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.
- 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.
- 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.
- A comment becomes a change. I review there. I comment
/edit make the hook shorterto ask for a change, or merge to approve. - A merge becomes the final video. Merging triggers the final render, the sound mix and the encoding for phones, in French and in English.
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.
- ✓ same input → same pixels
- ⟳ every Monday: re-render everything, compare pixels
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.
9× faster
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.
- The prompt carries only what it needs: the topic, two prerequisites, the list of objects that already exist, and a series guide that is cached so it isn't paid for in full each time.
- Scripts are written by a strong model in a weekly batch job. A
/editcomment goes to a small, fast model that returns a small patch, not a whole new file. - Each 3D object is built once and reused in every episode.
- Even the order of episodes needs no AI: it comes from walking an open map of 1,590 learning topics and their prerequisites.
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.
- ✓ 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.
≈ 1,500× fewer tokens
- for the same 69-second chapter
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.
- Skills for Claude. A skill is a folder of instructions and scripts Claude loads when a task needs it. I used one for detailed isometric drawings built part by part like a real object, and one for clay-style 3D explainer videos, and mixed them with my own rules on pacing, hooks and safe areas for phone screens.
- Claude projects and routines. Each piece of work runs in its own thread, in parallel, and a scheduled routine runs the weekly render check every Monday.
- Open tools. Voicebox, which clones my own voice locally on the Mac, with Kokoro as a ready-made English voice. And the open map of learning topics that orders the episodes.
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.