Posts by iAvoe

    x265 Common Hard (more control, less no-brainer settings, but makes things complex...)

    [

    Note: all unlisted settings are default

    Warning: laptop users, remember connect to power


    Split Block: --ctu < <1600x900=16; 1600x900~2080x1170=32; >2080x1170=64> --min-cu-size 16 --limit-tu 1 --tu-intra-depth 2 --tu-inter-depth 2


    Motion search: --me umh --subme 5 --merange <minimum(52 or ctu minus 4 and minus subme)> --analyze-src-pics

    *Alternative M. Search*: --hme-search umh --subme 5 --hme-range <Cm4mS÷4,Cm4mS÷2,ctu minus 4 minus subme>


    Intra-frame Search: --max-merge 2 --early-skip --b-intra


    Rate/frame Control: --no-open-gop --min-keyint 5 --ref 3 --fades --pbratio <1.2 for grain-less anime only, keep default in any other situation> --bframes 14 --b-adapt 2 --no-strong-intra-smoothing --frame-dup --dup-threshold 59


    Transitions: --scenecut-aware-qp --max-qp-delta 6


    Quantization: --crf <17~20, or any> --crqpoffs -3 --cbqpoffs -1


    RDO-Quantization: --rdoq-level 1


    Adaptive Quantize: --aq-mode 1 --aq-strength <grain-less anime=0.8, film=1> --qg-size 16


    Mode Decision: --rd 5 --limit-modes --limit-refs 3 --rect --rskip 1 --rc-lookahead <triple framerate (whole number)> --tskip-fast


    Rate Distort Optimize: --psy-rd <film=1.6, no-grain anime=0.6 *add or minus 0.6 if ctu is 64 or ctu is 16*>

    *Note here I've disabled psy-rdoq by default as type II recommendation, suggests it has duplicated function as psy-rd, which there's only 1 needed

    *Type III recommendation suggests to use psy-rdoq only, as psy-rd is currently slow for no CPU assembly written, --psy-rdoq <film=3.4, no-grain anime=2.3, *add or minus 0.2 if ctu is 64 or ctu is 16*>


    Deblock: <as default, or --deblock 0:0 for less filtering strength>


    Sample Accommodating Offset: --limit-sao --sao-non-deblock


    Data Perspective Lossless: <disabled as default>


    Picture/Sequence/Rate Parameter Set: --opt-qp-pps --opt-ref-list-length-pps --repeat-headers <for playing unmultiplexed h.265 video normally>


    Input and Output (maybe consistency?): --hash crc --allow-non-conformance <use when writing custom parameters like here> --idr-recovery-sei <use when playing through network like from nas>


    Processor Workload: --pools <if you have multiple CPU-RAMs, check x265.readthedocs.io for this parameter>


    Multi-thread referencing: <as default>


    HDR Support-step1: find out you video color space

    G(x0.265, y0.690), B(x0.150, y0.060), R(x0.680, y0.320), WP(x0.3127, y0.329) is DCI-P3

    G(x0.30, y0.60), B(x0.150, y0.060), R(x0.640, y0.330), WP(x0.3127,y0.329) is bt709

    G(x0.170, y0.797), B(x0.131, y0.046), R(x0.708, y0.292), WP(x0.3127,y0.329) is bt2020


    HDR Support-step2: --master-display <write the correct param as the above information that matches:

    For HDR DCI-P3: G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(?,1)

    For HDR bt709: G(15000,30000)B(7500,3000)R(32000,16500)WP(15635,16450)L(?,1)

    For HDR bt2020: G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(?,1)


    HDR Support-step3: Check source HDR video's luminance, and replace the "?" above with the exact amount as is. There is no standard, so each HDR video could be different on that


    HDR Support-step4: --max-cll <maximum content light level, use only when source video is specified, or discovered by ffprobe while source video did not specify>

    --hdr10 <increase bitrate for HDR10 videos>

    --colormatrix <choose one according to source video INFO: GBR bt709 fcc bt470bg smpte170m smpte240m YCgCo

    bt2020nc bt2020c smpte2085 ictcp>

    --transfer <transfer characteristics, choose one or keep unspecified, if source video is unspecified: GBR bt709 fcc bt470bg smpte170m smpte240m YCgCo

    bt2020nc bt2020c smpte2085 ictcp>


    Windows export log: 2>D:\folder\log.txt

    Linux export log: 2>&1 | tee D:\folder\log.txt

    ]


    x265 Slow Hard (gives extra compression... or less compression trades to more quality)

    [

    Note: all unlisted settings are default

    Warning: laptop users, remember connect to power


    Split Block: --ctu < <1600x900=16; 1600x900~2080x1170=32; >2080x1170=64> --limit-tu 1


    Motion search: --me star --subme 5 --merange <minimum(52 or ctu minus 4 and minus subme)> --analyze-src-pics

    *Alternative M. Search*: --hme-search star --subme 5 --hme-range <CmS÷4,CmS÷2,ctu minus subme>


    Intra-frame Search: --max-merge 4 --early-skip --b-intra


    Rate/frame Control: --no-open-gop --min-keyint 1 --ref 3 --fades --bframes 16 --b-adapt 2 --no-strong-intra-smoothing --frame-dup --dup-threshold 70


    Transitions: --scenecut-aware-qp --scenecut-window 650 --max-qp-delta 6


    Quantization: --crf <17~20, or any> --crqpoffs -3 --cbqpoffs -1


    RDO-Quantization: --rdoq-level 2


    Adaptive Quantize: --aq-mode 1 --aq-strength <grain-less anime=0.8, film=1> --qg-size 16


    Mode Decision: --rd 5 --limit-modes --limit-refs 3 --rect --rskip 1 --rc-lookahead <quadruple framerate (whole number)>


    Rate Distort Optimize: --psy-rd <film=1.6, no-grain anime=0.6 *add or minus 0.6 if ctu is 64 or ctu is 16*> --rdpqnalty 1 --splitrd-skip

    *Note here I've disabled psy-rdoq by default as type II recommendation, suggests it has duplicated function as psy-rd, which there's only 1 needed

    *Type III recommendation suggests to use psy-rdoq only, as psy-rd is currently slow for no CPU assembly written, --psy-rdoq <film=3.4, no-grain anime=2.3, *add or minus 0.2 if ctu is 64 or ctu is 16*>


    Deblock: <as default, or --deblock 0:0 for less filtering strength>


    Sample Accommodating Offset: --limit-sao --sao-non-deblock --selective-sao 2


    Data Perspective Lossless: <disabled as default>


    Picture/Sequence/Rate Parameter Set: --opt-qp-pps --opt-ref-list-length-pps --repeat-headers <for playing unmultiplexed h.265 video normally>


    Input and Output (maybe consistency?): --hash crc --allow-non-conformance <use when writing custom parameters like here> --idr-recovery-sei <use when playing through network like from nas> --nr-inter 20 --nr-inter 10 (nrs' are applied very lightly, so it should increase compression with a little trade off)


    Processor Workload: --pools <if you have multiple CPU-RAMs, check x265.readthedocs.io for this parameter>


    Multi-thread referencing: <as default>


    HDR Video Support Setp 1,2,3,4: <same as above>


    Windows export log: 2>D:\folder\log.txt

    Linux export log: 2>&1 | tee D:\folder\log.txt

    ]

    Done... sorry for the delay, I had final exams to do and staying home at the same time<X

    Take care

    x265 Common (all situation should apply, but still very slow)

    [

    Note: all unlisted settings are default

    Warning: laptop users, remember connect to power

    Warning: probably nerdy/hardcore content... though I'm not willing to admit... lol


    Split Block: --ctu <less than 1600x900=16; 1600x900~2080x1170=32; more than 2080x1170=64> --rect --min-cu-size 16 --limit-tu 1 --tu-intra-depth 2 --tu-inter-depth 2 --tskip-fast


    Motion search: --me umh --subme 5 --merange <ctu minus 4 and minus subme> --analyze-src-pics

    *Alternative M. Search*: --hme-search umh --subme 5 --hme-range <Cm4mS÷4,Cm4mS÷2,ctu minus 4 minus subme>


    Intra-frame Search: --max-merge 2 --limit-modes --limit-refs 3 --early-skip --rskip 1 --rc-lookahead <fps×3> --fast-intra --b-intra


    Rate Control: --no-open-gop --min-keyint 5 --ref 3 --fades --pbratio <1.2 for waifu-anime only, other situation keep default> --bframes 14 --b-adapt 2 --no-strong-intra-smoothing


    Transitions: --scenecut-aware-qp --max-qp-delta 6


    Quantization: --crf 17 --crqpoffs -3 --cbqpoffs -1


    Adaptive Quantize: --aq-mode 1 --aq-strength <waifu-anime=0.8, film=1> --qg-size 16


    Rate Distort Optimize: --rd 3 --rdpenalty 1 --splitrd-skip --rdoq-level 2 --psy-rdoq <film=3.4, wf-anime=2.3, *add or minus 0.2 if ctu is 64 or ctu is 16*> --psy-rd <film=1.6, wf-anime=0.6 *add or minus 0.6 if ctu is 64 or ctu is 16*>


    Deblock: <as default>


    Sample Accommodating Offset: --limit-sao --sao-non-deblock


    Data Perspective Lossless: <as default>


    Picture/Sequence/Rate Parameter Set: --opt-qp-pps --opt-ref-list-length-pps --repeat-headers <for playing unmultiplexed h.265 video normally>


    Input and Output (maybe consistency?): --hash crc --frame-dup --dup-threshold 59 --allow-non-conformance <use when writing custom parameters like here> --idr-recovery-sei <use when playing through network like from nas>


    Processor Workload: --pools <select a single processor-ramsticks combination for multi-cpu setup ONLY, don't use more than 1 processor at same time as it slows everything down without improve. e.g. -,+ specifies 2 cpu-ram group, use the 2nd cpu, as premiere/FX/vegas is taking the 1st processor already>


    Multi-thread referencing: <as default>


    HDR Video: --master-display <tells decoder which color space to use :

    DCI-P3: G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(?,1)

    bt709: G(15000,30000)B(7500,3000)R(32000,16500)WP(15635,16450)L(?,1)

    bt2020: G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(?,1)


    CHECK SOURCE HDR VIDEO INFORMATION, MATCH WITH ONE BELOW, AND USE AN ACCORDING VALUE ABOVE:

    L(?,1) COULD BE L(10000000,1), L(400,1)... CHECK THE SOURCE VIDEO


    DCI-P3: G(x0.265, y0.690), B(x0.150, y0.060), R(x0.680, y0.320), WP(x0.3127, y0.329)

    bt709: G(x0.30, y0.60), B(x0.150, y0.060), R(x0.640, y0.330), WP(x0.3127,y0.329)

    bt2020: G(x0.170, y0.797), B(x0.131, y0.046), R(x0.708, y0.292), WP(x0.3127,y0.329)



    > --max-cll <maximum content light level,maximum frame average light level> (use only when source video is specified, or found by ffprobe eventhough source video did not specify) --hdr10 <increase bitrate for HDR10 videos> --colormatrix <choose one according to source video INFO: GBR bt709 fcc bt470bg smpte170m smpte240m YCgCo

    bt2020nc bt2020c smpte2085 ictcp> --transfer <transfer characteristics, choose one or keep unspecified as the source video: GBR bt709 fcc bt470bg smpte170m smpte240m YCgCo

    bt2020nc bt2020c smpte2085 ictcp>


    Windows export log: 2>D:\folder\log.txt

    Linux export log: 2>&1 | tee D:\folder\log.txt

    ]

    These settings are written in cli format that is commonly used, e.g. --chroma-qp-offset 3; voukoder (and obs) uses api format which gives the same formatting with multiple encoders, e.g. chroma_qp_offset=3

    x264 Common (generally all video applies)

    [

    Note: all unlisted settings are default

    Motion search: --me umh --subme 10 (7mod x264 has max of 11) --merange 32

    Rate Control: --keyint <FRAME RATE × 8> --min-keyint <1~5, 1 gives the best quality, faster as it increases> --bframes 11 --b-adapt 2 --ref 3 --no-fast-pskip --direct auto

    Quantization: --crf 17 --qpmax 22 --rc-lookahead <FRAME RATE × 3>

    Adaptive Quantization: --aq-mode 2 --aq-strength 0.7 --trellis 2

    Loop Filter: --deblock 0:0 --psr-rd 0.7:0.2

    GPU Acceleration (don't expect it works helps a lot): --opencl

    Very very light Denoise: --nr 10


    Resize/Crop(more info can be found on internet): --vf crop:left:up:right:down/resize:width,height,sar(rectangular pixel compression),box(not sure what's this),chromaSubsampling,resizeAlgorithm


    Resize up quality boost: --partitions all


    Windows export log: 2>D:\folder\log.txt

    Linux export log: 2>&1 | tee D:\folder\log.txt]

    x264 fast (don't use original presets, they're not well aged!)

    [

    Motion search: --me hex --subme 8 --merange 16 --no-chroma-me

    Rate Control: --keyint <FRAME RATE × 5> --min-keyint <KEYINT ÷ 2> --bframes 6 --ref 3 --scenecut 33

    Quantization: --crf 17 --qpmax 22 --rc-lookahead <FRAME RATE × 2>

    Adaptive Quantization: --aq-mode 3 --aq-strength 0.8

    Loop Filter: --deblock 1:0 --psr-rd 0.7:0.3

    GPU Acc: --opencl]

    x264 lossless, special use only

    [

    Motion search: not working

    Rate Control: --keyint <FRAME RATE × 3~4> --min-keyint <=KEYINT> --bframes 6 --ref 3

    Quantization: --qp 0 --chroma-qp-offest -3

    Adaptive Quantization: as default

    Loop Filter: not working

    GPU Acc: --opencl]

    x264 Very slow, Good quality high compression

    [

    Motion search: --me esa --subme 10 --merange 52

    Rate Control: --keyint <FRAME RATE × 10> --min-keyint 1 --bframes 13 --b-adapt 2 --ref 3 --no-fast-pskip --direct auto --scenecut 35 --ipratio 1.5

    Quantization: --qpmin 13 --crf 19.5 --rc-lookahead <FRAME RATE × 3>

    Adaptive Quantization: --aq-mode 3 --aq-strength 0.8 --trellis 2

    Loop Filter: <default>

    GPU Acc: --opencl

    Very light Denoise: --nr 20

    hqdn3d denoise (x264 7mod exclusive, or filter setting in vouk): --vf hqdn3d:1.2,1.2,1.2,1.2

    Quality drop at credits roll: --zones <creditsBeginFrame>,<creditsEndFrame>,crf=28

    ]

    x264 Very slow, High quality high compression (great for ~5min clips)

    [

    Motion search: --me esa --subme 10 --merange 52

    Rate Control: --keyint <FRAME RATE × 6> --min-keyint 1 --bframes 14 --b-adapt 2 --ref 3 --no-fast-pskip --direct auto

    Quantization: --qpmax 24 --crf 17 --rc-lookahead <FRAME RATE × 3>

    Adaptive Quantization: --aq-mode 2 --aq-strength 0.7 --trellis 2

    Loop Filter: --deblock 0:0 --no-psy

    GPU Acc: --opencl

    Very very light Denoise: --nr 10

    ]

    x264 Maximum Useful Cost Possible, good quality

    [Motion Search: --me esa --merange 56 --subme 10

    Rate Control: --keyint <fps × 5> --min-keyint 1 --bframes 16 --b-adapt 2 --ref 3 --no-fast-pskip --direct auto --pbratio 1.5

    Quant: --qpmax 24 --crf 18 --rc-lookahead <fps × 4> --chroma-qp-offset -2 --vbv-maxrate 8000

    Adaptive Quant: --aq-mode 2 --aq-strength 0.7 --trellis 2

    Loop Filter: --deblock 0:0 --no-psy

    GPU Acc: --opencl

    Very light Denoise: --nr 20]

    x264 Manual Quality, unknown compression, very fast

    [Motion Search: as default

    Rate Control: --keyint <FRAME RATE × 2~3> --min-keyint <=KEYINT> --bframes 6 --ref 3 --scenecut 33

    Quantization: --qp <18 or other qualities you wish>

    Adaptive Quantization: not working

    Loop Filter: --deblock 0:-1 --psr-rd 0.7:0.53

    GPU Acc: --opencl]