fix variables for loglevel

dryrun doesn't work, doesn't like /dev/null or null... the examples use -f but this command doesn't... have to reconsider
This commit is contained in:
Cody Cook 2019-05-31 16:49:17 -07:00
commit 80ed1d3156

View file

@ -42,7 +42,7 @@ ffmpegcheck(){
## Env ## ## Env ##
SAVEIFS=$IFS SAVEIFS=$IFS
IFS=$(echo -en "\n\b") IFS=$(echo -en "\n\b")
loglevel="level+info" loglevel="-loglevel level+info"
FFMPEG="/data/sourcecode/ffmpeg/ffmpeg-4.1.3-amd64-static/ffmpeg" FFMPEG="/data/sourcecode/ffmpeg/ffmpeg-4.1.3-amd64-static/ffmpeg"
if [[ ! -f "$FFMPEG" ]]; then if [[ ! -f "$FFMPEG" ]]; then
FFMPEG=$(/usr/bin/env which ffmpeg) FFMPEG=$(/usr/bin/env which ffmpeg)
@ -95,7 +95,7 @@ while getopts d:p:fnXhkq OPT; do
echo "[debug] no custom pathing; using $WORKPATH" echo "[debug] no custom pathing; using $WORKPATH"
fi ;; fi ;;
q) q)
loglevel="quiet" loglevel="-loglevel quiet"
echo "[debug] disabling ffmpeg output" ;; echo "[debug] disabling ffmpeg output" ;;
X) X)
dryrun="1" dryrun="1"
@ -130,7 +130,7 @@ if [[ "$filelist" ]]; then
-codec:s srt \ -codec:s srt \
-metadata:s:s:0 language=eng \ -metadata:s:s:0 language=eng \
$force \ $force \
-loglevel "$loglevel" \ $loglevel \
"${OUTFILE}" "${OUTFILE}"
exitcode="$?" exitcode="$?"