Know the shape of a good demo
Before touching any tool, decide what you're making. The demos that work share a shape:
- 45-60 seconds. Ours landed at 54.3s of demo plus a 5.2s founder intro (59.55s total). Past a minute, watch-through collapses.
- One claim per scene. Six scenes, six claims. If a scene proves two things, it proves neither.
- Problem → drop → magic → interaction → proof → brand. Open on the pain, drop the artifact into the product, show the product doing the impossible part, show humans touching it, show the numbers reconciling, stamp the name. (The full six-scene table with claims is in Appendix A.)
- Honest data everywhere. Viewers can't articulate why fake data feels fake, but they feel it. Our fixture is the actual sample receipt photo: 8 line items, the printed prices, a total of exactly $84.20 that the on-screen math reconciles to, including a beat where tax gets split, because real receipts have tax and demos that skip it read as rigged.
- The product is the hero. Real components imported from the app repo, not a re-illustration. Everything downstream of this page exists to make your actual UI filmable.
- Plan two masters from day one: one with captions burned in (for places that mangle CC) and one clean (the edit base for voiceover). Retrofitting this later means re-rendering everything.
Write the story first
The script drives every other decision, scene lengths, cue times, music tempo. Write it before building anything.
2.1 The scene table
Name, duration, and the single claim for each scene. This literally becomes a JSON literal in the composition (step 4), so writing it is programming the film:
| Scene | Secs | The one claim |
|---|---|---|
| ColdOpen | 6 | Every group chat has one receipt that starts a war |
| TheDrop | 5.5 | Don't argue about the receipt, show it |
| MachineReads | 8 | Vouch reads the paper itself, every line, every price |
| Witness | 11 | Housemates tap what's theirs; every line gets a witness |
| AddsUp | 12 | Everyone sees it adds up |
| TheStamp | 11.8 | Vouch, three taps, no fights |
2.2 Voiceover lines, one per beat
Short declaratives beat clever ones, and deadpan beats enthusiasm. Write each line with its start timecode, then iterate ruthlessly, our best line took several rejected drafts before landing on:
Notice the structure: a claim, then two two-word hammer blows, then the detail that proves you actually built it ("the ink that's barely there", low-confidence OCR is a real product feature). The full 16-line script with timecodes is in Appendix A.
2.3 The rhythmic grid
Put repeated interactions (taps, claims) on a fixed time grid. We used 0.6 seconds, which is exactly 100 BPM. This one decision pays off three times: the interactions feel intentional instead of random, the eventual music locks to the picture with zero editing, and the sound cues land on musical subdivisions for free.
2.4 Air pockets
Mark 1-2 moments of deliberate silence in the script itself. Ours: the receipt drop at 0:09 (one clean beat of nothing before the paper lands) and 0:48.5 → end (the last 6 seconds carry no voiceover, just the sticker storm and the music resolving). The pauses are what make the loud moments loud.
2.5 Sync notes
At the bottom of the script, write which words must land on which frames, these are contracts between the writer and everyone downstream:
Sync notes: 'Show it.' lands on the squash-on-impact frame (~0:09.3);
'Even the ink...' lands as the scan beam pauses on SHARP CHEDDAR (~0:16.4);
'...their own link' lands on the WhatsApp press (~0:38.9);
silence from 0:48.5 to 0:54.3 for the sticker storm and music resolve.
Make your real UI renderable standalone
Your app components assume a running app, routers, auth, data fetching, env vars, a database. The demo needs them to render from a static folder with none of that. This step is where most of the invisible work lives.
3.1 Two paths
Path A, sync into a design tool. We synced the monorepo into Claude Design (/design-sync), which bundles components into a browsable design system with an animation editor over the real code. Path B, vendor a bundle yourself. Build components + CSS + tokens + fonts into one static bundle (esbuild) and commit the snapshot next to the demo, with a refresh script. We ended up doing both: authored in the tool, then vendored the runtime into demo/ds/ so the demo outlives the tool.
3.2 The gotchas, so they don't cost you a day each
- Pin every component explicitly. In a monorepo app (vs. a packaged design system) there's no dist/types tree to walk, auto-discovery finds one component and stops. We ended with ~26 explicit source-path pins, and every new component must be added by hand.
- Shim
process. Next.js client modules readprocess.env.__NEXT_*at module scope; a browser IIFE that only definesNODE_ENVcrashes withprocess is not defined. We needed the shim in two places: prepended to the main synthetic entry, and imported first in the preview-support entry (extra entries initialize before the main entry's shim runs). - Stub the router. Anything using
next/linkorusePathnameneeds fakeAppRouterContext/PathnameContextproviders. OnePreviewShellwrapper component, used by every preview, solves it once. - Cut server import chains. Our site-chrome component was an async server component whose import chain pulled the postgres client into the browser bundle. Exclude it and use a client-safe stand-in.
- Export page-internal components. Components defined inside a route file (our drop zone lived in
app/new/page.tsx) must beexported to be reachable. Extracting interactive states into props-driven components (DropZone active,ReadingPaper previewSrc) makes un-triggerable states, drag-over, mid-scan, filmable. - Fonts and CSS variables. next/font injects
--font-*variables at runtime; outside Next they're undefined and everyvar()font-family silently invalidates. Pin them in a preview-vars stylesheet and ship the woff2 files. - Ship real images as data URIs. The sample receipt photo (2.6MB PNG) became a 20KB webp data URI at width 512, big enough to film, small enough to commit.
- Measure, don't trust, fixture coordinates. Our OCR-bounds fixtures said the receipt rows were 58px apart; the actual photo's row pitch is ~86px. Overlays drawn from the fixture drifted low. Measure from the artifact you're actually showing.
- Split big screens into lego. Buttons, badges, stickers, tickers, textures, overlays, sheets, backgrounds as separate small components (we added an "Atoms" layer of 10). Small pieces animate independently; monoliths don't. Add new pieces additively, never delete old components, existing demos depend on them.
Author the demo as code, on one clock
The single most important architectural decision: the whole demo is one React tree rendered as a pure function of an authored clock T. No GUI timelines, no keyframes in a tool, a function from seconds to pixels.
4.1 The scene table becomes the master cue table
// index.html, one JSON literal drives everything
OM_SCENES = [
{ name: "ColdOpen", secs: 6 },
{ name: "TheDrop", secs: 5.5 },
{ name: "MachineReads", secs: 8 },
{ name: "Witness", secs: 11 },
{ name: "AddsUp", secs: 12 },
{ name: "TheStamp", secs: 11.8},
] // total: 54.3s
Scene code keys off derived offsets (CUES.Witness + 2.1), never absolute times. Retiming a scene is editing one number; everything after it follows.
4.2 The seek contract
The engine listens for a synchronous seek event that commits via flushSync in the same task, an external driver can say "show me exactly this frame" and the DOM is that frame when the call returns:
el.dispatchEvent(new CustomEvent('data-om-seek-to-time-frame', {
detail: { time: 36.98, sync: true } // flushSync commit; every seek pauses the internal clock
}))
This contract is what makes flawless recording (step 5) and self-scoring sound (step 7) possible. Determinism is the feature: ask for T = 36.98 twice, get identical pixels twice.
4.3 Motion rules that read as confidence
Build a small kit of instruments and compose scenes from those, the way the soundtrack is composed from a few sounds. Ours: stamp-in, slide, flip, Ticker, Sticker, Badge, animated cursors, CaptionStamp, tape-wipe, paper-tear, and scan-beam wipes.
4.4 Fixtures are the honesty layer
The data tables (items, prices, people) live at the top of the scene file, and there's a standing rule in the README: fixtures must match the sample receipt photo, prices are the printed ones, the total is 84.20. When someone later "improves" a price for visual balance, the rule catches it in review.
4.5 Styling real components inside the film
The demo overrides component CSS by targeting the hashed class names from the vendored bundle (.new_drop, .review_fields…). Those names are stable across rebuilds unless a source CSS module is renamed, so after every design-system refresh, run the smoke render (step 5) and eyeball four frames before trusting a full run.
4.6 The caption layer is part of the composition
Captions render as styled stamp-cards inside the film (same type, same motion), guarded by one flag:
function CaptionStamp(...) {
if (window.__NO_CAPTIONS) return null; // the recorder sets this for the clean master
...
}
Record frame-by-frame, never screen-record
Screen-recording live playback inherits every skipped requestAnimationFrame, that's the stutter you can't edit out. Instead, drive the seek contract: for each output frame, seek to its timestamp, screenshot, repeat. A slow frame costs render time, never a dropped frame.
// record.mjs (full script in /templates), the core loop
for (let f = 0; f <= frames; f++) {
const t = Math.min(f / FPS, duration - 1e-4);
await page.evaluate((time) => {
const el = document.querySelector('[data-om-exportable-video-with-duration-secs]');
el.dispatchEvent(new CustomEvent('data-om-seek-to-time-frame',
{ detail: { time, sync: true } }));
// Pin CSS keyframe animations to the authored clock, they run on
// wall-clock time and race ahead under slow capture otherwise.
for (const a of document.getAnimations()) {
try { a.pause(); a.currentTime = time * 1000; } catch { /* detached */ }
}
}, t);
await stage.screenshot({ path: `f${String(f).padStart(5,'0')}.png` });
}
The document.getAnimations() pinning is the non-obvious part. Our loading spinner is a CSS keyframe animation; CSS animations ignore your seek clock entirely and run on wall-clock time, so under slow per-frame capture the spinner spun ~11× too fast in the output. Pause every animation and set its currentTime to the authored clock on every frame.
5.1 The rig around the loop
- Serve locally, don't use file://, a ten-line
node:httpstatic server inside the script, so JSX fetches work. - Wait for readiness before frame 0: network idle, then
document.fonts.ready, then a settle delay for charts and images (we use 2.5s). A first frame with fallback fonts ruins the whole render. - Render at 2× device scale (viewport 1460×900, deviceScaleFactor 2) and downscale in the encoder, text comes out print-crisp.
--scale 3gives 4K. --smokemode renders 4 spot frames (we use T = 2, 16, 36.5, 48) so you can eyeball a change in seconds instead of waiting out a 10-minute full render. Run it after every design-system refresh.--no-captionssetswindow.__NO_CAPTIONSvia an init script before the page loads, that's how the two masters come from one composition.
5.2 Encode
ffmpeg -framerate 60 -i frames/f%05d.png \
-vf scale=2560:1440:flags=lanczos \
-c:v libx264 -preset slow -crf 12 -pix_fmt yuv420p \
-movflags +faststart demo-1440p60.mp4
CRF 12 is visually lossless for UI content, this file is a master, meant to survive a re-encode by an editor and another by every platform. yuv420p + faststart keep it playable everywhere. A full 54s render at 60fps is ~3,260 PNGs and ~10 minutes; drafts go faster with --fps 30.
Captions and AI voiceover
6.1 Captions are a projection, not a transcription
The composition already knows every line and time (the caption table in the scene file). SRT and VTT files are projections of that table, same cue times, sentence-case text, kept in sync by convention and checked in review. Never transcribe your own video.
6.2 The VO script format
One line per beat, timecode first, delivery direction at the top, sync notes at the bottom (see Appendix A for the full real script). If your voice tool supports tags, use them for control instead of hoping: pause tags (<#0.4#>-style) to hit timecodes exactly, emotion tags per line, sound-word tags where supported.
6.3 Fixing a slow, flat voice clone
Cloned voices commonly come out with correct pitch but sluggish, under-expressive delivery. What works, in order of impact:
- Split long sentences into short fragments. TTS engines phrase fragments with more energy. "Every line. Every price." reads with punch; the same words in one sentence sag.
- Raise the speed setting slightly (1.05-1.15) rather than regenerating endlessly.
- Put the emotion tag on the fragment, not the paragraph, engines average a paragraph-level tag into mush.
- Generate line-by-line, not the whole script in one pass, so one bad read doesn't force a full redo and each line can be nudged onto its timecode in the editor.
6.4 Previewing captions before shipping
To check the SRT against the clean master without an editor: a one-page HTML file with a <video> tag and <track kind="captions" src="demo.srt"> (convert to VTT for browsers), styled with ::cue to approximate the burned look. Two minutes to build, catches every off-by-one cue.
6.5 Distribution
Ship captions as a sidecar (upload the SRT wherever the video is posted, platform CC renders in the viewer's style) and keep the burned-in master for platforms that re-style captions poorly. If you later prepend an intro (step 9), shift the SRT by the intro's length, one small script, in Appendix C.
Sound design: make the demo score itself
Sound is where demos most often turn amateur. Our first pass was 58 hand-placed synth blips, it sounded like a slot machine and got the only piece of feedback that matters: "no sound effects are better than harsh and forceful sound effects." We deleted all of it and rebuilt on these rules:
- Whooshes lead their motion by ~20ms, brains process audio faster than video, so pre-cued movement reads as more responsive, not early.
- Impacts land on the settle frame, not the start of the motion. The stamp sounds when the ink hits, not when the arm starts moving.
- Reward scales with the moment. Taps are whispers (−13 dB); the film's thesis moment gets the one big hit (−8 dB). If everything is loud, nothing is. Establish a repeated sound once, then trust the viewer, we score the first claim tap and let the rest play silent.
- Whoosh and impact are different sounds in different frequency ranges, layer them, don't look for one file that does both.
- Generate organic sounds (paper, rubber stamps, felt taps) rather than synth beeps, AI SFX generators do this well now. UI taps want a short, clean, plastic transient; success wants a warm two-note resolution, and if the success moment sits next to a bigger hit, cut the chime entirely (we did).
7.1 Two traps in AI-generated SFX
- They pad silence before the hit. Our big-stamp's actual impact is 0.35s into the file; the whoosh peaks at 1.15s. Play the file at the cue time and every hit lands a third of a second late, which reads as "cheap" without anyone knowing why. Measure each file's peak-energy offset once, store it next to the file, and have every player subtract it.
- They're mastered quiet. Our stamp peaked at −9.6 dBFS. Set it to "−8 dB" in an editor and it actually plays at −17.6, buried under any music bed. Peak-normalize each file at mix time so your cue levels mean what they say.
7.2 The self-scoring architecture
Don't place sounds in an editor, put the cues in the composition, as data. One file is the single source of sound truth:
// sfx-cues.json (the real one, all 10 cues in Appendix A)
{
"sounds": {
"big-stamp": { "file": "../sfx/big-stamp.mp3", "hit": 0.35 },
"page-whoosh": { "file": "../sfx/page-whoosh.mp3", "hit": 1.15 },
...
},
"cues": [
{ "t": 8.26, "sound": "paper-drop", "db": -10, "why": "receipt lands, squash-on-impact" },
{ "t": 36.98, "sound": "big-stamp", "db": -8, "why": "ADDS UP., the one big hit" },
...
]
}
Every cue carries a why, that's the review surface. A cue that can't justify itself in one clause gets deleted.
Two consumers read the same file:
- A ~40-line WebAudio player (
sound.js) so the browser preview is audible while you author. The composition callswindow.__SFX_TICK(T)once per rendered frame; the player fires cues the clock crosses, but only during forward playback (0 < dt < 0.25), so seeks and scrubs stay silent. - An ffmpeg mixer (
mix-audio.mjs, full script in /templates) that bakes the identical cues onto any export: per-file peak normalization, hit-offset retiming (startAt = cue.t − hit),adelay+volumeper cue, oneamixwithnormalize=0, a limiter at 0.95, and padding to the video's length so the container never truncates.
Preview and final can never disagree, and sound survives re-renders with zero editor work: record → encode → mix from a clean checkout is a fully scored master.
Music: carve, duck, start at the drop
- Tempo-match the picture. Your interaction grid is a BPM (0.6s = 100 BPM). Pick music at that tempo, chillhop and lo-fi live right there, and the taps sit on the beat without any editing.
- Start the music at its drop, not the file start. Find the moment the track actually arrives (ours was 17.9 seconds in) and trim to it. Nobody grants your video a 15-second intro build. Bonus: land the drop on a story beat, not on frame zero.
- Carve, don't just duck. Notch the music a few dB at ~250 Hz (the voice's body) and ~2.8 kHz (its presence/consonants). The voice pops through the music instead of the music audibly pumping up and down:
equalizer=f=250:t=q:w=1.0:g=-3, equalizer=f=2800:t=q:w=1.1:g=-4.5 - Then duck gently on top. The research consensus and our final mix agree: music sits 15-20 dB under dialogue (our bed lived around −21 dB), dips another 3-6 dB while dense lines land, and swells in the air pockets, ours rises to about −7 dB for the voiceover-free outro, which is what makes the ending feel like an ending.
- Fade musically. Short fade-in at the trim point (~0.2s, since you're cutting into a playing track), long smooth fade-out (~2.5s) that finishes with the picture.
- Target −14 LUFS integrated, −1 dBTP for the final export, the loudness platforms normalize to anyway. Master louder and platforms just turn you down.
Assemble: intro, transition, export
- Founder intro up front (≤5s, camera-real, one sentence). Authenticity before polish is the whole point of the format. Ours is 5.23s. If its aspect ratio doesn't match, decide the letterbox treatment deliberately (scale-to-fill or a branded matte), don't ship accidental black bars.
- One branded transition between intro and demo, ours is a tape strip with the product name sweeping across (a position keyframe sweep over ~50 frames at 60fps), with a tape whoosh riding it at −9 dB, cued 3 frames before the visual starts. One transition, used once. Don't let it become a wipe library.
- Layer the audio as stems, not as dozens of clips: the VO track, the composition's SFX stem (export the scored demo's audio as one file and lay it in, never re-place individual sounds by hand, they're already frame-exact), and the carved music bed with ducking keyframes. When we replaced four hand-placed SFX clips with the stem, the export gained five cues that had never made it into the editor and every level was suddenly right.
- Mind clip-overwrite semantics. Dropping a stem onto a track trims whatever it overlaps (our transition whoosh lost its tail this way). Overlap-check after every placement.
- Export H.264, 1440p or 4K, 60fps for the master; then make a ~3.5 Mbps 1080p copy for chats and review links (an 84MB master became a 22MB preview). Shift the SRT by the intro's length for the combined cut (script in Appendix C).
- Verify the audio in the file, not in the editor. Probe the exported file at the cue times and confirm the peaks exist (command in Appendix C). Our final check: receipt lands −10.4 dB at 0:13, the ADDS UP stamp is the loudest single moment in the film at 0:42.
The ship checklist
- Under 60 seconds; one claim per scene; six-ish scenes
- All on-screen data is real and reconciles (totals sum, counts match, tax exists)
- Composition renders from a static folder with no app running (python3 -m http.server is the whole stack)
- Recorded frame-by-frame; CSS animations pinned; smoke frames eyeballed before the full render
- Two masters: captions burned + clean; SRT/VTT sidecars committed
- VO timed to the frame; sync notes honored; captions match VO word-for-word
- ≤ 10 sound cues, each with a why; hits measured and frame-exact; nothing repeated back-to-back
- Music tempo matches the interaction grid; starts at the drop; carved at 250 Hz / 2.8 kHz; swells in the outro
- Loudness: −14 LUFS, −1 dBTP; the thesis moment is the loudest thing in the film
- Audio verified in the exported file at cue times, not just in the editor
- Everything committed: composition, scripts, cues, captions, vendored runtime, NOTES, the demo re-renders and re-scores from a clean checkout with node + playwright + ffmpeg only
The worked example, every real number
The demo this playbook comes from: Vouch, a receipt-splitting app. 54.3s demo + 5.23s founder intro = 59.55s at 2560×1440/60fps.
The full voiceover script
VOUCH, 54.3s PRODUCT DEMO, VOICEOVER SCRIPT
(read deadpan; timecodes are line START times)
[00:00] Every group chat has one receipt
[00:01] That starts a war.
[00:06] Don't argue about the receipt.
[00:09] Show it.
[00:12] Vouch reads the paper itself.
[00:14] Every line. every price.
[00:16] Even the ink that's barely there.
[00:20] Your housemates tap what's theirs.
[00:22] I owe this. not mine. split it.
[00:25] Every line gets a witness.
[00:31] When it adds up…
[00:33] Everyone sees it adds up.
[00:38] Every friend gets their own link.
[00:40] One line. zero arguments.
[00:43] And it keeps the books.
[00:45] Vouch, three taps, no fights.
The complete cue sheet, 10 sounds scoring 54 seconds
| T | Sound | Level | Why (verbatim from the cue file) |
|---|---|---|---|
| 5.58 | tape-whoosh | −12 | lime tape wipe into TheDrop |
| 8.26 | paper-drop | −10 | receipt lands, squash-on-impact |
| 11.03 | page-whoosh | −13 | paper tear into MachineReads |
| 15.65 | rubber-stamp | −12 | LOW CONFIDENCE badge stamps |
| 21.70 | ui-tap | −13 | first claim tap (one establishes the sound) |
| 36.98 | big-stamp | −8 | ADDS UP., the one big hit |
| 38.90 | send-swoosh | −13 | WhatsApp send |
| 41.90 | notification-pop | −13 | thumbs-up lands |
| 42.08 | tape-whoosh | −12 | pink tape wipe into TheStamp |
| 45.18 | big-stamp | −11 | THREE TAPS. NO FIGHTS. headline |
Measured hit offsets: big-stamp 0.35s, send-swoosh 0.6s, page-whoosh 1.15s, tape-whoosh 0.15s, paper-drop 0.1s. Note what's absent: no sound on 20+ other taps and slides, no success chime (it sat next to the big stamp and diluted it, cut), nothing during the air pockets.
The music numbers
- Upbeat chillhop at ~100 BPM, matching the 0.6s claim grid
- Trimmed to start at its drop, 17.9s into the file
- Carved −3 dB @ 250 Hz, −4.5 dB @ 2.8 kHz (Q ≈ 1)
- Bed at ~−21 dB under VO; swells to ~−13…−7 dB in the VO-free stretches; 0.2s fade-in, 2.5s smooth fade-out
Troubleshooting log, symptom → cause → fix
Every one of these actually happened. Recognize the symptom, skip the diagnosis.
| Symptom | Cause | Fix |
|---|---|---|
| Recorded video stutters despite a fast machine | Screen-recording live playback inherits skipped rAF frames | Frame-by-frame: seek + screenshot per frame (step 5) |
| Spinner spins ~11× too fast in the render only | CSS keyframe animations run on wall-clock, ignore your seek | Pin via document.getAnimations() every frame |
| process is not defined in the component bundle | Framework client modules read process.env.* at module scope | Prepend a process shim, to every entry point, not just the main one |
| Database driver appears in the browser bundle | A server component's import chain reached the bundler | Exclude it; use a client-safe stand-in |
| All typography silently falls back | Runtime-injected font CSS variables undefined outside the app | Pin the variables in a preview stylesheet; ship the woff2s |
| Every SFX lands ~0.3s late and reads "cheap" | AI-generated SFX pad silence before the hit | Measure per-file peak offset; players subtract it |
| SFX inaudible under the music bed | AI SFX are mastered quiet (ours peaked at −9.6 dBFS) | Peak-normalize each file at mix time, then apply cue level |
| Soundtrack feels like a slot machine | Too many cues, synth timbres, repeats in a row | ≈10 organic cues max, one per story turn, nothing twice in a row |
| SFX-only mix truncates the video | Audio stream ends at the last sound's tail; -shortest cuts video to match | apad=whole_dur=<video duration> before the limiter |
| Voice audibly "pumps" the music | Ducking alone, too deep | EQ-carve 250 Hz / 2.8 kHz first, then duck gently (step 8) |
| Music takes 15s to get going | Track trimmed from file start, not from its drop | Trim to the drop; land it on a story beat |
| Overlays drift off the photo's lower rows | Fixture coordinates ≠ measured artifact coordinates | Measure from the actual image (our row pitch: 86px, not 58px) |
| A sound's tail clicks off abruptly in the editor | Placing a stem overwrote the overlapping clip's tail | Re-place the clip over the stem's silent head; overlap-check after placements |
| volumedetect parsing returns nothing | ffmpeg prints stats to stderr, not stdout | Capture stderr |
| Design-tool font scanner chokes on tokens | Bare math inside clamp() misparsed as a font family | Wrap the expression in calc(), rendering-identical |
Command reference
Render and encode
npm run smoke # 4 spot frames, eyeball before a full run
npm run record # all frames, captions burned (~10 min)
npm run record:clean # all frames, no captions (VO workflow base)
npm run encode # frames → visually lossless 1440p60 H.264
node record.mjs --scale 3 # 4K frames
node record.mjs --fps 30 # half-time drafts
Score an export (SFX ± music)
node mix-audio.mjs --video out/demo-nocaptions.mp4 # SFX only
node mix-audio.mjs --video out/demo-nocaptions.mp4 \
--bgm music.mp3 --bgm-start 17.9 --bgm-db -21 # + carved bed
Measure a sound file (loudness + where the hit is)
# peak level (prints to stderr!)
ffmpeg -i big-stamp.mp3 -af volumedetect -f null - 2>&1 | grep max_volume
# find the hit: peak level per 50ms window, the first loud window is the hit
ffprobe -f lavfi -i "amovie=big-stamp.mp3,astats=metadata=1:reset=1" \
-show_entries frame=pts_time:frame_tags=lavfi.astats.Overall.Peak_level \
-of csv=p=0 2>/dev/null | head -40
Verify cues exist in the exported file
for t in 13.45 42.15 47.0; do
ffmpeg -ss $t -t 0.4 -i final.mp4 -af volumedetect -f null - 2>&1 | grep max_volume
done # expect peaks at cue times, quiet elsewhere
Loudness for delivery
ffmpeg -i final.mp4 -af loudnorm=I=-14:TP=-1:LRA=11:print_format=summary -f null -
# then apply with the measured values in a second (two-pass) run
Shift an SRT after prepending an intro
python3 - <<'EOF'
import re
shift = 5.2333 # intro length in seconds
src = open('demo.srt').read()
def add(m):
h,mn,s,ms = map(int, m.groups())
t = h*3600 + mn*60 + s + ms/1000 + shift
h2=int(t//3600); t-=h2*3600; m2=int(t//60); t-=m2*60
return f"{h2:02d}:{m2:02d}:{int(t):02d},{round((t-int(t))*1000):03d}"
open('demo-fullcut.srt','w').write(
re.sub(r'(\d{2}):(\d{2}):(\d{2}),(\d{3})', add, src))
EOF
Small review copy from a big master
ffmpeg -i master-1440p60.mp4 -vf scale=1920:1080:flags=lanczos \
-c:v libx264 -preset slow -b:v 3300k -maxrate 3800k -bufsize 7600k \
-pix_fmt yuv420p -c:a aac -b:a 192k -movflags +faststart preview-1080p.mp4
Research sources
The sound and music rules in steps 7-8 were distilled from these, then validated against our own mix:
- uisfx.com, UI sound design principles (when interfaces should and shouldn't make sound)
- Envato, UI sound design with AI (generating organic interface sounds)
- Krotos, sound effects for motion graphics (whoosh timing, impact-on-settle)
- SoundMorph, a designer's guide to whooshes (layering, frequency separation)
- Ocular Sounds, whooshes for motion and energy (audio leading video)
Plus the standard mix wisdom the numbers here embody: dialogue-first mixing (music 15-20 dB under voice), frequency carving over deep ducking, and −14 LUFS streaming delivery.
stack used React Playwright ffmpeg ElevenLabs voice + SFX any keyframe NLE