diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/cutint.sh | 7 |
1 files changed, 5 insertions, 2 deletions
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") |