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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
1 HQ setting for ALL types of video. (also good for removing grain)(& audio settings)
the idea is lower the quality (raise crf value) to increase blending thus removing static, noise, & artifacts (while attempting to retain as much detail as possible). also with little to no artifacts when blown up to large size). sources with less grain/noise can have more detail by raising quality (lower crf value). these settings gives good blending when needed but not too much (like sao) thus preserving detail for high detail/high res encodes. there is also less random flickering and smoother playback, and color banding almost gone.
placebo is sometimes placebo, depends on the individual setting, some are the same as very slow setting, those are not not placebo. i toned down anything that went into the placebo range as it is only a waste of time, after extensive testing to ensure which preset placebo settings were really placebo. there are many new settings/options/flags are not yet been considered for adding to the Presets, but may still be "best" setting, i have chosen some of these in the custom settings listed here. i believe in one setting for all videos, or zones. however tweaking individual scenes/zones is time consuming and amazon/vudo/netflix isn't paying me to spend all day on a video. until video technology improves, some tweaking will always help, but eventually, in the future, an app will do it all for you. until then, use these settings :)... --- 12bits profile for slightly better pic, worth it. - frame rate=same as source. - resolution=same as source. - Preset=very slow (technically all settings are overwritten, but new settings may come out) - profile=auto - level=auto - tune=none --- these settings conforms to the hevc standard/specification, (thus the setting no-allow-non-conformance). - handbrake settings--\/ log-level=3::constrained-intra::interlace=0::gop-lookahead=0::min-keyint=0::keyint=345::ipratio=1.4::pbratio=1.3::psy-rd=0.35::psy-rdoq=14.65::deblock=0,-3::qcomp=0.54::rdoq-level=1::rdpenalty=0::no-tskip::no-splitrd-skip::no-allow-non-conformance::ref=5::weightp::weightb::scenecut-window=1000::scenecut-aware-qp::strong-intra-smoothing::rect::amp::no-cutree::hist-scenecut::hist-threshold=0.01::slices=1::frame-threads=1::no-wpp::pmode::no-pme::open-gop::bframes=8::b-adapt=2::b-pyramid::b-intra::rc-lookahead=46::lookahead-slices=0::opt-qp-pps::opt-cu-delta-qp::ctu=64::min-cu-size=8::qg-size=32::max-tu-size=32::tu-inter-depth=4::tu-intra-depth=4::limit-tu=3::nr-intra=0::nr-inter=0::no-intra-refresh::limit-refs=0::opt-ref-list-length-pps::no-limit-modes::me=3::subme=4::merange=58::max-merge=5::no-temporal-mvp::temporal-layers::analyze-src-pics::no-sao::qpstep=4::qpmax=69::qpmin=0::rd=6::rskip=2::no-early-skip::no-fast-intra::no-hme::no-frame-dup::no-fades::no-rc-grain::signhide::radl=0::info::copy-pic=1::level-idc=0::high-tier=1::rd-refine::no-dynamic-refine::selective-sao=0::sao-non-deblock::hevc-aq::no-aq-motion::aq-mode=3::aq-strength=1.00 - [EDIT: settings are for x265 3.4 (released 29th May, 2020)] - Code:
presets 0 1 2 3 4 5 6 7 8 9 mine ----------------------------------------------------------------------------------------------------- ctu 32 32 64 64 64 64 64 64 64 64 64 gives overall best pic at smaller size min-cu-size 16 8 8 8 8 8 8 8 8 8 8 bframes 3 3 4 4 4 4 4 8 8 8 8 b-adapt 0 0 0 0 0 2 2 2 2 2 2 trellis of corse rc-lookahead 5 10 15 15 15 20 25 40 40 60 45 lookahead-slices 8 8 8 8 8 8 4 1 1 1 0 never use higher scenecut 0 40 40 40 40 40 40 40 40 40 40 ref 1 1 2 2 3 3 4 5 5 5 5 limit-refs 0 0 3 3 3 3 3 1 0 0 0 limit-refs for lower quality... me 0 1 1 1 1 1 3 3 3 3 3 be a star merange 57 57 57 57 57 57 57 57 57 92 58 because hex's are bad subme 0 1 1 2 2 2 3 4 4 5 4 rect 0 0 0 0 0 0 1 1 1 1 1 best with amp amp 0 0 0 0 0 0 0 1 1 1 1 needs rect limit-modes 0 0 0 0 0 0 1 1 0 0 0 no limit here max-merge 2 2 2 2 2 2 3 4 5 5 5 early-skip 1 1 1 1 0 1 0 0 0 0 0 meh, why? for lower quality guessing... recursion-skip 1 1 1 1 1 1 1 1 1 0 2 fast-intra 1 1 1 1 1 0 0 0 0 0 0 (1=lowers detail) b-intra 0 0 0 0 0 0 0 1 1 1 1 sao 0 0 1 1 1 1 1 1 1 1 0 why? (gives nice blended picture for loss of detail) signhide 0 1 1 1 1 1 1 1 1 1 1 weightp 0 0 1 1 1 1 1 1 1 1 1 weightb 0 0 0 0 0 0 0 1 1 1 1 aq-mode 0 0 2 2 2 2 2 2 2 2 hevc-aq ((hevc-aq+no-cutree=best)) cuTree 1 1 1 1 1 1 1 1 1 1 0 loss of detail with cutree low res search rdLevel 2 2 2 2 2 3 4 6 6 6 6 --rd on documentation. rdoq-level 0 0 0 0 0 0 2 2 2 2 1 allows psy-rdoq to be effective tu-intra 1 1 1 1 1 1 1 3 3 4 4 tiny better. (no speed difference then 3) tu-inter 1 1 1 1 1 1 1 3 3 4 4 tiny better. (no speed difference then 3) limit-tu 0 0 0 0 0 0 0 4 0 0 3 for speed... (3 is sometimes better pic then 0) ----------------------------------------------------------------------------------------------------- presets 0 1 2 3 4 5 6 7 8 9 mine b-frames=8 any higher distorts picture + gives better compression, so use 8. less then 8 gives less compression and lower quility picture -------------------------------------------------------------------------------------------------- - Code:
======================================== opus audio transparent reproduction--\/ dolby trueHD/dtsHD | dts1553/ac3 640k 1c = 80k | 64k 2c = 160k | 128k 5.1c = 384k | 320k 6.1c = 448k | 384k 7.1c = 512k | 448k 8.1c = 576k | 512k ======================================== 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 heres what media info spit out--\/ frame-threads=1 / no-wpp / pmode / no-pme / no-psnr / no-ssim / log-level=3 / csv / csv-log-level=0 / input-csp=1 / input-res=480x720 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=5 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / temporal-layers / open-gop / min-keyint=19 / keyint=345 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=46 / lookahead-slices=0 / scenecut=0 / hist-scenecut=1 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / amp / max-tu-size=32 / tu-inter-depth=4 / tu-intra-depth=4 / limit-tu=3 / rdoq-level=1 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / constrained-intra / strong-intra-smoothing / max-merge=5 / limit-refs=0 / no-limit-modes / me=3 / subme=4 / merange=58 / no-temporal-mvp / no-frame-dup / no-hme / weightp / weightb / analyze-src-pics / deblock=0:-3 / no-sao / no-sao-non-deblock / rd=6 / selective-sao=0 / no-early-skip / rskip / rskip-edge-threshold=0.050000 / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.35 / psy-rdoq=14.65 / rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=27.2 / qcomp=0.54 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=1.00 / no-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=6 / transfer=1 / colormatrix=6 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=4095 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.01 / opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-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 / hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp / scenecut-window=1000 / max-qp-delta=5conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 Last edited by H2sixty; 4th October 2020 at 08:05. Reason: missing info for handbrake options,tune,profile,level. |
![]() |
![]() |
![]() |
#4 | Link | |
Herr
Join Date: Apr 2009
Location: North Europe
Posts: 558
|
This page shows the presets too,
https://x265.readthedocs.io/en/master/presets.html "psy-rd=0.35::psy-rdoq=14.65"? I'd rather have high psy-rd value, because it is more accurate than psy-rdoq. Quote:
Last edited by Forteen88; 18th September 2020 at 07:37. |
|
![]() |
![]() |
![]() |
#5 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,992
|
Quote:
We're always going to be figuring out the best balance of features to maximize quality for a given perf. And any types of content will always have different attributes that result in an optimum set of features to be used for quality @ perf. Encoders do a lot of content adaption implicitly and under the hood. |
|
![]() |
![]() |
![]() |
#6 | Link | |||
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
Quote:
https://x265.readthedocs.io/en/master/presets.html however it also says... Quote:
i tried the default settings of psy-rd=2.0::psy-rdoq=1.0 (since you didn't provide any, maybe you could?), the picture looks much worse, more flickering, looks less accurate at lower bitrates with added "detail"(noise) where there wasn't any :( maybe at real high bitrates, 4k grain free video content (or with intentions to preserve/keep the grain), psy-rd=2.0::psy-rdoq=1.0 could maybe be better setting along with no-constrained-intra maybe aqmode=1 instead of hevc-aq for remuxing such content. however most content has unnecessary visual noise and properly removing it can decrease the file size, and improved visuals. [EDIT: my settings (as posted at top) look better than placebo in high detail test clips, soon to be posted below] i also forget to mention in my post that i was going for perceived quality, not accuracy. besides, isn't x264 still king of remuxing losslessly? either way, i think there needs some tweaking for remuxing "perfect" sources. any ideas anyone? Last edited by H2sixty; 7th October 2020 at 05:07. Reason: truefulness |
|||
![]() |
![]() |
![]() |
#7 | Link | |
Herr
Join Date: Apr 2009
Location: North Europe
Posts: 558
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | Link |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
i retested the times of placebo against my custom settings posted at beginning of thread with a 5 second clip, and nothing else running.
placebo: 22min 33seconds custom : 22min 07seconds i must have been running something in background before, they are almost equal in time. so the variance in a larger clip may be meaningful, possibly saving you noticeable amounts of time... however placebo was slightly bigger file, and take tiny amount of time more because. (making them closer then test shows...) Last edited by H2sixty; 27th September 2020 at 07:56. |
![]() |
![]() |
![]() |
#9 | Link |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
i found some high quality sources and grabbed a png copy of a trailer for sintel at https://media.xiph.org/
i did some encodes at 18crf (before Forteen88 posted about crf 18, weird...) my custom settings posted did about 1 or 2% better than placebo. however with crf there is the added difficulty of different file sizes so i included the 2 placebo copies for comparison. my settings did well, beating placebo in a HD 1080p sdr lossless png video! custom settings posted at top even work great on low quality, designed to remove grain while retaining high detail (an almost impossible task) even pulling detail out of a static mess! and as long as your not a grain lover, this will do excellent HD, as just proved... [ i should change the title to ALL types of content, except cel animation ;p ] i am encoding the full trailer now, will take some time for this computer & to match similar sizes. i do not test in 2pass or other modes as my settings are customized around crf and using other modes to specify exact bitrates would throw quantization and other settings off. so i went for "real world" comparisons. here is what i have--\/ sintel_trailer_2k_0001=============____crf=18____custom____.mkv sintel_trailer_2k_0001=============____crf=18____placebo__.mkv sintel_trailer_2k_0001=============____crf=18.2____placebo____.mkv very slow for comparison--\/ sintel_trailer_2k_0001=============____crf=18____vs__.mkv source clip--\/ sintel trailer clip [EDIT: scroll down few posts for full trailer, these are just few secconds] Last edited by H2sixty; 3rd October 2020 at 15:40. |
![]() |
![]() |
![]() |
#10 | Link | |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
Quote:
the order of choice was always #1)quality #2)size #3)speed i just meant that some settings are higher than needed for some content, yet the trade off is not having to tweak and be an expert at settings for every video, (ease of use + possible speed loss + no loss of quality). [EDIT: tests show no speed lost!] **however cel animation could use some changes i suggest --tskip (thanks benwaggoner), & --ipratio=1.08 --pbratio=1.00 --deblock=1,1 as per the animation tuned, settings. the animation setting also suggests --aq-strength 0.4 & --bframes Increase by 2, but --aq-strength has no effect with the more automatic aq mode of --hevc-aq & --bframes more than 8 just add better compression but loss of quality so i do not suggest changing that. any other cel animation tweaks or settings anyone? Last edited by H2sixty; 25th September 2020 at 00:10. Reason: added information in [EDIT:] |
|
![]() |
![]() |
![]() |
#11 | Link |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
sintel full trailer encodes for comparison--\/
sintel_trailer_2k_1080p24____crf=17.5____placebo____.mkv sintel_trailer_2k_1080p24____crf=18.4____custom____.mkv 3.7GB source video the placebo encode is about 5% bigger than my custom settings encode, yet i still see more detail in the custom settings encode. i do wonder how these settings would do on benwaggners encoding challenge, against Sagittaire's 4 pass encode ABR settings... or maybe my settings customized into an ABR friendly customization for a 4 pass encode that also removes grain... sadly no space for png copies of tears of steel. i would like to see 4k comparisons as well. Last edited by H2sixty; 27th September 2020 at 07:47. |
![]() |
![]() |
![]() |
#12 | Link | ||
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,992
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#14 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,992
|
That block shows specifying EVERYTHING, including default parameters. It's easier to parse if you can list or show the actual flags you set on top of the defaults.
Quote:
Are you going to take a whack at my Compression Challenge source? |
|
![]() |
![]() |
![]() |
#15 | Link | |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
Quote:
handbrake (advanced settings box)--\/ ::constrained-intra::psy-rd=0.35::psy-rdoq=14.65::rdoq-level=1::deblock=0,-3::no-sao::qcomp=0.54::scenecut-aware-qp::scenecut-window=1000::hist-scenecut::min-keyint=0::keyint=345::rc-lookahead=46::merange=58::tu-inter-depth=4::tu-intra-depth=4::limit-tu=3::temporal-layers::no-temporal-mvp::no-cutree::analyze-src-pics::rskip=2::rd-refine::opt-qp-pps::opt-cu-delta-qp::opt-ref-list-length-pps::no-wpp::pmode::frame-threads=1::hevc-aq::aq-mode=3::no-tskip::log-level=3:: x265 commands--\/ --constrained-intra --psy-rd 0.35 --psy-rdoq 14.65 --rdoq-level 1 --deblock 0:-3 --no-sao --qcomp 0.54 --scenecut-aware-qp --scenecut-window=1000 --hist-scenecut --min-keyint 0 --keyint 345 --rc-lookahead 46 --merange 58 --tu-inter-depth 4 --tu-intra-depth 4 --limit-tu 3 --temporal-layers --no-temporal-mvp --no-cutree --analyze-src-pics --rskip 2 --rd-refine --opt-qp-pps --opt-cu-delta-qp --opt-ref-list-length-pps --no-wpp --pmode --frame-threads 1 --hevc-aq --aq-mode 3 --no-tskip --log-level 3 --preset veryslow --output-depth 12 with my custom settings, switching to placebo only changes subme=4 to subme=7, & tskip is enabled, (i only like tskip for cel animation)... i went with subme=4 over 5 or 7 because it tends to look better more often then subme=7, especially in flatter areas like the lady's face in the video... however the subme=7 encode is smaller in file size, slightly, from 18002 KB to 17933 KB for the sintel clips below (52 seconds at crf 18.4)... below is an encode with my custom settings & another encode with with my custom settings + subme=7 sintel_trailer_2k_1080p24____crf=18.4____custom__(subme=4).mkv (preset=veryslow) sintel_trailer_2k_1080p24____crf=18.4____custom_+_subme=7.mkv (preset=placebo) i added aq-mode=3 because aq-mode keeps coming out to a 2 in mediainfo :/ shouldn't it be 0 since hevc-aq takes place of aq-mode=x? is this a handbrake only bug? --- does rd-refine not work with hevc-aq? if i specify aq-mode=0 (with hevc-aq) i get an error saying rd-refine requires adaptive quant... --- i listed tskip, but technically veryslow already has tskip disabled, and as you know ;) placebo has it enabled, i quote you below. (he means veryslow...) Last edited by H2sixty; 5th October 2020 at 07:57. Reason: edited x265 commands, ffmpeg is slightly different. |
|
![]() |
![]() |
![]() |
#16 | Link | |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
quote from Any advice on --tune grain ? thread
Quote:
with my settings, choosing the right crf value for proper grain removal takes a lot of tests but the file will be optimal, small and degrained. well, maybe keep a hair pinch of noise somewhere... its a constant struggle between noise reduction and keeping detail. if done right, i just consider the lost detail, detail that wasn't there. its like they didn't finish processing the video... kinda like a old blocky video that looks like they forgot to deblock, or maybe it would have took too long... and a re-encode with deblocking makes all the blocks go away, as if the video was meant to look that way and was only half processed. Last edited by H2sixty; 5th October 2020 at 08:00. |
|
![]() |
![]() |
![]() |
#17 | Link | |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
Quote:
--- what is ffmpeg command to pipe a mkv/mp4 file into x265 in realtime as a yuv? x265 only likes yuv ![]() |
|
![]() |
![]() |
![]() |
#19 | Link |
Not a Registered User
Join Date: Aug 2020
Location: earth
Posts: 24
|
thank you excellentswordfight.
i started a thread to consolidate the information where others could more easily find it. ffmpeg command to pipe a mkv/mp4 file into x265 in realtime as a yuv |
![]() |
![]() |
![]() |
#20 | Link | ||||
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,992
|
Quote:
Grainy content should also use at least --rd 4, to get chroma motion estimation. Otherwise the heavy grain in luma can decorrelate to actual motion, giving a lag between when chroma changes and when it's reflected in the screen. So you can see someone's face tone stay in the same part of the screen while their face moves somewhere else. And so you kind a peachy looking lawn and a gray face. I find this abhorrently distracting. Quote:
Quote:
I'd think --nr-inter and a lower value of --nr-intra plus a lower CRF probably would give better results the majority of the time. Quote:
I've seen some content with synthetic noise where the frames are maybe 98% noise and 2% signal. For example, someone was trying to emulate a Super8 look at 4K, but were grading on a 1080p Pulsar monitor. The grain was being rendered with a grain size appropriate to 1080p, so each pixel was quite randomized. But scaled down to 1080p, a lot of that averaged out so the operator kept yanking up the noise intensity to where the 8 least significant bits were essentially random, so it looked grainy on 1080p. With x265 circa 2016, I literally was unable to make those shots look anything short of unwatchable, even at 40 Mbps --preset-placebo, lots of --nr, preprocessing, anything. The original --tune grain came out of some of those experiments, but even it couldn't save that pathological edge case. Fortunately HDR grading is all done at native resolution these days, so we don't see the same kind of weird one-off nightmares we suffered from in the early days of the format. |
||||
![]() |
![]() |
![]() |
Tags |
audio, handbrake, hevc, opus, x265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|