video-basic: one HTML page → one MP4
Turns a software project (a repo, README, docs site) into a 30–60s 1080p30 MP4: gradient backgrounds, white UI cards that spring in, terminals typing real commands, checklists that tick off, highlighter caption pills, and a rounded box for the presenter's talking head.
It costs nothing to render: no Remotion license, no paid AI video credits. The video is one self-contained index.html with a deterministic render(t), filmed frame by frame by Playwright and piped into ffmpeg.
Read references/style.md before writing the page. It has the tokens, animation helpers, render(t) rules and pitfalls. templates/index.html is a complete working page to start from.
Needs: Python 3 with pip install playwright (then playwright install chromium, or use an installed Chrome), and ffmpeg.
1. Research the project (accuracy over polish)
Never invent what the tool does when the source is reachable.
- Read the README, AGENTS.md or CLAUDE.md, example configs, and the CLI help or reference. Take real commands, output shapes and example data from them.
- Find brand assets (
brand/,DESIGN.md, favicon, logo, mascot) and anybrand.json(see the style guide). Use the project's own palette. - If commands or package names don't exist yet, use plausible ones, keep them in variables at the top of the script, and say in the reply that they're placeholders.
- Check whether the project has been renamed. Use the name the user asked for and mention the other.
2. Script it as beats (one idea per scene)
A proven structure for teaching a dev tool to someone new:
- Hero (optional, about 5s): dark brand field, wordmark, tagline, a
$ commandtyping, logo or mascot animating in. - Intro with talking head: camera box on the left; on the right a title card ("New to X?") and three checklist rows that tick off.
- The problem / old way: manual chores pop in and get crossed out, a red pill names the pain, then a yellow pill gives the new way.
- Step 1…N: a
STEP n OF Ntag and a big title, then a terminal or code card with the real commands and output. - Payoff visual: a hub-and-spokes diagram (centre circle plus cards with progress bars and status pills), or a small simulation of the tool working.
- Outro with talking head: camera box, logo card with URL, recap checklist, a call-to-action pill.
Give each section its own background and blur-dissolve between scenes. Keep caption pills to 2–5 words. Write the spoken line for each beat at about 2.5 words per second, so the user has a script to record.
3. Build the page
Work in one folder per video: index.html, a copy of scripts/render.py, and any assets next to them. Start from templates/index.html and replace its scenes. Set window.DURATION to the total length.
4. Check, then render once
python3 render.py stills index.html 4.0 12.5 20.0 …, picking the busiest moment of each scene.- Tile the stills into one contact sheet (ffmpeg
xstackor PIL) and look at it at full size. - Fix overlaps, clipping and low contrast. Then render once:
python3 render.py video index.html out.mp4. A 45s video takes about a minute. - Sample a few frames from the MP4 (
select='eq(n\,N)+…',tile=3x3) to confirm the transitions.
5. Deliver
- Hand over the MP4 plus
index.htmlandrender.pyso the video can be edited and re-rendered. - Say what's real (taken from the repo) and what's a placeholder.
- The video is silent. The talking-head recording supplies the audio once it's composited in. For a layered, editable timeline with the camera in its own track, use video-pro.