Reel from raw video
Proven on two reels: Linux Day 2 and Linux Day 1 (with sound effects). library/Reel.tsx is the Day 1 reel. Copy its patterns. Do not invent a new style.
Works on macOS and on Linux / Windows WSL. Setup: see README.md in the repo.
Hard rules
- Every overlay is timed from
work/words.txtseconds. Never guess a time. - Use only components in
src/(library). Add a new component only when no library component fits a beat. - Keep the face clear. Safe zones (1080x1920):
- Top tags and titles: y 90 to 400.
- Face and neck: y about 450 to 1350. Nothing here except full-screen title cards (max 3 s).
- Everything else goes below the neck (the shirt's first button): y 1360 to 1880.
Panelstarts atBELOW_NECK(1360). Usefitto scale a tall panel so it ends by 1880. - Find the neck line for each new video: grab a frame with a y-grid and look. Update
BELOW_NECKinui.tsx.
- Do not render the full video unless the user asks in chat. Use
scripts/stills.shto check. A hook blocksremotion renderwithoutRENDER_OK=1. - Do not download anything (models, fonts, music, sound packs) without asking the user.
- Read
reference/known-problems.mdbefore you debug anything. - In OpenCode, the plugin
~/.config/opencode/plugins/reel-from-rawdoes the same work as the Claude hooks (render block, type check, stills reminder). Open the sheet images with the read tool. If your model cannot see images, ask the user to check the sheets.
Scope rules (follow exactly)
- Do only what the user asked. Change only the files and values the request needs.
- A check (type check, stills check, reminder from a hook or plugin) is a check only. Fix only what breaks a rule in this file or in
reference/style-spec.md. Never restyle, add a component, add a scene, or change text, timing or volume because of a check. - If you think something else should change, tell the user in one line. Do not change it.
- Never edit
~/.claude/skills/reel-from-raw/(this skill) while you work on a video. Edit only the video project. - A test file you create (for example
src/__probe.ts) must be deleted before you finish.
Workflow (new video)
Run each step. Each script prints OK: on success. Stop and fix on any ERROR.
| # | Step | Command / action |
|---|---|---|
| 1 | Create project | bash ~/.claude/skills/reel-from-raw/scripts/new-project.sh <dir> <raw.mp4> (for example ~/Coding/motion-videos/<name>). It copies the library, the sound files and the hooks, and installs npm packages (or clones them from $REEL_SEED). |
| 2 | Transcribe | bash ~/.claude/skills/reel-from-raw/scripts/transcribe.sh <dir> hi (use en for English only). Then fix mishearings with reference/glossary.md. |
| 3 | Cut silences | python3 ~/.claude/skills/reel-from-raw/scripts/cuts.py <dir>. Use --start/--end to drop a false start or tail. |
| 4 | Beat sheet | Follow reference/beat-sheet-prompt.md. Write work/beats.md. Show it to the user if they want to approve the plan. |
| 5 | Build | src/Reel.tsx is the Day 1 reel. Rewrite it from the beat sheet. In Root.tsx, set id (for example LinuxDay3) and the real handle. Delete scene components the reel does not use. Keep the At and r() helpers. |
| 6 | Type check | Automatic: a hook runs tsc --noEmit after each edit. Fix every error it reports. |
| 7 | Visual check | bash ~/.claude/skills/reel-from-raw/scripts/stills.sh <dir> auto, then read every out/stills/sheet*.jpg. Also check beat frames: stills.sh <dir> 120,450,.... Check against reference/style-spec.md. Fix and repeat. |
| 8 | Sound check | Sound effects come with the components (see "Sound effects"). Check that public/sfx/typing.wav and public/sfx/pop.wav exist. Do not add sounds outside the table unless the user asks. |
| 9 | Preview | Add a launch.json entry running npx remotion studio --no-open --port <free> in the project. Give the user the URL http://localhost:<port>. The user listens to the sounds there. |
| 10 | Render (only on request) | RENDER_OK=1 npx remotion render <Id> out/<name>.mp4 --gl=angle (run in background, about 3-5 min for 90 s). |
Sound effects
src/sfx.tsx holds every sound. SFX lists the sounds. <Sfx src at volume frames name> plays one sound at frames into the current Sequence.
Key in SFX | Source | Internet needed |
|---|---|---|
whoosh, ding, click, switch, whip | @remotion/sfx (files on remotion.media) | Yes, for Studio and render |
pop | public/sfx/pop.wav (made by code) | No |
typing | public/sfx/typing.wav (made by scripts/make-typing-sound.py) | No |
The library components already play these sounds. You do not add them by hand.
| Moment | File (in the project) | Sound | Volume |
|---|---|---|---|
| Hook title / sub chip | scenes/Intro.tsx (Hook) | whoosh / whip | 0.54 / 0.48 |
| Day title card | scenes/Intro.tsx (DayTitle) | whoosh / ding | 0.6 / 0.36 |
| Command list chips | scenes/Intro.tsx (CommandList) | pop per chip | 0.36 |
| Command tag / command name | scenes/Commands.tsx (CommandTag) | whoosh / switch | 0.54 / 0.48 |
| Notepad lines | scenes/Commands.tsx (NoteCard) | typing per line | 0.6 |
| Lower panel appears | ui.tsx (Panel) | pop | 0.48 |
| Terminal command typed | ui.tsx (Terminal) | typing for each command line | 0.6 |
| Light leak | Reel.tsx | whoosh | 0.48 |
| Done badge / Follow click | scenes/Outro.tsx (DayDone, FollowCard) | ding / click | 0.48 / 0.72 |
Any <Sfx> with no volume | sfx.tsx (default) | - | 0.42 |
Volume runs from 0 (silent) to 1 (full). Keep every sound below the voice.
Common requests (exact recipe)
| User asks | Do exactly this |
|---|---|
| "Increase / decrease all sound effects by N%" | Multiply every volume={x} on an <Sfx line, and the default in sfx.tsx, by (1 ± N/100). Round to 2 decimals. Do not touch CutVideo.tsx (that is the voice). Run grep -rn "<Sfx" src before and after, and show the changed values. |
| "Change only the keyboard / typing sound volume" | Change only the lines with src={SFX.typing} (ui.tsx Terminal and scenes/Commands.tsx NoteCard). |
| "Change only sound X" | Find its row in the table above. Change only that volume. |
| "Keyboard sound is weak / make a new one" | python3 ~/.claude/skills/reel-from-raw/scripts/make-typing-sound.py <project>/public/sfx/typing.wav. Keep a copy of the old file first. Edit the numbers in the script only if the user asks for a different feel. |
| "Remove a sound" | Delete that one <Sfx .../> line. |
| "Where can I hear it before render?" | Studio (step 9). Press play or Space. Studio reloads by itself after each saved edit. |
| "How do I render myself?" | Terminal: cd <project> && npx remotion render <Id> out/<name>.mp4 --gl=angle. Studio UI: Render button (right end of the bar above the timeline) → Video tab → set Output name → Render video. Progress shows in the Jobs tab. The OpenGL setting is already angle. |
| "Render it" | Step 10, with RENDER_OK=1. Then give the full path of the output file. |
| "Change the handle" | Root.tsx defaultProps.handle. |
How timing works
src/timeline.ts:CUTS(raw seconds removed),out(sec)maps a raw second to an output frame.<At from={rawSec} to={rawSec} name="...">shows a block for that spoken span.r(t0, t)gives a frame delay inside a block, for "pop this when the word at t is said".CutVideoalternates zoom 1.0 / 1.14 per segment (punch-in on each cut). Do not add more zoom.
Library map
| File | Exports | Use for |
|---|---|---|
theme.ts | DISPLAY (Anton), SANS (Inter), MONO, colours C, extrude() | All text and colour. No new fonts or colours. |
sfx.tsx | SFX, Sfx | Sound effects (see above) |
ui.tsx | Pop, useIn, useOut, BELOW_NECK, Panel, TermFrame, Terminal | Spring pop-in, lower-half panel, typed terminal |
scenes/Intro.tsx | Hook({title, sub, subAt}), DailyStep({children}), DayTitle({day}), CommandList({commands, line, lineAt}), LightLeak | Opening, section transitions |
scenes/Commands.tsx | CommandTag({n, total, name, nameAt, meaning, meaningAt, color}), FolderPath, FileGrid, MoveSwap, NoteCard | One topic per section: tag on top, visual in Panel |
scenes/Commands.tsx (Day 2, hard-coded text) | IdCard, OwnerSwap, PhoneApps, Snapshot, TopView, PdfSearch | Add props for the text before you reuse one |
scenes/Outro.tsx | DayDone({day}), NextDay({day, commands, at}), FollowCard({handle}) | Ending (NextDay is optional) |
Reel.tsx | Reel | Full Day 1 reel. Use it as the example for structure. |
Keep sizes, colours and animation when you change text.