summaryrefslogtreecommitdiff
path: root/localvideowebencode
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2021-02-08 19:34:14 +0100
committerJonas Smedegaard <dr@jones.dk>2021-02-08 20:10:53 +0100
commitd2c0fb8c3392b57a172653aac079bce1ac7a9a59 (patch)
tree1dfda2a709d5aa33639f8064f9f6b4dda2cde761 /localvideowebencode
parentbbab8a2b55d9ab84ef4245dda89e178dd81362d0 (diff)
tidy: use generalized variables $use_*_any
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-xlocalvideowebencode11
1 files changed, 8 insertions, 3 deletions
diff --git a/localvideowebencode b/localvideowebencode
index 5cdf995..b0dc7b6 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -593,6 +593,11 @@ if [ -n "$use_ffmpeg_avc" ]; then
else
use_melt_avc=yes
fi
+use_melt_any="${webm:+$use_melt_vp8}${webm_vp9:+$use_melt_vp9}${mp4:+$use_melt_avc}"
+use_ffmpeg_any="${webm:+$use_ffmpeg_vp8}${webm_vp9:+$use_ffmpeg_vp9}${mp4:+$use_ffmpeg_avc}"
+use_vpxenc_any="${webm:+$use_vpxenc}${webm_vp9:+$use_vpxenc}"
+use_opusenc_any="${webm:+$use_oggenc}${webm_vp9:+$use_opusenc}"
+use_oggenc_any="${webm:+$use_oggenc}${webm_vp9:+$use_opusenc}"
[ -z "$gpu" ] || echo >&2 "GPU platform enabled: $gpu"
@@ -712,7 +717,7 @@ if [ -n "$loudness" ] && [ -z "$silence$_melt_loudness" ]; then
fi
if [ -n "${webm:+$multipass_vp8}${webm_vp9:+$multipass_vp9}${mp4:+$multipass_avc}" ]; then
- if [ -n "${webm:+$use_vpxenc}${webm_vp9:+$use_vpxenc}" ]; then
+ if [ -n "$use_vpxenc_any" ]; then
echo >&2 "Analyzing video complexity, as discrete processes..."
$melt $_melt_infiles $filters $_melt_stdout \
| pee \
@@ -722,7 +727,7 @@ if [ -n "${webm:+$multipass_vp8}${webm_vp9:+$multipass_vp9}${mp4:+$multipass_avc
--pass=1 --fpf=${stem}_vp9.log -o /dev/null"} \
${mp4:+${use_ffmpeg_avc:+$_ffmpeg_rawvideo $_ffmpeg_avc -an \
-pass 1 -passlogfile ${stem}_avc /dev/null}}
- elif [ -n "${webm:+$use_ffmpeg_vp8}${webm_vp9:+$use_ffmpeg_vp9}${mp4:+$use_ffmpeg_avc}" ]; then
+ elif [ -n "$use_ffmpeg_any" ]; then
echo >&2 "Analyzing video complexity, integrated with ffmpeg"
$melt $_melt_infiles $filters $_melt_stdout \
${webm:+${use_melt_vp8:+-consumer avformat:$stem.webm $_melt_webm \
@@ -750,7 +755,7 @@ if [ -n "${webm:+$multipass_vp8}${webm_vp9:+$multipass_vp9}${mp4:+$multipass_avc
fi
fi
-if [ -n "${webm:+$use_vpxenc$use_ffmpeg_vp8$use_oggenc}${webm_vp9:+$use_vpxenc$use_ffmpeg_vp9$use_opusenc}${mp4:+$use_ffmpeg_avc}" ]; then
+if [ -n "$use_ffmpeg_any$use_vpxenc_any$use_opusenc_any$use_oggenc_any" ]; then
echo >&2 "Encoding video${channels:+ and extracting audio}, as discrete files..."
$melt $_melt_infiles \
${channels:+$audioprefilters \