Skip to content

Instantly share code, notes, and snippets.

@thexande
Last active September 18, 2016 22:33
Show Gist options
  • Save thexande/ddfb97a53e34f324c57fb92a373fcd6a to your computer and use it in GitHub Desktop.
Save thexande/ddfb97a53e34f324c57fb92a373fcd6a to your computer and use it in GitHub Desktop.
# first run brew install ffmpeg && brew install imagemagick
# next, add lines 6 - 9 into your .zshrc or .bashrc file, depending on your shell you use ( zsh or bash )
# restart your terminal!
# then call like "movtogif in.mov out.gif"
movtogif(){
ffmpeg -i "$1" -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - |\
convert -delay 5 -layers Optimize -loop 0 - "$2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment