Skip to content
codewithanjum
AI agents

My Remotion and ElevenLabs reel pipeline

How I make faceless reels in code with Claude Code, Remotion and ElevenLabs. A three-stage CLAUDE.md, cached voice lines and the audio bugs I hit.

By Md Anjum Kamali · · 4 min read

Painting of a green typewriter feeding a film strip with play buttons out of the top, on an orange background
On this page
  1. The stack
  2. The three stages
  3. Audio problems I had to fix
  4. The sound library
  5. What I'd tell someone starting
  6. Questions people ask

Most of my reels and YouTube explainers are made in code. Claude Code writes the scenes in Remotion, ElevenLabs reads the script in my cloned voice, and I review each stage before the next one starts.

The video is a React project, so I can change anything by describing it, and nothing about the edit is locked inside an app. Here's how the pipeline works and the problems I had to fix along the way.

The stack

Tool Job
Remotion Builds the video from React components and renders it to MP4
Claude Code Writes the script file, the scenes and the audio handling
ElevenLabs Generates the voiceover from my cloned voice, with word timestamps
ffmpeg Trims, aligns and normalises the audio
A sound library Two folders of sound effects and music I reuse across videos

The three stages

The most useful file in the project is a CLAUDE.md in the root. Claude Code reads it on every run, and it forces one order: script, then silent scenes, then voice. ElevenLabs only gets called when I type "voice it".

That order exists to save credits. Visual changes are free to make. Voice changes cost money. So the voice comes last, after everything else is approved.

Stage 1: the script

Claude Code writes the script as JSON, one entry per line:

{
  "id": "l3",
  "voice": "My startup is called Prospectee.",
  "onScreen": "Prospectee",
  "visual": "Logo tile drops onto the dashboard",
  "pauseBefore": 0.3,
  "estSeconds": 2.2,
  "source": "https://prospectee.io"
}

voice is what gets spoken. onScreen is the caption. visual describes the animation in plain words. source is there for any fact, so I can check it before it goes out.

Claude prints a table of lines with word counts and an estimated length, then stops. I read it out loud once and change anything that sounds stiff.

Stage 2: silent scenes

Once I say "approved, stage 2", Claude builds one component per line, sized from the estimated seconds, and chains them in a Remotion <Series>. No audio yet.

I open Remotion Studio and fix visuals by chatting: "l10, make the drop faster", "l4, the bar should start slower". This is where most of the time goes, and none of it costs anything.

Stage 3: voice

When the visuals are right, I say "voice it". Claude generates one audio file per line using the ElevenLabs text-to-speech endpoint with timestamps, so each file comes back with word-level timing for captions.

Each file is cached by a hash of its text. If I change one sentence after hearing it, only that line regenerates. Then the estimated durations get replaced by the real ones, and the captions are built from the word timings.

Audio problems I had to fix

The video side went smoothly. Almost every bug was in the audio.

Mono sounded quieter. Voice files from one source were mono, sound effects were stereo, and in Remotion the mono files played about 3dB quieter at the same loudness. It took a while to track down. Now every audio file is converted to stereo before it goes into the project.

Too many audio tracks froze the editor. One long video had more than 200 sound effects, each as its own <Audio> component. Remotion Studio froze. The fix was to mix all the sound effects and music into a single WAV file with a small Python script, and play that one file instead.

Lines didn't match in volume. Every line was generated on its own, so some came out louder than others. I normalise the loudness of every line with ffmpeg so the whole track sits at one level.

Numbers were read badly. The voice model sometimes reads "$500" or "2,301" in odd ways. So in the voice field numbers are spelled out ("five hundred dollars"), while the caption shows the digits.

When I record my own voice instead, I do one take of the whole script. ffmpeg's silence detection finds the gaps between sentences, and the script splits the recording into lines from there, so each line lines up with its scene.

The sound library

Every video used to start with hunting for a whoosh and a click. Now all the sound effects and music from past projects live in two flat folders, sfx/ and sound/, and Claude picks from them by file name. New videos get sound design in minutes, and the channel starts to sound consistent.

What I'd tell someone starting

  1. Write the CLAUDE.md first. The order it enforces is what keeps this cheap.
  2. Keep the script as data. A JSON file per video means you can change the words without touching the animation code.
  3. Generate voice per line, never per video.
  4. Check every audio file's channels and loudness before you blame the editor.

What I want next is a small web app on top of this, with a timeline view, so I can drag a scene a few frames later without asking Claude to do it.

There's a starter version of this project on the resources page if you want to try the setup yourself.

Questions people ask

What is Remotion?

Remotion is a framework for making videos with React. Each scene is a component, animation is driven by the frame number, and you render the result to MP4 from the command line. Because the video is code, an AI coding assistant like Claude Code can build and edit it.

How do I avoid wasting ElevenLabs credits on a video?

Generate one audio file per script line, cache each file by a hash of its text, and only call ElevenLabs after the script and visuals are approved. Then editing one sentence regenerates one line instead of the whole voiceover.

Why does my Remotion audio sound quieter than expected?

Check whether the file is mono. In my project mono files played about 3dB quieter than stereo files at the same loudness, so I convert every voice and sound file to stereo before using it.

Keep reading