Skip to content

Instantly share code, notes, and snippets.

@WillsonSmith
Created March 21, 2017 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillsonSmith/85a8b07f3606e5a90fc7f507ce8c2adc to your computer and use it in GitHub Desktop.
Save WillsonSmith/85a8b07f3606e5a90fc7f507ce8c2adc to your computer and use it in GitHub Desktop.
turn video to high quality, low filesize gif
#!/bin/bash
palette="/tmp/palette.png"
filters="fps=25,scale=720:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment