From 575356a9b4d57de2fe03f7bd70b8572194dc46b5 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Wed, 13 May 2020 23:25:16 +0200 Subject: [PATCH] fix comparisons Former-commit-id: 96d201d911ce7b9220314ff63498733292cc9af5 --- src/static/client.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/static/client.sh b/src/static/client.sh index be9a425..9b8bfb3 100644 --- a/src/static/client.sh +++ b/src/static/client.sh @@ -73,7 +73,7 @@ while true; do etype=`echo $job | jq -r '.description.options | keys | .[]'` - if [$etype != "FFMPEG"] || [$etype != "AOMENC" ]; then + if [$etype != "FFMPEG"] && [$etype != "AOMENC" ]; then echo "That's not a valid encoder!! Are you being attacked?" fi @@ -85,7 +85,7 @@ while true; do options=`echo $job | jq .description.options.$etype` case $etype in - AOMENC) + "AOMENC") aomenco=`echo $options | jq -r .aomenc` aomenco=${aomenco//[^a-zA-Z0-9_\- =]/} ffmpego=`echo $options | jq -r .ffmpeg` @@ -171,7 +171,7 @@ while true; do rm "$input" fi ;; - FFMPEG) + "FFMPEG") echo "Starting FFMPEG encode" if [[ $two_pass = true ]]; then echo "Running in two-pass mode" @@ -183,7 +183,10 @@ while true; do lag_in_frames=`echo $options | jq -r .lag_in_frames` set +e - ffmpeg -i $input -c:v libaom-av1 -strict experimental -pass 1 -an -vf scale=$width:$height -pix_fmt $pix_fmt -tiles $tiles -lag-in-frames $lag_in_frames $flag_g -f ivf /dev/null + ffmpeg -i $input -c:v libaom-av1 -strict experimental -pass 1 -an \ + -vf scale=$width:$height -pix_fmt $pix_fmt \ + -tiles $tiles -lag-in-frames $lag_in_frames $flag_g \ + -f ivf /dev/null fi ;;