DEV Community

yohhoy
yohhoy

Posted on

18 4

Conway's Game of Life w/ FFmpeg

You can play "Conway's Game of Life" with FFmpeg command line tool. I'm not kidding.

Let's generate GIF animation with worldsize=60x60 generation=500.

$ ffmpeg -f lavfi -i life=s=60x60 -vframes 500 lifegame.gif
Enter fullscreen mode Exit fullscreen mode

world60x60-500gen-simple

OK, here is decorated version:

$ ffmpeg -f lavfi -i life=s=60x60:life_color=00ff00:ratio=.5 \
  -sws_flags neighbor -vf scale=360:360,drawgrid=w=6:h=6 \
  -vframes 500 lifegame.gif 
Enter fullscreen mode Exit fullscreen mode

world60x60-500gen

Enjoy!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (4)

Collapse
 
ben profile image
Ben Halpern

Ah cool!

Collapse
 
maxart2501 profile image
Massimo Artizzu

Is this just an Easter egg?

Collapse
 
yohhoy profile image
yohhoy

FYI: "life source" was available from anchent version 0.9 (commitlog). The author said "proof of concept" (ml-post) :D

Collapse
 
yohhoy profile image
yohhoy

RIP John Conway (xkcd.com)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay