Skip to content

Instantly share code, notes, and snippets.

@rfreebern
Created June 17, 2020 14:06
Show Gist options
  • Save rfreebern/4a2e0c65bdb23cf8878e659dd7ae4376 to your computer and use it in GitHub Desktop.
Save rfreebern/4a2e0c65bdb23cf8878e659dd7ae4376 to your computer and use it in GitHub Desktop.
# install both ffmpeg and gifsicle first
function mkgif () {
BASE_FILENAME=${*%.*}
`ffmpeg -i "$1" -loglevel quiet -hide_banner -stats -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=10 > "$BASE_FILENAME.gif" 2>/dev/null`
echo "Wrote $BASE_FILENAME.gif"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment