Communitygithub.com

Product demo video

Turn a running web app into a short 1080p60 demo with music and sound. Playwright records slow-motion takes; the film frames them, zooms to the action, and ends on a card.

What is Product demo video?

Product demo video learns the product's real brand, records scripted takes of the running app in slow motion, and composites those frames into a repeatable film: a hook, a framed window, zooms that follow the cursor, captions, wipes, and an end card. Music and interface sounds sit on the same clock, so a new take re-syncs the cut. It is for launch posts, feature shows, and anything that should show what the app actually does.

Works with✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/anirdeepm/product-demo-video/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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

FileWhat it is
scripts/capture-lib.mjsRecorder: slow clock, screencast, cursor log, marks, take API
scripts/capture.mjsTemplate takes — rewrite per product
scripts/gen-clips.mjsManifests → clips.js
scripts/brand.jsBrand config — fill from the product's tokens
scripts/timeline.jsScenes, camera, captions, cues — the edit
scripts/demo.htmlCompositor (render(t), cadence(), lint())
scripts/audio.htmlScore (build() → WAV)
scripts/stills.mjsStills + contact sheet + checks
scripts/render.mjsFull render + encode
scripts/encode.swiftAVFoundation encoder (macOS, used when ffmpeg is missing)
scripts/pw.mjsFinds Playwright and Chrome

Related Skills