--- name: devrel-video description: Produce a silent DevRel-style product walkthrough video from a web URL. Playwright records the live flow, HyperFrames composes title/frame/chapters/CTA, FFmpeg masters. Use when asked to record, make, or update a product demo, feature walkthrough, catalog tour, or promo video from a web product. --- # DevRel Video Studio — `/devrel-video` A **thin orchestrator**. It does not reimplement capture or composition — it drives: - **playwright-cli** (`page.screencast`) for live interaction capture, - **HyperFrames** for composition + deterministic MP4 render, - **FFmpeg / ffprobe** for convert, master, and QA. Read `references/production-notes.md` first for environment gotchas (sandbox flags, `init` flags, CDN vendoring, determinism) and the production steps for **music, narration, avatar, subtitles, and multi-environment (terminal ⇄ browser)** (all supported — steps 5.4–5.8; the template and manifest carry seams for each). For studio installation and prerequisites, see the repository-root `docs/installation.md`. The quick repository demo in `examples/README.md` demonstrates intake only; use the production workflow below for actual videos. ## When to use - "record / make / produce a walkthrough, demo, catalog tour, or promo of ``" - "update / re-render an existing devrel-video project" ## Inputs — gather, never guess - **URL** (+ start command if the product is local). - **Flow**: the 2–4 beats to show (e.g. browse → filter → open a detail). - **Brand**: reuse `brands//`, or extract from the URL (step 3). - **Output**: format(s) + duration target. Default: **silent 16:9, ~25–40 s**. - **Environments (optional)** — a demo can switch between the **browser** and **Claude Code (terminal)**. Name the order in the prompt ("prompt in Claude Code → the catalog in the browser → back to Claude Code") → `environments:` in `brief.yaml`. Terminal beats are captured with VHS (step 5.8); a pure-browser video is the default. - **Audio / avatar (optional, all prompt-selectable)** — set any of these straight from the prompt, and write them into `brief.yaml`: - **voice**: the narration voice — male `leo`/`dan`/`zac`, female `leah`/`tara`/`jess`/`mia`/`zoe` (**match the presenter**; offer samples if unsure). "…narrated with voice `dan`" → `narration: dan`. Regenerating with a different voice makes a new variant (see 5.4). - **music** on/off, **subtitles** languages, **avatar** at intro/CTA (+ its private `avatar_plate` path). - **Approved claims**: numbers/names allowed on screen — pull from the captured page, never invent (guide §7/§8). ## Workflow ### 1 · Intake → `projects//brief.yaml` Copy `templates/brief.example.yaml`. Confirm the audience, the one message, the CTA, and the beats. ### 2 · Explore (before recording) Open the URL headless; snapshot + screenshot. Confirm: no login wall, **no PII / keys / wallets on screen**, and stable selectors for each beat. Prefer exact `a[href="…"]` and `getByRole` locators; always add a fallback selector so one missing element can't abort the capture. ### 3 · Brand → `brands//` `scripts/brand-extract.sh ` → `tokens.json` (real palette + fonts) + `logo.svg`. Use these in the composition. **Never invent a palette.** Reuse an existing `brands//` if you already have one for the product (`brands/acme/` is the default placeholder brand). ### 4 · Capture → `projects//capture.mp4` Copy `templates/hero-script.js` → `capture.js`; edit the beats (eased `scrollTo`, real locators, deliberate pauses, **all-forward navigation** so `page.screencast` survives route changes). Then: `scripts/capture.sh projects//capture.js ""` → records `capture.webm`, converts to `capture.mp4`. Contact-sheet it; re-record on layout shift, PII, or a mis-click. ### 5 · Compose → `projects//index.html` Copy `templates/composition.html` to `projects//index.html` and fill it from the brief + tokens (skip `hyperframes init`: it refuses a folder that already holds the capture, and the render only needs `index.html`): title card (real claims) → footage in a browser frame → chapter lower-thirds synced to the capture beats (+ the title-card offset) → CTA (keep its small `.credit` line unless the user asks to drop it). Give **every animated element a stable `id`** (GSAP and lint both require it). ### 5.4 · Narration (optional — drives the timeline) For a narrated cut the **voice sets the timing.** Write ~1 line per beat (clean text: no parens/version numbers, em-dash → comma). Synth each with Orpheus in a **voice that matches the presenter** — male `leo`/`dan`/`zac`, female `leah`/`tara`/`jess`/`mia`/`zoe` (offer samples if unsure): `scripts/tts.sh "" vo1.wav ` (set `ORPHEUS_URL`/`ORPHEUS_KEY` — see `scripts/_env.sh`; reference TTS is `orpheus-tts`). Then adapt `projects//narrate.py` (copy the template — footage length, beat times, `SPOKEN` lines, captions) — it measures the lines, computes scene/chapter times, and writes `voice.wav`, re-timed `captions..srt`, and **`timing.json`**. Apply that timing to the composition with **`scripts/retime.py projects/`** (idempotent — rewrites every `data-start`/`data-duration` + GSAP position by id, so total tracks the voice), then mix (next step), render. **Swapping the voice later is one command:** `scripts/variant.sh projects/ ` runs the whole chain — re-TTS → narrate → retime → mix → re-lip-sync the avatar bubbles (if any) → render → `renders/out-.mp4` (add `--no-avatar` to skip the GPU step). `narrated-devrel` mode. ### 5.5 · Music (optional) Local, license-clean bed — no auth, no model: `python3 .claude/skills/devrel-video/scripts/gen-bgm.py bed.wav && ffmpeg -i bed.wav -b:a 192k projects//bgm.mp3`, then add the `