Created
November 1, 2013 17:51
-
-
Save brockboland/7269148 to your computer and use it in GitHub Desktop.
I'm not good at remembering long commands, so my .bash_profile is littered with things like this. This one converts a movie file into a gif. See https://gist.github.com/dergachev/4627207 for details.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert a movie file to a gif. Crappy quality, only good for short screen cap | |
# See https://gist.github.com/dergachev/4627207 | |
function gifify { | |
if [ -z "$1" ] | |
then | |
# No parameter passed, show usage | |
echo "Usage: gifify filename.mov" | |
echo "Resulting gif is stored as out.gif" | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment