Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

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?

share|improve this question
    
@Matt, what is wrong with my post? – theateist Sep 1 '13 at 23:06

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.

share|improve this answer
    
what quality means? Does it improve the quality by increasing the bitrate using high quantization? – theateist Sep 2 '13 at 8:25
    
Updated my answer, but i think you have to read a bit more about compression theory to understand what quantization/inverse quantization is and how it is used in compression. – alexbuisson Sep 2 '13 at 9:18
    
how come that low quantization level means higher bitrate and quality? If I'll quantize it with 2 bits(meaning 4 levels) or 4 bits(16 levels) so quantizating with 4 bits will give me signal more similar to original than quantizating with 2 bits, doesn't it? – theateist Sep 2 '13 at 11:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.