Skip to content

Instantly share code, notes, and snippets.

@andrey-utkin
Created April 19, 2016 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrey-utkin/1cc892661dc3216de7d4c6ff5f21ef9d to your computer and use it in GitHub Desktop.
Save andrey-utkin/1cc892661dc3216de7d4c6ff5f21ef9d to your computer and use it in GitHub Desktop.
#!/bin/bash -e
FFMPEG=./ffmpeg
rm -f *.mp4 *.ts
$FFMPEG -f lavfi -i testsrc,hflip -t 5 -x264opts stitchable=1 -vcodec libx264 -y 1.mp4
$FFMPEG -f lavfi -i testsrc,vflip -t 5 -x264opts stitchable=1 -vcodec libx264 -y 2.mp4
for x in mp4
do
for y in mp4
do
CONCAT_FILENAME="concat_${x}_and_${y}"
echo "ffconcat version 1.0
file 1.$x
file 2.$y
" > $CONCAT_FILENAME
z=mp4
$FFMPEG -safe 0 -auto_convert 1 -i $CONCAT_FILENAME -c copy -y ${CONCAT_FILENAME}.$z
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment