From 949c7d0d840aee4c41382accf7942e5cee29dffa Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 4 Feb 2021 19:50:59 +0100 Subject: tidy: isolate codec low-level options --- localvideowebencode | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'localvideowebencode') diff --git a/localvideowebencode b/localvideowebencode index 3a1a441..dd76b69 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -507,11 +507,13 @@ _opusenc_downmix="${downmix_opusenc:+${stereo:+--downmix-stereo}${mono:+--downmi # limit (i.e. avoid peaks "clipping") _melt_postfilters_audio="${limit:+-filter ladspa.1077}" +# codec low-level options +_vpxenc_vpx="--min-q=$webm_qmin --max-q=$webm_qmax${multipass:+ --minsection-pct=5 --maxsection-pct=1200} --kf-max-dist=120 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3" + # codec options _melt_theora="vcodec=libtheora${bitrate_theora:+ vb=$bitrate_theora} qscale=$q_theora" _melt_vp8="vcodec=$encoder_vp8${pre_vp8:+ vpreset=$pre_vp8}${preset_vp8:+ preset=$preset_vp8}${bitrate_vp8:+ ${no_q_vp8:+ vb=$bitrate_vp8} minrate=$((bitrate_vp8/20)) maxrate=$((bitrate_vp8*12))}${q_vp8:+ $qkey_vp8=$q_vp8} cpu-used=$cpu_vp8" _ffmpeg_vp8="-c:v $encoder_vp8${pre_vp8:+ -vpre $pre_vp8}${preset_vp8:+ preset $preset_vp8}${bitrate_vp8:+ ${no_q_vp8:+-b:v $bitrate_vp8} -minrate $((bitrate_vp8/20)) -maxrate $((bitrate_vp8*12))}${q_vp8:+ ${no_bitrate_vp8:+ -b:v 0 }-$qkey_vp8 $q_vp8} -cpu-used $cpu_vp8" -_vpxenc_vpx="--min-q=$webm_qmin --max-q=$webm_qmax${multipass:+ --minsection-pct=5 --maxsection-pct=1200} --kf-max-dist=120 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3" _vpxenc_vp8="--codec=vp8${bitrate_vp8:+ --target-bitrate=$((bitrate_vp8/1000))} --good --end-usage=${no_q_vp8:+vbr}${q_vp8:+cq --cq-level=$q_vp8} --cpu-used=$cpu_vp8 $_vpxenc_vpx --token-parts=$webm_tokenparts_log2" _melt_vp9="vcodec=$encoder_vp9${pre_vp9:+ vpreset=$pre_vp9}${preset_vp9:+ preset=$preset_vp9}${bitrate_vp9:+ ${no_q_vp9:+vb=$bitrate_vp9} minrate=$((bitrate_vp9/20)) maxrate=$((bitrate_vp9*12))}${q_vp9:+ $qkey_vp9=$q_vp9} cpu-used=$cpu_vp9" _ffmpeg_vp9="-c:v $encoder_vp9${pre_vp9:+ -vpre $pre_vp9}${preset_vp9:+ -preset $preset_vp9}${bitrate_vp9:+ ${no_q_vp9:+-b:v $bitrate_vp9} -minrate $((bitrate_vp9/20)) -maxrate $((bitrate_vp9*12))}${q_vp9:+ ${no_bitrate_vp9:+-b:v 0 }-$qkey_vp9 $q_vp9} -cpu-used $cpu_vp9" -- cgit v1.2.3