Treper
Treper

Reputation: 3653

How to get number of I/P/B frames of a video file?

I want to extract information of a video file to get the count of its I/P/B frames. How to do it in ffmpeg? Or should I programming using libavformat and libavcodec to do it? Many thanks!

Upvotes: 7

Views: 6601

Answers (1)

av501
av501

Reputation: 6729

On the command line use ffprobe -show_frames input_file. you can parse this input to get the frame type information.

You can also do ffprobe -show_frames inputfile | grep pict_type

The string to grep may vary depending on version of ffprobe you have.

Upvotes: 13

Related Questions