View Single Post
Old 23rd April 2021, 13:38   #3  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
The frame rate can be calculated from the number of samples and the duration:

Code:
u_int32_t mp4_numSamples = MP4GetTrackNumberOfSamples(mp4File, trackId);
MP4Duration duration = MP4GetTrackDuration(mp4File, trackId);
double msDuration = (double)(MP4ConvertFromTrackDuration(mp4File, trackId, duration, MP4_MSECS_TIME_SCALE));
double mp4_Frame_Rate = mp4_numSamples * 1000LL / msDuration;
It may also be specified in the video ES.

Last edited by videoh; 23rd April 2021 at 22:07.
videoh is offline   Reply With Quote