[FFmpeg-user] Can ffmpeg calculate the min and max bitrate of a video?

smu johnson smujohnson at gmail.com
Wed May 4 06:11:44 EEST 2022


Hi,

ffprobe / ffmpeg can show a video's avg. bitrate easily enough but I would
like the option for ffmpeg to scan an entire video file (if need be, I
don't think this info is stored anywhere) to find out the lowest (min)
bitrate of a video stream as well as the highest (max) bitrate it uses and
print them.

Ideally it would be nice if x264 / Handbrake's logs showed you these values
when encoding, but unfortunately they do not.  My goal is that I'd like to
know if I'm setting the right "L" encoding level or if it can be lower /
higher.  (e.g., 3.0 or 3.1 for DVDs).  I realize the profile can probably
change this but sometimes the "Auto" Encoder Level in Handbrake is all over
the place instead of consistently say, L3.0 for all NTSC DVDs.

This has been asked on Stack Exchange before by someone else here:
https://video.stackexchange.com/questions/21661/is-there-any-ffmpeg-command-for-knowing-max-bit-rate-of-a-video
.  The only problem is people are suggesting running scripts and other
hacks in order to do this instead of ffmpeg being able to just do it itself.

I'm on Windows 11 so I don't know how easy it would be to run these scripts
others wrote and I'd rather get an official answer from ffmpeg instead of
some script that might not even work properly or give me accurate
information.

Any help is greatly appreciated.  Thank you.

-- 
smu johnson <smujohnson at gmail.com>


More information about the ffmpeg-user mailing list