Agony with video formats on Windows Matlab installation

3 次查看(过去 30 天)
Essentially, I'm trying to get mmreader to load .mov files. And doing so using mencoder to convert them into a format Matlab will load. In the past, I've had some success with calling mencoder using the 'system' command. Although that was for a different task, I was taking hour-long movies, too large to load into memory in one go, and sawing them into 20-second chunks for processing.
I have other movie files that do load quite happily with mmreader (.avi using MJEPG) but even when I convert my target movies to that codec and that container, mmreader still fails with a " ??? Initialization failed. (No combination of intermediate filters could be found to make the connection.)" Infuriatingly, mmfileinfo works on many occasions when mmreader doesn't.
The fault may not be Matlab's - I could be just misunderstanding and screwing up mencoder's fairly horrific syntax and not producing what I intended to. Does anybody have any insights in using ffmpeg or mencoder for movie conversion with Matlab? (A set of command line options known to produce good movies would be awesome!)
I can't believe my only option is to use mencoder to convert the movies into a few thousand jpegs, then load and process them individually.

采纳的回答

Dinesh Iyer
Dinesh Iyer 2015-10-13
The error message you are receiving is a DirectShow error message which means that there is no codec available to read the file. Looking at DirectShow's supported formats page here, it appears that it does not support MOV files.
I think you are probably running a very old version of MATLAB. Starting around R2012a, mmreader (renamed to VideoReader) uses Media Foundation API's to read videos and it supports reading of MOV files directly into MATLAB.
If a file fails with mmreader, test if the file can be played using Windows Media Player. If it fails with Media Player, then you can install codecs such as ffdshow or K-lite codec pack and then give it a shot.
Bottom line: mmreader / VideoReader support MOV files that can be played back using Media Player.
Dinesh

更多回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by