What does Product demo video do?
Turn a running web app into a 20–30 s, on-brand, snappy film that people watch to the end.
The pipeline was built and refined over several real launches; the rules below are what reviews
of those films taught. Read references/storytelling.md before writing the storyboard — it has
the pacing, caption, camera and brand rules that make or break the film.
How it works
capture.mjs ──► frames/<take>/ (JPEG screencast + cursor log + marks, recorded in 2x slow motion)
gen-clips.mjs ─► clips.js (every take on its own film clock)
brand.js + timeline.js ─► demo.html render(t) (hook · framed clips · wipes · captions · end card)
└► audio.html build() (music bed + effects on the same clock)
stills.mjs ──► contact sheet + cadence + lint (review in seconds)
render.mjs ──► out/*.jpg + score.wav ──► MP4 (ffmpeg, or AVFoundation on macOS)
Everything is a pure function of film time, so a render is exactly repeatable and every element (camera, captions, sounds) re-syncs when a take is re-recorded.
Workflow
1. Learn the product and its brand (before any code)
- Read the design system: tokens/CSS variables, fonts and weights, radii, shadows, the gradient,
the accent. Find the real logo file and any illustrations/mascots. Copy font files and images into
the demo's
assets/. - List every journey or effect worth showing. Rank them (see storytelling.md §2) and pick 3–5.
- If the user named the platform (X, LinkedIn, a launch) or a length, follow it; otherwise 20–30 s.
2. Storyboard
Write STORYBOARD.md in the demo source folder: one row per beat with film time, footage, camera,
caption, and sound. Hook → 3–5 scenes → end card. Check it against storytelling.md §3–4 before
capturing — it's far cheaper to fix the story here than after a render.
3. Set up the source folder
SRC="<project>/DEMO/<name>-source"; mkdir -p "$SRC/assets"
cp ~/.claude/skills/product-demo-video/scripts/* "$SRC/"
Fill in brand.js from the product's tokens. Keep capture-lib.mjs, pw.mjs, encode.swift
unchanged. Playwright is found automatically (local, global, or nested in a global CLI); if it isn't,
npm i -D playwright-core in the source folder. It drives the installed Chrome.
4. Capture takes — references/capture.md
Start the app (dev or preview server). Write one take per scene in capture.mjs: seed realistic
data, script the cursor (a.to, a.click, a.type, a.scroll), and a.mark() every moment the
film will sync to. Then:
APP_URL=http://localhost:5173/ node capture.mjs frames # or: ... frames <take>
node gen-clips.mjs
Check each take's summary: film fps in motion ≥60, no page errors, marks where expected.
5. Edit the film — references/compositor.md
In timeline.js set the scenes (at, take, off, speed, camera keys from marks and aim()),
captions and sound cues. Tune the MUSIC block in audio.html to the brand's mood.
6. Review stills, fix, repeat — references/review-checklist.md
node stills.mjs stills # contact sheet + cadence + lint
Look at stills/sheet.jpg and the lint output; fix and re-run until the checklist passes. Most
fixes are in timeline.js; re-capture a take only when the footage itself is wrong.
7. Render and verify
node render.mjs "<project>/DEMO/<Product>-<name>.mp4"
Confirm the audio track and duration (afinfo / ffprobe), look at a final contact sheet, and
listen once. Delete nothing from the source folder — it's the editable project.
8. Hand it over
Give the path, a short beat-by-beat table of what the film shows, how to re-render (edit
timeline.js → node render.mjs), and — if it's for social — two short post captions (X and
LinkedIn), kept brief.
Rules that matter most
These come from frame-by-frame critiques of earlier films. The why is in storytelling.md.
- Product on screen by ~2.5 s, first interaction by ~7 s. Title cards before the product lose people.
- One idea per scene; give the differentiating moment the most time.
- Quiet captions. Readable but never loud: no dark pill, no pop sound. They sit under the window on a soft frosted chip with a thin accent underline on one word. ≤6 words, held ≥2.2 s.
- Push in to read. 1.3–1.7× on anything the viewer must read; go wide rarely; never zoom in-out-in.
- Real everything. Real product, real copy, real states, realistic seeded data, the real logo and illustrations, exact brand values. Never invent UI.
- Slow-motion capture (rate 0.5) for smooth fast motion — and never also patch rAF.
- No crossfades between UI scenes; brand wipes instead.
- Snappy ≠ rushed. Tighten dead time; keep take speed ≤1.25×; let payoffs land.
Scripts
| File | What it is |
|---|---|
scripts/capture-lib.mjs | Recorder: slow clock, screencast, cursor log, marks, take API |
scripts/capture.mjs | Template takes — rewrite per product |
scripts/gen-clips.mjs | Manifests → clips.js |
scripts/brand.js | Brand config — fill from the product's tokens |
scripts/timeline.js | Scenes, camera, captions, cues — the edit |
scripts/demo.html | Compositor (render(t), cadence(), lint()) |
scripts/audio.html | Score (build() → WAV) |
scripts/stills.mjs | Stills + contact sheet + checks |
scripts/render.mjs | Full render + encode |
scripts/encode.swift | AVFoundation encoder (macOS, used when ffmpeg is missing) |
scripts/pw.mjs | Finds Playwright and Chrome |