dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

ffmpeg-combine (371B)


      1 #!/bin/sh
      2 filelist="$(mktemp -p .)"
      3 
      4 if [ $# -lt 2 ]; then
      5 	echo "usage: $0 FILE1 FILE2 ..." >&2
      6 	exit 1
      7 fi
      8 
      9 for f in "$@"; do
     10 	printf "file '%s'\\n" "$f"
     11 done > "$filelist"
     12 
     13 if [ $? -ne 0 ]; then
     14 	echo "error building filelist" >&2
     15 	exit 1
     16 fi
     17 
     18 out="${1%.*}_combined.${1##*.}"
     19 ffmpeg -f concat -safe 0 -i "$filelist" -c copy "$out"
     20 rm -f "$filelist"
     21 printf '%s\n' "$out"