[FFmpeg-user] wrong colors in animated GIF

Michael Koch astroelectronic at t-online.de
Thu Sep 26 18:21:46 EEST 2019

Hi Javier,

> I suspect it is something about the palette generated.
> I have been using palettegen and paletteuse filters lately, and they have worked out fine for me.
> This command is working as you might expect:
> ffmpeg -y -i sidereal.gif -filter_complex "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse"  sidereal2.gif
> (2.8M)
> In fact, limiting the number of colors to 128, makes the file smaller:
> ffmpeg -i sidereal.gif -filter_complex "split[s0][s1];[s0]palettegen=max_colors=24[p];[s1][p]paletteuse"  sidereal2.1.gif
> (2.2M)

thank you very much for this example. It works as expected. I have 
already added it to my book:


More information about the ffmpeg-user mailing list