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 12th June 2020, 05:45   #7641  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by Greenhorn View Post
the comparatively enormous number of 64x64 blocks with rskip 2 to me, though-- from a total of 6.79% (normal + rect) to 65.33% (normal + rect)!
That puzzled me as well. Disabling early exits seems to favour bigger CUs in this case. Maybe it's something related to this test clip being HDR, so the image is quite flat compared to the graded result (edit: correctly displayed HDR) on the TV. Plenty of action, but plenty of plain white looking areas when I play the result back on my SDR display.

I checked a couple of frames where I found some onion artifacting -- happened to be next to edges -- and rskip 2 did fix them. So it's definitely helpful.

Quote:
Is there any way to get CU-type in a more readable format than setting csv-log-level=1 and viewing the generated file in an Excel/CSV viewer? Would greatly help with some comparison's I've been doing for myself.
I'm afraid not. That is something I'd like to see as well, averages like I put there and also information regarding refs. All those you can see with x264 so I don't know why the statistics were not considered for x265. If I was a coder, I would definitely submit a patch for it.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 12th June 2020 at 08:52.
Boulder is offline   Reply With Quote
Old 12th June 2020, 14:11   #7642  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 90
Thanks for all the suggestions guys!
I will try them out as soon as I can.

Quote:
Originally Posted by Boulder View Post
I've never understood why max-merge gets increased in the slower and supposedly higher quality profiles. I always have it at '2'.
Funny you should mention this, as i always wondered why I seem to get less of these 'artifacts' when encoding at lower presets. Will have a look at max-merge.

Quote:
Originally Posted by Boulder View Post
I checked a couple of frames where I found some onion artifacting -- happened to be next to edges -- and rskip 2 did fix them. So it's definitely helpful.
Will try this too.

Last edited by K.i.N.G; 12th June 2020 at 14:57.
K.i.N.G is offline   Reply With Quote
Old 12th June 2020, 15:26   #7643  |  Link
vpupkind
Registered User
 
Join Date: Jul 2007
Posts: 60
Quote:
Originally Posted by Greenhorn View Post
the comparatively enormous number of 64x64 blocks with rskip 2 to me, though-- from a total of 6.79% (normal + rect) to 65.33% (normal + rect)!
Do you see the difference in file size or average quantizer as well?
vpupkind is offline   Reply With Quote
Old 12th June 2020, 16:33   #7644  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by vpupkind View Post
Do you see the difference in file size or average quantizer as well?
Or visually?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 12th June 2020, 20:25   #7645  |  Link
Greenhorn
Registered User
 
Join Date: Apr 2018
Posts: 61
I just meant to say it surprised me, but forgot a word. For most of the stuff I've tried it one (just my personal collection, nothing terribly interesting) rskip 2 produces slightly larger but very similar looking encodes, so realizing that it was making such different files on a basic level was a jolt.

IDK how it behaves when you have studio-grade clean/detailed sources, but for me rskip mode 2 needs an annoying amount of tuning, because with the default edge threshold some clips are a little better than with mode 2, while others just fall apart entirely.
Greenhorn is offline   Reply With Quote
Old 12th June 2020, 22:08   #7646  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Greenhorn View Post
I just meant to say it surprised me, but forgot a word. For most of the stuff I've tried it one (just my personal collection, nothing terribly interesting) rskip 2 produces slightly larger but very similar looking encodes, so realizing that it was making such different files on a basic level was a jolt.

IDK how it behaves when you have studio-grade clean/detailed sources, but for me rskip mode 2 needs an annoying amount of tuning, because with the default edge threshold some clips are a little better than with mode 2, while others just fall apart entirely.
You can try with the source from my encoding challenge: https://forum.doom9.org/showthread.php?t=175776.

It'd be good to try with some files that used to have artifacts with rskip and see if and how they are improved with --rskip 2.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 16th June 2020, 11:56   #7647  |  Link
charliebaby
Registered User
 
charliebaby's Avatar
 
Join Date: Jun 2020
Posts: 37
Patman Thank you the Build x265 :-)
__________________
charliebaby is offline   Reply With Quote
Old 17th June 2020, 20:11   #7648  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Do following x265 crf values still make sense?

--crf 10 Super High
--crf 12 Very High
--crf 14 Higher
--crf 16 High
--crf 18 Medium
--crf 20 Low
--crf 22 Lower
--crf 24 Very Low
--crf 26 Super Low

I think the values were established many years ago when 4K was not popular.

There is a request to increase the value by 4:

--crf 14 Super High
--crf 16 Very High
--crf 18 Higher
--crf 20 High
--crf 22 Medium
--crf 24 Low
--crf 26 Lower
--crf 28 Very Low
--crf 30 Super Low

It would be identical to the x264 values then which also start at 14 and end at 30.

Change or not?
stax76 is offline   Reply With Quote
Old 17th June 2020, 20:39   #7649  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 90
Sorry for the late reply but our remote desktop software crashed and didn't have access to the servers...

After a quick test adding these parameters to the encode improved the quality in parts with motion "--rskip 2 --max-merge 2 --rd-refine" with about the same bitrate.
The artifacts are still there but far less (and much less perceptible when playing the video).
I'll see if i can experiment some more with the settings later, maybe it can be improved even more.

Thanks to everyone for the usefull input and suggestions!

Last edited by K.i.N.G; 17th June 2020 at 22:00.
K.i.N.G is offline   Reply With Quote
Old 17th June 2020, 20:47   #7650  |  Link
K.i.N.G
Registered User
 
Join Date: Aug 2009
Posts: 90
Quote:
Originally Posted by stax76 View Post
Do following x265 crf values still make sense?

--crf 10 Super High
--crf 12 Very High
--crf 14 Higher
--crf 16 High
--crf 18 Medium
--crf 20 Low
--crf 22 Lower
--crf 24 Very Low
--crf 26 Super Low

I think the values were established many years ago when 4K was not popular.

There is a request to increase the value by 4:

--crf 14 Super High
--crf 16 Very High
--crf 18 Higher
--crf 20 High
--crf 22 Medium
--crf 24 Low
--crf 26 Lower
--crf 28 Very Low
--crf 30 Super Low

It would be identical to the x264 values then which also start at 14 and end at 30.

Change or not?
I wouldn't change them. Its just going to add more confusion than it will fix when using presets with different versions.
And then there's the fact it also depends on the type of source. HDR needing a lower CRF than SDR etc.

I dont think 'normalizing' the CRF with x264 is that important if it is even possible... since result will always be different depending on the footage imho.
K.i.N.G is offline   Reply With Quote
Old 18th June 2020, 02:01   #7651  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Yeah. CRF fundamentally maps to QP, and while AVC and HEVC have similar QP scales, HEVC can do more with higher QP than AVC can. Any QP delta between x264 and x265 is going to vary based on profile and content. That said, I think the average CRF delta for the same subjective quality would be less than 4. That said, CRF 16 IS generally very high quality with x265. 10-12 are almost always psychovisually indistinguishable from 14 except for some heavy noise edge cases.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 18th June 2020, 09:14   #7652  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
At CRF 10-14, I wouldn't be surprised if the encode sometimes ended up at a higher average bitrate than the source itself
__________________
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 18th June 2020, 09:31   #7653  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
Quote:
Originally Posted by Boulder View Post
At CRF 10-14, I wouldn't be surprised if the encode sometimes ended up at a higher average bitrate than the source itself
I hear that for HDR UHD video, CRF 14 isn't very extreme.
Forteen88 is offline   Reply With Quote
Old 18th June 2020, 11:40   #7654  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
A test encode I did come out like this:


Source:

HEVC, Main 10@L5.1@High, 3840x2160, 23.976 FPS, 57.5 Mbps


Settings:

x265.exe --crf 14 --preset slower --output-depth 10


Result:

HEVC, Main 10@L5@Main, 3840x2160, 23.976 FPS, 32.9 Mbps


It was a sample from the movie Snow White and the Huntsman, had some noise, not particular much.


It would also be possible to add additional items, very, super, extreme, ludicrous...


My sample with the highest bitrate is:

HEVC, Main 10@L5.1@High, 3840x2160, 23.976 FPS, 70.0 Mb/s


Some old boring movie called Crash.
stax76 is offline   Reply With Quote
Old 18th June 2020, 13:42   #7655  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by Forteen88 View Post
I hear that for HDR UHD video, CRF 14 isn't very extreme.
True, HDR requires a significantly lower CRF to achieve visual transparency.
__________________
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 18th June 2020, 20:00   #7656  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Boulder View Post
True, HDR requires a significantly lower CRF to achieve visual transparency.
Having a perceptually uniform EOTF helps a lot, as QPs don't need to be lowered for dark regions. In SDR it's easy to seams between Y'=16 and Y'=17.

HDR always being 10-bit also helps.

Ballpark, HDR needs ~20% fewer bits than 8-bit SDR to get to a similar subjective quality.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 18th June 2020, 21:14   #7657  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Worth mentioning, x265 does require special tuning for good quality HDR.

The default hdr-opt is pretty good for PQ YCbCr (HDR10), but when encoding for Dolby Vision Profile 5 using PQ IPT (quite similar to ICtCp) masquerading as YCbCr, some additional tuning is needed to mitigate banding artifacts, even at high bitrates. I've seen some proprietary patches to x265 to improve performance here. Hopefully MCW makes something like this in mainline x265
Blue_MiSfit is offline   Reply With Quote
Old 18th June 2020, 21:23   #7658  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by benwaggoner View Post
Having a perceptually uniform EOTF helps a lot, as QPs don't need to be lowered for dark regions. In SDR it's easy to seams between Y'=16 and Y'=17.

HDR always being 10-bit also helps.

Ballpark, HDR needs ~20% fewer bits than 8-bit SDR to get to a similar subjective quality.
But CRF needs to be adjusted quite heavily. With my SDR settings + hdr-opt + HDR metadata, an encode of a HDR source produces a proportionally much smaller file than a similar one in SDR at CRF 18. With HDR sources, I tend to use CRF 14.
__________________
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 19th June 2020, 03:25   #7659  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Blue_MiSfit View Post
Worth mentioning, x265 does require special tuning for good quality HDR.



The default hdr-opt is pretty good for PQ YCbCr (HDR10), but when encoding for Dolby Vision Profile 5 using PQ IPT (quite similar to ICtCp) masquerading as YCbCr, some additional tuning is needed to mitigate banding artifacts, even at high bitrates. I've seen some proprietary patches to x265 to improve performance here. Hopefully MCW makes something like this in mainline x265
There's a whole different optimization flag for doing Profile 5, tuned for Y'CtCp instead of Y'CbCr.

Sent from my SM-T837V using Tapatalk
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th June 2020, 04:06   #7660  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
In mainline x265? Do tell. I've been using a patched 3.0 build for quite awhile.
Blue_MiSfit 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 14:54.


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