Hi guys,

Just need someone to confirm if below code can always get correct frame
rate from all formats:

AVStream *st = pFormatCtx->streams[your_video_index];
double frame_rate = st->r_frame_rate.num / (double)st->r_frame_rate.den;


in case of MPEG-2 and H.264 decoders are used where
pFormatCtx->streams[your_video_index]->codec->ticks_per_frame = 2,

above calculated framerate is actually field rate and actual framerate
is only half of it.


Thanks
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to