Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
10th February 2021, 23:41 | #1 | Link |
Registered User
Join Date: Jul 2020
Posts: 76
|
Minimum and maximum QP with 2 pass ABR
Ok, let me try to explain my intentions with this.
The benefit of CRF is that no matter what video you encode, the same level of quality will come out the other end (assuming equal quality sources). The downside is that the file size is entirely unpredictable. The benefit of ABR is that the file size is predictable, but the quality isnt. Easily compressible content will come out bloated, and difficult to compress content will come out degraded. My thought with this is to use the minimum and maximum QP settings to allow easily compressed content to compress more than the set bitrate would typically allow, and it would allow hard to compress content to be higher in bitrate, with all the regular stuff coming out where i want it. This way, my thinking is this will have everything come out at the same bitrate, EG 7mbits, but will allow the extreme outliers a bit of leaway. The easy stuff will be, say 5 mbits, and the harder stuff will be maybe 10. Have i got this right? Will it just shift the average up or down if i do this? Or am i missing something? |
11th February 2021, 01:45 | #2 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,429
|
No, it will not just shift the average up or down. All that does is clip the value if the encoder wants to go above or below the QP limits.
It would limit how far above or below the average could go but to have any effect with real content it would need to be set too restrictive. You would get a lot of blocks that looked terrible (difficult to compress) while also allocating extra bits to blocks that don't need it (easily compressed). The encoder will also use much lower QPs for blocks that get referenced a lot and much higher QPs for non-reference B-frames. These QP values will be much lower and higher than the average, so to have clipping the min/max QP significantly affect the file size you need to set them very restrictive which then destroys most of the benefit of the rate control. It moves you toward a constant QP rate control, i.e. less quality for larger file sizes. If you want a specific size use two pass. If not use CRF. That the file size is entirely unpredictable with crf is a feature, you don't want to waste bits or have any videos look terrible do you? Edit: An example for why raising the minimum QP just a bit does not really change the average QP. The few I frames that would have used that lower QP now get forced to use a higher one. This means future blocks that use that frame as a reference will have more significant difference blocks, requiring a lower QP for the same quality in all those blocks. This value will not get clipped because it is still much higher than the QP the I frame would have used. This can reduce the final quality with no change in the final size (or the final size could be slightly smaller or even increase, it depends on the source, but it will always be lower quality per bit).
__________________
madVR options explained Last edited by Asmodian; 11th February 2021 at 01:57. |
11th February 2021, 09:46 | #3 | Link | |
Registered User
Join Date: Jul 2020
Posts: 76
|
Quote:
|
|
11th February 2021, 12:25 | #4 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,429
|
It is not a bad idea at the start.
It just doesn't work well with the way QPs are used by modern encoders.
__________________
madVR options explained |
12th February 2021, 18:33 | #5 | Link | |
Registered User
Join Date: Jul 2020
Posts: 76
|
Quote:
Or, whatever crf+preset is most similar to x264 high profile crf 18 veryslow in terms of quality. Last edited by YaBoyShredderson; 12th February 2021 at 18:44. Reason: Additional information. |
|
12th February 2021, 20:04 | #6 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,893
|
Quote:
|
|
13th February 2021, 15:10 | #7 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 342
|
Quote:
Eitherway... If we assume that you are going to re-encode 1080p SDR blurays, then some ballpark answer would be that preset slow, crf 18-19, no-sao would be rather close to crf 18 veryslow @ maybe a 25% size reduction and would be in the 5-7Mbps range. And yes, the behavior in x265 is that the slower the preset, the higher the bitrate @ the same crf level. As CRF can only be used as a constant quality metrical @ the same settings, you should always do your tests when trying to find out settings and quality with 2pass (if you are going to compare different encoders and or settings), when you find the settings and bitrate you are happy with tune in an crf value that ends up in the same bitrate level as your 2pass tests. Last edited by excellentswordfight; 13th February 2021 at 16:03. |
|
Tags |
2 pass, abr, crf, hevc, quantisation parameter |
Thread Tools | Search this Thread |
Display Modes | |
|
|