Convert videos to GIF.

This commit is contained in:
Markus Birth 2014-12-13 18:09:01 +01:00
parent dfcd8323cb
commit f68b9ce3bb

7
mp42gif.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
TMPDIR=`mktemp -d /tmp/frames.XXXXXXXX` || exit 1
ffmpeg -i "$1" -vf scale=320:-1 -r 10 $TMPDIR/ffout%03d.png
convert -delay 5 -loop 0 $TMPDIR/ffout*.png $1.gif