NumberOfFrames using VideoReader function matlab 2016a
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
The object created using VideoReader function in matlab does not show the NumberOfFrames.
Referring to https://de.mathworks.com/matlabcentral/answers/250033-number-of-frames-in-video-file-with-matlab-2015b
This could be because of the variable frame rate.
The Number of frames can be estimated:
vidObj = VideoReader('myfile.MOV');
numFrames = ceil(vidObj.FrameRate*vidObj.Duration);
In My algorithm I needed to pick a particular frame, so I decded to export all frames as picture using:
vidObj = VideoReader('myfile.MOV');
numFrames = 0;
while hasFrame(vidObj)
readFrame(vidObj);
numFrames = numFrames + 1;
end
But after 14000 frame has been exported I encountered the following error:

What could be possible reason for this error? or skip this particular frame
How could this be fixed??
Thank you very much for your suggestions and help in advance.
2 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!