You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
407 B

5 years ago
  1. #!/bin/bash
  2. # should be run through output pipe, exit otherwise
  3. [ -t 1 ] && echo "ERROR: should declare output as a pipe, ie > output.mp4" && exit -1
  4. # detect current dir
  5. DIR=$(pwd)
  6. # build temporary file which contains all the files to append
  7. tempfile=$(mktemp)
  8. for i in $@; do
  9. echo file $DIR/$i >> $tempfile
  10. done
  11. # output as matroska file
  12. ffmpeg -safe 0 -f concat -i $tempfile -c copy -f matroska -