User Tools

Site Tools


ffmpeg:image:create_a_gif_image

ffmpeg - Image - Create a GIF image

GIF making with palette per frame

This generates a GIF/MP4 creating one palette per frame:

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" catalog.gif

Another approach

ffmpeg -y -i spread-%02d.png -vf palettegen palette.png
ffmpeg -r 6 -y -i spread-%02d.png -i palette.png -filter_complex "paletteuse" cad2raster.gif

NOTE: This approach might fail due to the following:

  • 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/image/create_a_gif_image.txt · Last modified: 2025/01/29 21:30 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki