Turning a series of PNG files into GIF with black transparent background

1

I have a series of RGB PNG images and I'd like to turn them into a single animated GIF file with black=transparent.

The following command was recommended elsewhere, but it doesn't seem to turn the black background into transparent.

ffmpeg -i /segments/frame%06d.png -filter_complex "[0:v] scale=320:-1:flags=lanczos,split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=black [p]; [b][p] paletteuse" finals.gif

Examples of the PNG file and the generated GIF files attached.

example of PNG image

generated GIF file without transparency

hints

Posted 2019-07-27T21:18:12.007

Reputation: 11

Not exactly what you're looking for, but there is a python script on SO which purports to be doing that - https://stackoverflow.com/questions/46850318/transparent-background-in-gif-using-python-imageio

– sashoalm – 2019-07-28T07:12:21.907

No answers