[FFmpeg-user] Why Does ffprobe Report an Incorrect Number of Frames?

John G skeeve99 at yahoo.com.au
Tue May 6 00:30:14 CEST 2014


Hi, all...

First-up, although I've been using the FFmpeg suite of utilities for a while, I've only ever used them in a fairly limited way, so please excuse me if some of my questions are a bit basic... I *have* looked through the old mailing list archives, the wiki and generally elsewhere but couldn't find a definitive answer on my questions.. hence, I've bitten the bullet and have come to  the THE LIST for advice(!)

I have a small video file which ffprobe describes as:-

    Input #0, avi, from 'sample.avi': 
    Metadata: 
    encoder : Lavf55.12.100 
    Duration: 00:00:35.00, start: 0.000000, bitrate: 546 kb/s 
    Stream #0:0: Video: msmpeg4v3 (MP43 / 0x3334504D), yuv420p, 320x240, 
                 506 kb/s, 200 fps, 200 tbr, 200 tbn, 200 tbc 

As the video is 35 sec. long, and with a 200 fps frame rate, I expect there would be (35 x 200) = 7000 frames in the video.

If I use ffmpeg to actually extract frame images from the video, I actually get 6999 images (near enough, I suppose). The command I use for this is:-

    c:\> ffmpeg -i sample.avi  -f image2 -c:v png Img%%04d.png

Note: the '%%' is required when the command is run from the WinXP CLI.


However, using the command:-

    c:\> ffprobe -select_streams v -show_frames sample.avi > frames.lis 


and counting how many [FRAME] items are in frames.lis gives a frame count of 1023 frames and not 7000.


Any explanation?

Here's a link to a very similar file that behaves in the same way (~7MB):-

    http://www.filedropper.com/sample_5

Left-click on the "Download This File" image on the page... and I'm not sure how long this file will stay available.. Hmm..


I'm using 17APR2014 static Win32 build of ffmpeg 'ffprobe' under WinXP-SP3.

If there's another way to do it, I'm primarily trying to build a table of "frame number" versus "time" for a series of video files for use in another application.

Thanks.


More information about the ffmpeg-user mailing list