summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2021-02-07 19:15:06 +0100
committerJonas Smedegaard <dr@jones.dk>2021-02-07 19:33:15 +0100
commit15b159c6a12c3f02ee96a916f8425e3e624a7b54 (patch)
tree84cdb00a34fcee5460dcd8eac1d93e8baf590ef3
parent192f507e8a32c6b14a9be6dbdde0be85da93bfb4 (diff)
tidy: use keys vp8 vp9 (not webm) where appropriate
-rwxr-xr-xlocalvideowebencode36
1 files changed, 22 insertions, 14 deletions
diff --git a/localvideowebencode b/localvideowebencode
index bacf5dd..8949f76 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -471,16 +471,24 @@ if [ -n "$_width" ] && [ -n "$_height" ]; then
fi
_frames="${framerate:-$framerate_in}"
-webm_qmin=0
-webm_qmax=63
-webm_lag=16
-webm_tokenparts_log2=0
+qmin_vp8=0
+qmin_vp9=0
+qmax_vp8=63
+qmax_vp9=63
+lag_vp8=16
+lag_vp9=16
+tokenparts_log2_vp8=0
+tokenparts_log2_vp9=0
if [ -n "$_pixels" ] && [ $_pixels -ge $((1024*768)) ]; then
- webm_qmin=11
- webm_qmax=51
- webm_tokenparts_log2=2
+ qmin_vp8=11
+ qmin_vp9=11
+ qmax_vp8=51
+ qmax_vp9=51
+ tokenparts_log2_vp8=2
+ tokenparts_log2_vp9=2
if [ -n "$_frames" ] && [ $_frames -gt 40 ]; then
- webm_lag=25
+ lag_vp8=25
+ lag_vp9=25
profile_vp8=1
profile_vp9=1
fi
@@ -627,12 +635,12 @@ _ffmpeg_bitrate_vp9="${do_bitrate_vp9:+-b:v $bitrate_vp9} -minrate $((bitrate_vp
_vpxenc_bitrate_vp9="--target-bitrate=$((bitrate_vp9/1000)) --minsection-pct=5 --maxsection-pct=1200"
# format low-level options
-_melt_misc_vp8="qmin=$webm_qmin qmax=$webm_qmax g=120 deadline=good cpu-used=$cpu_vp8${profile_vp8:+ vprofile=$profile_vp8} auto-alt-ref=1 lag-in-frames=$webm_lag arnr-maxframes=7 arnr-strength=5 arnr-type=centered"
-_ffmpeg_misc_vp8="-qmin $webm_qmin -qmax $webm_qmax -g 120 -deadline good -cpu-used $cpu_vp8${profile_vp8:+ -profile:v $profile_vp8} -auto-alt-ref 1 -lag-in-frames $webm_lag -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered"
-_vpxenc_misc_vp8="--min-q=$webm_qmin --max-q=$webm_qmax --kf-max-dist=120 --good --cpu-used=$cpu_vp8${profile_vp8:+ --profile=$profile_vp8} --token-parts=$webm_tokenparts_log2 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3"
-_melt_misc_vp9="qmin=$webm_qmin qmax=$webm_qmax g=120 deadline=good cpu-used=$cpu_vp9${profile_vp9:+ vprofile=$profile_vp9} auto-alt-ref=1 lag-in-frames=$webm_lag arnr-maxframes=7 arnr-strength=5 arnr-type=centered"
-_ffmpeg_misc_vp9="-qmin $webm_qmin -qmax $webm_qmax -g 120 -deadline good -cpu-used $cpu_vp9${profile_vp9:+ -profile:v $profile_vp9} -auto-alt-ref 1 -lag-in-frames $webm_lag -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered"
-_vpxenc_misc_vp9="--min-q=$webm_qmin --max-q=$webm_qmax --kf-max-dist=120 --good --cpu-used=$cpu_vp9${profile_vp9:+ --profile=$profile_vp9} --tile-columns=$webm_tokenparts_log2 --tile-rows=$webm_tokenparts_log2 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3"
+_melt_misc_vp8="qmin=$qmin_vp8 qmax=$qmax_vp8 g=120 deadline=good cpu-used=$cpu_vp8${profile_vp8:+ vprofile=$profile_vp8} auto-alt-ref=1 lag-in-frames=$lag_vp8 arnr-maxframes=7 arnr-strength=5 arnr-type=centered"
+_ffmpeg_misc_vp8="-qmin $qmin_vp8 -qmax $qmax_vp8 -g 120 -deadline good -cpu-used $cpu_vp8${profile_vp8:+ -profile:v $profile_vp8} -auto-alt-ref 1 -lag-in-frames $lag_vp8 -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered"
+_vpxenc_misc_vp8="--min-q=$qmin_vp8 --max-q=$qmax_vp8 --kf-max-dist=120 --good --cpu-used=$cpu_vp8${profile_vp8:+ --profile=$profile_vp8} --token-parts=$tokenparts_log2_vp8 --auto-alt-ref=1 --lag-in-frames=$lag_vp8 --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3"
+_melt_misc_vp9="qmin=$qmin_vp9 qmax=$qmax_vp9 g=120 deadline=good cpu-used=$cpu_vp9${profile_vp9:+ vprofile=$profile_vp9} auto-alt-ref=1 lag-in-frames=$lag_vp9 arnr-maxframes=7 arnr-strength=5 arnr-type=centered"
+_ffmpeg_misc_vp9="-qmin $qmin_vp9 -qmax $qmax_vp9 -g 120 -deadline good -cpu-used $cpu_vp9${profile_vp9:+ -profile:v $profile_vp9} -auto-alt-ref 1 -lag-in-frames $lag_vp9 -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered"
+_vpxenc_misc_vp9="--min-q=$qmin_vp9 --max-q=$qmax_vp9 --kf-max-dist=120 --good --cpu-used=$cpu_vp9${profile_vp9:+ --profile=$profile_vp9} --tile-columns=$tokenparts_log2_vp9 --tile-rows=$tokenparts_log2_vp9 --auto-alt-ref=1 --lag-in-frames=$lag_vp9 --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3"
# format options
# emulate VP8 Constant Quality using "loose" Constrained Quality