Extract video frames display time and frame number

4

I would like to extract each frame and its display time. The purpose will be to later compare the output between two videos (reference/original video and the transmitted video) and see what frames are missing. I plan on using Big Buck Bunny (http://download.blender.org/peach/bigbuckbunny_movies/) as my sample video.

FFMPEG seems to be the tool to use for this, but I haven't found the correct combination of options to use for my use case.

I am expecting my output to resemble something like:

    frame = 1, time = 0
    frame = 2, time = 2
    frame = 3, time = 3
    ...
    frame 14315, time = 596

I am hoping that the degraded video would show signs of degradation via its output with frames missing and time out of sync.

user1991772

Posted 2014-03-14T01:56:22.637

Reputation: 41

When you say extract, do you mean to save the frame as an image? – stib – 2014-03-14T04:58:17.680

Answers

4

Try filter showinfo. Seems like it's what you need. Example:

ffmpeg -i 1.ts -vf "showinfo" -f null /dev/null

ptQa

Posted 2014-03-14T01:56:22.637

Reputation: 1 599

0

Why not probing the video? ffprobe is a great tool for this, bundled along with ffmpeg.

ffprobe -select_streams v:0 FILE_PATH -show_frames

Константин Ван

Posted 2014-03-14T01:56:22.637

Reputation: 125