question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some x265 additional params are being ignored by the encoder

See original GitHub issue

I can’t figure out why no-sao and selective-sao=0 are being ignored. Additional params are deblock=-3:-3:no-sao:selective-sao=0:keyint=240 Raw command is "ffmpeg.exe" -y -i "file.mkv" -max_muxing_queue_size 1024 -map 0:0 -c:v libx265 -pix_fmt yuv420p10le -x265-params "deblock=-3:-3:no-sao:selective-sao=0:keyint=240:aq-mode=2:repeat-headers=1:strong-intra-smoothing=1:bframes=4:b-adapt=2:frame-threads=0:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:hdr10_opt=1:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,20):max-cll=0,0:hdr10=1" -crf 17 -preset medium -map_metadata -1 -map_chapters 0 -map 0:4 -c:1 copy -disposition:1 default -metadata:s:1 language='eng' -map 0:5 -c:2 copy -disposition:2 0 -metadata:s:2 language='eng' -map 0:6 -c:3 copy -disposition:3 0 -metadata:s:3 language='chi' -map 0:7 -c:4 copy -disposition:4 0 -metadata:s:4 language='hrv' -map 0:8 -c:5 copy -disposition:5 0 -metadata:s:5 language='cze' -map 0:9 -c:6 copy -disposition:6 0 -metadata:s:6 language='dan' -map 0:10 -c:7 copy -disposition:7 0 -metadata:s:7 language='dut' -map 0:11 -c:8 copy -disposition:8 0 -metadata:s:8 language='fin' -map 0:12 -c:9 copy -disposition:9 0 -metadata:s:9 language='fre' -map 0:13 -c:10 copy -disposition:10 0 -metadata:s:10 language='ger' -map 0:14 -c:11 copy -disposition:11 0 -metadata:s:11 language='gre' -map 0:15 -c:12 copy -disposition:12 0 -metadata:s:12 language='heb' -map 0:16 -c:13 copy -disposition:13 0 -metadata:s:13 language='hun' -map 0:17 -c:14 copy -disposition:14 0 -metadata:s:14 language='ita' -map 0:18 -c:15 copy -disposition:15 0 -metadata:s:15 language='kor' -map 0:19 -c:16 copy -disposition:16 0 -metadata:s:16 language='nor' -map 0:20 -c:17 copy -disposition:17 0 -metadata:s:17 language='pol' -map 0:21 -c:18 copy -disposition:18 0 -metadata:s:18 language='por' -map 0:22 -c:19 copy -disposition:19 0 -metadata:s:19 language='por' -map 0:23 -c:20 copy -disposition:20 0 -metadata:s:20 language='rum' -map 0:24 -c:21 copy -disposition:21 0 -metadata:s:21 language='rus' -map 0:25 -c:22 copy -disposition:22 0 -metadata:s:22 language='slv' -map 0:26 -c:23 copy -disposition:23 0 -metadata:s:23 language='spa' -map 0:27 -c:24 copy -disposition:24 0 -metadata:s:24 language='spa' -map 0:28 -c:25 copy -disposition:25 0 -metadata:s:25 language='swe' -map 0:29 -c:26 copy -disposition:26 0 -metadata:s:26 language='tha' -map 0:30 -c:27 copy -disposition:27 0 -metadata:s:27 language='tur' "file2.mkv" The mediainfo of the output file shows, amongst other things ...deblock=-3:-3 / sao / no-sao-non-deblock / rd=3 / selective-sao=4.... So deblock is working but options for sao are being ignored. keyint=240 is also there so there’s something specific about sao. Is it option in the UI that I’m just missing which is overriding the extra parameters?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
E-t-zcommented, Jan 26, 2021

I just use it to avoid bitrate overshooting, over particular level spec, with very low crf’s which I sometimes use. And I was a bit unsure, when encoding HEVC, if I should use Advanced options or add it as x265 param, hence I continued to use it as I initially set it up in custom profile.

BTW, I started to use VBV, when there were no advanced panel available 😄

1reaction
clidxcommented, Jan 25, 2021

I figured it out. ffmpeg requires different values of the same parameter to be separated by a , rather than : like Handbrake etc. So it should be deblock=-3,-3. For some reason this causes the parsing of the next parameter to fail, so in my case it was trying to read -3:no-sao as a single parameter (which is odd since it has a : in it). Also all parameters must be assigned a value even if they can be used on their own in other libx265 encoders, e.g. no-sao=1 or sao=0. With the person who messaged you, since the deblock param is so common in x265 encoding, that could be the problem as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Options — x265 documentation - Read the Docs
Sets parameters to preselected values, trading off compression efficiency against encoding speed. These parameters are applied before all other input parameters ...
Read more >
#4284 (FFmpeg doesn't pass -x265-params to the x265 ...
Hi! Summary of the bug: When I'm trying to pass x265 parameters by using -x265-params, multiple issues happen: Some parameters may be reported...
Read more >
ffmpeg does not apply parameters with libx265
When I use this avs as input for ffmpeg, it shows me the encoding is based on 1920x540, although the interlaced flag is...
Read more >
x265/svthevc.rst at master · videolan/x265 · GitHub
Since SVT-HEVC params/CLI are not exposed outside, it has to be configured ... and maps all other x265 CLI's present in the command...
Read more >
Re-encoding video library in x265 (HEVC) with no quality loss
However, a few videos which are of very high quality (e.g. one movie print which is of 5GB) loses quality -- the video...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found