From e87dc7f4713b187b61392435c940095d319ecb0a Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Wed, 12 Jan 2022 11:04:04 +0100 Subject: [PATCH] update ffmpeg call --- bin/ffcut | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ffcut b/bin/ffcut index 6eb4649..9dc09d9 100755 --- a/bin/ffcut +++ b/bin/ffcut @@ -20,11 +20,11 @@ source "$(dirname $0)/../lib/sf" echo "Cutting file ${sftbf}$(basename "$FILE")${sftrs}" # Set additional ffmpeg arguments -ffmpeg_args=() -[ "$to" != "end" ] && ffmpeg_args+=("-t" "$to") -[ "${FILE##*.}" == "${out##*.}" ] && ffmpeg_args+=("-c" "copy") +args=() +[ "$to" != "end" ] && args+=("-to" "$to") +[ "${FILE##*.}" == "${out##*.}" ] && args+=("-c" "copy") # Execute ffmpeg -ffmpeg -hide_banner -loglevel error -ss "$from" -i "$FILE" -ss "$from" "${ffmpeg_args[@]}" "$out" +ffmpeg -hide_banner -loglevel error -ss "$from" -i "$FILE" "${args[@]}" "$out" [ "$?" == "0" ] && echo "The extracted part was saved to ${sftbf}$out${sftrs}"