Skip to main content

Create gifs with scripts

·70 words·1 min
Shadowfish
Author
Shadowfish
Welcome to my digital space. Check out my recent work and posts below.

Gif scripts
Simple 2 commands using ffmpeg to render any video file as a gif.

With some fiddling, probably intergalactic quality can be achieved.

  1. Create a palette of the colors used in the video

    ffmpeg -i dump.webm -filter_complex "[0:v] palettegen" palette.png
  2. Encode the video as a gif

    ffmpeg -i dump.webm -i palette.png -filter_complex "[0:v][1:v] paletteuse" dump.gif

Note! With script and set to run on an export folder and it will be awesome!