MATLAB Answers

Calculating The Number of frames

4 views (last 30 days)
Abdussalam Elhanashi
Abdussalam Elhanashi on 23 Jan 2020
Answered: KALYAN ACHARJYA on 23 Jan 2020
Hi guys
just asking
is this code accurate for calculating the number of frames for such video
vidObj = VideoReader('myfile.mp4');
numFrames = 0;
while hasFrame(vidObj)
readFrame(vidObj);
numFrames = numFrames + 1;
end

  0 Comments

Sign in to comment.

Sign in to answer this question.