Last active
May 25, 2021 19:44
-
-
Save synth/d1045e129a5f35d87b69 to your computer and use it in GitHub Desktop.
High quality gifs on OSX with ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install ffmpeg ImageMagic mplayer gifsicle | |
# Option 1 | |
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
ffmpeg -y -i yourmovie.mov -vf fps=10,scale=800:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i yourmovie.mov -i palette.png -filter_complex "fps=10,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" yourgif.gif | |
# Option 2 | |
# https://gist.github.com/dergachev/4627207 | |
ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment