The CQP parameter in HEVC libx265 encoding does not seem to work

  • Hello,

    Firstly let me say thanks for having developed this plugin. It is great to be able to use these codecs from within Adobe Premiere and therefore achieve better output files. This plugin is very encouraging.

    Nothing is perfect though, so I found a bug - I think :

    It seems that the "Constant Quantizer" setting does not work in HEVC mode.

    I observe this problem while compressing videos with the "libx265" codec, using the "Constant Quantizer (CQP)" strategy. I tried to compress exactly the same video with various values around 20, such as 10, 16, 18, 20, 22 : to my surprise I end up with output files of pretty much the same size. I would expect a large change of size between 22 and 10 for example. I tried this with a couple of input videos (one just 30 seconds and the other one around 10 minutes) and come to the same conclusion.
    I attach a log file corresponding to a voukoder session whereby I did part of this testing.

    Thanks in advance for looking into this

  • ppravier

    Changed the title of the thread from “The CQP parameter with HEVC encoding does not seem to work” to “The CQP parameter in HEVC libx265 encoding does not seem to work”.
  • Vouk

    Added the Label In Progress
  • Vouk

    Set the Label from In Progress to Fixed
  • Hi,

    You know what.. I think you're right (given your expertise this is likely... :-) ).

    Until a few minutes I thought that CQP stood for "Constant Quality" , which is what I like to use because it should give me a constant quality for my videos based on this principle:

    Considering the same video resolution and length to start with:

    - If my material is very complicated (lots of motion, complicated and changing pictures, etc...) this will result in a bigger file .

    - If my material is simpler (not much motion, simpler images) this will result in a smaller file.

    In both cases the output video will look subjectively of the same quality ... At least that was my assumption of the CQP parameter..

    I picked CQP because I thought this was the same than CQ which I am familiar with on other encoders..

    But it turns out that I am wrong. According to this page - - I need to use CRF instead because it should matche my expectation more than CQP.

    I was interpreting the denomination of CQP - "Constant Rate Factor" - too naïvely, thinking that it was just something trying to set the output bitrate as xx times less than the input bitrate (i.e. setting it to 10 would tell the codec to output with a bitrate 10 times smaller than the input raw bitrate ), which did not sound very good too me.

    Reading the article above it seems that CQP is a more rigid form of CRF - to put it simply - which indeed looks a bit wasteful.

    Having said that the article indicates that CQP is useful for specialised situations so I am glad that I found the bug and that you corrected it :-)


  • Yes, that link is probably the best guide to h264 video encoding available. The sad thing is that NVENC h264 does not have CRF, so we have to use CQP instead.

    Stay up-to-date and follow me on Twitter. Tell me your feedback.

    Help to improve this plugin and support me on patreon. Thank you.