From ee08432b170b942c8b08ae99ddc15585a9037049 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 2 Feb 2013 20:29:00 +0100 Subject: cutint: Allow giving only a start value as last parameter So that the end is automatically the end of the file. --- src/cutint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cutint.sh b/src/cutint.sh index 84a174a..f294b6c 100755 --- a/src/cutint.sh +++ b/src/cutint.sh @@ -13,14 +13,17 @@ output=$2 shift shift -while [ "x$1" != "x" -a "x$2" != "x" ] +while [ "x$1" != "x" ] do # tmp=`mktemp --tmpdir=. --suffix=.mpg` tmp=`mktemp -p . XXXXX` tmp=${tmp}.mpg start=$1 echo $tmp - ffmpeg -y -i "$input" -sameq -ss "$1" -t "$2" "$tmp" + duration="" + [[ "x$2" != "x" ]] && duration="-t $2" + + ffmpeg -y -i "$input" -sameq -ss "$1" $duration "$tmp" parts=$(printf "%s|%s" "$parts" "$tmp") -- cgit