Generate Game of Life animation

useful tips

// what it does

Generates video from nothing: -f lavfi -i life=... uses libavfilter's built-in Conway's Game of Life source instead of a file. s=320x240 sets the grid, r=30 the frame rate, ratio=0.5 the initial random fill density, mold=10 sets how fast dead cells fade toward the mold color, and life_color/death_color set the palette. -t 10 caps the output at ten seconds.

// shell

$ ffmpeg -f lavfi -i life=s=320x240:mold=10:r=30:ratio=0.5:death_color=#C83232:life_color=#00ff00 -t 10 output.mp4

// gotcha

lavfi generative sources run forever, so without -t (or -frames) the encode never stops; the starting grid is randomized per run unless you add a fixed seed=, so every invocation produces a different animation.