summaryrefslogtreecommitdiff
path: root/video/ffconcat
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-11-11 22:23:10 -0600
committerTimmy Keller <tjk@tjkeller.xyz>2021-11-11 22:23:10 -0600
commita92bcfe91bc274970840cbd65e1389d0c4371e02 (patch)
treeb0d507fc9bee430cb429d32e796201773c8599d3 /video/ffconcat
parent73688982c135a0276a64aec7d61aaff4e9434d09 (diff)
downloadscripts-a92bcfe91bc274970840cbd65e1389d0c4371e02.tar.xz
scripts-a92bcfe91bc274970840cbd65e1389d0c4371e02.zip
tssg changes and such
Diffstat (limited to 'video/ffconcat')
-rwxr-xr-xvideo/ffconcat17
1 files changed, 17 insertions, 0 deletions
diff --git a/video/ffconcat b/video/ffconcat
new file mode 100755
index 0000000..7e903f6
--- /dev/null
+++ b/video/ffconcat
@@ -0,0 +1,17 @@
+#!/bin/sh
+#for out; do true; done # get last argument
+filelist=$(mktemp ${TMPDIR:-/tmp}/ffconcat.XXXXXX) || exit
+pwd="$(pwd)"
+for out; do
+ [ -e "$pwd/$out" ] \
+ && files="$pwd/$out\n$files" \
+ || ([ -e "$out" ] && files="$out\n$files")
+done
+echo $files | tail +2 | sed -n "s/\(.\+\)/file '\1'/p"# > $filelist
+
+ffmpeg \
+ -f concat \
+ -safe 0 \
+ -i $filelist \
+ -c copy \
+ $out