Skip to content

Instantly share code, notes, and snippets.

@mmozuras
Created July 11, 2013 05:57
Show Gist options
  • Save mmozuras/5972871 to your computer and use it in GitHub Desktop.
Save mmozuras/5972871 to your computer and use it in GitHub Desktop.
Bash function to convert a video to a gif
gifit() {
if [[ -n "$1" ]]; then
ffmpeg -i $1 -s 600x375 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=5 > $1.gif
else
echo "proper usage: gifit <input_movie.mov>"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment