Skip to content

Instantly share code, notes, and snippets.

@hatashiro
Created May 9, 2016 09:38
Show Gist options
  • Save hatashiro/c407fbb5b3106f67299f20416c2b2a79 to your computer and use it in GitHub Desktop.
Save hatashiro/c407fbb5b3106f67299f20416c2b2a79 to your computer and use it in GitHub Desktop.
mov-to-gif
#!/usr/bin/env bash
if [ -z "$3" ]; then
scale=600
else
scale=$3
fi
if [ -z "$2" ]; then
out="out.gif"
else
out=$2
fi
ffmpeg -i "$1" -filter:v scale=$scale:-1 -pix_fmt rgb24 -r 10 -f gif - |\
gifsicle --optimize=3 --delay=3 > $out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment