Captions guidance for Remotion projects. Every caption is JSON in the Caption type from @remotion/captions, with text, start and end times in milliseconds, a timestamp, and a confidence value.
The skill covers three jobs: transcribing a video or audio file into captions with Whisper running on the local GPU, importing an existing .srt file, and showing the captions with the Basic Captions element so they stay editable in Remotion Studio.
What You Get
- A single JSON caption format (text, startMs, endMs, timestampMs, confidence, pageBreakAfter) used for every step
- A Node.js transcription script that decodes audio to 16kHz mono and runs Whisper through @remotion/whisper-webgpu
- A browser transcription variant using resampleTo16Khz for a File object
- An SRT import component built on parseSrt, with a delayRender-guarded fetch
- Rules for placing the Basic Captions element inside the same Sequence as its clip so trimming and speed changes affect both
Common Use Cases
- Adding subtitles to a talking-head video built in Remotion
- Converting a client-supplied .srt file into captions that animate with the video
- Transcribing each source clip of an edit and keeping timestamps relative to the source file
- Building a captioned short-form video where captions stay editable in Studio
What Makes It Unique
It is specific to Remotion’s own Caption type and the @remotion/captions package. It transcribes with a Whisper build that runs on the local GPU, so no audio leaves the machine, and it contains layout rules that keep captions attached to their clip when the clip is trimmed, reordered or retimed. It also asks for the captions array to be written inline so the Studio caption editor can write edits back to the source.
Under The Hood
The skill is instructions with code samples; it ships no scripts of its own. The agent is told to install packages with npx remotion add (or the bun, yarn or pnpm equivalent), write and run a Node.js script that reads a media file from the project’s public folder, downloads a Whisper model, and writes a captions JSON file. It tells the agent to fetch the Basic Captions source from remotion.dev and save it into the project, and it can fetch a remote or local .srt file. It also tells the agent to open Remotion Studio when finished. A compatible GPU is required for transcription.