What is the maximum frame rate that the MATLAB video file reade can support?

44 views (last 30 days)
I am using the video file reader with a video file that I know is 60 fps but when I extract the info from the video file reader it says that its coming out as 30 fps, does anyone know where the loss is coming from? thanks!
  2 Comments
Dinesh Iyer
Dinesh Iyer on 14 Aug 2015
Edited: Dinesh Iyer on 14 Aug 2015
When you say the video is coming out as 30 fps, do you mean that the FrameRate property of the VideoReader object is 30?
If you are on Windows, can you inspect the file using Windows Explorer i.e. Right-click > Properties > Details and confirm that the file is indeed 60 frames/sec?
What kind of file are you reading and which platform are you on?
To answer your question, there is no upper limit on the frame-rate that MATLAB can read in.
Dinesh

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 14 Aug 2015
AVI files have a header with a field dwMicroSecPerFrame which is a 32 bit unsigned integer that gives the overall period between frames in microseconds (10^(-6)) seconds. This suggests that AVI files were not intended to support more than a million frames per second.
AVI files also have an overall header and an individual stream header with two 32 bit unsigned integers, dwScale and dwRate, where the frames per second is given as dwRate / dwScale . As dwScale could in theory be 1 and dwRate could in theory be 2^32-1 then the maximum frame rate for AVI files is (2^32 - 1) frames per second.
With the VideoReader class, positioning at a frame is done by a double precision number which is a time in seconds. With Denormalized Numbers this would allow us to have a non-zero frame number at 4.9407e-324 seconds. Therefore we could have a frame rate of about 2*10^323 frames per second... but only for about 10^16 frames.
The piece of information you are missing: the libraries just read the next frame in sequence. Every frame. Every frame can be read from a video file. Displaying the frames at the requested rate is an entirely different matter.
  2 Comments
Maryam Na
Maryam Na on 11 Sep 2015
Hi Dinesh,
I have the same problem. I know the frame rate of the video file and is much higher than 30 fps. But everytime I use:
mov = VideoReader('myfile.avi')
mov.framerate
It provides 30 fps, which is not right. How can I find the frame rate of my data then?
Thanks!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!