Created
August 22, 2016 07:15
-
-
Save dmitrydyomin/52375aba526fefbb53cd3b3be1c6c664 to your computer and use it in GitHub Desktop.
Convert video to animated GIF using 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
#!/bin/sh | |
ffmpeg -y -i source.mp4 -vf fps=5,scale=480:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i source.mp4 -i palette.png -filter_complex "fps=5,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment