diff --git a/ts-to-mkv.sh b/ts-to-mkv.sh index 536c047..d7d39ae 100644 --- a/ts-to-mkv.sh +++ b/ts-to-mkv.sh @@ -47,12 +47,6 @@ FFMPEG="/data/sourcecode/ffmpeg/ffmpeg-4.1.3-amd64-static/ffmpeg" if [[ ! -f "$FFMPEG" ]]; then FFMPEG=$(/usr/bin/env which ffmpeg) fi - -ffmpegcheck -if [[ "$?" == "2" ]]; then - echo "[error] ffmpeg version too low, need to use version 4.0.0 or newer." - exit 1 -fi WORKPATH="./" keepsource="0" version="2" @@ -99,6 +93,12 @@ while getopts d:p:fnhkq OPT; do esac done +ffmpegcheck +if [[ "$?" == "2" ]]; then + echo "[error] ffmpeg version too low, need to use version 4.0.0 or newer." + exit 1 +fi + shift $((OPTIND-1)) echo "[info] finding files" filelist="$(find "$WORKPATH" -name "*.ts")"