Force MATLAB mmreader or avireader to use a different codec?

微笑、不失礼 提交于 2019-12-07 06:52:08

问题


How do I force MATLAB functions to use a different codec when I need to play an AVI file? I am using windows7 and I find that indeo5 codec is not working properly because of the OS. All code works fine on XP.

Thanks!


回答1:


If your question is about how to play an avi using a codec other than the one used to create it, you'll have to use some kind of image conversion software ( RAD video tools aka bink and smacker is popular and free ) to recompress the movie using the new codec. There may be some loss of video quality.

If your question is how to tell MATLAB to create an avi using a different codec, type help avifile to see the full documentation.

If your problem is that MATLAB is choking on a codec it says it supports and if you're using 64 bit MATLAB, I've had this problem. The short answer, unfortunately, is that there are no 64 bit codecs that work with MATLAB. There are two workarounds, and they both suck. One is to install 32 bit MATLAB and use that when you need to access an avi. The other is to use some kind of image conversion software to convert your avi to an image stack, then load that with MATLAB.

(EDIT: In newer versions of MATLAB, you can use the VideoWriter object to write MP4 and other compressed formats in 64 bit windows)



来源:https://stackoverflow.com/questions/4050949/force-matlab-mmreader-or-avireader-to-use-a-different-codec

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!