[FFmpeg-user] ffprobe -show_frames and coded_picture_number
Paul B Mahol
onemda at gmail.com
Sat Aug 10 14:48:08 CEST 2013
On 8/9/13, Richard H Lee <ricardohenrylee at gmail.com> wrote:
> I use ffprobe -show_frames to find out the exact frame rate of videos
> that stray away from 24000/1001 fps before conversion to 25 fps so that
> I can get accurate a/v sync when I speed up the audio.
>
> I basically use pkt_pts_time / coded_picture_number of the very last
> frame for the overall frame rate.
>
> The problem is that on large files, it can take quite a while to dump
> all the frame data.
Mainly because you need to decode whole file (at least currently).
>
> Is it possible to just dump the last few frames / seconds of the file?
Yes, by seeking to such location.
> Or would this affect coded_picture_number? (I'm not sure if
> coded_picture_number is counted by keeping track of frames/packets or is
> stored within the packet itself.)
It looks like coded_picture_number is increased by one when decoding
(and only for few codecs).
So its not stored in bitstream, and skiping decoding would change it.
You can try this anyway and report outcome.
More information about the ffmpeg-user
mailing list