Log in

View Full Version : My best 264 config for quality vs bitrate


COCOViper
21st March 2021, 02:32
I've been doing some 4x upscales (VEAI) on various 90s DVDs and have settled on this as my ultimate re-encode config for the 4x masters post upscaling. It's slow to encode (happy to wait for quality) but I'd love to hear anyone's perspective on what (if anything) could make it better without more bitrate:

--crf 22 --preset veryslow --tune film --output-depth 10 --partitions p8x8 --no-fast-pskip --threads 4 --lookahead-threads 8 --deblock -2:-2
AVC Encoder x264 core 161 r3048+25 be33c5d [Mod by Patman]
profile: High 10, level: 6.0, subsampling: 4:2:0, bit-depth: 10-bit
cabac=1 ref=16 deblock=1:-2:-2 analyse=0x3:0x10 me=umh subme=10 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=-3 threads=4 lookahead_threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00

I really tried to find an x265 config that could match or exceed it but every time 265 always looked worse for the same amount of bitrate. To say nothing of the fact that while this config encodes at around 1.3 fps on my 9900KS, the high quality settings on x265 consistently made it 0.3 to 0.6fps. I legitimately wonder if 265 ever produces better SNR for a given bitrate over 264 10-bit for high quality video.

NVENC at any setting continues to be worthless unless x264/x265 cpu fast quality is acceptable; I love having it as a tool for DVD/Bluray extras, but I wouldnt touch premium content with it.

It's also been some time since I've tried QSV (Intel); I've sort of assumed if I couldn't make NVENC acceptable that QSV would be in a similar state, think its worth giving it a shot?

If anyone has any other codecs and settings worth comparing this config against, I'm all ears. I essentially have no knowledge of AV1/VP9 but maybe I'm missing out?

benwaggoner
22nd March 2021, 18:29
I've been doing some 4x upscales (VEAI) on various 90s DVDs and have settled on this as my ultimate re-encode config for the 4x masters post upscaling. It's slow to encode (happy to wait for quality) but I'd love to hear anyone's perspective on what (if anything) could make it better without more bitrate:

--crf 22 --preset veryslow --tune film --output-depth 10 --partitions p8x8 --no-fast-pskip --threads 4 --lookahead-threads 8 --deblock -2:-2
AVC Encoder x264 core 161 r3048+25 be33c5d [Mod by Patman]
profile: High 10, level: 6.0, subsampling: 4:2:0, bit-depth: 10-bit
cabac=1 ref=16 deblock=1:-2:-2 analyse=0x3:0x10 me=umh subme=10 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=-3 threads=4 lookahead_threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00

I really tried to find an x265 config that could match or exceed it but every time 265 always looked worse for the same amount of bitrate. To say nothing of the fact that while this config encodes at around 1.3 fps on my 9900KS, the high quality settings on x265 consistently made it 0.3 to 0.6fps. I legitimately wonder if 265 ever produces better SNR for a given bitrate over 264 10-bit for high quality video.

NVENC at any setting continues to be worthless unless x264/x265 cpu fast quality is acceptable; I love having it as a tool for DVD/Bluray extras, but I wouldnt touch premium content with it.

It's also been some time since I've tried QSV (Intel); I've sort of assumed if I couldn't make NVENC acceptable that QSV would be in a similar state, think its worth giving it a shot?

If anyone has any other codecs and settings worth comparing this config against, I'm all ears. I essentially have no knowledge of AV1/VP9 but maybe I'm missing out?
x265 can absolutely outperform x264 in terms of "bitrate required for acceptable quality level." Grainy content is the biggest challenge, where x265 using --tune grain can generally do well but with pretty small savings. Although I wouldn't think that grain would be a problem with upscaling, unless you're adding some in. Anime, line art, and text x265 can look great with well below 50% the bitrate of x265, as intraframe prediction and the deringing tools can be a huge help. x265 can make scrolling credits at the end of a movie look pretty darn great at --crf 45.

So, what kind of content are you talking about here?

The gap is also smaller if comparing at the same encoding fps, particularly on a system without >12 logical cores. x265's --preset slower is where most of the advanced x265 tools are available. x265 can scale up to using a whole lot more cores than x264, particularly at HD and UHD frame sizes.