readFrame error Matlab R2016a Mac OSX 10.11.1
2 次查看(过去 30 天)
显示 更早的评论
Trying to convert a video to images. So far getting errors with 2 very simple lines of code--wondering if this is an issue of running on Mac. I converted the original .avi file to .m4v.
OBJ = VideoReader('SampleVidB1.m4v');
video = readFrame(OBJ);
The error:
Error using VideoReader/hasFrame (line 46)
Could not read file due to an unexpected error. Reason: Cannot Open
Error in VideoReader/readFrame (line 104)
if ~hasFrame(obj)
Additionally, I have seen mmread used in this application. Is it best to just download that from the file exchange and proceed? Thanks!
2 个评论
回答(1 个)
MJU
2016-6-23
1 个评论
liomsi liomsi
2022-1-6
My video codec is MPEG-4 and I still get this error.
I started to get this issue once I used video with a frame rate of 32 Hz (it is OK with other videos of frame rate 34 Hz).
Matlab version: 2017a.
另请参阅
类别
在 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!