/ouroboros-skills:video-editingfrom ouroboros-skills
Build and edit videos using Remotion with kinetic typography, VO-synced timing, and motion design. Use this skill when the user asks to create, edit, or fix video content — especially presentation videos, demo reels, or kinetic text films. Complements frontend-design for motion/video work.
Ships in ouroboros-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill guides the creation of polished, VO-synced video content using Remotion. It covers kinetic typography, demo footage editing, voiceover alignment, music beat-sync, particle/motion design, and the editorial workflow for presentation videos.
The core workflow has eight phases: Discovery, Understand Footage, Voiceover, Music, Build Reference Docs, Build Compositions, Beat-Sync & Taste, and QA & Render. Every phase feeds forward — skip one and later phases break.
The single most important principle: write everything down. Context windows compress. If timings, breakdowns, or sync maps exist only in conversation history, they will be lost. Every phase produces a file.
The second most important principle: VO is narration, not background audio. Every VO sentence must match what's on screen at that exact moment. If the footage shows a website chat, the VO must describe the website chat — not something happening off-screen. If the footage cuts to a different perspective, the VO must go silent or describe the new perspective. Render a still at every VO placement frame and verify. No exceptions.
project-root/
├── PROJECT.md <- entry point (creative brief, constraints, status)
├── timing-reference.md <- THE single-pass edit guide (see Phase 5)
├── media/ <- Remotion publicDir (staticFile() reads from here)
│ ├── footage/ <- clips + breakdown.md
│ ├── vo/ <- wavs + timestamps/ + timestamps.md + master.md + manifest.md + generate-vo.py
│ ├── music/ <- tracks + analysis.md
│ └── assets/ <- design files + style-reference.md
├── demo-sources/ <- archival originals (not consumed by Remotion)
├── output/ <- rendered finals
└── remotion-demo/ <- code only (publicDir -> ../media)
Why this layout:
media/ is the Remotion publicDir. Remotion's staticFile() resolves against publicDir. Keeping all runtime assets in one tree means fast renders — Remotion only indexes what it needs. Configure in remotion.config.ts: Config.setPublicDir("../media").demo-sources/ is archival. Raw screen recordings, original exports, reference clips. These are NOT in media/ because Remotion would index them, slowing studio startup and bloating renders.footage/breakdown.md, vo/timestamps.md, music/analysis.md, assets/style-reference.md. These are deep-dive docs for verification. The agent's primary reference is timing-reference.md at the root.remotion-demo/ contains only code. Components, compositions, utilities. No media files.Before touching any code, have a conversation to understand the project.
Do not proceed until you understand these answers. The biggest failures come from building on assumptions.
If the video has a time limit, anchor the ending first:
You cannot watch video — but you can look at extracted frames.
Extract 1 frame per second from each clip, scaled for fast reading:
mkdir -p frames/clip1 frames/clip2
ffmpeg -v error -i "clip1.mp4" -vf "fps=1,scale=1920:-1" -q:v 2 "frames/clip1/frame_%03d.jpg"
1fps is the right interval for the initial overview, but 1fps timestamps are NEVER accurate enough for VO placement. They tell you WHAT happens, not exactly WHEN. A 1fps frame showing "toggle ON" could mean the toggle happened anywhere during that second. Always refine at 10fps before using a timestamp for VO placement. 2fps produces too many near-identical frames. 1 frame every 2 seconds misses transitions. For a 100-second clip, 100 frames is very manageable for the overview.
Do NOT re-encode source footage to shrink it. Remotion decodes the source and does its own final encode — any intermediate re-encode is generation loss for no benefit.
1fps gives 1-second precision — good for an overview but too lossy for VO-to-footage sync. At 60fps, 1 second = 60 frames of potential drift. But extracting every clip at 10fps or higher produces thousands of frames to review — overkill for static holds.
The balance: targeted extraction at sync points. After the initial 1fps pass, identify the ~10-15 specific moments that compositions will reference (freeze points, VO placement landmarks, transitions). Then extract a 2-3 second window around each at 10fps:
# Extract 10fps for a 2-second window around a sync point (e.g., footage 0:07)
ffmpeg -v error -i "clip2.mp4" -ss 6 -t 2 -vf "fps=10,scale=1920:-1" -q:v 2 "frames/clip2-sync-07/frame_%03d.jpg"
This gives 100ms precision exactly where it matters. ~12 windows x 20 frames = ~240 frames total — minimal cost, maximum value.
What needs sub-second precision:
What stays at 1-second precision:
Update breakdown.md with sub-second timestamps for sync points: 0:06.8 not 0:07.
Read every frame and produce a second-by-second log (refined at sync points). Write it to media/footage/breakdown.md:
| Time | What's on screen |
|------|-----------------|
| 0:01-0:03 | [UI state, visible text, mouse position, what's happening] |
| 0:04 | [transition/animation/new screen] |
Group consecutive static frames. Note every transition, click, typed text, loading state, animation. Be specific — "Teams chat showing request card" is not enough; "Request card: Customer Gus, Status Live, phone 973-555-1234, View Transcript button" is.
For multiple clips, launch one agent per clip. Each reads its batch of frames and returns a detailed breakdown. 20-minute serial task becomes 5-minute parallel.
Before placing ANY VO, identify every moment the footage changes perspective, scene, or context. These are the moments where VO timing goes wrong if you're not careful.
Examples of scene changes to map:
Write these in the breakdown with exact timestamps. When placing VO later, check every sentence against this map: does the VO describe what's visible during this scene, or a different scene?
When the user doesn't have a recorded voiceover:
en-US-Name:DragonHDLatestNeural) is top tier — LLM-based, auto-detects emotion from text.en-US-Name:DragonHDOmniLatestNeural) is newest gen.If the user doesn't have a recorded VO, a ready-to-use Azure Speech generation script is bundled at generate-vo.py alongside this skill file. Copy it into the project's media/vo/ directory, edit the SECTIONS dict with the script text, and run. See the docstring in that file for config notes (supported SSML, voice settings, gotchas).
Auth: Use Entra ID, not API keys. Azure Cognitive Services resources should have local auth (API keys) disabled. Authenticate with DefaultAzureCredential from azure-identity:
from azure.identity import DefaultAzureCredential
import azure.cognitiveservices.speech as speechsdk
token = DefaultAzureCredential().get_token("https://cognitiveservices.azure.com/.default").token
config = speechsdk.SpeechConfig(endpoint="https://<custom-domain>.cognitiveservices.azure.com/")
config.authorization_token = token # raw token, no prefix
Requirements: pip install azure-identity, a custom domain on the Speech resource, and Cognitive Services Speech User role assigned to the calling identity. This is the preferred auth pattern for all Azure resources — never hardcode or commit API keys.
Generate per-sentence, not per-section. Long single-file TTS generations produce clicking artifacts at sentence boundaries. Generate each sentence as its own WAV file (e.g., setup--toggle.wav, setup--summary.wav). Benefits: no clicking, precise per-sentence placement with placeVO(), easy to regenerate one sentence without re-recording the whole section, and word-onset alignment (see Phase 3 transcription) becomes trivially useful.
Dragon HD auto-detects pronunciation from context, but it gets ambiguous words wrong (e.g., "Live Chat" as "lɪv" instead of "laɪv"). Fixes, in order of reliability:
<sub alias="..."> (most reliable). Forces the TTS to read a different word. Example: <sub alias="lyve">Live</sub> Chat — always produces "laɪv". Works inside <prosody> tags.<phoneme alphabet="ipa" ph="..."> (inconsistent). Sometimes ignored depending on surrounding sentence context. Try <sub> first.Pronunciation varies by sentence context. The same word with the same SSML can be pronounced differently in different sentences. Always listen to EVERY generated segment — don't assume a fix in one segment carries to another. If a word is mispronounced in some segments but not others, add the override only where needed (the override itself can change the cadence, so don't apply it unnecessarily).
Punctuation is Dragon HD's primary emotion lever, but it's unpredictable:
! adds energy but can also shorten delivery — Dragon HD rushes excited lines. "This is Lydia!!" (0.84s) was shorter than "This is Lydia!" (1.70s).<emphasis level="strong"> compressed a 1.7s line to 0.79s — worse than !!.— adds a dramatic beat/pause and generally increases duration. Useful for hero lines: "This — is Lydia!".rate="+15%" on a short phrase gave a more deliberate, energetic delivery than +10% with !!. Higher rate forces the model to make stronger prosodic choices.Multi-video projects: Use a master script + manifest pattern. All VO sections in one file, manifest maps sections to videos. Edit once, applies everywhere.
VO script writing is iterative. Expect multiple rounds of feedback. Use a draft document (e.g., master-v2-draft.md) with:
This lets the user read the script as a story, see what changed, and understand what's on screen at each moment — without needing to cross-reference breakdowns or timecodes. Commit the draft and let the user edit it directly. Track their changes via file modification notifications.
Word-level timestamps are non-negotiable. Install whisper-cpp if not present:
brew install whisper-cpp
curl -L "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin" \
-o /tmp/ggml-base.en.bin
Do NOT use Python whisper — it takes 10-30 minutes for a 2-minute file. whisper-cpp with Metal does it in under 10 seconds.
ffmpeg -y -i input.m4a -ar 16000 -ac 1 -c:a pcm_s16le /tmp/vo-16k.wav
whisper-cli -m /tmp/ggml-base.en.bin -f /tmp/vo-16k.wav --output-json-full -of /tmp/vo-output
Parse the JSON: each segment has tokens[] with per-word offsets.from / offsets.to in milliseconds. Store in a TypeScript data file.
CRITICAL — on-screen text timing: Text must appear exactly when the narrator says those words. Always use word-level timestamps, never sentence boundaries.
CRITICAL — whisper endpoint vs actual file duration: Whisper's last token timestamp is NOT the audio file's duration. The file typically has 200-400ms of tail after the last word. Use ffprobe for actual duration:
ffprobe -v error -show_entries format=duration -of csv=p=0 vo/section.wav
Use whisper timestamps for startFrom/endAt splits within a file. Use ffprobe duration for durationInFrames on the full VO Sequence.
Whisper word timestamps need buffer: Whisper's offsets.from can be 50-100ms late relative to actual audio onset. When splitting VO at word boundaries, back up startFrom by 200-400ms to capture the breath/onset. A too-tight split cuts off word beginnings. Note: this buffer applies ONLY to splitting a WAV at a word boundary. When using word onsets for placement offset calculations (see below), use the raw value — the slight lateness means VO arrives before the visual, which is correct ("VO leads, visuals follow").
When you have per-sentence WAV files and need a specific word to land at a specific footage moment, use Whisper word onsets to calculate the sentence's start:
sentenceStart = clipStart + ms(footageTimestamp) - ms(wordOnset)
Example: setup--toggle.wav says "One toggle! Customer Connect Agent — on!" Whisper says "toggle" starts at 310ms. Footage shows toggle click at 4.2s.
// "toggle" at 310ms into sentence → hits at footage 4.2s
setupVO1 = placeVO(clipStart + ms(4200 - 310), [
{ file: "setup--toggle", durMs: 3288 },
...
])
This places the sentence so "One" starts at 3.89s (while the toggle is about to be clicked), and "toggle" lands exactly at 4.2s when the click happens. Far more precise than aligning sentence boundaries to footage.
WARNING: This formula is only as accurate as its inputs. If the footage timestamp (4.2s) came from a 1fps breakdown, it could be off by up to 1 second. Always verify with 10fps extraction or a rendered still at the placement frame. The formula's mathematical precision can mask imprecise inputs — you get a confident wrong answer.
When to use this technique:
When NOT needed:
NEVER estimate VO durations from word count. Word-count heuristics (e.g., "2.75 words/sec") are routinely 30-40% off for Dragon HD at +10% rate. A 20-word sentence estimated at 7.3s may actually be 5.1s. This compounds across a timeline and leads to false "doesn't fit" conclusions that waste hours of restructuring.
The correct workflow:
ffprobeNever calculate timing, check feasibility, or propose changes based on estimated durations. Generate the audio first. It takes seconds.
Always work in milliseconds internally. Convert to frames only at the final step: ms(millisec) => Math.round((millisec / 1000) * FPS). A tenth of a second is 3 frames at 30fps — that's visible drift. Never round timestamps to one decimal place.
FPS-agnostic examples: Use ms(4500) not 4 * FPS + 15. The skill should work regardless of FPS setting.
The workflow: analyze first, edit video, THEN cut the music to fit.
Original: [INTRO 0-9s] [PLATEAU A 9-42s] [DIP] [PLATEAU B 42-76s] [QUIET 77-101s] [PLATEAU C 103-117s] [FADEOUT 118-133s]
Need 90s: [INTRO 0-9s] [PLATEAU A 9-42s] [DIP] [PLATEAU B 42-60s] → splice to → [FADEOUT 118-133s]
^cut at energy dip^ ^natural ending^
Need 200s: [INTRO 0-9s] [PLATEAU A 9-42s] [DIP] [PLATEAU B 42-76s] → loop back to → [PLATEAU A 9-42s] ... [FADEOUT 118-133s]
^splice at matching energy^
Splice points are structural dips where energy briefly drops — cuts there are inaudible because the listener expects a moment of breath. Find these in the waveform analysis (look for 1s windows where RMS drops 6-10dB below surrounding plateaus).
Use ffmpeg to make the cuts:
# Extract segments and concatenate
ffmpeg -i track.m4a -ss 0 -t 60 -c copy /tmp/part1.m4a
ffmpeg -i track.m4a -ss 9 -t 42 -c copy /tmp/part2.m4a # loop middle
ffmpeg -i track.m4a -ss 118 -c copy /tmp/part3.m4a # fadeout
# Concatenate with crossfade at splice points
ffmpeg -f concat -safe 0 -i list.txt -c:a aac output.m4a
Do this AFTER the video edit is locked — the music length depends on the final composition duration.
Unlike footage (where each frame must be visually reviewed), music analysis is just math on audio samples. Analyze the entire track at 5ms peak resolution in one pass — it takes seconds, not minutes. No need for the targeted windowing approach used for footage.
# 5ms peak analysis for the FULL track — cheap, do it all
ffmpeg -v error -i track.m4a -af "aresample=8000" -f wav - | \
python3 -c "
import sys, struct, math
data = sys.stdin.buffer.read()
samples = data[44:]
window = 40 # 40 samples at 8kHz = 5ms
for i in range(0, len(samples) - window*2, window*2):
chunk = samples[i:i+window*2]
vals = struct.unpack(f'<{window}h', chunk)
peak = max(abs(v) for v in vals)
rms = math.sqrt(sum(v**2 for v in vals) / len(vals)) if vals else 0
peak_db = 20 * math.log10(peak / 32768) if peak > 0 else -96
rms_db = 20 * math.log10(rms / 32768) if rms > 0 else -96
t_ms = (i // (window*2)) * 5
print(f'{t_ms}ms: peak={peak_db:.1f}dB rms={rms_db:.1f}dB')
"
Store the full analysis in media/music/analysis.md. You'll reference it for every beat-sync decision.
Why peak, not RMS, for dings: RMS averages energy over a window. A sharp percussive hit (bell, cymbal, ding) has a massive peak but low RMS because the energy is concentrated in milliseconds. RMS will miss it entirely. Always use peak analysis for finding hits.
Cost comparison: Music analysis = seconds of compute, no review. Footage analysis = each frame must be read as an image. This is why footage uses targeted extraction at sync points, but music can be analyzed wall-to-wall.
Then analyze at 1-second resolution for the full track to map structural sections. Write results to media/music/analysis.md.
RMS averages energy over a window. A short percussive hit (bell ding, cymbal tap) has a massive peak but low RMS because energy is concentrated in a few milliseconds. Always use peak amplitude analysis for finding dings/hits:
ffmpeg -v error -i track.m4a -ss 2.5 -t 2 -af "aresample=8000" -f wav - | \
python3 -c "
import sys, struct, math
data = sys.stdin.buffer.read()
samples = data[44:]
window = 40
for i in range(0, len(samples) - window*2, window*2):
chunk = samples[i:i+window*2]
vals = struct.unpack(f'<{window}h', chunk)
peak = max(abs(v) for v in vals)
peak_db = 20 * math.log10(peak / 32768) if peak > 0 else -96
t_ms = 2500 + (i // (window*2)) * 5
print(f'{t_ms}ms: {peak_db:.1f}dB')
"
A percussive "ding" has three phases:
Example from a real track:
3000ms: peak -1.9dB <- attack (sharp transient)
3165ms: peak -6.6dB <- resonance (ring)
3225ms: peak -9.5dB <- resonance (fading)
3260ms: peak -24.6dB <- landing (ring finished) <- CUT HERE
This anatomy matters for beat-sync decisions in Phase 7.
timing-reference.md is THE document an editing session needs. An agent should be able to read it ONCE and have every number needed to build or modify any composition. Subdirectory docs (breakdown.md, timestamps.md, analysis.md) are for deep dives and verification.
ffprobe, not whisper) and sentence timestampsUpdate this file every time you change timing. Stale timing references cause drift.
// remotion.config.ts
Config.setPublicDir("../media");
This points Remotion at the shared media/ directory. staticFile("footage/clip1.mp4") resolves to media/footage/clip1.mp4.
Symlinks don't work in publicDir — Remotion's static file server returns 404. Copy files instead.
Node version: Remotion's rspack binding may not work with latest Node. Test early with npx remotion studio. Node 20 is a safe bet.
<Sequence from={frame} durationInFrames={dur}> for beat placement<Audio startFrom={frame} endAt={frame}> for VO segment playback<OffthreadVideo> for demo clips (better than <Video> for rendering)spring() for organic motion, interpolate() for linear/easeduseCurrentFrame() is local to the Sequence — frame 0 = Sequence startstaticFile() for assets in publicDirnpx remotion studio for live preview (hot-reloads)In any composition with freezes, skips, or multiple clips, composition time ≠ footage time. A frame at composition second 50 might show footage second 45 (if there was a 5s skip earlier) or footage second 38 (if there were freeze frames).
Build helper functions to convert between the two:
// Footage seconds → composition frame (accounting for skip at footage 59-64)
const f = (footageSec: number) => {
const cr = footageSec >= SKIP_TO ? footageSec - SKIP_DUR : footageSec;
return clipStart + ms(cr * 1000);
};
// fToC for freezes
const fToC = (footageSec: number) => {
let extra = 0;
for (const f of freezes) {
if (footageSec > f.footageSec) extra += s(f.durSec);
}
return s(footageSec) + extra;
};
Always present timings to the user in composition time (MM:SS from start of video). Footage-relative seconds are meaningless to someone watching the composition. When debugging, show both.
CRITICAL: If you define VO durations using ms() (which converts milliseconds to frames), those values are ALREADY IN FRAMES. Do NOT pass them to s() — that multiplies by FPS again (a 30x error).
// WRONG — double conversion
const VO_DUR = ms(9600); // = 288 frames
const dur = s(VO_DUR); // = s(288) = 8640 frames (288 SECONDS!)
// RIGHT — ms() already returns frames
const VO_DUR = ms(9600); // = 288 frames
const dur = VO_DUR; // = 288 frames
// Also RIGHT — use s() only on raw seconds
const dur = s(9.6); // = 288 frames
Pick ONE unit convention. Recommended: define all durations with ms() at the top, use frame values directly everywhere else. Comment every constant with its unit.
With per-sentence WAV files (recommended), each sentence is its own <Audio> element in its own <Sequence>. No startFrom/endAt splitting needed:
{allPlacements.map((p, i) => (
<Sequence key={i} from={p.at} durationInFrames={p.dur}>
<Audio volume={3.5} src={staticFile(`vo/${p.file}.wav`)} />
</Sequence>
))}
Gaps between sentences let demo footage breathe silently. The VO introduces what the viewer is about to see, then goes quiet while they watch.
If you're working with a legacy single-file-per-section VO, you can split with startFrom/endAt — but per-sentence files are strongly preferred (see Phase 3).
When VO takes 8s to describe what footage shows in 2s, use multiple short freezes:
WRONG: [--- 23s VO as one track, no freezes ---]
VO drifts 8+ seconds behind by mid-clip
ALSO WRONG: [screenshot freeze] -> [footage starts]
Same image twice in a row — looks jarring
RIGHT: [play] [freeze 2.5s] [play] [freeze 3s] [play] [freeze 3s] [play]
VO plays continuously; freezes absorb the density gap
Use Remotion's <Freeze frame={0}>:
<Sequence from={freezeStart} durationInFrames={ms(3000)}>
<Freeze frame={0}>
<DemoFootage src="footage/clip.mp4" startFrom={ms(7000)} />
</Freeze>
</Sequence>
Rules for freezes:
fToC(footageSec) helper that maps footage timestamps to composition frames accounting for all freeze offsetsCRITICAL — freeze duration changes cascade. When you extend a freeze, every VO placed AFTER that freeze in composition time shifts later, but the footage events don't move. A sequential VO chain anchored to a previous VO's endFrame will silently drift away from the footage moments it's supposed to describe. After ANY freeze duration change: re-verify every subsequent VO placement against the footage. The safest pattern: anchor key VOs to footage moments using f(footageSec), not to previousVO.endFrame + gap. Sequential chains are safe only within ~5s windows where drift doesn't matter.
This is the step-by-step process for placing VO over footage. Every shortcut here costs hours later.
Use the footage breakdown (Phase 2) to map footage time → composition time. Account for freezes, skips, and clip boundaries. Identify scene changes, cutaways, and perspective shifts. Know what's on screen at every second of the composition. If the breakdown is stale or approximate, extract fresh frames from the raw footage at 10fps around critical moments to verify.
For each VO sentence, identify the footage moment it describes. Find the composition time where that moment is on screen. This is the anchor.
Decide: anchored or sequential? If the events a group of sentences describe happen within ~5 seconds of each other, sequential placeVO is fine. If events are spread across 10+ seconds, anchor each sentence individually. Never assume sequential placement will land sentences at the right footage moments — verify.
Generate all audio files and measure with ffprobe. Real durations, not estimates.
Calculate placements using real durations. Check every gap: no overlaps, and no VO playing during a scene change to a different perspective.
Render a still at every VO start frame. Read the image. Confirm what's on screen matches what the VO says. This is not optional.
Present the full timeline to the user in composition time (MM:SS). Footage-relative times are meaningless to someone watching the video. When the user gives feedback with timestamps, map their comp time to footage internally — never ask them to think in footage time.
Iterate. The user will watch and give feedback. Placements will shift. This is normal. Re-verify after every change.
Characters must be introduced before being named. First VO reference to any character must establish their role: "A prospective customer, Gus, visits the website!" not "Gus visits the website!" A name without context is confusing. The pattern: "Meet Maya! She runs Whisker Wonderland." establishes the character; subsequent "Maya" is fine.
Silent moments are intentional. When footage shows a character's natural reaction (typing a response, reading something, acknowledging — "sure! take your time :)"), let it breathe with NO VO. These moments are pacing. VO should never compete with a character moment. If VO is playing over a cutaway, it must describe something OTHER than what the cutaway shows.
Intro sections need beats between ideas. Different concepts (person → product → person) need ~1s silence between them. Build the beat INTO the card's visual duration so the card stays on screen during silence. personaCard.dur = ms(voDuration + 1000) — not a separate gap that shows black.
Continuous with freezes: VO plays as one track, footage pauses to let it catch up. Best when VO and footage describe the same sequence but at different densities.
Sentence-level blocks: Each VO sentence placed at the exact footage timestamp where the action happens. Best when footage has large gaps between described events. Example: "asks about discounts" at footage 0:53, "asks about gift packages" at footage 1:09.
Sequential after previous section: Multiple VO sections over the same clip, each placed after the previous ends with ~0.5-2s gap. WARNING: This is the most dangerous strategy. It looks correct in code (placeVO handles the math cleanly) but silently places sentences at wrong footage moments when the events are spread across time. Only use when events happen within ~5 seconds of each other. For events spread across 10+ seconds, anchor each sentence individually. ALWAYS verify the footage at each sentence's actual start time — do not trust that sequential placement will land at the right moment.
Lower music when VO plays, bring it back during silent/demo sections:
interpolate() on the volume propWhen adding audio to an existing video (e.g., rebranding an FCP/Premiere project), build a single pre-mixed audio file and mux it into the video with ffmpeg. This avoids complex NLE timeline manipulation.
Process:
generate-vo.py.--output-json-full for word-level timestamps. Use these ONLY for finding word positions within a file (e.g., aligning a specific word to a visual transition). NEVER use whisper segment boundaries as sentence boundaries — they split on arbitrary line lengths, not punctuation.ffmpeg -y -i silent-video.mp4 -i premix-vo-music.wav \
-c:v copy -c:a aac -b:a 320k \
-map 0:v:0 -map 1:a:0 output.mp4
Freeze frames for VO overflow: If VO is longer than the available visual (e.g., closing text slide needs to hold while VO finishes), the best option is to have the human extend the clip in their NLE (FCP/Premiere) and re-export — zero quality loss. If that's not possible, use ffmpeg to freeze a frame, but note that re-encoding introduces visible quality degradation on static frames where compression artifacts are most noticeable:
# Split video at freeze point, hold frame, then append remainder
ffmpeg -y -i input.mp4 -t {freeze_start} -c copy part1.mp4
ffmpeg -y -i input.mp4 -ss {freeze_start} -frames:v 1 freeze.png
ffmpeg -y -loop 1 -i freeze.png -t {freeze_duration} -c:v libx264 -pix_fmt yuv420p -r 60 freeze.mp4
ffmpeg -y -i input.mp4 -ss {resume_point} -c copy part3.mp4
# Concatenate parts
Before muxing audio into video, you MUST complete this checklist. Do not ship without it.
1. Read every placement frame. For each VO sentence, read the actual video frame at that placement time. Confirm the visual matches the narration. Do this yourself — do not delegate to an agent and trust "MATCH." If any placement is wrong, fix it before proceeding. This is not optional.
2. Check for overlaps programmatically. Print every placement's start, end, and gap to next. If any gap is negative, fix it. If any gap is under 0.3s, flag it.
3. Verify music reaches end of video. Play the last 5s of the pre-mix. Confirm music is audible and fading naturally, not cutting off abruptly. If the music track is shorter than the video, you MUST extend it with a bespoke splice that preserves the natural fadeout — and the fadeout must END at the video's end, not BEGIN there.
4. Verify ducking is speech-accurate. Listen to a VO section: music should duck only while words are being spoken, not during pauses between sentences. If ducking pumps weirdly during silence, you're ducking to file boundaries instead of speech. Use amplitude detection on the placed VO track, not timestamp mapping.
5. Verify closing sequence. Read the last 20s of frames. Confirm: VO finishes before any non-narrated end card (logo, etc.). Music fades naturally through to the end. No abrupt silence.
objectFit: "contain" on dark backgroundBuild reusable SVG components:
collapse prop (0-1).Keep particles low opacity (0.1-0.4), behind text. Atmosphere, not competition.
The visual cut must land AFTER the ding, not before or during it. If music is being ducked for VO, and VO starts when the cut happens, the duck ramp eats the ding. The ding must ring out at full volume FIRST, then cut, then VO begins.
ding attack: ms(3970)
resonance ends: ms(4060)
duck ramp: 10 frames
earliest VO: ms(4060) + 10 frames
safe cut: ms(4060) + 13 frames (3-frame margin)
Cutting BEFORE a ding kills it. The duck ramp silences the beat before it plays.
Remotion studio displays time as SS:FF (seconds:frames), NOT decimal seconds. When the user says "3:26" they mean 3 seconds and 26 frames = 3 * FPS + 26 frames, NOT 3.26 seconds. Always clarify:
Splitting VO around a visual moment (zoom-in, reveal, transition) creates dramatic punctuation. The silence lets the visual breathe.
Example: "Early engineering preview," [silence -- zoom happens] "more to come."
The phrase before sets it up. The visual lands in silence. The phrase after punctuates. This is the difference between narration and storytelling.
// "early engineering preview," ends -> zoom -> "more to come."
const doc2a = { at: clip3Start + ms(23000) - doc2aDur, dur: doc2aDur }; // ends at zoom start
const doc2b = { at: clip3Start + ms(24000), dur: doc2bDur }; // starts at zoom end
There's no formula — mix balance is found by ear. But you can't hear, so use these defaults and let the user iterate.
Starting defaults:
volume prop)The tuning process:
volume prop vs MusicTrack constants), so they can be tuned independently.Rule of thumb: VO should be the clear foreground. If you can't tell whether the VO or music is louder, the music is too loud. The viewer should never strain to hear the narrator.
For each VO phrase, decide what the viewer sees:
Rules:
Before committing ANY composition change, for EVERY VO placement:
npx remotion still src/index.ts CompositionId still.png --frame=NThis is not optional. This is not "spot check a few." This is every single placement. The cost of rendering stills is seconds; the cost of wrong timing is hours of debugging and frustrated users.
Never eyeball VO placement. Print every VO block's start/end and check gaps:
voRanges.sort((a,b) => a.startFrame - b.startFrame);
for (let i = 0; i < voRanges.length - 1; i++) {
const gap = voRanges[i+1].startFrame - voRanges[i].endFrame;
if (gap < 0) console.error('OVERLAP at range', i, ':', gap, 'frames');
}
After computing total duration, verify the music covers it:
console.log('Composition:', totalDuration/FPS, 's');
console.log('Music track: 133s - ' + (133 > totalDuration/FPS ? 'OK' : 'TOO SHORT'));
If the track is too short, a looped version may flatten dynamics — listen to it.
npx remotion studio — instant preview with scrubbing. Use this constantly. Never render until the user says go. Renders take minutes; studio preview is instant.
You cannot watch video, but you CAN render stills:
npx remotion still src/index.ts CompositionId stills/check.png --frame=60
Read the PNG to check. Verify every component: title cards, interstitials, persona cards, closing cards, demo footage transitions.
4K gotcha: Everything needs to be 2-3x larger than you'd think. Font sizes, avatars, logos, spacing. Render a still, look at it, adjust.
Text card rule: 7 words max, each card stands alone. Title cards, interstitials, and reveal cards must never exceed 7 words total. These are visual punctuation, not subtitles — the VO carries the message, the card reinforces it. If the VO sentence is long, distill to the core idea. Each card must speak for itself — when a new card appears, the previous card's text must not persist. Use separate <Sequence> blocks so each card replaces the last, never accumulates. Examples: "Remember Sam?" (2 words) → cut → "Here's how Maya set it up." (7 words). Never stack text from multiple VO sentences on the same card.
For closing sequences where text cards match VO word-by-word (e.g., "Customer Connect Agent:" → "Faster resolutions." → "Happier customers." → "Ready from day one."), use Whisper word timestamps to sync each card to when the narrator says the corresponding word:
// Whisper: "faster" at 1210ms, "happier" at 2420ms, "ready" at 4300ms
const cardCC = { at: t, dur: ms(1210) }; // "Customer Connect Agent:"
const cardFR = { at: t + ms(1210), dur: ms(2420 - 1210) }; // "Faster resolutions."
const cardHC = { at: t + ms(2420), dur: ms(4300 - 2420) }; // "Happier customers."
const cardRD = { at: t + ms(4300), dur: ms(5568 - 4300 + 800) }; // "Ready from day one." + beat
Each card appears at the exact moment the narrator says its first word. This creates a subtitle-level sync that feels deliberate and polished.
For multicam screen recordings with typing, the human and the agent have different strengths:
Human handles in FCP:
Agent handles in Remotion:
The human gives the agent a clean clip that plays at 1x throughout. The agent never attempts speed ramps — 1fps frame extraction can't identify precise typing start/stop boundaries, resulting in normal-speed typing leaking through or sped-up non-typing sections.
When a composition changes characters (e.g., Maya → Sam as service rep), EVERY VO file must be audited:
resolution--discounts ("Maya asks about first-time discounts") may still exist and get accidentally included. Remove them from the composition.Music cutting comes LAST, after the edit is locked. During iteration, accept that the track will be too short — don't waste time building cuts that become stale with each freeze change.
media/music/analysis.md)[0-N] + [loop section at matching energy] + [natural fadeout]When the user re-exports footage from Screen Studio with different zoom animations, the file gets replaced in media/footage/ but:
ffprobe and update s(clipDur) in the compositionMulti-session projects WILL lose context. Before ending a session:
PROJECT.md with current state — what's done, what's in progress, what's nextPROJECT.md and know exactly where to pick upUse the "In Progress" section of PROJECT.md as the handoff doc, not conversation history.
Only when approved:
npx remotion render CompositionId out/filename.mp4
ms() returns frames. Never pass its result to s().ffprobe for actual WAV duration.persona.dur = ms(2736), widgetHero.dur = ms(3888)), but placeVO adds VO_GAP between sentences, the total VO duration exceeds the visual card sum by (N-1) * VO_GAP. This means the last intro VO bleeds into the next section (footage start). Fix: t = Math.max(t, introVO.endFrame) after sizing visual cards. With 5 sentences and 300ms VO_GAP, the overshoot is 1.5 seconds — very audible.timing-reference.md. Future sessions will lose anything not written down.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (ourostack/ouroboros-skills) — no native marketplace selected
npx claudepluginhub p/ourostack-ouroboros-skills11 skills in this plugin
/book-fetchSearch for ebooks on libgen, download EPUBs, and optionally deliver them to an e-reader or Calibre library. Infrastructure-agnostic — discovers the user's setup at runtime./cswapKeep several Claude Code accounts working unattended with claude-swap (cswap) — install it, turn on automatic switching, read its account labels, re-log a lapsed account, and watch it so a dead login is caught days early. Use when setting up cswap, when an account shows "token expired" or "re-login needed", when auto-switch did not switch, or when the user asks why an account stopped working./designDesign and build production-grade frontend interfaces from scratch. Covers the full workflow from context gathering through visual direction, implementation, and polish. Use when creating new pages, components, or design systems — not just auditing existing UI./dragon-huntRun an adversarial end-to-end bug hunt across product, backend, auth, data, integrations, MCP/agent surfaces, and deployment assumptions. Use when the user wants Codex to find, prove, fix, test, and log every reachable defect before declaring a system ready./frontend-designCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics./linkedin-profileAuthor and publish a complete LinkedIn profile that reads like the operator, not like a model: goal, audience model, verbatim voice capture, fold-first drafting, section-by-section locks (About, Headline, Experience, Featured, Skills, small fields), browser publishing with character-level verification, then a rubric audit loop. Invoke when the user asks to refresh, rewrite, audit, or fix their LinkedIn profile or any section of it. Do NOT invoke for LinkedIn posts/content strategy, or for resumes (different artifact, different rules).