In my last post I described a way of creating timelapse videos from a series of images

As I uploaded the code to github, I wanted a way to embed the video on the github readme file.

As it turns out ffmpeg (the tool used to create my timelapse video) can also convert mp4 files to animated gif files

ffmpeg -i timelapse.mp4 -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" timelapse.gif