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. |
![]() |
#1 | Link |
Media Enthusiast
Join Date: Jul 2017
Location: San Francisco, CA
Posts: 10
|
What are your baseline x265 encoding settings?
Hey folks,
I've been searching these forums and the web and have come to the conclusion that there isn't really a good collection of baseline encoding settings or proposed tunes for x265 that cover various types of media. Given x265 doesn't really provide much in the way of content specific tunes (aside from grain), this seems like something that would be useful to the enthusiast community, and would give people a good starting point for their own content-specific tweaks. So I am proposing establishing a sticky thread (or using this one) as a place where people can share their settings and discuss what works (or doesn't work) and why. Assuming others are interested, of course. Obviously, I have my own agenda since I'm in process of converting a large collection of DVD & BR media to digital format, and I'd like to use HEVC for at least some of it, so getting some good advice to tackle some of that would be handy. As a starting point, I found the following as the most recent proposed tunes for animation and film in the HEVC discussion forum (crf 18 @ 1080p). However, they were posted more than a year ago, and may no longer be relevant based on the changes that have been made to x265 in that time... animation: Code:
--ctu 32 --ref 4 --bframes 6 --pbratio 1.2 --cbqpoffs -3 --crqpoffs -3 --no-sao --subme 3 --b-intra --no-amp --weightb --aq-mode 3 --aq-strength 0.8 --rd 4 --psy-rd 1.8 --psy-rdoq 1.5 --rdoq-level 2 --rc-lookahead 80 --qcomp 0.65 --no-strong-intra-smoothing --limit-modes Code:
--ctu 32 --pbratio 1.2 --cbqpoffs -3 --crqpoffs -3 --no-sao --subme 3 --b-intra --no-amp --weightb --aq-mode 3 --aq-strength 0.9 --rd 4 --psy-rd 2.5 --psy-rdoq 4.0 --rdoq-level 2 --rc-lookahead 80 --qcomp 0.65 --no-strong-intra-smoothing --limit-modes Personally, I use the following for animation/anime (non-CGI 1080p BR transfers), but I suspect it can be improved... Code:
--aq-mode 3 --aq-motion --aq-strength 0.9 --rc-lookahead 80 --deblock -3:-3 --tskip --tskip-fast --tu-inter-depth 4 --tu-intra-depth 4 --limit-tu 4 --no-sao What do you use for your own content, and why? Last edited by Merlin93; 28th September 2017 at 01:04. |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Jun 2017
Posts: 89
|
I got a lot of help/advice here, so these conclusions are not just my own:
https://docs.google.com/spreadsheets...it?usp=sharing Maybe it helps. ![]() Essentially, especially since x265 2.4, not too much alteration is needed in my experience to get transparent encodes from Blu-rays: main10 CRF: 16-20 Tune: none Preset: slow, slower or veryslow Custom: --no-sao That's basically it. In my opinion, --no-sao is all the deviation from x265 2.4+ standards that is needed. However, my experiences are just with regular film or 3D animation / CGI, no anime / 2D animation stuff. If I encounter sources with extreme grain, I either use x264 or don't bother at all and just remux. I also just remux, if a Blu-ray is already highly compressed, more than usual (=low bitrate). I got help in these two threads: https://forum.doom9.org/showthread.php?t=174679 https://forum.doom9.org/showthread.php?t=174491 Those were mainly about UHD, but I got some input for regular 1080p stuff as well. YMMV. ![]() |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: May 2009
Posts: 345
|
I still use
pmode:rd=4:tu-intra-depth=3:rdoq-level=2:early-skip:b-intra:limit-modes:aq-mode=2:qg-size=16:ipratio=1.38 ![]() ![]() |
![]() |
![]() |
![]() |
#4 | Link | |
Media Enthusiast
Join Date: Jul 2017
Location: San Francisco, CA
Posts: 10
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | Link | |
Media Enthusiast
Join Date: Jul 2017
Location: San Francisco, CA
Posts: 10
|
Quote:
Yeah, I realize that settings will always need to be tweaked depending on the specific content and how well/poorly it was mastered. So when I say baseline, I mean the starting point before making any tweaks. |
|
![]() |
![]() |
![]() |
#6 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 361
|
Quote:
Personally the only other parameters I set are: --keyint fps*10 --min-keyint fps --rc-lookahead fps*2 and --bframes 8 for 50/60p material. + ofc VUI flags for color info etc. Last edited by excellentswordfight; 3rd October 2017 at 09:02. |
|
![]() |
![]() |
![]() |
#7 | Link | |
Media Enthusiast
Join Date: Jul 2017
Location: San Francisco, CA
Posts: 10
|
Quote:
As mentioned in my first post, my personal interest is to find x265 equivalents to tunes for animation, CGI, low action film, and fast action film content. Though ultimately I think it would be helpful to use this thread as a good place to discuss tuning in general and what people like for various types of content. Of course, it would be more useful if we can explore why various settings work best for different types of content, but since activity on this thread is fairly slow, I'd be happy to see any submissions. I've found that my experience with x264 tuning doesn't really apply directly for x265. Or at least, using similar settings doesn't get the same results that I would expect. So I'd really like to understand what others use (and why) to help inform my own choices as I move more of my library to x265. Thanks for the feedback. ![]() |
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,448
|
I have been testing sao with the new builds of x265. It does not seem to smooth the way it used to.
For 1080p anime I have had good results with: --crf 18 -p 8 -F 1 --pools "5" --lookahead-slices 0 --rd-refine --tskip --tskip-fast --tu-inter 4 --tu-intra 4 --limit-tu 4 --rect --amp --limit-modes --no-strong-intra-smoothing Adding --no-sao hurt quality and did not improve sharpness. This was not the case the last time I tested sao (probably about 6 months ago). Does this match anyone else's experience?
__________________
madVR options explained Last edited by Asmodian; 3rd October 2017 at 19:55. |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Nov 2003
Posts: 12
|
Quote:
As for the OP's question -- after lots of testing I came to the conclusion that I don't really like film grain. I don't like plastic faces either, however, so I'm trying to find a balance between the two for a more "natural" look. I also endlessly tried to decide which presets and settings I want to use, with no final result. After even more testing I decided to go for relatively simple presets. 1. Apply slight digital noise reduction: Code:
clip = core.fmtc.bitdepth(clip, bits=16) clip = core.knlm.KNLMeansCL(clip, d = 4, s = 4, a = 4, h = 0.5) 2. - Video parameters: Bit depth: 10. Haven't experimented too much with 12. Speed preset: Very slow (as others have already found out: at least Slow) Custom parameters:
Code:
-mapping_family 1 3. I use these quality presets as a guideline for video and audio. I also choose depending on how much I like a movie. Note that these values are for noise reduced sources -- see step 1. Without the slight DNR I'd probably go 1 CRF higher for everything. Code:
Video Audio Q || CRF || Opus 2.0 | Opus 5.1 | Opus 6.1 | Opus 7.1 || Source Quality -------++-------++----------+----------+----------+-----------++---------------- Q0 || 16 || 160 kbps | 400 kbps | 480 kbps | 560 kbps || T0 Blu movies (reference) Q0.5 || 16.5 || 152 kbps | 380 kbps | 456 kbps | 532 kbps || T0 Blu movies (reference) Q1 || 17 || 144 kbps | 360 kbps | 432 kbps | 504 kbps || T1 Gold movies Q1.25 || 17.5 || 136 kbps | 340 kbps | 408 kbps | 476 kbps || Q1.5 || 18 || 128 kbps | 320 kbps | 384 kbps | 448 kbps || Q1.75 || 18.5 || 120 kbps | 300 kbps | 360 kbps | 420 kbps || Q2 || 19 || 112 kbps | 280 kbps | 336 kbps | 392 kbps || T2 Silver movies | T1 Gold series Q2.25 || 19.5 || 104 kbps | 260 kbps | 312 kbps | 364 kbps || Q2.5 || 20 || 96 kbps | 240 kbps | 288 kbps | 336 kbps || Q2.75 || 20.5 || 88 kbps | 220 kbps | 264 kbps | 308 kbps || Q3 || 21 || 80 kbps | 200 kbps | 240 kbps | 280 kbps || T3 Bronze movies | T2 Silver series Q3.25 || 21.5 || 76 kbps | 190 kbps | 228 kbps | 266 kbps || Q3.5 || 22 || 72 kbps | 180 kbps | 216 kbps | 252 kbps || Q3.75 || 22.5 || 68 kbps | 170 kbps | 204 kbps | 238 kbps || Q4 || 23 || 64 kbps | 160 kbps | 192 kbps | 224 kbps || T4 Copper movies | T3 Bronze series Q4.5 || 23.5 || 60 kbps | 150 kbps | 180 kbps | 210 kbps || Q5 || 24 || 56 kbps | 140 kbps | 168 kbps | 196 kbps || T5 Coal movies | T4 Copper series Without noise reduction I'd increase CRF by 1. With noise reduction I figure CRF needs to be one step lower to compensate for an increased chance of artifacts, but on the plus side the bitrate is used for detail that actually matters to me. Sound bitrates should be more or less proportional to the video bitrates between presets. Regarding Atmos / DTS-X, I'm not sure if or when I'd keep it, especially if the tracks are lossless, which I think is overkill. I'd very much prefer their lossy variants, but there's no readily available encoder for that, is there? In general I suppose the presets I'd use most often are Q2 (CRF=18 for movies) or Q3 (CRF=20 for TV shows). I also like JD17's spreadsheet for presets, although I guess those are more for grain keeping. Last edited by Arhu; 30th December 2017 at 22:57. |
|
![]() |
![]() |
![]() |
#10 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,984
|
Quote:
The number of frame threads is what impacts quality in multithreaded encoding, so better to set that directly and let x265 figure out how many cores and threads it can productively use for that encode. using --pool 5 would map to --frame-threads 3. Or is this about something else entirely? |
|
![]() |
![]() |
![]() |
#11 | Link | |
Registered User
Join Date: Jan 2012
Posts: 14
|
For anime I'm using the below on CRF 19-20 depending on the source (Ripped from BD using makeMKV)
Code:
–profile main10 –output-depth 10 –tune grain –aq-mode 3 –preset veryslow –aq-strength 0.8 –ctu 32 –qcomp 0.8 –psy-rd 1 –tu-intra 4 –tu-inter 4 –limit-tu 1 –psy-rdoq 5.0 –rdoq-level 1 –deblock -2:-2 –qg-size 32 –merange 44 –me 3 –subme 5 –no-rect –no-amp Quote:
__________________
I5 3570k OC @4.5Ghz, EVGA GTX 1080 FTW Oced, Asrock Z77 Extreme4, 8GB DDR3 @ 1600Mhz Last edited by Toku; 4th November 2017 at 12:51. |
|
![]() |
![]() |
![]() |
#12 | Link | |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,448
|
Quote:
![]() I only included the thread limits to be complete with my reporting because I hadn't tested too many variations of the command line. Interesting, I wonder if that is animation style dependent or if it is simply your slightly higher crf value. I definitely thought strong-intra-smoothing created something like that slightly smoothed look that I used to associate with sao.
__________________
madVR options explained |
|
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Apr 2008
Posts: 420
|
This is what I use for 1080p live action content with medium preset, I haven't heard about limit sao before, have to run some trials with that
Code:
--crf 24.0 --ref=4 --ctu 32 --max-tu-size 16 --deblock=-2:-2 --no-strong-intra-smoothing --profile main10 --psy-rd=1.80 --psy-rdoq=5.00 --qcomp 0.7 --rdoq-level 1 --ipratio=1.30 --pbratio=1.20 --qg-size 16 --merange 44 --splitrd-skip --no-sao |
![]() |
![]() |
![]() |
#14 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,448
|
If I understand correctly limit-sao is a speed up for sao, not really meant to reduce the impact of sao.
__________________
madVR options explained |
![]() |
![]() |
![]() |
#18 | Link |
Registered User
Join Date: Aug 2014
Posts: 28
|
Sorry, on mobile right now so I can’t post logs. Yes it’s 4:2:0. It works fine if my source does in fact have hdr. When it doesn’t though, the encode will go all the way to the end and finish up with an error. This is using megui. |
![]() |
![]() |
![]() |
#19 | Link |
Herr
Join Date: Apr 2009
Location: North Europe
Posts: 558
|
I'm unfortunately opening an old thread
![]() @Arhu. Why don't you use AAC instead of Opus? Opus takes much more decoding time. I did a test in foobar2000 v1.4 (with component "Decoding speed test"), testing the song "Ennio Morricone Conducts Morricone His Greatest Hits - The Good, the Bad and the Ugly: The Ecstasy of Gold". "High priority: yes Buffer entire file into memory: yes Warm-up: yes" Apple AAC@144kbps (using latest version with qaac_2.67, default setting), "Decoding time: 0:00.174" Opus@144kbps (using opus-tools-0.1.10-win64, default setting), "Decoding time: 0:00.990" Last edited by Forteen88; 18th August 2018 at 11:31. |
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,448
|
Opus is higher quality than AAC, isn't that a reason to use it? Audio decode time is usually not a concern, it is really fast and can be done on another CPU/thread. HEVC takes a lot longer to decode than AVC too.
![]()
__________________
madVR options explained |
![]() |
![]() |
![]() |
Tags |
settings, tunes, x265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|