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.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th January 2020, 22:33   #1  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
UHD HDR - which bitrate for a high quality encode?

Hi

I have encoded about 10 UHD HDR titles so far. All of them were encoded at preset medium or slow and CRF of 17.

This mostly resulted in video bitrates of around 4000-8000.
When I encode the same title in 1080p SDR and CRF 17 or 18 the bitrate is pretty much the same.
To achieve a higher bitrate in UHD HD, lets say 15000+ I need to set CRF to 14 or lower.

Is anyone able to explain to why the UHD HDR title bitrate is the same although the resolution, and hence pixel information, is more than double? Does HDR has something to with this and what do you bitrates do you recommend for HDR UHD encodes?

thx
blublub is offline   Reply With Quote
Old 24th January 2020, 23:02   #2  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,337
My theory is that uhd movies are simply cleaner(denoised by default)
Atak_Snajpera is offline   Reply With Quote
Old 25th January 2020, 02:26   #3  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 534
care to post your encoding commandline ? please ?
(i'm interested in how you include HDR metadata)
hydra3333 is offline   Reply With Quote
Old 25th January 2020, 02:40   #4  |  Link
RanmaCanada
Registered User
 
Join Date: May 2009
Posts: 123
HDR seems to be extremely compressable, unlike SDR. I do not know the technical reason why.
RanmaCanada is offline   Reply With Quote
Old 25th January 2020, 07:56   #5  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Atak_Snajpera View Post
My theory is that uhd movies are simply cleaner(denoised by default)
Hi, yes they do look at bit cleaner for the most part. But I can't wrap my head around it why compression is like a third than that of a 1080p encode when correlated to the resolution.
blublub is offline   Reply With Quote
Old 25th January 2020, 07:59   #6  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by hydra3333 View Post
care to post your encoding commandline ? please ?
(i'm interested in how you include HDR metadata)
Hi

here is the output of my last encode with CRF 13. Bitrate was 12600.

Code:
cpuid=1111039 / frame-threads=2 / numa-pools=+ / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=5754 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=5 / no-allow-non-conformance / repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=6 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=23 / lookahead-slices=8 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=32 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=3 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-1:-1 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=13.0 / qcomp=0.80 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50) / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / hdr10 / hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0
blublub is offline   Reply With Quote
Old 25th January 2020, 10:36   #7  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,662
The thing is that x265 does not use a graded image to make the decisions, so it will just see a very flat image compared to SDR. It's very much normal to have to lower CRF by 4-5 units to get similar results than with SDR sources.
I also recommend testing aq-strength and aq-mode to find a correct value range to use. I tested things earlier and mode 1 worked much better for me than the default mode 2.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 25th January 2020, 11:34   #8  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Boulder View Post
The thing is that x265 does not use a graded image to make the decisions, so it will just see a very flat image compared to SDR. It's very much normal to have to lower CRF by 4-5 units to get similar results than with SDR sources.
I also recommend testing aq-strength and aq-mode to find a correct value range to use. I tested things earlier and mode 1 worked much better for me than the default mode 2.
Uh ok. I did not come across this recommendation or must have missed it.

What does aq-mode 1 do better than 2 with HDR, I was aware not to use mode 3.
blublub is offline   Reply With Quote
Old 25th January 2020, 12:38   #9  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,662
Quote:
Originally Posted by blublub View Post
What does aq-mode 1 do better than 2 with HDR, I was aware not to use mode 3.
I don't have any technical reason, that was just based on my tests. I posted some stuff here: https://forum.doom9.org/showthread.p...72#post1857472 . I've also seen similar results with SDR sources and aq-mode 2 so maybe it's just that my eyes don't like it.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 25th January 2020, 15:46   #10  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Boulder View Post
I don't have any technical reason, that was just based on my tests. I posted some stuff here: https://forum.doom9.org/showthread.p...72#post1857472 . I've also seen similar results with SDR sources and aq-mode 2 so maybe it's just that my eyes don't like it.
K, thx. I will take a look.
blublub is offline   Reply With Quote
Old 25th January 2020, 20:29   #11  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Boulder View Post
I don't have any technical reason, that was just based on my tests. I posted some stuff here: https://forum.doom9.org/showthread.p...72#post1857472 . I've also seen similar results with SDR sources and aq-mode 2 so maybe it's just that my eyes don't like it.
aq-mode=1 drastically increases the bitrate with my HDR encode - about 80% with all other settings remaining identical.

What do is an acceptable HDR UHD bitrate for you? 15.000 oder closer to 20.000?
Do you use mode 3 for SDR sources?

Last edited by blublub; 25th January 2020 at 20:33.
blublub is offline   Reply With Quote
Old 25th January 2020, 20:36   #12  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,337
Do not look at final bitrate. Look at actual quality of encoded footage. No need to waste space if you do not see the difference while watching.
Atak_Snajpera is offline   Reply With Quote
Old 25th January 2020, 21:31   #13  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,662
I now use aq-mode 1 at the default strength for SDR. And it's true that you have to find the acceptable level without looking at the bitrate. Every clip is different. Probably the flat image also causes the rise in bitrate with aq-mode 1, but it's very much possible that you can then raise CRF to compensate it. Or try lowering aq-strength slightly. In any case, adjust only one parameter at a time.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 25th January 2020, 23:42   #14  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Although this is true it also is incredibly time consuming and due to my job I really do not have much time for such tests - so I am generally looking for a setting which will provide a indistinguishable quality on a 65" TV which I can use for all movies.

For x264 SDR I always used CRF 17 or 18 and I never had any quality issues and it pretty much cut the file size in half compared to the original.

With x265 and SDR 1080p I also use CRF 17 and 18. Size is mostly about 20-30% smaller than x264 and quality wise the picture was also really good - I can't see a difference.

Just the UHD HDR gives me a headache. For me it is a contradictory that I can get indistinguishably quality a 9th or 10th of the original bitrate, just can't be.
So from that perspective a bitrate below 15.000 is unrealistic for a high quality encode.
blublub is offline   Reply With Quote
Old Yesterday, 00:50   #15  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,587
In my experience using a baseline of preset slow, you can get very good quality 2160p HDR at around 15 Mbps for most titles.

The hard part is that this does not apply to every scene. So, if you’re doing CRF or 2 pass VBR it’s probably fine to have a final average bitrate around 15, but we don’t have this luxury for adaptive streaming. I found that 20-25 Mbps average makes all but the most challenging scenes look great.

For full transparency you need a lot of bits. Grain is hard. This is why UHD BluRay exists and uses such high bitrates

Please take all of this with a big grain of salt. It depends heavily on your display, viewing distance, etc. AQ settings alone can drastically change things.

There’s room on the table for optimization for PQ since the code value distribution is so different from standard gamma. This is doubly so for Dolby Vision. The HDR optimizations in x265 are totally critical, since chroma issues are much more obvious in HDR (so we lower chroma QP)
Blue_MiSfit is offline   Reply With Quote
Old Yesterday, 09:59   #16  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Blue_MiSfit View Post
In my experience using a baseline of preset slow, you can get very good quality 2160p HDR at around 15 Mbps for most titles.

The hard part is that this does not apply to every scene. So, if youíre doing CRF or 2 pass VBR itís probably fine to have a final average bitrate around 15, but we donít have this luxury for adaptive streaming. I found that 20-25 Mbps average makes all but the most challenging scenes look great.

For full transparency you need a lot of bits. Grain is hard. This is why UHD BluRay exists and uses such high bitrates

Please take all of this with a big grain of salt. It depends heavily on your display, viewing distance, etc. AQ settings alone can drastically change things.

Thereís room on the table for optimization for PQ since the code value distribution is so different from standard gamma. This is doubly so for Dolby Vision. The HDR optimizations in x265 are totally critical, since chroma issues are much more obvious in HDR (so we lower chroma QP)
Hi

OK, so if 15Mbps is good for the majority of titles then I'll try to get between 15 and 20Mbps for the encodes and aiming a bit more for the 20.

Total transparency is not what I want since it means I cannot distinguish the encode from the original side by side. If I wanted that I wouldn't bother with encoding.
I just don't want any obvious artifacts and loss of detail.

What I haven't decided yet if I use ad-mode 1 or 2.
Mode 1 seems to need a lot more Bitrate and I am gonna do one or two more encodes of the same title with 1 and 2 for comparison.

As far as grain goes most titles in Uhd seem to have not that much grain and CRF of 13 or 14 seems to be about 20Mbps.
For titles with grain CRF if 16 seems to be in that area for a title with a little more grain
blublub is offline   Reply With Quote
Old Yesterday, 10:42   #17  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,662
CRF 15 with preset slower (+ --hdr-opt and possibly --no-sao or at least --selective-sao 2) will probably look very good in all cases. Then maybe just test the two aq-modes and see which one you like more, or if you can even tell a difference. I think it depends on the material if mode 1 or 2 produces a bigger file.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old Yesterday, 12:12   #18  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
OK. Thx
I already use "no-sao and no-stron-intrasmoothing" anyway.
I gotta check with the 2 aq modes tomorrow
blublub is offline   Reply With Quote
Old Yesterday, 12:25   #19  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,662
--no-strong-intra-smoothing is a bit scary parameter name, actually you want to enable it. It should provide better retention of details, there's some sample pictures here in this forum.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old Yesterday, 16:47   #20  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 100
Quote:
Originally Posted by Boulder View Post
--no-strong-intra-smoothing is a bit scary parameter name, actually you want to enable it. It should provide better retention of details, there's some sample pictures here in this forum.
Wow how things change. In 2017 and 2018 this was a recommendation to enable it.

I wish I could find some samples of aq-mode 1 VS 2 somewhere

Last edited by blublub; Yesterday at 17:53.
blublub is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.