I have a sequence of png images: image_00.png
, image_01.png
, image_02.png
, etc. I want to convert them to a gif, so I tried the command
ffmpeg -i image_%02d.png video.gif
Unfortunately, the resulting gif has distorted colors. More specifically, it added a weird sort of yellow haze around some objects in the video.
I also tried using the command above with all possible pixel format options (which I determined using the command ffmpeg -h encoder=gif
): rgb8
, bgr8
, rgb4_byte
, bgr4_byte
, gray
, pal8
. For example ffmpeg -i image_%02d.png -pix_fmt rgb8 video.gif
. Unfortunately, all of the resulting gifs had some sort of color distortion.
I also observed that this distortion does not occur if I convert the images to mp4 instead of gif. However, if I try converting that mp4 to a gif, I end up with the distortion again.
How can I produce this gif without color distortion?