Home

Converting a transparent .mov to a transparent .gif with FFmpeg

Create a colour palette from your video then use the palette to convert to GIF:

$ ffmpeg -i in.mov -vf palettegen=reserve_transparent=true palette.png

$ ffmpeg -i in.mov -i palette.png -lavfi paletteuse out.gif

Example:

A logo spinning towards the screen


I can’t remember what I needed this GIF for - the example above is converted from a transparent stinger video I made for switching scenes in OBS (Open Broadcaster Software), in the comprehensive set of OBS scenes I have set up for streaming programming (which I’ve never done).

I also ended up writing my first Lua script for that:

created