skip to content
← back to the projects

blog · lab/

What if learning videos could almost make themselves?

· 5 min read

It started with one sentence: imagine we could share educational content on social media without much effort.

I'm a software engineer, and I love the "so that's how it works!" moment. The click of a key in a lock. The quiet hum of a fridge. Short videos are perfect for that moment, but making each one by hand takes hours. So I asked a different question: what would a machine that makes them look like?

My part: the idea and the architecture

I didn't write most of the code. I designed the system, and GitHub is its backbone.

  1. A topic becomes data. An episode is one JSON file: the scenes, the narration, the camera moves, the timing. A JSON Schema (a strict description of what the file may contain) checks it before anything else runs.
  2. A pull request becomes a storyboard. Each change to an episode opens a pull request. A GitHub Actions workflow builds the episode, renders a contact sheet of key frames and a draft video, and posts them on the pull request.
  3. A comment becomes a change. I review there. I comment /edit make the hook shorter to ask for a change, or merge to approve.
  4. A merge becomes the final video. Merging triggers the final render, the sound mix and the encoding for phones, in French and in English.
/edit → JSON patchClaude skillweekly batchepisode.jsonshots · camera · textpull requestGitHubstoryboard+ draft 540×960owner review/edit or mergeMac runnerrender 1080×1920sound + encodemusic · sound effects9:16 videoGitHub release
From a script to a video, with one human review in the middle.

How a web page turns into a video

Each episode is an HTML page that can jump to any exact moment. A headless browser (Chromium with no window, driven by Playwright) moves the clock forward one frame at a time and takes a screenshot. ffmpeg then stitches the screenshots into an MP4.

Because time is controlled by code, not by the real clock, the same input always gives the same pixels. A weekly check re-renders everything and compares pixels to catch silent changes.

episode.htmlseek(t)Chromiumheadless · t += 1 frameframes0001 0002 0003…ffmpegstitchMP49:16episode.htmlseek(t)Chromiumheadless · t += 1 frameframes0001 0002 0003…ffmpegstitchMP49:16
  • ✓ same input → same pixels
  • ⟳ every Monday: re-render everything, compare pixels
The clock belongs to the code: one frame, one screenshot, then ffmpeg.

Choice 1: my own laptop as the render farm

Rendering is the heavy part. Instead of renting servers, I registered my MacBook as a self-hosted GitHub runner: a small agent that waits for jobs and runs them on my machine. Rendering jobs carry a render label, so they always land there. On the Mac, the browser draws with the graphics chip (Metal) and five workers capture frames in parallel.

GitHub Actionslabel: renderself-hosted runnermy MacBook · Metal · 5 workersGitHub Actionslabel: renderself-hosted runnermy MacBook · Metal · 5 workers
  • cloud machine18 min

  • MacBook runner2 min

9× faster

The same 69-second preview, on two machines.

Choice 2: as few AI tokens as possible

The AI never writes HTML or JavaScript in daily production. It only fills in the episode JSON, and plain, predictable code does the rest.

Two engines, tested side by side

We tested a lot. The same lock scene was built twice, once in flat SVG and once in 3D with three.js, and compared frame by frame. We kept both, and each object's manifest now says which engine draws it: three.js for real mechanisms and camera moves, SVG for diagrams and text-heavy cutaways.

The SVG version was slow to capture because a "hand-drawn wobble" filter was recomputed on every frame. Computing that texture once and reusing it cut the time from 1.4 to 0.5 seconds per frame, with the same pixels.

  • wobble filter, recomputed every frame1.4 s / frame

  • texture computed once, reused0.5 s / frame

  • ✓ same pixels

Where AI fits

AI was the builder; the plan was mine. I decided what the system should be, split it into small jobs, wrote the rules each job had to follow, and reviewed every result. Claude wrote most of the code, ran the tests and produced the previews. I said "not yet" a lot, and I chose what to keep.

The token numbers show why that design matters. When Claude built one 69-second chapter from scratch in a coding session, it used about 23 million tokens, mostly re-reading the project as it worked. In the pipeline I designed, the AI only writes the JSON for a chapter, with a limit of about 15,000 tokens.

  • coding session, from scratch≈ 23,000,000 tokens

  • pipeline: the AI writes the JSON only≈ 15,000 tokens

≈ 1,500× fewer tokens

  • for the same 69-second chapter
Same video. The second bar is so thin you can barely see it, and that is the point.

Borrowing good ideas

I didn't start from zero. I kept an eye on what people were sharing online and plugged the best pieces into my own setup.

My engineering background is what tied these together. The skills gave the know-how; I decided where each one belonged. At the end, I turned what we learned into one reusable prompt, so a similar project can start from where we landed.

What I learned

Ideas are easier to test than ever. Good architecture is what keeps them small.

Put the AI where judgment is needed, and plain code everywhere else.

What stays human is knowing what a good explanation looks like, and choosing what to keep.