Christian Recinos
Christian Recinos

Reputation: 127

Get bits per each second FFmpeg/Mediainfo

Is there any way to get how many bits per second are in any video?

ej:

ffmpeg/mediainfo -commands input.mkv

Result:

sec 1 - 500bits
sec 2 - 600bits
sec 3 - 300bits

Thanks!

Upvotes: 3

Views: 3926

Answers (2)

Rodrigo Polo
Rodrigo Polo

Reputation: 4784

To install on OS X, first install Xcode and Homebrew, then:

Python

brew install python3
pip3 install matplotlib
curl -OLJ https://raw.githubusercontent.com/zeroepoch/plotbitrate/master/plotbitrate.py
chmod +x plotbitrate.py
./plotbitrate.py -f svg -o out.svg input.mkv

Pearl

brew install cpanm gnuplot
sudo cpanm -v JSON
curl -OLJ https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/tools/plotframes
chmod +x plotframes
./plotframes.pl -i input.mkv -o output.svg -t svg

Upvotes: 4

aergistal
aergistal

Reputation: 31227

You can output frame information such as the packet size and time with ffprobe:

ffprobe -show_entries frame=pkt_size,pkt_pts_time <input>

You can then aggregate them as you like. For eg. the plotframes ffmpeg tool uses this information to generate a video frame size by type plot.

enter image description here

Upvotes: 5

Related Questions