summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/cutint.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cutint.sh b/src/cutint.sh
index ce53e99..0157dc4 100755
--- a/src/cutint.sh
+++ b/src/cutint.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-parts=( )
+parts=""
if [ $# -lt 5 ]; then
printf "usage: %s input output [start duration [start duration ...]]\n" $0 2>&1
@@ -19,11 +19,11 @@ do
echo $tmp
ffmpeg -y -i "$input" -sameq -ss "$1" -t "$2" "$tmp"
- parts=( $parts $tmp )
+ parts=$(printf "%s|%s" "$parts" "$tmp")
shift
shift
done
-ffmpeg -y -i concat:$(printf "|%s" "${parts[@]}" | sed 's/^|//') -vcodec copy -acodec copy "$output"
-rm "${parts[@]}"
+ffmpeg -y -i concat:$(echo "$parts" | sed 's/^|//') -vcodec copy -acodec copy "$output"
+rm $(echo $parts | sed 's/|/ /g')