summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 20:29:00 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 20:56:26 +0100
commitee08432b170b942c8b08ae99ddc15585a9037049 (patch)
treec86842ede7342109206237327ae9b80af5098d2e /src
parent99a9ad7d356ae04cfe3b15087fc53b92a9eb3182 (diff)
downloadadvtime-ee08432b170b942c8b08ae99ddc15585a9037049.tar.gz
advtime-ee08432b170b942c8b08ae99ddc15585a9037049.tar.bz2
advtime-ee08432b170b942c8b08ae99ddc15585a9037049.zip
cutint: Allow giving only a start value as last parameter
So that the end is automatically the end of the file.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cutint.sh7
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")