How to make a video with Claude Code
Claude Code does not draw video by itself — it writes the video as a program: scenes in React with Remotion, a voiceover through the ElevenLabs API and final assembly in FFmpeg. This guide walks through the whole process, from installation to a finished MP4 with voice and subtitles, with example prompts and commands.
At a glance
| What you get | An MP4 with animated scenes, a voiceover and subtitles |
| Main tool | Claude Code — writes the video code and scripts from your description |
| Video | Remotion — videos as React components |
| Voice | ElevenLabs — speech synthesis via API, including Russian and Kazakh |
| Post-production | FFmpeg — music, subtitles, compression |
| To install | Claude Code, Node.js; FFmpeg optional |
| Minimum budget | Claude Pro — $20 a month; ElevenLabs Starter — $6 a month for commercial use (as of November 2026) |
How it works
Claude Code is Anthropic's agentic tool that reads a project, writes files and runs commands with your permission. It does not conjure footage the way video-generation models do; it assembles a video from code. That makes it best at explainers, motion design, infographics, vertical text videos and series of similar videos built from a template.
The pipeline looks like this:
- Script — you describe the idea, and Claude Code splits it into scenes and lines.
- Voiceover — a script sends the lines to ElevenLabs and saves the MP3 plus timestamps for every character.
- Scenes — Claude Code writes Remotion components and fits each scene's length to the actual speech.
- Render — Remotion turns the components into an MP4.
- Post-production — FFmpeg adds music, burns in subtitles and compresses the file when needed.
The advantage is that everything stays code: you can edit the video in words ("make the title bigger", "change the voice"), rebuild it, and produce dozens of similar videos from one template.
Step 1. Install Claude Code
Claude Code is included in the paid Claude plans — Pro, Max, Ultra, Team and Enterprise — but not in the free plan; you can also pay for API usage by tokens (as of November 2026). To install on macOS and Linux:
curl -fsSL https://claude.ai/install.sh | bash
On Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
Then open your project folder in a terminal and run claude; on first launch it asks you to sign in. Plans, permission modes and security are covered in the Claude Code article.
Step 2. Create a Remotion project
Remotion is a framework in which a video is written as React components: every frame is the output of a function of the frame number. It needs Node.js. Create a blank project and add Remotion's official skills for AI agents:
npx create-video@latest --yes --blank my-video
cd my-video
npx remotion skills add
claude
The skills teach Claude Code Remotion's rules — frame-based animation, audio, rendering. Alternatively, install Remotion's official Claude Code plugin:
claude plugin marketplace add remotion-dev/claude-code-plugin
claude plugin install remotion@remotion
Remotion is free for individuals and organizations of up to three people; everyone else needs a paid company licence (as of November 2026).
Step 3. Describe the video in a prompt
The more precise the description, the fewer revisions you need. State the format, length, scenes and style. An example prompt:
Make a vertical video, 1080×1920 at 30 fps, about 40 seconds long, on "What is an API". Four scenes: a title; the restaurant waiter analogy; an example request and response; a takeaway. Large white text on a dark blue background, words fading in smoothly. Put the scene texts in
src/script.json— we will voice them later. Use the Remotion skills.
Then start the preview and watch the result in your browser:
npm run dev
Remotion Studio opens with a timeline. From there, edit in words: "make the title font bigger", "add an icon to scene three", "speed up the transitions". Claude Code changes the components and Studio refreshes the preview.
Voiceover with ElevenLabs
ElevenLabs is a speech-synthesis service with an API; the underlying technology is explained in Text-to-speech (TTS). Here is how to add a voice to your video.
Get an API key and pick a voice
- Sign up at elevenlabs.io and create an API key in your account settings.
- Save the key in a
.envfile at the project root — not in the code and not in a prompt:
ELEVENLABS_API_KEY=your_key
- Make sure
.envis listed in.gitignoreso the key never reaches the repository. - Pick a voice in the voice library and copy its
voice_id; theGET /v2/voicesendpoint also lists voices. Note that ElevenLabs' original default voices stop working after December 31, 2026, so choose one from the library.
Choose a model: Russian and Kazakh
As of November 2026, the current models are Eleven v4 and v4 Turbo.
- Russian is supported by v4, v4 Turbo, v3, Multilingual v2 and Flash v2.5.
- Kazakh is supported only by v4, v4 Turbo, v3 and v3 Conversational.
The API's default model is Multilingual v2, which does not support Kazakh, so for a Kazakh voiceover set the model explicitly: "model_id": "eleven_v4".
Generate a test voiceover
Check the key and the voice with one request:
curl -X POST "https://api.elevenlabs.io/v1/text-to-speech/YOUR_VOICE_ID?output_format=mp3_44100_128" \
-H "xi-api-key: $ELEVENLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Сәлем! Бұл бейнені Claude Code жасады.", "model_id": "eleven_v4"}' \
--output public/test.mp3
If public/test.mp3 plays a voice, everything is set up.
Let Claude Code write the voiceover script
For video, the timestamped endpoint is more useful: POST /v1/text-to-speech/{voice_id}/with-timestamps returns the audio in base64 and an alignment object listing every character with its start and end time. With that data you can fit scenes to the speech and build subtitles. Ask Claude Code:
Write a script
scripts/voiceover.ts. It readssrc/script.jsonand, for each scene, calls ElevenLabs/v1/text-to-speech/{voice_id}/with-timestampswith theeleven_v4model, saves the MP3 topublic/voice/scene-N.mp3and thealignmenttopublic/voice/scene-N.json. Take the key fromELEVENLABS_API_KEYand the voice ID fromELEVENLABS_VOICE_ID. Log nothing except file names.
The core of such a script looks roughly like this:
import { writeFile } from 'node:fs/promises';
const res = await fetch(
`https://api.elevenlabs.io/v1/text-to-speech/${process.env.ELEVENLABS_VOICE_ID}/with-timestamps`,
{
method: 'POST',
headers: { 'xi-api-key': process.env.ELEVENLABS_API_KEY!, 'Content-Type': 'application/json' },
body: JSON.stringify({ text: scene.text, model_id: 'eleven_v4' }),
},
);
const data = await res.json();
await writeFile(`public/voice/scene-${i}.mp3`, Buffer.from(data.audio_base64, 'base64'));
await writeFile(`public/voice/scene-${i}.json`, JSON.stringify(data.alignment));
Claude Code runs the script itself and, if something fails, reads the error and fixes the code. It asks permission before running commands, so check what it is about to execute.
Add the voice to the video in Remotion
Remotion recommends the <Audio> component from the @remotion/media package. Install it:
npx remotion add @remotion/media
Files in the public/ folder are referenced with staticFile():
import { Audio } from '@remotion/media';
import { Sequence, staticFile } from 'remotion';
export const Scene1Voice = () => (
<Sequence from={0}>
<Audio src={staticFile('voice/scene-1.mp3')} />
</Sequence>
);
So that scenes neither cut the speech off nor drag on, ask Claude Code to compute each scene's length from the timestamps: the end time of the last character × 30 frames, plus a short pause. Remotion's calculateMetadata() function sets a composition's duration dynamically.
Subtitles from timestamps
The alignment data gives character-accurate subtitles. Ask Claude Code to either:
- render subtitles in Remotion — words appear and highlight as they are spoken; or
- build a
subs.srtfile to burn into the video later with FFmpeg.
The first gives social-media-style animated captions, the second regular subtitles.
Voice licensing and ethics
- On ElevenLabs' free plan, the audio cannot be used commercially, and the publication title must credit "elevenlabs.io" or "11.ai". Content created without a paid plan cannot be used commercially later.
- A commercial licence is included in every paid plan from Starter up (as of November 2026).
- Clone only your own voice or that of a person who has given consent. Rules on labeling synthetic content are covered in Text-to-speech (TTS).
Step 4. Render the video
When the preview looks right, build the MP4. The composition name is in src/Root.tsx:
npx remotion render MyVideo out/video.mp4
Remotion draws the frames in a headless browser and encodes them with its built-in FFmpeg, so you do not need a separate FFmpeg install to render. For very long videos or mass production there is Remotion Lambda cloud rendering.
Step 5. Post-production in FFmpeg
FFmpeg is useful when you assemble a video from finished parts. A few commands Claude Code can run for you:
Voiceover over quiet background music:
ffmpeg -i video.mp4 -i voiceover.mp3 -i music.mp3 \
-filter_complex "[2:a]volume=0.2[music];[1:a][music]amix=inputs=2:duration=longest:normalize=0[mix]" \
-map 0:v -map "[mix]" -c:v copy -c:a aac -shortest final.mp4
Burn subtitles into the picture:
ffmpeg -i video.mp4 -vf subtitles=subs.srt -c:v libx264 -crf 23 -c:a copy subtitled.mp4
Compress to H.264 for social media:
ffmpeg -i input.mov -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p -c:a aac -b:a 192k -movflags +faststart output.mp4
The subtitles filter is not in every build — the standard Homebrew formula lacks it, for example, and you need the ffmpeg-full build. Check with ffmpeg -filters.
What it costs
As of November 2026:
| Tool | Price |
|---|---|
| Claude Code | In Claude plans from Pro at $20 a month, or pay-as-you-go API |
| Remotion | Free for individuals and companies of up to 3 people; company licence from $25 a month per seat |
| ElevenLabs | Free — 10,000 credits, no commercial use; Starter — $6 a month, 30,000 credits; Creator — $22 a month |
| FFmpeg | Free |
Tips and common mistakes
- Keys only in
.env. Never paste an API key into a prompt or into code that goes into git. - Preview first. Rendering a long video takes time, so check scenes in Remotion Studio.
- Kazakh needs
eleven_v4. Without an explicit model the request goes to Multilingual v2, which does not support Kazakh. - Numbers and abbreviations. If the voice reads them wrong, write them out in words in the script.
- One voice per video. Keep the
voice_idin.envso every scene sounds the same. - Check commands. Claude Code asks permission before running commands — read what it is about to run.
Limitations
- Claude Code does not shoot or generate live-action footage: it builds a video from code, text, graphics and existing files. For real-world footage you need stock video or generative video models.
- Quality depends on the description and on revisions; the first version is rarely final.
- Remotion requires a paid licence for companies of more than three people, and commercial voiceovers need a paid ElevenLabs plan.
Sources
- Claude Code: установка — Anthropic (accessed 29 November 2026)
- Remotion: работа с AI-агентами — Remotion (accessed 29 November 2026)
- Remotion: компонент Audio (@remotion/media) — Remotion (accessed 29 November 2026)
- Remotion: calculateMetadata() — Remotion (accessed 29 November 2026)
- ElevenLabs API: озвучка с таймкодами — ElevenLabs (accessed 29 November 2026)
- ElevenLabs: модели и языки — ElevenLabs (accessed 29 November 2026)
- ElevenLabs: тарифы — ElevenLabs (accessed 29 November 2026)
- FFmpeg Filters Documentation — FFmpeg (accessed 29 November 2026)