Created
May 13, 2023 14:56
-
-
Save jeremyjordan/5e119c4b8aaa99921131663e2937d54d to your computer and use it in GitHub Desktop.
Create GIF from images
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
# Create a directory with images named 1.jpg, 2.jpg, 3.jpg, etc. | |
# Generate a custom color palette | |
ffmpeg -framerate 0.5 -i %d.jpg \ | |
-vf "format=rgba,fps=0.5,palettegen=stats_mode=diff" \ | |
-y palette.png | |
# Create the gif | |
ffmpeg -framerate 0.5 -i %d.jpg -i palette.png \ | |
-lavfi "format=rgba,fps=0.5,paletteuse=dither=none" \ | |
-y output.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment