Last active
June 13, 2018 16:12
-
-
Save amoodie/027034a33bbd6f335d7bdb5a84cc3291 to your computer and use it in GitHub Desktop.
convert still sequence to gif
This file contains 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
fps=20 | |
scale=800 | |
nzero=4 | |
ffmpeg -r $fps -i %0"$nzero"d.png -c:v libx264 -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p -y out.mp4 | |
ffmpeg -i out.mp4 -vf fps=$fps,scale=$scale:-1:flags=lanczos,palettegen -y palette.png | |
ffmpeg -i out.mp4 -i palette.png -filter_complex "fps=$fps,scale=$scale:-1:flags=lanczos[x];[x][1:v]paletteuse" -y output.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment