[FFmpeg-user] ffprobe -show_frames and coded_picture_number

Richard H Lee ricardohenrylee at gmail.com
Sat Aug 10 01:06:44 CEST 2013


On 09/08/2013 19:48, thljcl wrote:
> The frame rate of your video source is 24000/1001 FPS. You want to convert it
> to 25 FPS and still make sure that the audio is in sync with the video? Is
> that what you want?

No, I don't have any problems with conversion and synchronization at 
24000/1001 fps. You can just speed up the audio by 1001/960 to get it to 
match 25 fps.

The problem is that many media is not exactly 24000/1001 fps . Thus to 
find the exact frame rate run ffprobe -show_frames on the file, and 
divide the coded_picture_number by the pkt_pts_time of the last frame.

The thing is that ffprobe -show_frames can take quite a while especially 
on a slower machine as it has to go through every frame.

This leads me to my question: it is possible to save time by getting the 
coded_picture_number and the pkt_pts_time fields of the last frame 
without having to run through all the other preceding frames?


More information about the ffmpeg-user mailing list