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 11th September 2018, 15:10   #6361  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,554
And if you have source material with only 8 bit precision per color component, an internal precision of 12 bit per quantization coefficient would be a waste anyway.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is online now   Reply With Quote
Old 11th September 2018, 18:45   #6362  |  Link
brumsky
Registered User
 
Join Date: Jun 2016
Posts: 87
Quote:
Originally Posted by katzenjoghurt View Post
Hi guys,

I'm currently trying to convert Star Wars Episode III to x265... and hell... it's a beast.
This movie gives me super ugly artifacts in dark scenes.

Original: https://i.imgur.com/PA9cWuR.png
Encoding: https://i.imgur.com/HpVbyf4.png (with meagre 2,300kb/s in that scene, 4,500kb/s on avg for the whole movie)

My settings were: --crf 23 --tune grain --profile main12 --output-depth 12 --rskip --qcomp 0.8 --no-open-gop --no-deblock --no-strong-intra-smoothing

I already tried aq-mode 3 but to retain an okayish quality I had to set the aq-strength to 1.5 and ended up with 12 mbit/s for this scene.
I then tried aq-strength 3 and ended up with with perfect quality... and wopping 43 mbit /s.

Why are dark scenes so much more costly than brighter scenes?
This does not feel right...
What can I do?
To me it looks like your PSY values are set very high. That could be an effect of tune grain though. Have you tried it without tune grain? Maybe take tune grain out and try playing with the PSY values. I've found aq-mode 3 to work well but it needs a bit high bit rate to help it. When I use aq-mode 3 I try to set the strength setting between .85-1, then up the bit rate as needed to reach my target quality.
brumsky is offline   Reply With Quote
Old 11th September 2018, 21:15   #6363  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Hey brumsky et al.!

Yes... psy_rd was set to 4.
I kept grain mode but reduced psy_rd to 1 and set crf to 21 now and the artifacts are gone (while the file size got a bit smaller) ... the result is a bit smeared though.
Also it kills most of the grain.
https://i.imgur.com/eqQJXy7.png

Lowering Crf or Psy further won't do any good though... quite the contrary. At least on that example scene.

Last edited by katzenjoghurt; 11th September 2018 at 21:33.
katzenjoghurt is offline   Reply With Quote
Old 11th September 2018, 21:25   #6364  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Quote:
Originally Posted by sneaker_ger View Post
Why did you not lower crf?
I didn't know that this is good practice.
Tried it out but didn't find any sweet spot yet though. :-/

Quote:
Originally Posted by Forteen88 View Post
Are you aware of that GPU-decoding (certain newer GPUs) doesn't support 12-bits x265-video, but maximum 10-bits x265-video?
Just something I tried out... 12-bit seemed to have helped in this thread. But no. Didn't work out for me.

Last edited by katzenjoghurt; 12th September 2018 at 08:57.
katzenjoghurt is offline   Reply With Quote
Old 12th September 2018, 19:54   #6365  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 35
Quote:
Originally Posted by katzenjoghurt View Post
I didn't know that this is good practice.
Tried it out but didn't find any sweet spot yet though. :-/



Just something I tried out... 12-bit seemed to have helped in this thread. But no. Didn't work out for me.
Tune grain usually gives pretty bad results, I found it to be usefull in very few instances.

I would start over with main10, keep --no-strong-intra-smoothing and --no-sao, try a slower preset and a lower CRF value. If that doesnt give you good results start playing with AQ and qcomp
excellentswordfight is offline   Reply With Quote
Old 12th September 2018, 21:16   #6366  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 263
Quote:
Originally Posted by katzenjoghurt View Post
My settings were: --crf 23 --tune grain --profile main12 --output-depth 12 --rskip --qcomp 0.8 --no-open-gop --no-deblock --no-strong-intra-smoothing
Try setting --psy-rdoq 0.0 (default for --tune grain is --psy-rdoq 10.0) or set it to around 2.0.
I never liked that corresponding PSY-setting in x264 either, it was too strong.
Forteen88 is offline   Reply With Quote
Old 12th September 2018, 22:43   #6367  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Quote:
Originally Posted by Forteen88 View Post
Try setting --psy-rdoq 0.0 (default for --tune grain is --psy-rdoq 10.0) or set it to around 2.0.
I never liked that corresponding PSY-setting in x264 either, it was too strong.
huh! I set --psy-rdoq 0 and got the exact same output (same pic and bytesize).
I then checked with mediainfo and all my test videos so far were already encoded with --psy-rdoq 0.

Last edited by katzenjoghurt; 12th September 2018 at 22:48.
katzenjoghurt is offline   Reply With Quote
Old 12th September 2018, 22:48   #6368  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Quote:
Originally Posted by excellentswordfight View Post
Tune grain usually gives pretty bad results, I found it to be usefull in very few instances.

I would start over with main10, keep --no-strong-intra-smoothing and --no-sao, try a slower preset and a lower CRF value. If that doesnt give you good results start playing with AQ and qcomp
I will try tomorrow or during the weekend. As with any proposal that seems to be a bit more time consuming.

I'm quite happy with Tune Grain... I use it for every movie.
E.g. every Star Wars movie came out well with it so far... only Star Wars III seems like it was specifically made to make x265 look bad - pick your poison:
a) no grain b) 15k+ bitrate c) wobbling faces with artefacts

Last edited by katzenjoghurt; 12th September 2018 at 22:58.
katzenjoghurt is offline   Reply With Quote
Old 13th September 2018, 07:51   #6369  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 263
Quote:
Originally Posted by katzenjoghurt View Post
huh! I set --psy-rdoq 0 and got the exact same output (same pic and bytesize).
I then checked with mediainfo and all my test videos so far were already encoded with --psy-rdoq 0.
Oh, weird, I got that info about --tune grain from,
https://x265.readthedocs.io/en/default/presets.html
That webpage says that --tune grain sets --psy-rdoq 10.0

Did you set --psy-rdoq 0 AFTER setting --tune grain? I think it overwrites the --psy-rdoq that --tune grain sets then.

Last edited by Forteen88; 13th September 2018 at 07:54.
Forteen88 is offline   Reply With Quote
Old 13th September 2018, 08:55   #6370  |  Link
jd17
Registered User
 
Join Date: Jun 2017
Posts: 74
He was most likely using a non-slow preset.
--psy-rdoq 10.0 is only set starting at --preset slow and slower.

This is why --tune grain actually looks quite good on medium or fast preset.

@katzenjoghurt:
Simply try --preset slow --profile main10 --output-depth 10 --no-sao at a CRF between 17 and 20.
Maybe that helps with bitrate and quality.
jd17 is online now   Reply With Quote
Old 13th September 2018, 10:34   #6371  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 263
Quote:
Originally Posted by katzenjoghurt View Post
My settings were: ... --no-deblock
That'll create blocks on big screens. I would not remove deblock, most people use minimum --deblock -3:-3
I've never seen an encode (including x264-encodes) with lower --deblock than --deblock -3:-3
Forteen88 is offline   Reply With Quote
Old 13th September 2018, 22:56   #6372  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Hi guys,

just wanted to thank you for your support.
Unfortunately I'm too dead tired from work to do some test encodings today.
But thanks! Much appreciated.
Will try out some of your proposals during the weekend and let you know what worked out.
katzenjoghurt is offline   Reply With Quote
Old 14th September 2018, 00:18   #6373  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 164
Quote:
Originally Posted by Forteen88 View Post
That'll create blocks on big screens. I would not remove deblock, most people use minimum --deblock -3:-3
I've never seen an encode (including x264-encodes) with lower --deblock than --deblock -3:-3
why? i am using --no-deblock with CRF ano NO BLOCKING... depends on bitrate and with CRF, no blocking should be presented.
__________________
Core i9-7940X, 64GB DDR4, 1TB SSD, 3TB HDD, 32TB NAS
jlpsvk is offline   Reply With Quote
Old 14th September 2018, 07:14   #6374  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 263
Quote:
Originally Posted by jlpsvk View Post
why? i am using --no-deblock with CRF ano NO BLOCKING... depends on bitrate and with CRF, no blocking should be presented.
Yeah, that's true to a point (until the screen is VERY big) What is the inch of the big screen you're using for playing such encodes?
If you're setting --no-deblock on UHD-encodes, it's obviously also less of a difference compared to encodes at lower resolutions.

Last edited by Forteen88; 14th September 2018 at 07:17.
Forteen88 is offline   Reply With Quote
Old 14th September 2018, 09:11   #6375  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,399
(C)TU size and detail retention

In theory, is it better to use smaller (C)TU sizes to retain detail? I've been thinking about the rdpenalty parameter - earlier I've used --ctu 32 --max-tu-size 16 --tu-inter-depth 4 --tu-intra-depth 4 --limit-tu 3, but I've wondered if --max-tu-size 32 --rdpenalty 1 would allow some more flexibility for the encoder without sacrificing detail.
__________________
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 15th September 2018, 12:34   #6376  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,531
Quote:
Originally Posted by Forteen88 View Post
Yeah, that's true to a point (until the screen is VERY big) What is the inch of the big screen you're using for playing such encodes?
If you're setting --no-deblock on UHD-encodes, it's obviously also less of a difference compared to encodes at lower resolutions.
Deblocking also improves quality by making prediction more efficient. Even if you can't see a sharp block boundary on a given screen, it being there makes that area a poor reference for a predicted block. Using deblocking can reduce residual substantially, and thus lower QPs overall.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 15th September 2018, 21:44   #6377  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,472
x265.exe 2.8+68-fa57fa584898

https://forum.videohelp.com/threads/...59#post2529259
Midzuki is offline   Reply With Quote
Old 16th September 2018, 21:09   #6378  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 59
Quote:
Originally Posted by jd17 View Post
@katzenjoghurt:
Simply try --preset slow --profile main10 --output-depth 10 --no-sao at a CRF between 17 and 20.
Maybe that helps with bitrate and quality.
The quality is nice at crf 17 slow.
I tried a bigger test encode with crf 18 medium but looks like I'll get close to a 10mbit bitrate then.
But lowering the bitrate further will kill the grain on the other hand.
*sigh*

At least I can confirm that the artifacts indeed seem to be caused by tune grain. As soon as I enable it artifacts start showing up at bitrates <10mbit.


This movie is really weird. Looking at it my gut feeling is that it should be encodable with 5,000kbit/s.
But it demands far more... more than some 60's movie with grain everywhere.

Last edited by katzenjoghurt; 16th September 2018 at 23:40.
katzenjoghurt is offline   Reply With Quote
Old Yesterday, 13:48   #6379  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 293
x265 v2.8+70-33a782b23f2c (32 & 64-bit 8/10/12bit Multilib Windows Binaries)

Code:
https://bitbucket.org/multicoreware/x265/commits/branch/default
Barough 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 15:23.


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