diff --git a/tools/video_concat b/tools/video_concat new file mode 100755 index 0000000..5cac282 --- /dev/null +++ b/tools/video_concat @@ -0,0 +1,16 @@ +#!/bin/bash + +# should be run through output pipe, exit otherwise +[ -t 1 ] && echo "ERROR: should declare output as a pipe, ie > output.mp4" && exit -1 + +# detect current dir +DIR=$(pwd) + +# build temporary file which contains all the files to append +tempfile=$(mktemp) +for i in $@; do + echo file $DIR/$i >> $tempfile +done + +# output as matroska file +ffmpeg -safe 0 -f concat -i $tempfile -c copy -f matroska -