Why low qmax value improve video quality?

2019-02-11 10:58发布

Maybe my questions doesn't make sense due to not understanding but please explain me what I miss because I did read posts and wiki and still it's not clear to me.

As I understand setting low value for qmax will improve the quality by increasing the bitrate. Maybe I didn't understood something but isn't lowing the Q(quantization) will decrease the quantization levels and thus the bitrate which means degradation in quality? Or in ffmpeg lowing Q means increasing the quantization levels? If the last is true so it make sense that lower qmax improves the quality.

If the above is true, so increasing qmax will decrease the quantization levels which means less bits for coding a quantization level. So, if number of bits for a level is lower, so total bits per frame will be lower, so how the encoder manage to get to the desired bitrate?

1条回答
霸刀☆藐视天下
2楼-- · 2019-02-11 11:55

Your are right in your interpretation of the relation between quantization factor and bit-rate.

  • The lowest the quantization is, the higher the bit rate and quality will be.
  • The higher the quantization is, the lower the bit rate and quality will be.

But in any case, for a given quantizer, you can still ask for a target bit rate, and if so you have 2 cases:

  1. the bit-rate is lower than the target, and some padding is added.
  2. the bit-rate is higher than the target ans so the rate-control process will use a higher quantization level.

But with ffmpeg qmax may have different meaning as it's a codec dependent parameters. for x264 it should be a quantizer see here, But with some others codecs it doesn't represent a quantization level but a quality range.

qmax and qmin are the 'quality-ranges' in which you define to encode. Oposite from what most, atleast me, would expect is that higher the values the lower the quality.

  • qmin 50 an qmax 51 gives the lowest quality
  • qmin 0 -qmax 1 gives the highest quality

values of qmin lower than 16 and qmax 26 are visibly 'very good' lowering qmin below 16 costs extra space 'without adding visible' quality.

so if you increase the video quality the encoded output will be closer to the original, and that often require a higher bit-rate, but internally it often means that lower quantization level are use.

查看更多
登录 后发表回答