[FFmpeg-user] Can ffmpeg calculate the min and max bitrate of a video?
Peter van den Houten
petervdh at gmail.com
Wed May 4 11:30:49 EEST 2022
On 04/05/2022 05:11, smu johnson wrote:
> 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:
> . 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
> Any help is greatly appreciated. Thank you.
FFmpeg will not always report bitrate, depending on the container format. Mediainfo is available for Windows and will scan an entire file and you might be able to change the switches for min & max bitrate.
mediainfo --Parsespeed=1 filename
More information about the ffmpeg-user