R2011b pre-release now supports mpeg-4 and .mov in videoreader. http://www.mathworks.com/help/pdf_doc/matlab/relnotes_pr.pdf (see p. 13) I have not tested it yet (will probably wait for the final release), but this is good news!
Reading MP4 Video files with Matlab in Win7
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I plan to do image processing on frames from .mp4 (h264) video files, but it seems I cannot get matlab to read the video files first.
The VideoReader class help does not list .mp4 as a supported file type, but accepts "any format supported by Microsoft DirectShow". The Windows player on my machine does read my mp4s, but matlab does not. Updating my codecs with the k-lite codec pack does nothing better.
I searched for solutions before posting here :
- videoIO library http://www.mathworks.com/matlabcentral/newsreader/view_thread/252119 Unfortunately requires installation process that is beyond my knowledge (compilation, environment variables ...)
- video.MultimediaFileReader http://www.mathworks.com/matlabcentral/newsreader/view_thread/303186 This does not work either, although I have the Video Processing blockset installed.
I know I can transform my mp4 into AVI using VirtualDub or something, but doing the whole process inside Matlab would save hours of work as I have many videos to analyse.
Thank you if anyone can help.
Emmanuel.
0 个评论
采纳的回答
更多回答(7 个)
Joseph
2011-5-25
I am having the same issue as you. I downloaded the videoIO toolbox with the precompiled binaries for Windows XP, however it does not read in my mp4 video files. I don't think it is a missing codec, as WMP plays the file just fine.
There is apparently VideoReader in Matlab 2010b and newer; however I am running R2009a and only have access to R2010a at the moment. Looking into getting R2010b or newer. Wish there was an easier solution. Did you ever figure out your problem? I see your post is approximately 3 months old.
0 个评论
Harsha Vardhan Rao Avunoori
2011-5-26
In the earlier versions of MATLAB with mmreader you can read a video file and this function supports most of the video formats.If you have the latest version of MATLAB then you should try using VideoReader()
For more information refer to the below link
http://www.mathworks.com/help/techdoc/ref/videoreaderclass.html
Let me know if it works for you :)
-Harsha
0 个评论
timmdd pan
2016-4-19
This works http://www.mathworks.com/help/matlab/ref/videoreader.html but I found this:http://www.mathworks.com/help/pdf_doc/matlab/relnotes_pr.pdf not available by now? may try to let mp4 to mkv or something?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!