[FFmpeg-user] How do I determine quantization of an mp4 file?

Tobias Rapp t.rapp at noa-archive.com
Fri Apr 30 10:48:48 EEST 2021


On 29.04.2021 16:47, David Niklas wrote:
> [...]
> 
> But when I try to come up with a useful value from that data I get a very
> large value. Much higher than the typical 24-60 or so for quantization
> that I see in files I encode.
> 
> Have I gotten the formula correct?
> 
> Size WxH  BPP FPS    Duration       Bitrate
> (1920*1080*12*29.97*((22*60)+09.2))/1074000

Likely I was confused about the meaning of the term "quantization" here. 
Maybe you mean the ratio between compressed and uncompressed video 
stream? If "Bitrate" stands for the data rate of the MP4 video stream 
(excluding audio and container) in bits per second, the formula for the 
compression ratio in percent should look like:

Bitrate * 100 / (Frame Width * Height * BitsPerPixel * FrameRate)

Where a value of 100% means no compression and a value of 20% means that 
the output stream size takes one fifth of the input stream size. In your 
scenario the compression ratio is around 14%.

Regards,
Tobias



More information about the ffmpeg-user mailing list