Index of every page on this site: llms.txt
All skills
oaustegard avatar

/making-remotion-videos

@b9eb735
Run it yourself

Make an MP4 from React components with Remotion, rendered headlessly in this container. Covers project scaffolding with pinned versions, the frame-pure composition contract, the still-frame review loop, rendering with the preinstalled Chromium, and the product demo reel - an app shown inside a phone frame, built from Playwright captures of the real UI. Use for 'Remotion', 'make a video in React', 'demo reel', 'promo video for my app', 'app preview video', 'product video', 'phone mockup video', 'vertical video for social', 'Instagram reel', 'TikTok-format video', 'animated explainer with text and screenshots', or any motion graphics job built from layout, type and UI captures.

Use this Skill: https://skilld.dev/gh/oaustegard/claude-skills/making-remotion-videos

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesnarration.md

≈1.6k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Narration for a Remotion reel

How the aeyu.io reel got its voiceover (2026-10-29, sources in oaustegard/experiments aeyu-demo-reel/vo/). The reel's scenes are fixed, so the voiceover fits the timeline rather than the reverse.

Script

vo/script.json is a list of {id, start, end, text}. Take start a few tenths after each scene starts, and end a few tenths before the next line's start. Size the text to the slot before generating anything:

for l in S: print(l["id"], round(len(l["text"].split()) / (l["end"] - l["start"]) * 60), "wpm needed")

Rewrite any line that needs more than about 180 wpm. Oskar's standing pace target for narration is 165–180 wpm, energetic, with varied intonation (memory 3eb81ac6).

Routes

Gemini 3.8 Flash TTS OmniVoice 0.2.1 (k2-fsa)
Where invoking-gemini generate_speech(), API local, inside claude-workspace/scripts/jail.sh
Speed here 27 takes in 2.5 min about 29× slower than real time on 4 CPU cores when cloning, about 10× with a designed voice
Voice control prebuilt or designed voice id, plus a free-text style tag design (male, young adult, low pitch, british accent), or cloning from a 3–10 s reference with its transcript
Pace control the style string only duration= per line (exact), or speed=
Pitch variation, 2 test lines 4.1–6.6 semitones SD designed voices 1.8–3.2; cloned from a lively reference 2.7–4.1
"Year bests" "your best" in 6 of 6 takes correct in most takes

OmniVoice is the default engine of debpalash/VoiceStudio, the 94k-star app billed as an "open-source, fully-local ElevenLabs alternative". The app itself is an Electron studio; the engine is what matters for a render.

OmniVoice in the jail

The weights are 3.3 GB: k2-fsa/OmniVoice at revision c5fdb5ccb1, with audio_tokenizer/ included. Download them outside the jail with huggingface_hub.snapshot_download into /tmp/jail/omnivoice/models/OmniVoice. Install wheels with --no-deps into separate .deps* directories created before the chown. The system torch 2.14 CPU build is reused, so torch is not installed:

omnivoice==0.2.1 transformers==5.19.0 pydub==0.25.1 soundfile==0.14.0
safetensors==0.8.0 regex==2026.9.10
audioop-lts==0.2.2          # Python 3.13 removed audioop; pydub needs it
accelerate==1.15.0 psutil==7.2.2   # the audio tokenizer loads with device_map

Run with -e PYTHONPATH=<all .deps dirs> -e HF_HUB_OFFLINE=1 -e HOME=/tmp/jail/omnivoice. vo/omnivoice_run.py takes a JSON list of lines with optional instruct, ref_audio, ref_text, duration and seed. Each failure surfaced as an import error at first run: pyaudioop, then accelerate. Read the traceback, add the wheel, and re-run.

A cloned voice carries the reference's delivery. A 6 s Gemini Charon clip in the "energetic, brisk explainer" style, with no words shared with the script, gave OmniVoice its energy. Unpaced, the clone then averaged 211 wpm, with lines up to 283. Set duration = min(slot − 0.15, words / 170 × 60) per line.

Picking and mixing

vo/assemble.py TAKES NAME [SCRIPT [TOTAL]] handles each line in turn. It trims silence at 40 dB, keeping 60 ms before the detected start, and caps pauses inside the take at 0.22 s. It transcribes with faster-whisper small.en, picks the take with the lowest WER and then the one closest to the line's target (slot minus 0.25 s) among takes that end 0.1 s before the next line. It stretches only within ±4%, with ffmpeg Rubber Band (librosa's phase vocoder at 6–12% sounded like an echoey room, per Oskar). It places each take at its slot start in a 48 kHz track, applies linear gain so peaks hit −2 dBFS, and writes NAME.wav plus NAME_picks.json. An earlier version ran loudnorm=I=-16:TP=-1.5, which squashed the voice by about 5 dB; Oskar heard it as over-amplified.

Two quirks of this container's faster-whisper 1.2.1: passing a file path fails in PyAV (open() got an unexpected keyword argument 'metadata_errors'), so pass a 16 kHz float32 array. ASR also cannot judge a coined brand name ("aeyu" came back as "IU.io", "au.io" and "I-O dot I-O"). Exclude those lines from the WER score and get the pronunciation from a person.

Verified on the aeyu reel

Speech onsets from silencedetect were 0.31, 2.61, 6.12 … 31.31 s against planned starts of 0.3, 2.6, 6.1 … 31.3 s, and integrated loudness was −15.8 LUFS. The paced OmniVoice track, with duration set per line, measured 182 wpm with speech onsets on every slot start and −16.0 LUFS.

Pronouncing a coined name

Record the name once and splice that one clip into every line that says it: the closing line is "Try the demo at" plus the clip, with an 80 ms gap. When it was generated inside each line, Gemini said "aeyu" two different ways in one reel (Oskar heard "I owe" and "AU").

To choose the spelling, generate each candidate 3 times and keep the one whose takes all transcribe alike. For Gemini, "AY-you dot I-O." gave "AU.io" in 3 of 3 takes. "AY-yoo dot eye-oh." drifted between "AO", "AU" and "AEO", and "Ay, you." gave "Hey you". OmniVoice read every spelling as "IU.io" ("eye-you"). Its inline CMU override [EY1 Y UW0] dot I-O. gave "AU.io" in 4 of 4 takes.

The same override did not rescue "Year bests": [Y IH1 R] bests still transcribed as "your best" in 3 of 3 takes. Both voices said "Best of the year" correctly, so the script uses that wording.

When no voice can say the name, spell it

The aeyu reel's final audition had eight Gemini voices read "AY-you dot I-O". Oskar listened: every voice dropped or swapped a letter ("drops the e", "drops y", "a, u, i-t-o?"). A transcript cannot catch this, because ASR maps all of those to the same "AU.io". The fix was editorial:

  • Spell the name: "A, E, Y, U, dot I, O." Write the letters with periods in the TTS text ("A. E. Y. U. Dot I. O."). All 4 takes spelled every letter in order.
  • Move the spoken name out of the opening, which spoke the tagline instead.
  • Give the spelling a visual. Measure each letter's time on the mixed track: whisper word_timestamps=True returns the span ("A", "-E", "-Y" ...), and librosa.onset.onset_detect inside that span finds each syllable. Convert those times to frames relative to the scene's start and light each letter's key on its frame. Recompute them whenever the take changes.

Choose a voice by ear. Auditioning eight voices on one closing line (a 1:40 file, each clip introduced by number in a neutral voice) took 2 minutes to make.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    The skill provides a robust environment for React-based video production with Remotion. It includes automation for project scaffolding, font management, and UI capture via Playwright. Security analysis identified expected command execution for media rendering and project setup, as well as downloads from trusted sources like Google Fonts and HuggingFace. A low-severity surface for indirect prompt injection exists because the tool captures content from external web applications.

  • Socket5d

    No alerts

  • Snyk5d

    Risk: MEDIUM · 1 issue

Signed by skilld at b9eb735. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 weeks ago
metadata
{
  "version": "0.2.5"
}

README badge

README badge for oaustegard/claude-skills/making-remotion-videos