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. |
|
25th September 2022, 18:02 | #1 | Link |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
x265 Sharpness and Detail (Best Settings?)
Hi,
I'm looking to find settings that increase detail and sharpness. In turn, I'm also looking for settings that apply blurring or softness and can be turned off. Here are the settings that I know of so far that do this.
These are all the detail increase settings that I know of so far. Are there any more? I saw some things on QBlur, I don't know what it does, because I haven't researched it. Just because blur is in the title made me think, but is this anything that controls sharpness and detail? Are there any more? My goal is to get the most detailed image possible use x265 (which is notorious for having a soft image). However, if anything goes over the top, like, giving an edge-enhanced look or heavy ringing, I will back off. The goal is maximum blur removal and ultra-high detail without looking overly digital, this is why I'm trying to back off from using psy-rd and rdoq, I just don't like the look personally. Thank you. Last edited by HD MOVIE SOURCE; 25th September 2022 at 18:05. |
26th September 2022, 21:12 | #2 | Link | ||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
[QUOTE=HD MOVIE SOURCE;1975282]Hi,
I'm looking to find settings that increase detail and sharpness. In turn, I'm also looking for settings that apply blurring or softness and can be turned off. Here are the settings that I know of so far that do this.
Nor does --deblock if used appropriately. Both will reduce detail at moderate-low bitrates, as they reduce compression efficiency and drive QPs higher, which itself is a low-pass filter. The HEVC built-in deblocking filter is better turned than H.264's. --subme only goes up to 5 in --preset placebo. I've not seen visible quality improvements from using higher values. If you have sharp synthetic details (text, line art, noise-free anime), --tskip can increase detail. In theory --hme can help with very noisy content. --amp and --rect can improve detail by allowing TUs to better match the shape of content, for example encoding a mild horizontal curve as 32x8 instead of forcing it to be square. But in general, a lot of these things are controlled by the preset. It's best to pick the slowest preset that is fast enough, and start tweaking from there. Quote:
Quote:
|
||
2nd October 2022, 04:45 | #3 | Link | |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
Okay, I added tskip, hme amp, and rect to my encoding settings. The sharpness is off the chain right now. It's pin sharp. The facial detail on SolLevante looks as thought it was drawn with a pencil it looks that sharp. The biggest issue is the encoding time. It took about 16 hours just to encode SolLevante and that was about 4 minutes of content. I was encoding this in 2 and a half hours before these settings. I'm just using an old PC to encode with overnight. If I want to encode using these settings I will definitely have to get an optimized encoding PC. The settings I used that have an effect in detail.
The sharpness is extremely impressive, I didn't think x265 was capable of this level of detail. Thank you, now you'll have to send me an encoding PC LOL. Last edited by HD MOVIE SOURCE; 2nd October 2022 at 04:53. |
|
4th October 2022, 02:21 | #4 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
Quote:
If that doesn't give you the detail you want, first try --no-sao. If you find --tskip helpful, try --tskip --tskip-fast. |
|
8th October 2022, 01:52 | #5 | Link | ||
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
One thing I've noticed is that no-hme is used in all 10 presets by default. Is this because the encoding time added is huge by using hme? I have tried it on SolLevante, but it's a very short piece of material so I could get away with it. But, unless you have a supercomputer I don't think hme is even viable to setups like mine. I will run some speed tests on the other settings and see what I can get away with. As long as it can add detail and not take away with minimal impact on encoding time, I'm fine with that. I cannot encode a full movie using beyond medium. Medium and a movie of about 90 minutes is around 2 days. But, I am well aware my current encoding PC is woefully inadequate. However, for now I'm fine with it. I don't mind an encode taking 4 or 5 days, that's fine, but anything over a week is not something I can achieve right now. So I will test each setting to see the speed impact. Thanks. Quote:
What this does is makes it so anything under my target bit-rates is essentially transparent, and anything getting up to 98 Mbps is so high in bit-rate that it basically transparent also. SolLevante was encoded using these settings and my final average bit-rate is 68.7 Mb/s. The average QP is 8.21. If you want to see my encode for SolLevate here it is: https://drive.google.com/file/d/1v8-...W0kKVV2St/view Somebody mentioned banding in a previous comment. Using aq-mode=3 and aq strength of 1.6 removes banding entirely for me. I tested this over and over again and 1.6 gives you the lowest QP (highest quality possible). Going above 1.6 lowers the quality. With SolLevante using 1.6 and aq-mode=3 removes all banding on a professionally calibrated LGC9 OLED. Last edited by HD MOVIE SOURCE; 8th October 2022 at 02:07. |
||
8th October 2022, 23:13 | #6 | Link | |||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
Quote:
The primary use case for that the --hme infrastructure was built around was to encode lower resolutions of the bitrate ladder and use the analysis data from that to encode the next resolution up a lot faster. So 540 -> 1080 -> 2160 and 360 -> 720 -> 1440. Using the --hme command lets you emulate the quality impact of doing the above, but without the speed benefits. I'm not sure how much parallelism is implemented in there; the speed hit could be a lot less or even get faster with enough cores if properly threaded. --hme also allows for different search ranges and methods to be used for each resolution tier, which would allow for finer-grained quality and performance tuning. Quote:
If I'm doing content-specific tuning, I can make it 2-3x faster without significant visible quality loss as I can turn off tools that don't help in that particular case. Things like --tu-inter/intra 4 and --tskip can help a lot with some content and do nothing for other content. Quote:
|
|||
4th October 2022, 22:19 | #7 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,870
|
Quote:
I've been encoding for ages with high psy-rd/psy-rdoq and have yet to see it destroy detail or sharpness. At worse, it makes the image more "static". |
|
4th October 2022, 22:25 | #8 | Link | |
Registered User
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 399
|
Quote:
|
|
23rd September 2023, 16:50 | #9 | Link | |
Registered User
Join Date: Sep 2023
Posts: 28
|
[QUOTE=benwaggoner;1975353]
Quote:
Last edited by N'Cha; 23rd September 2023 at 16:59. |
|
26th September 2023, 01:11 | #10 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
Quote:
If anyone has more recent or specific results, I'd love to hear about them! |
|
29th September 2022, 18:08 | #11 | Link |
I might be autistic...
Join Date: Apr 2022
Location: 16-235
Posts: 34
|
I'm going to second and expand upon benwaggoner's great advice.
For deblock, you should turn the strength down and turn the threshold up instead of disabling it outright. Start with --deblock -1:1 and work your way down/up from there to taste. I personally wouldn't go higher than 1 on the threshold, and I don't think I've seen any encodes "in the wild" with threshold >1 either. Some people use e.g. -2:0. For SAO, I'm not sure what the "best" option is, but I use --limit-sao --selective-sao 1 --sao-non-deblock to "reel it in" as opposed to turning it off completely, and it has been working well for me. Now that I look at the documentation, --selective-sao 3 might be a better choice. I'm not sure why you'd ever want SAO on non-reference slices though, so definitely use at least one of those two choices, or "2" if you don't want it on any reference B slices. --amp --rect and --tskip-fast are all indispensable for animated content, if you can stomach all the extra time they consume. I haven't tried them with live action content. --hme is pretty useful for getting away with using a lower subme and knocking slower presets down to --me umh at higher resolutions, although I personally haven't seen any benefit from using it at 1080p and below. |
29th September 2022, 23:27 | #12 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
--selective-sao 2 is the one you want, and should be the x265 default. SAO is designed around forward-prediction only, so 99% of the value is seen on just I and P frames. Applying it to B and b frames just slows the encode down a bit. In theory I could imagine --selective-sao 3 maybe helping a tiny bit in some odd scenarios, but don't have any evidence or examples of that.
What impact have you found from --sao-non-deblock? I don't think I've ever tried it (which is pretty rare!). I'd presumed it was a quality-versus-performance tradeoff parameter. And yeah, cel animation and motion graphics require much different tuning that natural image content. Motion blur and noise make a huge difference compared to not having those. |
1st October 2022, 06:16 | #13 | Link |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Thank you for the feedback guys, much appreciated. And yes, I have been encoding from the basic preset first and then adjusting from there.
I personally can't stand using sao, its way too aggressively soft, I just don't think it's needed, at least on high bit-rate content like 4k UHD Blu-ray. Streaming maybe another matter or low bit-rates, but I will not use sao, that's the opposite direction I want to go. "-tskip can increase detail" --- Is this okay to use in grainy content too? "In theory --hme can help with very noisy content" --- This doesn't remove noise or grain though does it? as long as it doesn't remove anything, Ill try it. --amp and --rect I will look into, I know they add quite a bit of encoding time so I will have to think about these. Right now I'm encoding SolLevante from Netflix which is grain free but has ultra-fine details. When she dives down into the ocean, I want to retain as much of the ultra-fine detail that the source has. I also thinking about grain content also. i want to preserve as much grain as possible also, without blurring or blending anything. Ill run a few encodes with these new settings. Thank you. Last edited by HD MOVIE SOURCE; 1st October 2022 at 06:26. |
10th October 2022, 02:49 | #15 | Link | |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
However, I have re-encoded many things like Big Buck Bunny, Tears of Steel, and others just for science, and just for fun. I like to see how close to the original source I can get. Yeah, it looks incredible. How do you know when it's a good time to use tskip? The settings do offer incredible detail, if it's possible to encode at 1 hour per day and use these settings that would be really cool. |
|
10th October 2022, 17:10 | #16 | Link | ||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
Quote:
Quote:
In general, --tskip is useful in similar scenarios where --tu-inter/intra 4 are helpful. And the even slower --cu-lossless only really helps when --tskip is already helpful, or at extremely high bitrates. |
||
10th October 2022, 22:28 | #17 | Link | |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
I'd like to try a really slow encode one time with all the detail settings that you have provided just for fun. I always though tskip was a speed increase, but it's definitely a speed loss. Is -tskip-fast a weaker version of tskip? Thanks for the help. |
|
13th October 2022, 17:55 | #18 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
--tskip definitely slows things down. --tskip-fast reduced the speed impact, but can miss some cases where tranform skip would have been better that straight --tskip would have found. But you certainly get most of the benefit with a lot less of the speed hit using --tskip --tskip-fast.
|
13th October 2022, 18:40 | #19 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,369
|
I have an encode running and it will finish only on a few days, so i can't make tests right now (and also can't check the speed difference), so i'll ask...
Is tskip enabled in slower preset ? (Or in any preset) Is tskip significant, on 4k HDR 10 bits, on multipass encode, average 40000, maxrate 90000 vbv-buffsize 70000 ? In any case, from what i've understood, --tskip --tskip-fast will always be better than without tskip, if tskip is realy too slow. As i don't have tskip in my settings and i'm at 0,5fps encode speed, i'm not realy enthusiast reducing speed more...
__________________
My github. |
14th October 2022, 16:53 | #20 | Link | ||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
|
Nope, not in any preset (it should be on for placebo at least, IMHO). You can see all the preset parameters here:
https://x265.readthedocs.io/en/master/presets.html Quote:
Quote:
|
||
Thread Tools | Search this Thread |
Display Modes | |
|
|