Skip to content

Instantly share code, notes, and snippets.

@brockboland
Created November 1, 2013 17:51
Show Gist options
  • Save brockboland/7269148 to your computer and use it in GitHub Desktop.
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.
# 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