[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CNCMRHTRT3NV5CJGQ4WNRT":3,"skill-same:01M6CNCMRHTRT3NV5CJGQ4WNRT":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":34,"publishedAt":55,"linkOnly":56,"markdownContent":57,"markdownBody":58,"frontMatter":59,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6CNCMRHTRT3NV5CJGQ4WNRT","hyperframes-best-practices",null,"Production-grade HyperFrames workflow for turning a raw screencast or talking-head recording into a polished product video. Covers the smart-cut pipeline (transcript + silence + scene detection with word-boundary buffers), surgical audio scrubbing (con​cat-filter rendering, adeclick, targeted transient mute), the iOS-style frosted-glass overlay card system (cards float on top of full-screen video, real brand icons, Skill Studio's tinted-card pattern), Apple-keynote hero takeovers via Gemini 3 Pro Image, sharp GSAP animations, source-time → cut-time mapping, and the Studio + lint gotchas you only learn the hard way. Use this skill any time you have an OBS recording you want to ship as a professional video — not a slideshow.","anton-abyzov\u002Fvskill","anton-abyzov","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F979819?v=4","01M6CN5XDNZDM4A59WYJ1MF0DF","Anton Abyzov","01M6CN5XHVS7FXP067EJQVVZHK",47,"MIT","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002FSKILL.md",[18,23,26,29],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":30,"categoryName":31,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"best practices","hyperframes","hyperframes best practices","use","system","Word","gemini","brand","ship","product","whisper","transcript","image","workflow","learn","only","pipeline","Audio","Animation","Video","2026-11-10 10:12:30",false,"---\nversion: \"1.0.0\"\nname: hyperframes-best-practices\ndescription: \"Production-grade HyperFrames workflow for turning a raw screencast or talking-head recording into a polished product video. Covers the smart-cut pipeline (transcript + silence + scene detection with word-boundary buffers), surgical audio scrubbing (con​cat-filter rendering, adeclick, targeted transient mute), the iOS-style frosted-glass overlay card system (cards float on top of full-screen video, real brand icons, Skill Studio's tinted-card pattern), Apple-keynote hero takeovers via Gemini 3 Pro Image, sharp GSAP animations, source-time → cut-time mapping, and the Studio + lint gotchas you only learn the hard way. Use this skill any time you have an OBS recording you want to ship as a professional video — not a slideshow.\"\nmetadata:\n  tags: hyperframes, video, screencast, ffmpeg, whisper, smart-cuts, audio-scrubbing, beeps, overlays, brand-icons, gsap, animation, gemini-image, ios-card, frosted-glass\n---\n\n# \u002Fhyperframes-best-practices\n\nUse this skill any time you are turning a raw screencast, talking-head recording, or OBS export into a polished HyperFrames product video. It bundles **two layers** of knowledge:\n\n1. **HyperFrames fundamentals** — the upstream rule files maintained by HeyGen at `github.com\u002Fheygen-com\u002Fhyperframes` (composition authoring, GSAP timelines, `data-*` attributes, the dev-loop CLI). Install via `npx vskill i heygen-com\u002Fhyperframes`.\n2. **Production-craft rules** — lessons captured from a long iteration cycle building a real SpecWeave product video from a single 8:47 OBS recording. These are the rules that, when followed, produce a video the user can actually ship — and, when broken, leave you with beeps, mid-word clips, blank takeover scenes, and overlays that block the speaker's face cam.\n\nRead both layers before authoring.\n\n---\n\n## Scope and applicability\n\n> **The Layer 2 craft rules below were derived from one specific project: turning an 8:47 SpecWeave intro recording (Anton Abyzov, OBS capture, talking-head + screen-share, May 2026) into a 6:00 production-ready promo video.** They reflect the look-and-feel of *that* product — Studio's tinted-card aesthetic, SpecWeave's purple\u002Fgreen palette, an iOS-card overlay style, and the technical realities of OBS recordings (start\u002Fstop ticks, recording-resume transients, duplicate takes from re-recording the same line three times).\n>\n> **The exact constants are project-specific** — overlay positions for that face-cam location, the `Boris Cherny \u002F Anthropic` correction text, the `600+\u002F500+\u002F3K+` stats — translate, do not copy.\n>\n> **Use this layer as a reference for the underlying technique:** the transcript-driven smart-cut algorithm, the per-clip fade-in for transient suppression, the `con​cat`-filter render pipeline that avoids con​cat-demuxer clicks, the surgical-mute beep scrubber, the iOS-card overlay pattern, the source-time → cut-time mapping, the Studio waveform-cache invalidation gotcha — those generalize.\n\n---\n\n## When to use\n\nTrigger this skill when ANY of these apply:\n\n- A user has a raw screencast or OBS recording and wants a tightened, captioned, branded video.\n- The source has dead air, paused silences, or duplicate \"let me try that again\" takes.\n- The source has clicks, beeps, or transient artifacts at recording boundaries.\n- The user wants graphic overlays (callouts, stat cards, brand reveals, tool logos) that **don't cover the speaker's face cam**.\n- The user said the words \"make this production-ready\" or \"ready to ship\".\n- The user mentioned wanting \"Apple-keynote style\" or \"iOS hover cards\" or \"frosted glass\".\n\nIf ANY of those signals are present, follow this workflow. If the user just wants a quick title card on a clean source, the upstream `hyperframes` skill alone is enough.\n\n---\n\n## The pipeline (10 phases)\n\n```\n┌──────────────────────────────────────────────────────────────────┐\n│  Phase 0  Inventory tools                                         │\n│  Phase 1  Probe the source (duration, codec, audio sample rate)   │\n│  Phase 2  Transcribe with Whisper (word-level timestamps)         │\n│  Phase 3  Detect silences + scene changes                         │\n│  Phase 4  Build the smart cut list (with word-boundary buffers)   │\n│  Phase 5  Scrub transient beeps (surgical mute + adeclick)        │\n│  Phase 6  Render the master via con​cat filter (single pass)       │\n│  Phase 7  Generate hero imagery (Gemini 3 Pro Image)              │\n│  Phase 8  Author the HyperFrames composition (iOS cards)          │\n│  Phase 9  Lint + verify in Studio                                 │\n└──────────────────────────────────────────────────────────────────┘\n```\n\nRun the phases sequentially. **Iterate inside a phase, not across phases** — a bad cut list breaks every overlay timing downstream, and you'll spend an hour re-resolving anchors. Get cut list right first, then render once, then build overlays against the final timeline.\n\n---\n\n# Phase 0 — Inventory tools\n\nBefore starting, confirm these are available. The skill assumes macOS \u002F Linux; on Windows use WSL.\n\n| Tool | Used for | Install |\n|---|---|---|\n| `ffmpeg` (>= 6.0) | All video\u002Faudio processing | `brew install ffmpeg` |\n| `ffprobe` | Stream inspection | bundled with ffmpeg |\n| `whisper` (OpenAI Python pkg) | Transcription with word timestamps | `pip install openai-whisper` |\n| `python3` | Cut list \u002F beep scrubber scripts | system |\n| `npx hyperframes@latest` | Composition CLI (preview, render, lint) | `npx hyperframes init \u003Cproject>` |\n| Gemini 3 Pro Image API | Hero images (optional) | `GEMINI_API_KEY` env var |\n| `vskill` (>= 1.0) | Skill installation | `npm i -g vskill` |\n\nIf Whisper isn't installed, `pip install openai-whisper` brings it in. **Do not** use `large-v3` or `large-v3-turbo` on CPU — they take 10–15 minutes for an 8-minute audio. **Use `base.en`** for English tech monologue: ~30s, plenty accurate for word boundaries.\n\nIf a user's machine has `auto-editor` installed, ignore it — it does silence cuts but **not** beep scrubbing or word-boundary buffering, and it generates choppy 50+ segment cuts. We do better by hand.\n\n---\n\n# Phase 1 — Probe the source\n\nBefore doing anything else, learn the file's shape:\n\n```bash\nffprobe -v error -show_entries stream=index,codec_type,codec_name,width,height,r_frame_rate,duration,sample_rate,channels \\\n  -show_entries format=duration,size,bit_rate -of json \"$SRC\" | tee source_meta.json\n```\n\nThings you must know:\n\n- **Total duration** — drives all cut math.\n- **Frame rate** — OBS often records at 60 fps; HyperFrames Studio plays at 30 fps internally for scrubbing. **Multiply seconds × 30 to get studio frame numbers**, not seconds × source-fps. This trips people up.\n- **Audio codec & sample rate** — OBS commonly records `pcm_s24le` at 48 kHz. Re-encode to AAC 192k for delivery; keep 48 kHz to match all downstream tools.\n- **Container** — `.mov` from DaVinci, `.mkv` from OBS — both fine, ffmpeg reads either.\n\nSave the probe to disk so later phases can re-read it without re-probing.\n\n---\n\n# Phase 2 — Transcribe with Whisper\n\nWord-level timestamps are the foundation. Without them you can't:\n\n- Snap cut boundaries to word edges (avoiding mid-word clips).\n- Detect duplicate takes (same line said 2-3 times).\n- Place overlay anchors against speech moments instead of cut times that drift.\n\n**Extract audio first** so Whisper gets a clean mono 16 kHz WAV (saves 80% of CPU vs full-quality):\n\n```bash\nmkdir -p .work\nffmpeg -hide_banner -y -i \"$SRC\" -vn -ac 1 -ar 16000 -c:a pcm_s16le .work\u002Fsource.wav\n```\n\n**Run Whisper with word timestamps and JSON output:**\n\n```bash\nwhisper .work\u002Fsource.wav \\\n  --model base.en \\\n  --language en \\\n  --word_timestamps True \\\n  --output_dir .work \\\n  --output_format json \\\n  --verbose False\n```\n\n⚠️ **Whisper CLI gotcha**: passing `--output_format json --output_format srt` keeps **only the last** flag in older versions. If you need multiple, use `--output_format all` (writes JSON + SRT + VTT + TSV + TXT).\n\nValidate the output: `.work\u002Fsource.json` should contain `segments[].words[]` with `start`, `end`, `word`. If `words` is empty, you forgot `--word_timestamps True`.\n\n**Read the full transcript at this stage.** Don't skip it. You'll spot:\n\n- **Brand-name miss-hearings.** Whisper hears \"Claude Code at Anthropic\" as \"Cloud Code at Infropic\" 90% of the time. \"SpecWeave\" comes out as \"spec with\" or \"specs\". These need overlay corrections, not re-recording.\n- **Duplicate takes.** Look for the same sentence repeated verbatim. In our project, *\"And those systems cannot produce skills as you work\"* appeared three times at 01:14, 01:30, 01:47. Drop two of them.\n- **Filler restarts.** Single-word fragments like \"And…\", \"And…\" preceding the actual sentence. The cut script catches these as \"ghost\" segments — we drop them in phase 4.\n\n---\n\n# Phase 3 — Detect silences and scene changes\n\nTwo parallel detections feed the cut algorithm:\n\n### 3a. Silence detection\n\n```bash\nffmpeg -hide_banner -nostats -i \"$SRC\" -af \"silencedetect=noise=-30dB:duration=1.2\" -f null - 2>&1 \\\n  | grep -E \"silence_(start|end)\"\n```\n\n`-30 dB` and `1.2s` are the sweet spot. Looser (`-25 dB`, `0.8s`) catches breath gaps you don't want to cut. Tighter (`-35 dB`, `2s`) misses real dead air.\n\nParse start\u002Fend pairs into `[(s, e, dur), ...]` and write to `silences.json`. See [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py).\n\n### 3b. Scene-change detection\n\n```bash\nffmpeg -hide_banner -nostats -i \"$SRC\" -filter:v \"select='gt(scene,0.05)',showinfo\" -f null - 2>&1 \\\n  | grep \"showinfo\" | grep -oE \"pts_time:[0-9.]+\" | sed 's\u002Fpts_time:\u002F\u002F' > scenes.txt\n```\n\n`scene>0.05` is sensitive enough to catch the speaker bringing up a new browser tab, switching apps, scrolling significantly. Don't go below `0.03` — you'll get false positives from cursor blinks.\n\nThese two together let you make the **smart cut decision**: silence + no scene change = pure dead air, cut it. Silence + scene change = the speaker is showing something on screen, **keep it** (the audience is supposed to look at the screen, not hear narration).\n\n---\n\n# Phase 4 — Build the smart cut list\n\n> **Speaker who records repeated takes (Anton's rule, 2026-11-01):** when each passage is said several times and the last attempt is the clean one, that rule overrides Rules 1-2 below. Keep only the last attempt of each passage as one unbroken piece: no dead-air or silence removal inside it, no cut inside a sentence. Trim only take heads and tails at word edges (about 100-200 ms buffer), join takes with short audio crossfades (30-80 ms) and keep the ending clean. If it runs long, speed the whole edit up uniformly (about 1.1x, `atempo` plus `setpts`, pitch preserved) instead of cutting.\n\nThe cut algorithm has **5 hard rules** earned the painful way:\n\n### Rule 1 — Pure dead air gets cut, but not all of it\n\nFor each silent segment > `MIN_CUT_LEN` (1.5s) with no scene change inside: cut everything except a `BREATH` of 0.30s. The breath preserves natural rhythm — eliminating 100% of silence makes speech sound machine-edited.\n\n```python\nif not in_scenes and (cut_end - cut_start) > MIN_CUT_LEN:\n    cuts.append((cut_start + 0.30, cut_end, f\"dead air {dur:.1f}s\"))\n```\n\n### Rule 2 — Silences with screen activity stay (capped at 3.5s)\n\nIf the silence has scene changes, the speaker is letting the audience read. Keep the window from `first_scene - 0.4s` to `last_scene + 0.8s`, but never longer than 3.5s — staring at one frame past 3.5s loses people.\n\n### Rule 3 — Snap to word boundaries\n\nAfter computing the rough keep ranges, snap each boundary to the nearest word edge from Whisper, within a 0.4s tolerance:\n\n```python\ndef snap(t, words):\n    best, bd = t, 0.4\n    for s, e, _ in words:\n        for cand in (s, e):\n            if abs(cand - t) \u003C bd:\n                best, bd = cand, abs(cand - t)\n    return best\n```\n\nThis is what stops cuts from clipping mid-word. Without it, every other cut clips a trailing 's' or breath consonant.\n\n### Rule 4 — Add word-boundary buffers (this is the one users notice)\n\nEven with word-edge snapping, **trailing consonants extend slightly past Whisper's reported word-end timestamp**. Whisper times the *vowel onset to vowel offset*, not the consonant tail. So a literal cut at `word.end` clips the trailing 's', breath, or 'k'.\n\nThe fix: extend each keep range:\n\n- **End:** `+ 0.30s` past the last word's end, capped at half the gap to the next keep.\n- **Start:** `- 0.10s` before the first word's start, capped at half the gap to the previous keep.\n\n```python\nEND_BUF, START_BUF = 0.30, 0.10\nfor i, (s, e) in enumerate(keep):\n    gap_next = keep[i+1][0] - e if i+1 \u003C len(keep) else TOTAL - e\n    gap_prev = s - keep[i-1][1] if i > 0 else s\n    add_end   = min(END_BUF,   max(0, gap_next * 0.5))\n    add_start = min(START_BUF, max(0, gap_prev * 0.5))\n    if gap_next \u003C 0.6: add_end   = max(add_end,   gap_next - 0.05)  # eat tiny gaps\n    if gap_prev \u003C 0.6: add_start = max(add_start, gap_prev - 0.05)\n    final.append([s - add_start, e + add_end])\n```\n\n**The result**: cut \"find the tickets\" extends from src 08:09.26 to 08:09.56 — the trailing 's' survives. Without this, the user will tell you the audio \"feels rushed\" or \"swallows endings\".\n\n### Rule 5 — Manual duplicate-take removal\n\nProgrammatic dedup of identical n-grams is fragile and dangerous (it can drop legitimate repetitions). Instead: read the transcript, find verbatim duplicates yourself, and add explicit drop ranges in source-time:\n\n```python\nDUP_RANGES = [\n    (78.86, 113.82),   # 01:18.86 - 01:53.82: 2 of 3 takes of \"skills as you work\"\n]\nfor ds, de in DUP_RANGES:\n    # trim each keep that overlaps this range\n    ...\n```\n\nReduces the cut from 35% saved to 32% saved (the duplicates are silenced gaps + speech), but the result reads cleanly.\n\n### Output\n\nThe script writes:\n\n- `cuts.json` — keep ranges + cut ranges + summary stats + source-time mapping (used by Phase 8 for overlay anchors).\n- `edl.txt` — human-readable EDL with transcript snippets per keep (eyeball-check this before rendering).\n\nSee [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) for the full implementation.\n\n---\n\n# Phase 5 — Scrub transient beeps\n\nOBS recordings often contain short transient artifacts — boot beeps, key-switch clicks, mic plosives that hit a hot input. These ride along through silence-cut decisions because they're loud (so silence detection ignores them) and they're surrounded by quiet. They sound like a \"tick\" in the final video at 4:11 or 0:52 or wherever.\n\n**Don't try to fix this with a global noise gate or de-noiser.** You'll smear consonants and make speech sound underwater. Instead: detect transients and surgically silence each 60–100ms window.\n\n### Detection algorithm (the one that doesn't mute speech)\n\nA transient is a \"beep\" iff:\n\n```\nRMS(window 5ms)  > BEEP_RMS_MIN     (e.g., > 800)\nRMS(preceding 150ms) \u003C PRE_QUIET    (e.g., \u003C 200)\nRMS(following 200ms) \u003C POST_QUIET   (e.g., \u003C 350)\n```\n\nThe third condition is critical. Without it, you'll catch consonant onsets ('p', 't', 'k') of speech, because they look identical in the first 5ms — *but speech is followed by a sustained vowel*, while a beep returns to silence. Filter on `post_avg \u003C 350` and you only ever silence isolated transients.\n\nAlso cap the silenced span at 0.30s — a misclassification can never wipe out a word.\n\n### Apply the surgical mutes\n\nBuild an ffmpeg `volume` filter expression with the targeted ranges:\n\n```\nvolume=enable='between(t,52.110,52.180)+between(t,169.850,169.920)+between(t,251.245,251.315)+between(t,268.780,268.845)':volume=0,adeclick\n```\n\nThe trailing `adeclick` catches anything else click-shaped that the surgical pass missed. Keep both — they're complementary.\n\nSee [scripts\u002Fscrub_beeps.py](scripts\u002Fscrub_beeps.py) for the full implementation.\n\n### Why per-clip fade-in DOESN'T work\n\nYou'd think: \"just fade in the start of every kept clip and the boundary clicks disappear.\" That works for **boundary** clicks (con​cat artifacts). It does **NOT** work for transients sitting deeper inside the clip — e.g., 0.7s into the segment, in a silence. We had a beep at cut 4:11.245 that was 0.74s into keep[26] — no fade-in reaches that.\n\nThe right fix is **the right tool for each problem**:\n\n| Problem | Fix |\n|---|---|\n| Boundary click between two re-encoded clips | Use `con​cat` filter, not `con​cat` demuxer (Phase 6) |\n| OBS start tick at t=0 | 0.4s `afade=t=in:st=0:d=0.4` |\n| Click-type spikes anywhere | `adeclick` filter (broad, low cost, no audible side effects) |\n| Transient pip in a silence (the hard one) | Detection + surgical `volume=0:enable='between(t,a,b)'` |\n\n---\n\n# Phase 6 — Render the master via con​cat filter\n\nThe single most important rendering rule: **use the `con​cat` filter, not the `con​cat` demuxer.**\n\n### Why\n\nThe con​cat demuxer (`-f con​cat -i list.txt`) requires every clip to have identical codec params. Even when they do, the demuxer can introduce **audible boundary clicks** because it stitches packets at container level without aligning audio samples. We saw clicks at every clip join — sounded like the OBS tick we tried to remove, which is what made the user think we hadn't fixed the beep.\n\nThe con​cat filter (`filter_complex … con​cat=n=N:v=1:a=1`) does sample-accurate con​catenation through the audio path. No boundary clicks. Single pass.\n\n### The full ffmpeg command\n\n```bash\n# Build filter_complex string from cuts.json keeps\npython3 - \u003C\u003C'PY' > filter_complex.txt\nimport json\nkeep = json.load(open('cuts.json'))['keep']\ntotal_out = sum(e-s for s,e in keep)\nparts = []\nfor i,(s,e) in enumerate(keep):\n    parts.append(f\"[0:v]trim=start={s:.4f}:end={e:.4f},setpts=PTS-STARTPTS[v{i}]\")\n    parts.append(f\"[0:a]atrim=start={s:.4f}:end={e:.4f},asetpts=PTS-STARTPTS[a{i}]\")\ninter = \"\".join(f\"[v{i}][a{i}]\" for i in range(len(keep)))\nparts.append(f\"{inter}concat=n={len(keep)}:v=1:a=1[vc][ac0]\")\nparts.append(f\"[ac0]adeclick,afade=t=in:st=0:d=0.4,afade=t=out:st={total_out-0.5:.2f}:d=0.5[ac]\")\nprint(\";\".join(parts))\nPY\n\nffmpeg -hide_banner -y -i \"$SRC\" \\\n  -\u002Ffilter_complex filter_complex.txt \\\n  -map \"[vc]\" -map \"[ac]\" \\\n  -c:v libx264 -preset medium -crf 18 -pix_fmt yuv420p \\\n  -c:a aac -b:a 192k -ar 48000 \\\n  -movflags +faststart \\\n  master.mp4\n```\n\n### Rendering checks\n\nAfter rendering, verify both streams have matching durations:\n\n```bash\nffprobe -v error -show_entries stream=codec_type,duration,nb_frames \\\n  -show_entries format=duration -of json master.mp4\n```\n\nVideo and audio durations should match within 0.05s. If they don't, your filter_complex has a bug — usually because the audio passed through `aselect` instead of `atrim` and got time-shifted. Use `atrim`, not `aselect`, for cut-list rendering.\n\nAfter surgical beep mute (Phase 5), the audio has been re-encoded — copy the video stream, replace the audio:\n\n```bash\nffmpeg -y -i master.mp4 -c:v copy -af \"volume=enable='...':volume=0,adeclick\" \\\n  -c:a aac -b:a 192k -ar 48000 master_clean.mp4\n```\n\n---\n\n# Phase 7 — Generate hero imagery\n\nFor dramatic full-takeover scenes (the \"Apple keynote moment\") you want a single hero image — something the audience will remember. Don't use stock photos; generate one with Gemini 3 Pro Image.\n\n### Prompt anatomy that works\n\nA reliable Apple-keynote prompt has these **6 elements**:\n\n1. **Subject + framing** — \"exploded view of an Apple Watch, components floating in 3D space\"\n2. **Lighting** — \"soft volumetric studio lighting, specular highlights, rim light\"\n3. **Background** — \"dark gradient (deep navy to black, subtle teal rim glow)\"\n4. **Style** — \"photorealistic ray-traced metals and glass, ultra sharp\"\n5. **Layout** — \"front-3\u002F4 angle, cinematic 16:9 keynote slide composition, generous negative space, no text\"\n6. **Mood** — \"premium product photography\"\n\nThe \"no text\" is critical — image-gen models love adding gibberish text. Always say no.\n\n### API call\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent?key=$GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"contents\": [{\"parts\": [{\"text\": \"\u003Cyour prompt>\"}]}],\n    \"generationConfig\": {\n      \"responseModalities\": [\"TEXT\", \"IMAGE\"],\n      \"imageConfig\": {\"aspectRatio\": \"16:9\"}\n    }\n  }' > resp.json\n```\n\nDecode the inline-base64 image:\n\n```python\nimport json, base64\nd = json.load(open('resp.json'))\nfor p in d['candidates'][0]['content']['parts']:\n    if 'inlineData' in p:\n        open('hero.png','wb').write(base64.b64decode(p['inlineData']['data']))\n```\n\n### When you can't use Gemini\n\nIf `GEMINI_API_KEY` isn't available, fall back to:\n- Anton's project: paid-tier `EasyChamp` Gemini key (per `~\u002F.zshrc`) — see `reference_gemini_api_keys.md` for the user's existing keys\n- Free fallback: Pollinations.ai (lower quality, but free)\n- Don't ask the user for an API key — check their environment first\n\nKeep the resulting PNG in `assets\u002F`. Reference it from the composition with `\u003Cimg src=\"assets\u002Fhero.png\">`.\n\n---\n\n# Phase 8 — Author the HyperFrames composition\n\nThis is where most visual quality lives. The Layer 2 lessons here are dense — read them all before writing HTML.\n\n## 8.1 — The iOS-card overlay system (NOT the PiP layout)\n\n> **The mistake**: shrinking the underlying video to a corner PiP and filling the rest with graphics.\n> **The lesson**: real product videos keep the speaker visible at full screen and float overlays *on top* like iOS notification cards.\n\n### Why \"PiP corner\" feels wrong\n\nA PiP shrinks the speaker to ~480×270 in a corner. Three problems:\n1. The user can no longer see what they're showing on screen at full detail.\n2. PiP transitions are jarring — content snaps from full-screen to thumbnail and back.\n3. It looks like a Zoom call, not a product video.\n\n### The iOS card pattern that works\n\nThe card is a **frosted-glass surface** that drops in on top of the full-screen video. The video keeps playing. The card stays for 4–11 seconds, then dismisses.\n\n```css\n.card {\n  position: absolute;\n  background: linear-gradient(180deg, rgba(28,30,38,0.82) 0%, rgba(18,20,26,0.82) 100%);\n  backdrop-filter: blur(28px) saturate(140%);\n  -webkit-backdrop-filter: blur(28px) saturate(140%);\n  border: 1px solid rgba(255,255,255,0.10);\n  border-radius: 28px;\n  box-shadow:\n    0 1px 0 rgba(255,255,255,0.06) inset,\n    0 24px 60px rgba(0,0,0,0.55),\n    0 8px 16px rgba(0,0,0,0.35);\n  overflow: hidden;\n}\n.card::before {\n  \u002F* Top accent stripe — Skill Studio FEATURES card pattern *\u002F\n  content: \"\"; position: absolute; left: 0; right: 0; top: 0;\n  height: 4px; background: var(--card-accent, #06b6d4);\n  opacity: 0.85;\n}\n```\n\nThe four ingredients:\n\n1. **`backdrop-filter: blur(28px) saturate(140%)`** — the frosted-glass effect that makes the card legible against any underlying video frame. `saturate(140%)` keeps colors punchy through the blur.\n2. **Tinted gradient surface** — not pure black. `rgba(28,30,38,0.82)` lets enough of the video bleed through to feel layered, not pasted-on.\n3. **Inset highlight + drop shadow stack** — the `0 1px 0 inset` rim catches light, the doubled drop shadow gives depth without looking heavy.\n4. **Top accent stripe** — 4px colored bar tied to the scene's brand color. Single visual anchor.\n\n### Card placement — avoid the speaker's face cam\n\nFind where the face cam lives in the source. For most OBS configs, it's bottom-right at ~480×270. Place cards anywhere else:\n\n| Card position | When to use |\n|---|---|\n| Top, full width | Quote opener, eyebrow + title scenes |\n| Top-left | Big-number stats |\n| Center | Hero brand reveal (one-shot, dramatic) |\n| Bottom-left chip | Small contextual annotations (name corrections) |\n| Bottom, full width | CTA, terminal command |\n\n**Never** place a card in the bottom-right unless the speaker isn't there. **Never** make a full-screen card cover the screen content unless the moment is specifically designed as a \"takeover\" beat (e.g., the Apple Watch hero in our project).\n\n## 8.2 — Real brand icons, not text labels\n\nThe project's `docs-site\u002Fsrc\u002Fcomponents\u002Fui\u002FIcon\u002Fbrands\u002F` directory ships with 10 brand SVGs:\n\n- `claude.svg` (#D97757 terra-cotta)\n- `github.svg` (#6e40c9)\n- `copilot.svg` (#6E5494)\n- `cursor.svg` (orange tetrahedron, multi-fill)\n- `jira.svg` (#2684FF)\n- `azure.svg` (#0078D4)\n- `windsurf.svg`, `discord.svg`, `linear.svg`, `youtube.svg`\n\nCopy them into your composition's `assets\u002Fbrands\u002F` and **inline them as SVG inside cards**, not via `\u003Cimg>`. Inlining lets you control the icon's container size and respect the design language. Use the SVGs verbatim — these are the canonical brand marks; do not recolor.\n\n```html\n\u003Cdiv class=\"brand-icon\">\n  \u003Csvg viewBox=\"0 0 24 24\" fill=\"#D97757\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n    \u003Cpath d=\"…\"\u002F>\n  \u003C\u002Fsvg>\n\u003C\u002Fdiv>\n```\n\n```css\n.brand-icon { width: 64px; height: 64px; flex: 0 0 64px;\n  display: inline-flex; align-items: center; justify-content: center;\n  border-radius: 16px;\n  background: rgba(255,255,255,0.06);\n  border: 1px solid rgba(255,255,255,0.10);\n}\n.brand-icon svg { width: 38px; height: 38px; }\n```\n\n## 8.3 — Mirror Skill Studio's tinted-card pattern\n\nSkill Studio (vskill-platform) uses this pattern for feature cards. Our overlays should match:\n\n```js\n\u002F\u002F Each scene gets a brand color; that color drives the entire card's tint\nconst SCENE_COLORS = {\n  opener:    \"#06b6d4\",   \u002F\u002F cyan\n  problem:   \"#ef4444\",   \u002F\u002F red\n  solution:  \"#22c55e\",   \u002F\u002F green\n  cta:       \"#22c55e\",\n  brand:     \"#a855f7\",   \u002F\u002F purple\n  info:      \"#3b82f6\",   \u002F\u002F blue\n};\n```\n\nPill labels follow the exact pattern from `vskill-platform\u002Fsrc\u002Fapp\u002Fstudio\u002Fpage.tsx`:\n\n```css\n.pill {\n  display: inline-flex; align-items: center; gap: 8px;\n  padding: 6px 14px; border-radius: 999px;\n  font-family: 'Geist Mono', 'SF Mono', monospace;\n  font-size: 16px; font-weight: 600;\n  letter-spacing: 1.5px; text-transform: uppercase;\n  \u002F* Per-color: *\u002F\n  color: var(--c);\n  background: rgba(\u003Cc-rgb>, 0.10);   \u002F* ${color}10 *\u002F\n  border: 1px solid rgba(\u003Cc-rgb>, 0.40);  \u002F* ${color}40 *\u002F\n}\n.pill .swatch {\n  width: 8px; height: 8px; border-radius: 50%;\n  background: var(--c);\n  box-shadow: 0 0 10px var(--c);\n}\n```\n\nThis is the **exact** pattern from the platform — borders at 40% alpha, surfaces at 10% alpha, body text at full color. Mirror it for overlay legibility against any video frame.\n\n## 8.4 — Sharp animations, not \"fade in\"\n\nPlain `opacity 0 → 1` looks flat. Every card uses a four-property entry:\n\n```js\nfunction cardIn(sel, start) {\n  tl.fromTo(sel,\n    { opacity: 0, y: 60, scale: 0.96, filter: \"blur(8px)\" },\n    { opacity: 1, y: 0, scale: 1, filter: \"blur(0px)\",\n      duration: 0.7, ease: \"power3.out\", overwrite: \"auto\" }, start);\n}\n```\n\nThe four properties layered:\n- **Opacity** — `0 → 1`\n- **Y offset** — `60 → 0` (slide up from below)\n- **Scale** — `0.96 → 1` (subtle pop)\n- **Blur** — `8px → 0` (focus-in)\n\nPlus per-element flourishes:\n\n| Element | Animation | Why |\n|---|---|---|\n| Stat numbers | `scale 0.5 → 1` with `back.out(1.5)` | Big-number \"Apple keynote pop\" |\n| Tool icons | `stagger 0.08s` with `back.out(1.4)` | Each one snaps in |\n| Brand wordmark | `scale 0.7 → 1` with `blur(20px) → 0` | Reveal moment |\n| Live dot, terminal cursor | `@keyframes blink` 1.4s | Lived-in feel |\n| Hero image (Apple Watch) | Continuous gentle `y bob` 4s sine yoyo | Floats in space |\n\nAlways use `overwrite: \"auto\"` on tweens that share a property — the lint catches it otherwise.\n\n## 8.5 — Source-time → cut-time mapping (the silent killer)\n\nYou wrote overlay anchors against the **original source timestamps** (\"when he says 'SpecWeave' at src 03:28\"). The cut master plays at **cut timestamps** (the same speech moment is at cut 02:19.5).\n\nAfter every re-cut, the cumulative durations shift slightly. **Recompute the mapping and re-resolve every overlay anchor** before rendering:\n\n```python\nmapping = []\ncum = 0.0\nfor s, e in keep_ranges:\n    mapping.append({\"src_start\": s, \"src_end\": e, \"cut_start\": cum})\n    cum += (e - s)\n\ndef src_to_cut(src_t):\n    for m in mapping:\n        if m['src_start'] \u003C= src_t \u003C= m['src_end']:\n            return m['cut_start'] + (src_t - m['src_start'])\n    return None  # source moment was cut\n```\n\nSkip overlays whose source moments got cut — don't try to \"place them somewhere reasonable.\" Drop them.\n\nSave the mapping to `cuts.json` and have the overlay-author script read it. See [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) for the full version.\n\n## 8.6 — Concise text, big and structured\n\nCards follow the **eyebrow-pill + headline + structured content** pattern (Apple keynote):\n\n```\n┌────────────────────────────────────────┐\n│ ● PILL LABEL                           │\n│                                        │\n│ The Big Headline.                      │\n│                                        │\n│ Tool · Tool · Tool   (or: 3 cards)     │\n└────────────────────────────────────────┘\n```\n\nRules:\n- **Headline**: 56–96px, `font-weight: 800`, `letter-spacing: -1.5px`. One sentence. No more.\n- **Eyebrow pill**: 16px mono, all-caps, tracked +1.5px. ≤ 4 words.\n- **Body**: short structured units — bullets (3 max), tool tiles, stat tiles. Never a paragraph.\n- **Numbers**: huge. 140–320px is normal. Numbers are the visual anchor of every stat scene.\n\nBad: `\"With more than 600 increments, 500 NPM releases, and over 3000 commits, SpecWeave is battle-tested.\"`\nGood: `● BATTLE-TESTED` \u002F **Real numbers.** \u002F 3 stat tiles: `600+` \u002F `500+` \u002F `3K+`\n\n---\n\n# Phase 9 — Lint + verify in Studio\n\n## 9.1 — HyperFrames lint gotchas\n\nRun `npx hyperframes lint` after every edit. The five errors\u002Fwarnings we hit and how to fix:\n\n| Lint message | Cause | Fix |\n|---|---|---|\n| `overlapping_clips_same_track` | Two `data-track-index` clips on the same track overlap in time | Move one to a different track. Audio especially — give it `data-track-index=\"-1\"`. |\n| `overlapping_gsap_tweens` | Two GSAP tweens animate the same property on the same selector | Add `overwrite: \"auto\"` to all but the first. |\n| `gsap_exit_missing_hard_kill` | Exit fade ends near a clip start boundary; non-linear seek can land mid-fade | After the exit, add `tl.set(sel, { opacity: 0 }, end_time);` |\n| `composition_file_too_large` | Single `index.html` exceeds ~500 lines | Move scenes into `compositions\u002FsceneN.html` and mount with `data-composition-src`. Cosmetic when timing is fluid; do it once timing is locked. |\n| `timeline_track_too_dense` | More than ~6 elements on one track | Same fix as above — split into sub-comps. |\n\n## 9.2 — Studio gotchas\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| New audio plays correctly but waveform display still shows old version | `.waveform-cache\u002F` holds stale per-asset JSON | `rm -rf .waveform-cache\u002F` then refresh the studio. |\n| Frame-jump number doesn't match expected seconds | Studio internally runs at 30fps regardless of source frame rate | Multiply `seconds × 30` to get the studio frame number. |\n| `\u003Caudio>` element conflicts with `\u003Cvideo>` on same track | Both clips on `data-track-index=\"0\"` overlap | Audio gets `data-track-index=\"-1\"` (background, never visible). |\n| Hot-reload doesn't pick up new asset | The file replaced has the same name as before | Refresh the browser tab. Studio polls but is occasionally lazy. |\n| `npm run dev` fails on second run with port conflict | Previous studio still running on port 3002 | `lsof -nP -iTCP:3002` then kill the process. |\n\n## 9.3 — Verify scenes by jumping to known cut times\n\nThe studio has an \"Jump to frame\" input. Compute the frame for each scene:\n\n```python\nscenes = {\n  \"quote_opener\":      0.5,   # cut 0:00.5\n  \"boris_correction\":  10.4,\n  \"brownfield\":        53.88,\n  \"apple_watch\":       91.4,\n  \"specweave_reveal\":  139.51,\n  ...\n}\nfor name, cut_sec in scenes.items():\n    print(f\"{name}: frame {int(cut_sec * 30)}\")\n```\n\nJump to a frame just past each scene's start (so the entry animation has settled), screenshot, eyeball, iterate.\n\n---\n\n# Reference: full pipeline scripts\n\nThree Python scripts handle the heavy lifting. Read them, copy them, adapt them. Don't reinvent.\n\n- [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) — Phase 4: smart cut list with word-boundary buffers + dup removal + source→cut mapping.\n- [scripts\u002Fscrub_beeps.py](scripts\u002Fscrub_beeps.py) — Phase 5: detect transient beeps (loud + quiet on both sides) + emit ffmpeg volume-gate filter.\n- [scripts\u002Frender_master.py](scripts\u002Frender_master.py) — Phase 6: build the `con​cat`-filter `filter_complex` and run ffmpeg single-pass.\n\n# Reference: HTML composition starter\n\n- [references\u002Fcomposition-starter.html](references\u002Fcomposition-starter.html) — minimal HyperFrames composition with the iOS-card primitives, brand-icon container, pill labels, and the standard `cardIn`\u002F`cardOut` GSAP helpers. Drop in your scene content; ship.\n\n---\n\n# Anti-patterns — never do these\n\n1. **Don't shrink the video to a PiP corner during overlays.** Float overlays on top instead. The user said \"those animations must be on top, like phone hover style\" — they meant it.\n2. **Don't fade between cuts with a slow crossfade.** Hard cuts (snapped to word edges with buffers) read as professional; slow crossfades read as amateur. Exception: between repeated takes (Anton's rule, 2026-11-01), use short 30-80 ms audio crossfades so the joins stay smooth.\n3. **Don't use `auto-editor` to do silence cuts.** It's choppy, doesn't snap to word boundaries, doesn't handle duplicate takes, doesn't scrub beeps. Use the smart-cut algorithm.\n4. **Don't use the `con​cat` demuxer for re-encoded clips.** Use the `con​cat` filter — it sample-aligns audio. Boundary clicks are not OBS ticks; they're con​cat artifacts.\n5. **Don't fade-in every clip** to suppress beeps. Beeps inside silences (deep into a clip) won't be reached. Use surgical detection + targeted mute instead.\n6. **Don't write paragraphs in cards.** Headline + 3 bullets max. If you need more, you need more cards.\n7. **Don't reinvent brand marks.** Inline the official SVGs from `docs-site\u002Fsrc\u002Fcomponents\u002Fui\u002FIcon\u002Fbrands\u002F`. Don't ask Gemini to \"draw a Claude logo\".\n8. **Don't author overlays before the cut master is finalized.** Every recut shifts cut times — you'll waste hours re-resolving anchors. Lock the cut, then build overlays.\n9. **Don't trust Whisper on brand names.** \"Claude Code at Anthropic\" → \"Cloud Code at Infropic\". Read the transcript and add overlay corrections. Don't re-record.\n10. **Don't render with `large-v3-turbo` Whisper on CPU.** 15+ minutes for an 8-minute audio. `base.en` is 30 seconds and equally good for English tech monologue word-boundary work.\n\n---\n\n# Verification checklist\n\nBefore declaring the video ready:\n\n- [ ] Total duration matches the cut summary (within 0.05s).\n- [ ] Video and audio stream durations are equal in `ffprobe` output.\n- [ ] No mid-word clips on the EDL transcript snippets — read each keep's snippet end-to-end.\n- [ ] Surgical beep ranges all 60–300ms, never longer.\n- [ ] At every kept-segment boundary, listen for the trailing consonant on the previous segment and the leading consonant on the next.\n- [ ] Lint reports 0 errors (warnings are fine — they're cosmetic).\n- [ ] Each overlay scene has been screenshotted in the studio and visually checked for coverage of the speaker face cam.\n- [ ] Brand icons render correctly (inline SVG, not broken `\u003Cimg>`).\n- [ ] Hero takeover scene (if any) has the underlying video opacity animated to 0 during the takeover, then back to 1 after.\n- [ ] Final render plays end-to-end without audio glitches; specifically check the cut times where you previously heard beeps.\n\n---\n\n# Glossary\n\n- **Smart cut** — keep ranges built from silence + scene-change correlation, not just silence. Dead air with screen activity is kept; dead air without it is cut.\n- **Word-boundary buffer** — extending a keep range past the word's reported end to preserve trailing consonants (Whisper times vowels, not tails).\n- **Surgical mute** — silencing a sub-100ms window via `volume=0:enable='between(t,a,b)'`, applied only to detected transients in dead air.\n- **Hero takeover** — a full-screen graphic scene that briefly replaces the video entirely (e.g., Apple Watch), then returns. Use sparingly — once or twice per video.\n- **iOS card** — frosted-glass overlay primitive (backdrop-blur + tinted gradient + inset highlight + drop shadow) that floats on top of full-screen video without shrinking it.\n\n---\n\n# Provenance\n\nThis skill encodes lessons from one specific project: turning Anton Abyzov's 8:47 SpecWeave intro recording (May 2026 OBS capture) into a 6:00 production-ready video. The smart-cut algorithm, beep scrubber, and iOS-card design system were iterated through five render passes (v1 PiP layout → v2 word-boundary buffers → v3 con​cat-filter render → v4 surgical beep mute → v5 iOS-card overlay redesign) before reaching production quality. The Apple-Watch hero image was generated via Gemini 3 Pro Image with the exploded-product-photography prompt template.\n\nAuthor: Anton Abyzov (`anton.abyzov@gmail.com`)\nIteration log preserved in `~\u002FProjects\u002FObsidian\u002Fpersonal-docs\u002F` under `004 Archive\u002Fspecweave-video-2026-05`.\n","# \u002Fhyperframes-best-practices\n\nUse this skill any time you are turning a raw screencast, talking-head recording, or OBS export into a polished HyperFrames product video. It bundles **two layers** of knowledge:\n\n1. **HyperFrames fundamentals** — the upstream rule files maintained by HeyGen at `github.com\u002Fheygen-com\u002Fhyperframes` (composition authoring, GSAP timelines, `data-*` attributes, the dev-loop CLI). Install via `npx vskill i heygen-com\u002Fhyperframes`.\n2. **Production-craft rules** — lessons captured from a long iteration cycle building a real SpecWeave product video from a single 8:47 OBS recording. These are the rules that, when followed, produce a video the user can actually ship — and, when broken, leave you with beeps, mid-word clips, blank takeover scenes, and overlays that block the speaker's face cam.\n\nRead both layers before authoring.\n\n---\n\n## Scope and applicability\n\n> **The Layer 2 craft rules below were derived from one specific project: turning an 8:47 SpecWeave intro recording (Anton Abyzov, OBS capture, talking-head + screen-share, May 2026) into a 6:00 production-ready promo video.** They reflect the look-and-feel of *that* product — Studio's tinted-card aesthetic, SpecWeave's purple\u002Fgreen palette, an iOS-card overlay style, and the technical realities of OBS recordings (start\u002Fstop ticks, recording-resume transients, duplicate takes from re-recording the same line three times).\n>\n> **The exact constants are project-specific** — overlay positions for that face-cam location, the `Boris Cherny \u002F Anthropic` correction text, the `600+\u002F500+\u002F3K+` stats — translate, do not copy.\n>\n> **Use this layer as a reference for the underlying technique:** the transcript-driven smart-cut algorithm, the per-clip fade-in for transient suppression, the `con​cat`-filter render pipeline that avoids con​cat-demuxer clicks, the surgical-mute beep scrubber, the iOS-card overlay pattern, the source-time → cut-time mapping, the Studio waveform-cache invalidation gotcha — those generalize.\n\n---\n\n## When to use\n\nTrigger this skill when ANY of these apply:\n\n- A user has a raw screencast or OBS recording and wants a tightened, captioned, branded video.\n- The source has dead air, paused silences, or duplicate \"let me try that again\" takes.\n- The source has clicks, beeps, or transient artifacts at recording boundaries.\n- The user wants graphic overlays (callouts, stat cards, brand reveals, tool logos) that **don't cover the speaker's face cam**.\n- The user said the words \"make this production-ready\" or \"ready to ship\".\n- The user mentioned wanting \"Apple-keynote style\" or \"iOS hover cards\" or \"frosted glass\".\n\nIf ANY of those signals are present, follow this workflow. If the user just wants a quick title card on a clean source, the upstream `hyperframes` skill alone is enough.\n\n---\n\n## The pipeline (10 phases)\n\n```\n┌──────────────────────────────────────────────────────────────────┐\n│  Phase 0  Inventory tools                                         │\n│  Phase 1  Probe the source (duration, codec, audio sample rate)   │\n│  Phase 2  Transcribe with Whisper (word-level timestamps)         │\n│  Phase 3  Detect silences + scene changes                         │\n│  Phase 4  Build the smart cut list (with word-boundary buffers)   │\n│  Phase 5  Scrub transient beeps (surgical mute + adeclick)        │\n│  Phase 6  Render the master via con​cat filter (single pass)       │\n│  Phase 7  Generate hero imagery (Gemini 3 Pro Image)              │\n│  Phase 8  Author the HyperFrames composition (iOS cards)          │\n│  Phase 9  Lint + verify in Studio                                 │\n└──────────────────────────────────────────────────────────────────┘\n```\n\nRun the phases sequentially. **Iterate inside a phase, not across phases** — a bad cut list breaks every overlay timing downstream, and you'll spend an hour re-resolving anchors. Get cut list right first, then render once, then build overlays against the final timeline.\n\n---\n\n# Phase 0 — Inventory tools\n\nBefore starting, confirm these are available. The skill assumes macOS \u002F Linux; on Windows use WSL.\n\n| Tool | Used for | Install |\n|---|---|---|\n| `ffmpeg` (>= 6.0) | All video\u002Faudio processing | `brew install ffmpeg` |\n| `ffprobe` | Stream inspection | bundled with ffmpeg |\n| `whisper` (OpenAI Python pkg) | Transcription with word timestamps | `pip install openai-whisper` |\n| `python3` | Cut list \u002F beep scrubber scripts | system |\n| `npx hyperframes@latest` | Composition CLI (preview, render, lint) | `npx hyperframes init \u003Cproject>` |\n| Gemini 3 Pro Image API | Hero images (optional) | `GEMINI_API_KEY` env var |\n| `vskill` (>= 1.0) | Skill installation | `npm i -g vskill` |\n\nIf Whisper isn't installed, `pip install openai-whisper` brings it in. **Do not** use `large-v3` or `large-v3-turbo` on CPU — they take 10–15 minutes for an 8-minute audio. **Use `base.en`** for English tech monologue: ~30s, plenty accurate for word boundaries.\n\nIf a user's machine has `auto-editor` installed, ignore it — it does silence cuts but **not** beep scrubbing or word-boundary buffering, and it generates choppy 50+ segment cuts. We do better by hand.\n\n---\n\n# Phase 1 — Probe the source\n\nBefore doing anything else, learn the file's shape:\n\n```bash\nffprobe -v error -show_entries stream=index,codec_type,codec_name,width,height,r_frame_rate,duration,sample_rate,channels \\\n  -show_entries format=duration,size,bit_rate -of json \"$SRC\" | tee source_meta.json\n```\n\nThings you must know:\n\n- **Total duration** — drives all cut math.\n- **Frame rate** — OBS often records at 60 fps; HyperFrames Studio plays at 30 fps internally for scrubbing. **Multiply seconds × 30 to get studio frame numbers**, not seconds × source-fps. This trips people up.\n- **Audio codec & sample rate** — OBS commonly records `pcm_s24le` at 48 kHz. Re-encode to AAC 192k for delivery; keep 48 kHz to match all downstream tools.\n- **Container** — `.mov` from DaVinci, `.mkv` from OBS — both fine, ffmpeg reads either.\n\nSave the probe to disk so later phases can re-read it without re-probing.\n\n---\n\n# Phase 2 — Transcribe with Whisper\n\nWord-level timestamps are the foundation. Without them you can't:\n\n- Snap cut boundaries to word edges (avoiding mid-word clips).\n- Detect duplicate takes (same line said 2-3 times).\n- Place overlay anchors against speech moments instead of cut times that drift.\n\n**Extract audio first** so Whisper gets a clean mono 16 kHz WAV (saves 80% of CPU vs full-quality):\n\n```bash\nmkdir -p .work\nffmpeg -hide_banner -y -i \"$SRC\" -vn -ac 1 -ar 16000 -c:a pcm_s16le .work\u002Fsource.wav\n```\n\n**Run Whisper with word timestamps and JSON output:**\n\n```bash\nwhisper .work\u002Fsource.wav \\\n  --model base.en \\\n  --language en \\\n  --word_timestamps True \\\n  --output_dir .work \\\n  --output_format json \\\n  --verbose False\n```\n\n⚠️ **Whisper CLI gotcha**: passing `--output_format json --output_format srt` keeps **only the last** flag in older versions. If you need multiple, use `--output_format all` (writes JSON + SRT + VTT + TSV + TXT).\n\nValidate the output: `.work\u002Fsource.json` should contain `segments[].words[]` with `start`, `end`, `word`. If `words` is empty, you forgot `--word_timestamps True`.\n\n**Read the full transcript at this stage.** Don't skip it. You'll spot:\n\n- **Brand-name miss-hearings.** Whisper hears \"Claude Code at Anthropic\" as \"Cloud Code at Infropic\" 90% of the time. \"SpecWeave\" comes out as \"spec with\" or \"specs\". These need overlay corrections, not re-recording.\n- **Duplicate takes.** Look for the same sentence repeated verbatim. In our project, *\"And those systems cannot produce skills as you work\"* appeared three times at 01:14, 01:30, 01:47. Drop two of them.\n- **Filler restarts.** Single-word fragments like \"And…\", \"And…\" preceding the actual sentence. The cut script catches these as \"ghost\" segments — we drop them in phase 4.\n\n---\n\n# Phase 3 — Detect silences and scene changes\n\nTwo parallel detections feed the cut algorithm:\n\n### 3a. Silence detection\n\n```bash\nffmpeg -hide_banner -nostats -i \"$SRC\" -af \"silencedetect=noise=-30dB:duration=1.2\" -f null - 2>&1 \\\n  | grep -E \"silence_(start|end)\"\n```\n\n`-30 dB` and `1.2s` are the sweet spot. Looser (`-25 dB`, `0.8s`) catches breath gaps you don't want to cut. Tighter (`-35 dB`, `2s`) misses real dead air.\n\nParse start\u002Fend pairs into `[(s, e, dur), ...]` and write to `silences.json`. See [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py).\n\n### 3b. Scene-change detection\n\n```bash\nffmpeg -hide_banner -nostats -i \"$SRC\" -filter:v \"select='gt(scene,0.05)',showinfo\" -f null - 2>&1 \\\n  | grep \"showinfo\" | grep -oE \"pts_time:[0-9.]+\" | sed 's\u002Fpts_time:\u002F\u002F' > scenes.txt\n```\n\n`scene>0.05` is sensitive enough to catch the speaker bringing up a new browser tab, switching apps, scrolling significantly. Don't go below `0.03` — you'll get false positives from cursor blinks.\n\nThese two together let you make the **smart cut decision**: silence + no scene change = pure dead air, cut it. Silence + scene change = the speaker is showing something on screen, **keep it** (the audience is supposed to look at the screen, not hear narration).\n\n---\n\n# Phase 4 — Build the smart cut list\n\n> **Speaker who records repeated takes (Anton's rule, 2026-11-01):** when each passage is said several times and the last attempt is the clean one, that rule overrides Rules 1-2 below. Keep only the last attempt of each passage as one unbroken piece: no dead-air or silence removal inside it, no cut inside a sentence. Trim only take heads and tails at word edges (about 100-200 ms buffer), join takes with short audio crossfades (30-80 ms) and keep the ending clean. If it runs long, speed the whole edit up uniformly (about 1.1x, `atempo` plus `setpts`, pitch preserved) instead of cutting.\n\nThe cut algorithm has **5 hard rules** earned the painful way:\n\n### Rule 1 — Pure dead air gets cut, but not all of it\n\nFor each silent segment > `MIN_CUT_LEN` (1.5s) with no scene change inside: cut everything except a `BREATH` of 0.30s. The breath preserves natural rhythm — eliminating 100% of silence makes speech sound machine-edited.\n\n```python\nif not in_scenes and (cut_end - cut_start) > MIN_CUT_LEN:\n    cuts.append((cut_start + 0.30, cut_end, f\"dead air {dur:.1f}s\"))\n```\n\n### Rule 2 — Silences with screen activity stay (capped at 3.5s)\n\nIf the silence has scene changes, the speaker is letting the audience read. Keep the window from `first_scene - 0.4s` to `last_scene + 0.8s`, but never longer than 3.5s — staring at one frame past 3.5s loses people.\n\n### Rule 3 — Snap to word boundaries\n\nAfter computing the rough keep ranges, snap each boundary to the nearest word edge from Whisper, within a 0.4s tolerance:\n\n```python\ndef snap(t, words):\n    best, bd = t, 0.4\n    for s, e, _ in words:\n        for cand in (s, e):\n            if abs(cand - t) \u003C bd:\n                best, bd = cand, abs(cand - t)\n    return best\n```\n\nThis is what stops cuts from clipping mid-word. Without it, every other cut clips a trailing 's' or breath consonant.\n\n### Rule 4 — Add word-boundary buffers (this is the one users notice)\n\nEven with word-edge snapping, **trailing consonants extend slightly past Whisper's reported word-end timestamp**. Whisper times the *vowel onset to vowel offset*, not the consonant tail. So a literal cut at `word.end` clips the trailing 's', breath, or 'k'.\n\nThe fix: extend each keep range:\n\n- **End:** `+ 0.30s` past the last word's end, capped at half the gap to the next keep.\n- **Start:** `- 0.10s` before the first word's start, capped at half the gap to the previous keep.\n\n```python\nEND_BUF, START_BUF = 0.30, 0.10\nfor i, (s, e) in enumerate(keep):\n    gap_next = keep[i+1][0] - e if i+1 \u003C len(keep) else TOTAL - e\n    gap_prev = s - keep[i-1][1] if i > 0 else s\n    add_end   = min(END_BUF,   max(0, gap_next * 0.5))\n    add_start = min(START_BUF, max(0, gap_prev * 0.5))\n    if gap_next \u003C 0.6: add_end   = max(add_end,   gap_next - 0.05)  # eat tiny gaps\n    if gap_prev \u003C 0.6: add_start = max(add_start, gap_prev - 0.05)\n    final.append([s - add_start, e + add_end])\n```\n\n**The result**: cut \"find the tickets\" extends from src 08:09.26 to 08:09.56 — the trailing 's' survives. Without this, the user will tell you the audio \"feels rushed\" or \"swallows endings\".\n\n### Rule 5 — Manual duplicate-take removal\n\nProgrammatic dedup of identical n-grams is fragile and dangerous (it can drop legitimate repetitions). Instead: read the transcript, find verbatim duplicates yourself, and add explicit drop ranges in source-time:\n\n```python\nDUP_RANGES = [\n    (78.86, 113.82),   # 01:18.86 - 01:53.82: 2 of 3 takes of \"skills as you work\"\n]\nfor ds, de in DUP_RANGES:\n    # trim each keep that overlaps this range\n    ...\n```\n\nReduces the cut from 35% saved to 32% saved (the duplicates are silenced gaps + speech), but the result reads cleanly.\n\n### Output\n\nThe script writes:\n\n- `cuts.json` — keep ranges + cut ranges + summary stats + source-time mapping (used by Phase 8 for overlay anchors).\n- `edl.txt` — human-readable EDL with transcript snippets per keep (eyeball-check this before rendering).\n\nSee [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) for the full implementation.\n\n---\n\n# Phase 5 — Scrub transient beeps\n\nOBS recordings often contain short transient artifacts — boot beeps, key-switch clicks, mic plosives that hit a hot input. These ride along through silence-cut decisions because they're loud (so silence detection ignores them) and they're surrounded by quiet. They sound like a \"tick\" in the final video at 4:11 or 0:52 or wherever.\n\n**Don't try to fix this with a global noise gate or de-noiser.** You'll smear consonants and make speech sound underwater. Instead: detect transients and surgically silence each 60–100ms window.\n\n### Detection algorithm (the one that doesn't mute speech)\n\nA transient is a \"beep\" iff:\n\n```\nRMS(window 5ms)  > BEEP_RMS_MIN     (e.g., > 800)\nRMS(preceding 150ms) \u003C PRE_QUIET    (e.g., \u003C 200)\nRMS(following 200ms) \u003C POST_QUIET   (e.g., \u003C 350)\n```\n\nThe third condition is critical. Without it, you'll catch consonant onsets ('p', 't', 'k') of speech, because they look identical in the first 5ms — *but speech is followed by a sustained vowel*, while a beep returns to silence. Filter on `post_avg \u003C 350` and you only ever silence isolated transients.\n\nAlso cap the silenced span at 0.30s — a misclassification can never wipe out a word.\n\n### Apply the surgical mutes\n\nBuild an ffmpeg `volume` filter expression with the targeted ranges:\n\n```\nvolume=enable='between(t,52.110,52.180)+between(t,169.850,169.920)+between(t,251.245,251.315)+between(t,268.780,268.845)':volume=0,adeclick\n```\n\nThe trailing `adeclick` catches anything else click-shaped that the surgical pass missed. Keep both — they're complementary.\n\nSee [scripts\u002Fscrub_beeps.py](scripts\u002Fscrub_beeps.py) for the full implementation.\n\n### Why per-clip fade-in DOESN'T work\n\nYou'd think: \"just fade in the start of every kept clip and the boundary clicks disappear.\" That works for **boundary** clicks (con​cat artifacts). It does **NOT** work for transients sitting deeper inside the clip — e.g., 0.7s into the segment, in a silence. We had a beep at cut 4:11.245 that was 0.74s into keep[26] — no fade-in reaches that.\n\nThe right fix is **the right tool for each problem**:\n\n| Problem | Fix |\n|---|---|\n| Boundary click between two re-encoded clips | Use `con​cat` filter, not `con​cat` demuxer (Phase 6) |\n| OBS start tick at t=0 | 0.4s `afade=t=in:st=0:d=0.4` |\n| Click-type spikes anywhere | `adeclick` filter (broad, low cost, no audible side effects) |\n| Transient pip in a silence (the hard one) | Detection + surgical `volume=0:enable='between(t,a,b)'` |\n\n---\n\n# Phase 6 — Render the master via con​cat filter\n\nThe single most important rendering rule: **use the `con​cat` filter, not the `con​cat` demuxer.**\n\n### Why\n\nThe con​cat demuxer (`-f con​cat -i list.txt`) requires every clip to have identical codec params. Even when they do, the demuxer can introduce **audible boundary clicks** because it stitches packets at container level without aligning audio samples. We saw clicks at every clip join — sounded like the OBS tick we tried to remove, which is what made the user think we hadn't fixed the beep.\n\nThe con​cat filter (`filter_complex … con​cat=n=N:v=1:a=1`) does sample-accurate con​catenation through the audio path. No boundary clicks. Single pass.\n\n### The full ffmpeg command\n\n```bash\n# Build filter_complex string from cuts.json keeps\npython3 - \u003C\u003C'PY' > filter_complex.txt\nimport json\nkeep = json.load(open('cuts.json'))['keep']\ntotal_out = sum(e-s for s,e in keep)\nparts = []\nfor i,(s,e) in enumerate(keep):\n    parts.append(f\"[0:v]trim=start={s:.4f}:end={e:.4f},setpts=PTS-STARTPTS[v{i}]\")\n    parts.append(f\"[0:a]atrim=start={s:.4f}:end={e:.4f},asetpts=PTS-STARTPTS[a{i}]\")\ninter = \"\".join(f\"[v{i}][a{i}]\" for i in range(len(keep)))\nparts.append(f\"{inter}concat=n={len(keep)}:v=1:a=1[vc][ac0]\")\nparts.append(f\"[ac0]adeclick,afade=t=in:st=0:d=0.4,afade=t=out:st={total_out-0.5:.2f}:d=0.5[ac]\")\nprint(\";\".join(parts))\nPY\n\nffmpeg -hide_banner -y -i \"$SRC\" \\\n  -\u002Ffilter_complex filter_complex.txt \\\n  -map \"[vc]\" -map \"[ac]\" \\\n  -c:v libx264 -preset medium -crf 18 -pix_fmt yuv420p \\\n  -c:a aac -b:a 192k -ar 48000 \\\n  -movflags +faststart \\\n  master.mp4\n```\n\n### Rendering checks\n\nAfter rendering, verify both streams have matching durations:\n\n```bash\nffprobe -v error -show_entries stream=codec_type,duration,nb_frames \\\n  -show_entries format=duration -of json master.mp4\n```\n\nVideo and audio durations should match within 0.05s. If they don't, your filter_complex has a bug — usually because the audio passed through `aselect` instead of `atrim` and got time-shifted. Use `atrim`, not `aselect`, for cut-list rendering.\n\nAfter surgical beep mute (Phase 5), the audio has been re-encoded — copy the video stream, replace the audio:\n\n```bash\nffmpeg -y -i master.mp4 -c:v copy -af \"volume=enable='...':volume=0,adeclick\" \\\n  -c:a aac -b:a 192k -ar 48000 master_clean.mp4\n```\n\n---\n\n# Phase 7 — Generate hero imagery\n\nFor dramatic full-takeover scenes (the \"Apple keynote moment\") you want a single hero image — something the audience will remember. Don't use stock photos; generate one with Gemini 3 Pro Image.\n\n### Prompt anatomy that works\n\nA reliable Apple-keynote prompt has these **6 elements**:\n\n1. **Subject + framing** — \"exploded view of an Apple Watch, components floating in 3D space\"\n2. **Lighting** — \"soft volumetric studio lighting, specular highlights, rim light\"\n3. **Background** — \"dark gradient (deep navy to black, subtle teal rim glow)\"\n4. **Style** — \"photorealistic ray-traced metals and glass, ultra sharp\"\n5. **Layout** — \"front-3\u002F4 angle, cinematic 16:9 keynote slide composition, generous negative space, no text\"\n6. **Mood** — \"premium product photography\"\n\nThe \"no text\" is critical — image-gen models love adding gibberish text. Always say no.\n\n### API call\n\n```bash\ncurl -s -X POST \\\n  \"https:\u002F\u002Fgenerativelanguage.googleapis.com\u002Fv1beta\u002Fmodels\u002Fgemini-3-pro-image-preview:generateContent?key=$GEMINI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"contents\": [{\"parts\": [{\"text\": \"\u003Cyour prompt>\"}]}],\n    \"generationConfig\": {\n      \"responseModalities\": [\"TEXT\", \"IMAGE\"],\n      \"imageConfig\": {\"aspectRatio\": \"16:9\"}\n    }\n  }' > resp.json\n```\n\nDecode the inline-base64 image:\n\n```python\nimport json, base64\nd = json.load(open('resp.json'))\nfor p in d['candidates'][0]['content']['parts']:\n    if 'inlineData' in p:\n        open('hero.png','wb').write(base64.b64decode(p['inlineData']['data']))\n```\n\n### When you can't use Gemini\n\nIf `GEMINI_API_KEY` isn't available, fall back to:\n- Anton's project: paid-tier `EasyChamp` Gemini key (per `~\u002F.zshrc`) — see `reference_gemini_api_keys.md` for the user's existing keys\n- Free fallback: Pollinations.ai (lower quality, but free)\n- Don't ask the user for an API key — check their environment first\n\nKeep the resulting PNG in `assets\u002F`. Reference it from the composition with `\u003Cimg src=\"assets\u002Fhero.png\">`.\n\n---\n\n# Phase 8 — Author the HyperFrames composition\n\nThis is where most visual quality lives. The Layer 2 lessons here are dense — read them all before writing HTML.\n\n## 8.1 — The iOS-card overlay system (NOT the PiP layout)\n\n> **The mistake**: shrinking the underlying video to a corner PiP and filling the rest with graphics.\n> **The lesson**: real product videos keep the speaker visible at full screen and float overlays *on top* like iOS notification cards.\n\n### Why \"PiP corner\" feels wrong\n\nA PiP shrinks the speaker to ~480×270 in a corner. Three problems:\n1. The user can no longer see what they're showing on screen at full detail.\n2. PiP transitions are jarring — content snaps from full-screen to thumbnail and back.\n3. It looks like a Zoom call, not a product video.\n\n### The iOS card pattern that works\n\nThe card is a **frosted-glass surface** that drops in on top of the full-screen video. The video keeps playing. The card stays for 4–11 seconds, then dismisses.\n\n```css\n.card {\n  position: absolute;\n  background: linear-gradient(180deg, rgba(28,30,38,0.82) 0%, rgba(18,20,26,0.82) 100%);\n  backdrop-filter: blur(28px) saturate(140%);\n  -webkit-backdrop-filter: blur(28px) saturate(140%);\n  border: 1px solid rgba(255,255,255,0.10);\n  border-radius: 28px;\n  box-shadow:\n    0 1px 0 rgba(255,255,255,0.06) inset,\n    0 24px 60px rgba(0,0,0,0.55),\n    0 8px 16px rgba(0,0,0,0.35);\n  overflow: hidden;\n}\n.card::before {\n  \u002F* Top accent stripe — Skill Studio FEATURES card pattern *\u002F\n  content: \"\"; position: absolute; left: 0; right: 0; top: 0;\n  height: 4px; background: var(--card-accent, #06b6d4);\n  opacity: 0.85;\n}\n```\n\nThe four ingredients:\n\n1. **`backdrop-filter: blur(28px) saturate(140%)`** — the frosted-glass effect that makes the card legible against any underlying video frame. `saturate(140%)` keeps colors punchy through the blur.\n2. **Tinted gradient surface** — not pure black. `rgba(28,30,38,0.82)` lets enough of the video bleed through to feel layered, not pasted-on.\n3. **Inset highlight + drop shadow stack** — the `0 1px 0 inset` rim catches light, the doubled drop shadow gives depth without looking heavy.\n4. **Top accent stripe** — 4px colored bar tied to the scene's brand color. Single visual anchor.\n\n### Card placement — avoid the speaker's face cam\n\nFind where the face cam lives in the source. For most OBS configs, it's bottom-right at ~480×270. Place cards anywhere else:\n\n| Card position | When to use |\n|---|---|\n| Top, full width | Quote opener, eyebrow + title scenes |\n| Top-left | Big-number stats |\n| Center | Hero brand reveal (one-shot, dramatic) |\n| Bottom-left chip | Small contextual annotations (name corrections) |\n| Bottom, full width | CTA, terminal command |\n\n**Never** place a card in the bottom-right unless the speaker isn't there. **Never** make a full-screen card cover the screen content unless the moment is specifically designed as a \"takeover\" beat (e.g., the Apple Watch hero in our project).\n\n## 8.2 — Real brand icons, not text labels\n\nThe project's `docs-site\u002Fsrc\u002Fcomponents\u002Fui\u002FIcon\u002Fbrands\u002F` directory ships with 10 brand SVGs:\n\n- `claude.svg` (#D97757 terra-cotta)\n- `github.svg` (#6e40c9)\n- `copilot.svg` (#6E5494)\n- `cursor.svg` (orange tetrahedron, multi-fill)\n- `jira.svg` (#2684FF)\n- `azure.svg` (#0078D4)\n- `windsurf.svg`, `discord.svg`, `linear.svg`, `youtube.svg`\n\nCopy them into your composition's `assets\u002Fbrands\u002F` and **inline them as SVG inside cards**, not via `\u003Cimg>`. Inlining lets you control the icon's container size and respect the design language. Use the SVGs verbatim — these are the canonical brand marks; do not recolor.\n\n```html\n\u003Cdiv class=\"brand-icon\">\n  \u003Csvg viewBox=\"0 0 24 24\" fill=\"#D97757\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\n    \u003Cpath d=\"…\"\u002F>\n  \u003C\u002Fsvg>\n\u003C\u002Fdiv>\n```\n\n```css\n.brand-icon { width: 64px; height: 64px; flex: 0 0 64px;\n  display: inline-flex; align-items: center; justify-content: center;\n  border-radius: 16px;\n  background: rgba(255,255,255,0.06);\n  border: 1px solid rgba(255,255,255,0.10);\n}\n.brand-icon svg { width: 38px; height: 38px; }\n```\n\n## 8.3 — Mirror Skill Studio's tinted-card pattern\n\nSkill Studio (vskill-platform) uses this pattern for feature cards. Our overlays should match:\n\n```js\n\u002F\u002F Each scene gets a brand color; that color drives the entire card's tint\nconst SCENE_COLORS = {\n  opener:    \"#06b6d4\",   \u002F\u002F cyan\n  problem:   \"#ef4444\",   \u002F\u002F red\n  solution:  \"#22c55e\",   \u002F\u002F green\n  cta:       \"#22c55e\",\n  brand:     \"#a855f7\",   \u002F\u002F purple\n  info:      \"#3b82f6\",   \u002F\u002F blue\n};\n```\n\nPill labels follow the exact pattern from `vskill-platform\u002Fsrc\u002Fapp\u002Fstudio\u002Fpage.tsx`:\n\n```css\n.pill {\n  display: inline-flex; align-items: center; gap: 8px;\n  padding: 6px 14px; border-radius: 999px;\n  font-family: 'Geist Mono', 'SF Mono', monospace;\n  font-size: 16px; font-weight: 600;\n  letter-spacing: 1.5px; text-transform: uppercase;\n  \u002F* Per-color: *\u002F\n  color: var(--c);\n  background: rgba(\u003Cc-rgb>, 0.10);   \u002F* ${color}10 *\u002F\n  border: 1px solid rgba(\u003Cc-rgb>, 0.40);  \u002F* ${color}40 *\u002F\n}\n.pill .swatch {\n  width: 8px; height: 8px; border-radius: 50%;\n  background: var(--c);\n  box-shadow: 0 0 10px var(--c);\n}\n```\n\nThis is the **exact** pattern from the platform — borders at 40% alpha, surfaces at 10% alpha, body text at full color. Mirror it for overlay legibility against any video frame.\n\n## 8.4 — Sharp animations, not \"fade in\"\n\nPlain `opacity 0 → 1` looks flat. Every card uses a four-property entry:\n\n```js\nfunction cardIn(sel, start) {\n  tl.fromTo(sel,\n    { opacity: 0, y: 60, scale: 0.96, filter: \"blur(8px)\" },\n    { opacity: 1, y: 0, scale: 1, filter: \"blur(0px)\",\n      duration: 0.7, ease: \"power3.out\", overwrite: \"auto\" }, start);\n}\n```\n\nThe four properties layered:\n- **Opacity** — `0 → 1`\n- **Y offset** — `60 → 0` (slide up from below)\n- **Scale** — `0.96 → 1` (subtle pop)\n- **Blur** — `8px → 0` (focus-in)\n\nPlus per-element flourishes:\n\n| Element | Animation | Why |\n|---|---|---|\n| Stat numbers | `scale 0.5 → 1` with `back.out(1.5)` | Big-number \"Apple keynote pop\" |\n| Tool icons | `stagger 0.08s` with `back.out(1.4)` | Each one snaps in |\n| Brand wordmark | `scale 0.7 → 1` with `blur(20px) → 0` | Reveal moment |\n| Live dot, terminal cursor | `@keyframes blink` 1.4s | Lived-in feel |\n| Hero image (Apple Watch) | Continuous gentle `y bob` 4s sine yoyo | Floats in space |\n\nAlways use `overwrite: \"auto\"` on tweens that share a property — the lint catches it otherwise.\n\n## 8.5 — Source-time → cut-time mapping (the silent killer)\n\nYou wrote overlay anchors against the **original source timestamps** (\"when he says 'SpecWeave' at src 03:28\"). The cut master plays at **cut timestamps** (the same speech moment is at cut 02:19.5).\n\nAfter every re-cut, the cumulative durations shift slightly. **Recompute the mapping and re-resolve every overlay anchor** before rendering:\n\n```python\nmapping = []\ncum = 0.0\nfor s, e in keep_ranges:\n    mapping.append({\"src_start\": s, \"src_end\": e, \"cut_start\": cum})\n    cum += (e - s)\n\ndef src_to_cut(src_t):\n    for m in mapping:\n        if m['src_start'] \u003C= src_t \u003C= m['src_end']:\n            return m['cut_start'] + (src_t - m['src_start'])\n    return None  # source moment was cut\n```\n\nSkip overlays whose source moments got cut — don't try to \"place them somewhere reasonable.\" Drop them.\n\nSave the mapping to `cuts.json` and have the overlay-author script read it. See [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) for the full version.\n\n## 8.6 — Concise text, big and structured\n\nCards follow the **eyebrow-pill + headline + structured content** pattern (Apple keynote):\n\n```\n┌────────────────────────────────────────┐\n│ ● PILL LABEL                           │\n│                                        │\n│ The Big Headline.                      │\n│                                        │\n│ Tool · Tool · Tool   (or: 3 cards)     │\n└────────────────────────────────────────┘\n```\n\nRules:\n- **Headline**: 56–96px, `font-weight: 800`, `letter-spacing: -1.5px`. One sentence. No more.\n- **Eyebrow pill**: 16px mono, all-caps, tracked +1.5px. ≤ 4 words.\n- **Body**: short structured units — bullets (3 max), tool tiles, stat tiles. Never a paragraph.\n- **Numbers**: huge. 140–320px is normal. Numbers are the visual anchor of every stat scene.\n\nBad: `\"With more than 600 increments, 500 NPM releases, and over 3000 commits, SpecWeave is battle-tested.\"`\nGood: `● BATTLE-TESTED` \u002F **Real numbers.** \u002F 3 stat tiles: `600+` \u002F `500+` \u002F `3K+`\n\n---\n\n# Phase 9 — Lint + verify in Studio\n\n## 9.1 — HyperFrames lint gotchas\n\nRun `npx hyperframes lint` after every edit. The five errors\u002Fwarnings we hit and how to fix:\n\n| Lint message | Cause | Fix |\n|---|---|---|\n| `overlapping_clips_same_track` | Two `data-track-index` clips on the same track overlap in time | Move one to a different track. Audio especially — give it `data-track-index=\"-1\"`. |\n| `overlapping_gsap_tweens` | Two GSAP tweens animate the same property on the same selector | Add `overwrite: \"auto\"` to all but the first. |\n| `gsap_exit_missing_hard_kill` | Exit fade ends near a clip start boundary; non-linear seek can land mid-fade | After the exit, add `tl.set(sel, { opacity: 0 }, end_time);` |\n| `composition_file_too_large` | Single `index.html` exceeds ~500 lines | Move scenes into `compositions\u002FsceneN.html` and mount with `data-composition-src`. Cosmetic when timing is fluid; do it once timing is locked. |\n| `timeline_track_too_dense` | More than ~6 elements on one track | Same fix as above — split into sub-comps. |\n\n## 9.2 — Studio gotchas\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| New audio plays correctly but waveform display still shows old version | `.waveform-cache\u002F` holds stale per-asset JSON | `rm -rf .waveform-cache\u002F` then refresh the studio. |\n| Frame-jump number doesn't match expected seconds | Studio internally runs at 30fps regardless of source frame rate | Multiply `seconds × 30` to get the studio frame number. |\n| `\u003Caudio>` element conflicts with `\u003Cvideo>` on same track | Both clips on `data-track-index=\"0\"` overlap | Audio gets `data-track-index=\"-1\"` (background, never visible). |\n| Hot-reload doesn't pick up new asset | The file replaced has the same name as before | Refresh the browser tab. Studio polls but is occasionally lazy. |\n| `npm run dev` fails on second run with port conflict | Previous studio still running on port 3002 | `lsof -nP -iTCP:3002` then kill the process. |\n\n## 9.3 — Verify scenes by jumping to known cut times\n\nThe studio has an \"Jump to frame\" input. Compute the frame for each scene:\n\n```python\nscenes = {\n  \"quote_opener\":      0.5,   # cut 0:00.5\n  \"boris_correction\":  10.4,\n  \"brownfield\":        53.88,\n  \"apple_watch\":       91.4,\n  \"specweave_reveal\":  139.51,\n  ...\n}\nfor name, cut_sec in scenes.items():\n    print(f\"{name}: frame {int(cut_sec * 30)}\")\n```\n\nJump to a frame just past each scene's start (so the entry animation has settled), screenshot, eyeball, iterate.\n\n---\n\n# Reference: full pipeline scripts\n\nThree Python scripts handle the heavy lifting. Read them, copy them, adapt them. Don't reinvent.\n\n- [scripts\u002Fbuild_cuts.py](scripts\u002Fbuild_cuts.py) — Phase 4: smart cut list with word-boundary buffers + dup removal + source→cut mapping.\n- [scripts\u002Fscrub_beeps.py](scripts\u002Fscrub_beeps.py) — Phase 5: detect transient beeps (loud + quiet on both sides) + emit ffmpeg volume-gate filter.\n- [scripts\u002Frender_master.py](scripts\u002Frender_master.py) — Phase 6: build the `con​cat`-filter `filter_complex` and run ffmpeg single-pass.\n\n# Reference: HTML composition starter\n\n- [references\u002Fcomposition-starter.html](references\u002Fcomposition-starter.html) — minimal HyperFrames composition with the iOS-card primitives, brand-icon container, pill labels, and the standard `cardIn`\u002F`cardOut` GSAP helpers. Drop in your scene content; ship.\n\n---\n\n# Anti-patterns — never do these\n\n1. **Don't shrink the video to a PiP corner during overlays.** Float overlays on top instead. The user said \"those animations must be on top, like phone hover style\" — they meant it.\n2. **Don't fade between cuts with a slow crossfade.** Hard cuts (snapped to word edges with buffers) read as professional; slow crossfades read as amateur. Exception: between repeated takes (Anton's rule, 2026-11-01), use short 30-80 ms audio crossfades so the joins stay smooth.\n3. **Don't use `auto-editor` to do silence cuts.** It's choppy, doesn't snap to word boundaries, doesn't handle duplicate takes, doesn't scrub beeps. Use the smart-cut algorithm.\n4. **Don't use the `con​cat` demuxer for re-encoded clips.** Use the `con​cat` filter — it sample-aligns audio. Boundary clicks are not OBS ticks; they're con​cat artifacts.\n5. **Don't fade-in every clip** to suppress beeps. Beeps inside silences (deep into a clip) won't be reached. Use surgical detection + targeted mute instead.\n6. **Don't write paragraphs in cards.** Headline + 3 bullets max. If you need more, you need more cards.\n7. **Don't reinvent brand marks.** Inline the official SVGs from `docs-site\u002Fsrc\u002Fcomponents\u002Fui\u002FIcon\u002Fbrands\u002F`. Don't ask Gemini to \"draw a Claude logo\".\n8. **Don't author overlays before the cut master is finalized.** Every recut shifts cut times — you'll waste hours re-resolving anchors. Lock the cut, then build overlays.\n9. **Don't trust Whisper on brand names.** \"Claude Code at Anthropic\" → \"Cloud Code at Infropic\". Read the transcript and add overlay corrections. Don't re-record.\n10. **Don't render with `large-v3-turbo` Whisper on CPU.** 15+ minutes for an 8-minute audio. `base.en` is 30 seconds and equally good for English tech monologue word-boundary work.\n\n---\n\n# Verification checklist\n\nBefore declaring the video ready:\n\n- [ ] Total duration matches the cut summary (within 0.05s).\n- [ ] Video and audio stream durations are equal in `ffprobe` output.\n- [ ] No mid-word clips on the EDL transcript snippets — read each keep's snippet end-to-end.\n- [ ] Surgical beep ranges all 60–300ms, never longer.\n- [ ] At every kept-segment boundary, listen for the trailing consonant on the previous segment and the leading consonant on the next.\n- [ ] Lint reports 0 errors (warnings are fine — they're cosmetic).\n- [ ] Each overlay scene has been screenshotted in the studio and visually checked for coverage of the speaker face cam.\n- [ ] Brand icons render correctly (inline SVG, not broken `\u003Cimg>`).\n- [ ] Hero takeover scene (if any) has the underlying video opacity animated to 0 during the takeover, then back to 1 after.\n- [ ] Final render plays end-to-end without audio glitches; specifically check the cut times where you previously heard beeps.\n\n---\n\n# Glossary\n\n- **Smart cut** — keep ranges built from silence + scene-change correlation, not just silence. Dead air with screen activity is kept; dead air without it is cut.\n- **Word-boundary buffer** — extending a keep range past the word's reported end to preserve trailing consonants (Whisper times vowels, not tails).\n- **Surgical mute** — silencing a sub-100ms window via `volume=0:enable='between(t,a,b)'`, applied only to detected transients in dead air.\n- **Hero takeover** — a full-screen graphic scene that briefly replaces the video entirely (e.g., Apple Watch), then returns. Use sparingly — once or twice per video.\n- **iOS card** — frosted-glass overlay primitive (backdrop-blur + tinted gradient + inset highlight + drop shadow) that floats on top of full-screen video without shrinking it.\n\n---\n\n# Provenance\n\nThis skill encodes lessons from one specific project: turning Anton Abyzov's 8:47 SpecWeave intro recording (May 2026 OBS capture) into a 6:00 production-ready video. The smart-cut algorithm, beep scrubber, and iOS-card design system were iterated through five render passes (v1 PiP layout → v2 word-boundary buffers → v3 con​cat-filter render → v4 surgical beep mute → v5 iOS-card overlay redesign) before reaching production quality. The Apple-Watch hero image was generated via Gemini 3 Pro Image with the exploded-product-photography prompt template.\n\nAuthor: Anton Abyzov (`anton.abyzov@gmail.com`)\nIteration log preserved in `~\u002FProjects\u002FObsidian\u002Fpersonal-docs\u002F` under `004 Archive\u002Fspecweave-video-2026-05`.\n",{"name":5,"version":60,"metadata":61,"description":7},"1.0.0",{"tags":62},"hyperframes, video, screencast, ffmpeg, whisper, smart-cuts, audio-scrubbing, beeps, overlays, brand-icons, gsap, animation, gemini-image, ios-card, frosted-glass","main","fa7fff86b8ce0a42e1853ab44bed64107f0fcda4","skills\u002Fhyperframes-best-practices",5,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill","https:\u002F\u002Fverified-skill.com","https:\u002F\u002Fgithub.com\u002Fanton-abyzov","https:\u002F\u002Fspecwithcode.com","Founder of SpecWithCode · Creator of SpecWeave · AI coding agents, Cloud, DevOps · 20 yrs SWE · YouTube: @AntonAbyzov","2026-11-13 06:33:58",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add anton-abyzov\u002Fvskill --skill hyperframes-best-practices",{"tool":79,"command":80},"bunx","bunx skills add anton-abyzov\u002Fvskill --skill hyperframes-best-practices",{"tool":82,"command":83},"pnpm","pnpm dlx skills add anton-abyzov\u002Fvskill --skill hyperframes-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002FSKILL.md",true,[87,93,99,103],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fcomposition-starter.html","REFERENCE","参考文档",8018,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002Freferences\u002Fcomposition-starter.html",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fbuild_cuts.py","SCRIPT","脚本",5078,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002Fscripts\u002Fbuild_cuts.py",{"path":100,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Frender_master.py",1692,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002Fscripts\u002Frender_master.py",{"path":104,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fscrub_beeps.py",4340,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fhyperframes-best-practices\u002Fscripts\u002Fscrub_beeps.py",[108,133,149,175,205,231],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":55},"01M6HKP9JT8CH33W7DJB544DCS","x-reply-drafts","Find live X threads where a product genuinely fits, and draft truthful, humanized replies for the owner to review and post by hand. Human pace only: max 5 replies a day, never two within 20 minutes, no automated posting. Use when the user asks to 'find threads to reply to', 'draft X replies', 'reply-guy session', 'join trending conversations', 'engage on Twitter about \u003Cproduct>', or wants a daily batch of reply drafts. Not for scheduling original posts (social-media-posting) or bulk publishing (blotato).","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fplugins\u002Fmarketing\u002Fskills\u002Fx-reply-drafts\u002FSKILL.md",[],[115,116,117,118,44,119,120,121,122,50,123,124,125,126,127,128,129,130,131,132],"reply","drafts","x reply drafts","review","batch","Media","unslop","never","humanize","social","human","join","trending","bulk","posts","threads","conversations","hand",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":55},"01M6CND903Q6E6R2XDWMFH8MAY","hello-world","A tiny test skill used by the 0853 verify-runtime harness. Says hello. No external calls. Use when the user asks for a sanity-check skill in a verify-harness fixture.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Ftest\u002Fverify\u002Ffixtures\u002Ftiny-skill-source\u002Fplugins\u002Ftiny-test-plugin\u002Fskills\u002Fhello-world\u002FSKILL.md",[],[140,141,142,143,144,145,146,147,148,38],"hello world","hello","world","test","Test Skill","harness","verify","check","user",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":161,"publishedAt":55},"01M6CND60H0N1CYEB6ABEW18NS","existing-skill","Lint markdown files for style and grammar issues.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fsrc\u002Fcommands\u002F__tests__\u002Ffixtures\u002Fexisting-skill\u002FSKILL.md",[155,158],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":159,"categoryName":160,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000030","开发工程师",[162,163,164,165,166,167,168,169,170,171,172,173,174],"existing skill","docs","lint","code","issues","markdown","grammar","read","write","edit","cursor","files","lint markdown files",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":189,"publishedAt":55},"01M6CND1JAW97FY3W50MAPNKX7","remotion-best-practices","Best practices for Remotion video creation in React — scaffolding, compositions, animations, transitions — PLUS hard-won rules for high-fidelity product-demo videos: real logos\u002Ficons, precise YouTube-reference matching, full-screen camera zooms, click-targets that actually hit, content-tight rectangle highlights, voiceover regeneration discipline, audio-level normalization (no double-boost), per-scene voice-sync math, Studio detail-page mirror patterns, bold-not-subtle connection lines, and the YouTube publication kit (chapters, description, thumbnail, hashtags) that turns a render into a shipped video.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fremotion-best-practices\u002FSKILL.md",[181,184,185,186],{"categoryNo":182,"categoryName":183,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":187,"categoryName":188,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000031","产品经理",[35,190,191,192,193,44,194,54,53,195,52,196,197,198,199,200,201,202,203,204],"remotion best practices","Remotion","react","sync","normalization","Composition","page","math","discipline","publishing","camera","youtube","voiceover","patterns","remotion, video, react, animation, composition",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":209,"categories":210,"keywords":212,"publishedAt":55},"01M6CNCXMSB1MKQ7646AR12VXY","rea","Find out exactly how a feature is implemented in a shipped tool or app you don't have the source for (desktop apps, Electron apps like Claude desktop, native CLIs like Codex, websites, APKs, .NET assemblies) using REA - Reverse Engineer Anything (github.com\u002Fmorluto\u002Frea). Sets REA up when it is missing (CLI, MCP registration, Hopper or Ghidra), routes the target to the right REA tool, keeps evidence out of the context window, and turns findings into a clean-room spec before any rebuild. Use when the user says 'use REA', 'reverse engineer', 'how does \u003Capp> do X', 'how is this feature implemented in \u003Ctool>', 'clone this feature', 'decompile', 'look inside the app', or asks how a closed-source competitor works. Skip it when the source is available - read the repo instead.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Frea\u002FSKILL.md",[211],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[207,213,214,215,216,217,218,219,220,221,169,222,223,224,225,226,227,228,229,230],"MCP","cli","reverse-engineering","ghidra","binary-analysis","analysis","how","reverse engineer anything","repo","context","evidence","up","engineer","rebuild","clean","registration","do","reverse engineer",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":235,"categories":236,"keywords":241,"publishedAt":55},"01M6CNCSE0847Q1FP1GRQ75SR9","motion-graphics-promo","After Effects-style motion graphics for short product promos (15-45 s, vertical or landscape), built as code with HyperFrames + GSAP. Covers a story-first brief, motion grammar (energetic entry, one transition per task, spring settle, 2-3 s of stable proof), a 32-second promo timeline, device-frame and kinetic-type recipes, vertical-first composition, evidence rules (real UI only, no fake clicks), music licensing and encoded-frame verification. Use when the user asks for an After Effects-like animation, motion graphics, a kinetic-type promo, an app promo video, a product teaser, a Reels\u002FTikTok\u002FShorts ad, or 'animations like After Effects'. Also covers short explainers, tutorials and 15-second vertical ads: a design kit (footage beds, condensed caps in a marker box, white device frames, falling stickers, voice-over with music ducking) and HyperFrames render traps that silently break output. Pairs with hyperframes-best-practices (screencast pipeline) and remotion-best-practices.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fmotion-graphics-promo\u002FSKILL.md",[237,238,239,240],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":159,"categoryName":160,"taxonomyType":32,"taxonomyTypeDesc":33},{"categoryNo":30,"categoryName":31,"taxonomyType":32,"taxonomyTypeDesc":33},[242,243,244,245,246,165,247,44,248,249,51,54,53,191,195,250,168,251,50,252],"graphics","motion graphics","motion","motion graphics promo","design","verification","ui","brief","ads","short","tiktok"]