Hi All,

I am trying to read frame rate information from a *.mp4 file. The file has
mp4v and mp4a contents.
The AVStream structure has following details,

AVFormatContext->streams[Video]->r_frame_rate.num = 60000
AVFormatContext->streams[Video]->r_frame_rate.den = 1001

AVFormatContext->streams[Video]->time_base.num = 50
AVFormatContext->streams[Video]->time_base.den = 999

Normally I refer the "r_frame_rate" variable in AVStream structure to get
the frame rate information.
So the frame rate = (r_frame_rate.num/r_frame_rate.den) = 59.94

But actually the correct from rate is 19.98.
If the above method is wrong, Please tell me the right way to calculate the
frame rate.

If I refer the time base details, I get the correct frame rate info, which
is (999/50) = 19.98.

What is the correct approach to calculate the frame rate. Is the frame rate
calculation method different for *.avi and *.mp4 files?.

Thanks in advance,
Srinivasan.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to