ffmpeg:create_a_gif_image
Differences
This shows you the differences between two versions of the page.
ffmpeg:create_a_gif_image [2025/01/02 23:05] – created peter | ffmpeg:create_a_gif_image [2025/01/29 21:30] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ffmpeg - Create a GIF image ====== | ||
- | |||
- | ===== GIF making with palette per frame ===== | ||
- | |||
- | This generates a GIF/MP4 creating one palette per frame: | ||
- | |||
- | <code bash> | ||
- | ffmpeg -r 2 -i spread-%02d.png -filter_complex "[0:v] split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Another approach ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -y -i spread-%02d.png -vf palettegen palette.png | ||
- | ffmpeg -r 6 -y -i spread-%02d.png -i palette.png -filter_complex " | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * It will fail due to the palette being generated from only one frame (the first), and if the first frame was black and white, it will make the whole thing black and white. | ||
- | * Same problem will occur with MP4, even without using the palette. | ||
- | |||
- | </ | ||
ffmpeg/create_a_gif_image.1735859139.txt.gz · Last modified: 2025/01/02 23:05 by peter