How can I create a graphic representation of frames in an encoded video?

0

1

ffprobe is great but I couldn't get it to show a 1-liner info of each frame, let alone a graphic representation. Is there some software that can either take the json output of ffprobe and show it graphically or analyze a h.264 stream and show it graphically? I'm looking at types of frames, sizes etc...

And preferably I'm looking for a tool for Mac.

Mandy Weiss

Posted 2017-02-06T19:55:56.350

Reputation: 1

What all info do you need from a frame? – Gyan – 2017-02-07T05:37:23.453

type of frame and size – Mandy Weiss – 2017-02-07T09:01:10.910

1

This may also be interesting: https://trac.ffmpeg.org/wiki/Debug/MacroblocksAndMotionVectors

– slhck – 2017-02-07T14:50:34.217

Answers

1

You can certainly get a 1-line readout per frame from ffprobe. Use

ffprobe -v 16 -show_entries frame=pict_type,pkt_size,pkt_pts_time -select_streams v -of csv=p=0 in.mp4

This will generate an output like this

1.600000,55307,I
1.640000,5610,B
1.680000,19691,B
1.720000,24077,B
1.760000,39859,P
1.800000,24254,B
1.840000,31068,B
1.880000,29013,B
1.920000,43124,P
1.960000,35221,B

This first entry is the timestamp, then the packet size for the frame and the type. You can use Excel or any similar tool to generate a graph.

Gyan

Posted 2017-02-06T19:55:56.350

Reputation: 21 016