ffmpeg makes yellow patches in gifs - ffmpeg

I have a bunch of png images made from a python script. When I convert the images to a mp4 format using ffmpeg, the video looks good. But the moment I make them into gifs it starts creating random yellow patches as shown below.
The syntax I use to convert png to gif is ffmpeg -i img%04d.png animation.gif
Thanks.

Related

ffmpeg transparent HVEC video from alpha matte and color video

I have an alpha.mp4 (alpha matte video) and a color.mp4 (color video). How do I use ffmpeg to make a transparent HVEC (.mov) video?
I can combine with ffmpeg to make a .webm file following the instruction here:
https://www.unscreen.com/api under "Convert unpacked Pro Bundle to WEBM video with transparency"
I have a newer mac and should be able to use HVEC_videotoolbox from either these 2 videos or the .webm file created.
The closest I found was this which seems to generate a corrupt video that cannot be viewed in safari. Use FFmpeg to generate a movie with alpha channel from separate video and fill movies? but

how to convert png animation to gif and keep the transparent using ffmpeg

I would like to convert png animation file to gif in windows,
I choose to use ffmpeg, as I have many of pngs to covert, cmd is quite straight forward in this case.
the sample img here:
https://i.imgur.com/SPGGMEb.png
tried:
ffmpeg -i SPGGMEb.png -vocdec gif output.gif
everything seems fine but the transparent background turns to black, as:
https://i.stack.imgur.com/7CbO8.gif
how can I keep the transparent background during conversion?

Creating hq gif from series of png with transparent background using ffmpeg

i have series of pngs with transparent background
when i'm trying to create gif using
ffmpeg -framerate 24 -i img%03d.png z.gif
my tranparency turns into black mess
what should i do to avoid this?

Imagemagick: converting gif to pngs and pngs to gif produce different results

I am getting some problems trying to convert a gif file to pngs (change some colors in the pngs, but not yet) and then reconvert it into gif.
I convert the gif using: convert loading_32.gif loading.png. It produces 11 pngs files, what is pretty fine. But when I am trying to convert these pngs files into gif again using convert -delay 10 -loop 0 *.png loading2.gif , I get a different gif. Here the links to the gifs: original gif and generated gif
Hope someone can help!
This happens because *.png doesn't add the images in the original order. Try the following...
convert -delay 10 -loop 0 loading-{0..11}.png loading2.gif

slide Wipe effects with ImageMagick tool and ffmpeg

I have to do a four slide effects named 'Wipe Up', 'Wipe Down', 'Wipe Right', 'Wipe Left'. Like curtain of two images for each type. I think it can be possible with cropping of images with 'convert'
convert 01.jpg -crop 1920x5 output_%03d.jpg
where i can get sequence of images and compose at same time to the second image(What I don't know..) And then I can build video from this sequence of images with ffmpeg:
ffmpeg -i output_%03d.jpg out.mp4
Maybe someone can help me with compossing of images in the same time when I croping? Thanks for any suggestions!
PS: all images have fixed dimensions: 1920x1080
You could use ImageMagick's MIFF format (Multiple Image File Format) to send a stream of multiple, cropped images to another invocation of ImageMagick to put them together in a video sequence. So assuming you start with this:
and did this
convert input.png -crop 1920x10 miff:- | convert - -loop 0 out.gif
you would get this

Resources