Number of Video Frames doesn't Match Actual Computations
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a 25fps video that I'd like to do some further processing using MATLAB. The video was 5.03seconds long. Now, using the following codes:
video = VideoReader(video01);
video.NumberOfFrames
and a loop counter, with fcounter initialised to 1,
while hasFrame(video)
fcounter = fcounter + 1;
end
Both returned a total number of frames of 128. However, if we do the calculations, given an fps of 25 and total video time of 5.03sec, shouldn't it return a total number of frames equal to (25)(5.03) = 125.75 = 125? 128 number of frames and a 25fps would mean a video length of 5.12secs, which doesn't add up/match. Is there something wrong with my calculations? Or does MATLAB append or do some overlaps on the frames internally? I'm using MATLAB R2016b.
Thank you!
2 comentarios
Walter Roberson
el 19 de Abr. de 2018
But is it 25 fps? A lot of videos these days are variable frame rate.
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!