marknormanfrancis.com

My potted history of making GIFs

Monday 07 June, 2021 at 9.57am

The original idea behind my GIFs site was that there were a bunch of GIFs I wanted to use that were bad quality — low resolution, had janky animation (low frames per second, or just slow sampling of the original source), and often did not capture what I thought of as the right part. As I used a specific GIF that wasn't good enough, or when I couldn't find what I wanted at all, I would make my own.

But this was when I was making each one by hand using GIF Brewery. There was a significant time cost to each, and it was harder than I liked to save the config and reuse it again later if I wanted to tweak the GIF. In 2014 I made and published just 18 GIFs. I did one more at a friend's request in 2015. The inertia behind making a new GIF meant I just stopped.

Zathras telling Ivanova “This is wrong tool”
Zathras telling Ivanova “This is wrong tool” — Babylon 5

But for a long time, I had a note in Things to investigate using command-line tools to make GIFs. I knew it could be done, I just needed some time on my hands to see what was involved, and how easy it would be to put together a script to make GIFs.

Automating things

Last June I had a moment of clarity. Flourish, my website generator, can use a TOML file as the source of a webpage. That TOML file can contain extra keys that Flourish doesn't use without problems. I could keep the configuration for the GIF in the same definition file as the website uses. All I needed was to work out the command-line GIF generation and I should be able to make and remake GIFs to my heart's content.

I found an article on the GIPHY engineering blog on making GIFs with FFmpeg, which was very helpful as the basis of my script. I had expected FFmpeg to be the basis of things, but I hadn't used it much and had been confounded by trying to work out how to use filters. Mostly, I'd just used it to convert and trim video.

More articles and forum posts helps solidify it in my head, especially a post on high-quality GIFs, and I had the basis of making GIFs repeatedly. A bit of work, and in July last year I republished the site with newly automated GIF making potentials, and fulfilled an old promise by making a huge swathe of GIFs from Lilo & Stitch. What would've taken me weeks of effort in GIF Brewery now took me two afternoons. The hard part is getting the timing of the GIF and the captions right. Changing my mind about the font to use in the captions was a matter of a quick search and replace, then typing make and waiting a few minutes.

A script writer saying “Super easy, barely an inconvenience”
”…super easy…” — Screenrant’s Pitch Meetings

Getting to the one-a-day habit

I started by publishing the GIFs as soon as they were done. For example, all of Shatner of the Mount published on July 30th, 2020, the aforementioned Lilo & Stitch across three days following that.

As it sunk in that I could make a GIF in mere minutes, I started doing one as part of my morning routine. I kept that going, mostly, throughout 2020. But around Christmas I took a break.

The longer I left it, the harder it became to get back into the habit of making one a day. To crack this, I sat down and worked through Ghostbusters from start to finish, making the GIF each time I got to a part of the film I had made a todo about. By the end I had 48 new GIFs. I altered the GIFs site to not publish anything dated in the future and queued up these new GIFs on Mondays throughout the rest of the year.

Then I did the Five Levels of Drinking, Horizon Zero Dawn, Ted Lasso (nearly 200 of them, I might have a problem), and more.

I find it easier to sit down for a protracted period of time, go through the video and make draft entries for each GIF with just rough timings, then go back and polish the timings, then set the options to tweak colours, sizes, compression, etc. to make it as small as I'd like.

And, well, here we are. I have a git repository containing the configuration to make 698 GIFs (as of 7th June, 2021). I have queued posts through the year with only 36 days currently missing content, and 112 as-yet unscheduled Ted Lasso GIFs.

Ted Lasso saying to himself “Barbecue sauce”
“Barbecue sauce” — Ted Lasso