Why not load the frame from videoObj?

2 views (last 30 days)
medic911
medic911 on 7 Dec 2015
Edited: Walter Roberson on 8 Dec 2015
videoObjref = VideoReader('Barrier.avi');
videoObj = VideoReader('output4.avi'); %video encoding using ffmpeg (h.264)
numFramesref = videoObjref.NumberOfFrames;
numFrames = videoObj.NumberOfFrames;
numFramesref=400
numFrames=400
vot=read(videoObj,inf);
figure()
imshow(vot)
this code is ok
vot=read(videoObjref,inf);
figure()
imshow(vot)
This code gives an error:
Error using VideoReader/read (line 86)
The frame index requested is beyond the end of the file.
Why not load the frame from videoObj?
The code used in ffmpeg: ffmpeg -i Barrier.avi -c:v libx264 -b:v 2M output4.avi

Answers (0)

Community Treasure Hunt

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

Start Hunting!