Editing video with Claude Code and FFmpeg: five tasks, step by step
From a long recording to captioned vertical clips without opening your editor: what to ask Claude Code, which command it should run and what to check at each step.
Every week you record an hour-long video podcast. Out of it come six vertical clips with captions, all at the same loudness and with the same file naming. It is a job you know by heart and it eats your Monday afternoon.
That kind of work — repeated, rule-based and file-based — is where Claude Code really pays off. Not because it "edits" like a human editor, but because it writes and runs the FFmpeg commands you would otherwise dig out of a forum.
This guide is for creators and editors who don't code but aren't scared of a terminal. If you first want to know what Claude can and can't do with video in general, start with how to edit videos with Claude.
What you need
- Claude Code installed. It needs a paid Claude subscription or an Anthropic Console account.
- FFmpeg installed and available from the terminal. If you don't have it, ask Claude Code to install it and explain what it's doing.
- A working folder with a copy of the footage, never the original raw files.
- Recommended: The Polimake desktop app, free. It transcribes with Whisper on your computer, includes a video editor for the touch-ups FFmpeg can't handle and lets Claude query your library over MCP. It saves you installing and configuring Whisper by hand. For now there is only a Windows version.
Before you start: the folder rules
When it starts, Claude Code reads a file called CLAUDE.md in the folder you open it in. Use it to set the rules you don't want to repeat every week:
# Rules for this folder
- Originals live in `raw/`. Never modify or delete them.
- Everything you generate goes in `out/`, named `YYYY-MM-DD_clip-NN.mp4`.
- Export H.264, CRF 18, AAC audio at 192k.
- Vertical clips: 1080 × 1920. Horizontal: 1920 × 1080.
- Before processing more than one file, try one and show me the result.
If you're unsure about the output codec or container, the decision is explained in H.264 or H.265 and in which format to ask for at delivery.
The first rule is the important one. Claude Code asks for permission before running each command, but with twenty commands in a row it's easy to approve without reading. With the originals protected, a mistake costs a minute, not a shoot.
Task 1: find long silences
What you ask:
Analyze
raw/episode-42.mp4and give me a list of silences longer than 0.6 seconds, with start and end.
What it should run, roughly:
ffmpeg -i raw/episode-42.mp4 -af silencedetect=noise=-35dB:d=0.6 -f null -
FFmpeg prints each silence with its start and end, and Claude hands it back to you in order.
What to check: the -35dB threshold. In a room with background noise it may detect nothing; in a very quiet studio it may flag a deliberate pause as silence. If the result looks off, ask it to try another value. And decide for yourself whether to remove the silences: in an interview, some pauses are the best part of the video.
Task 2: transcribe and prepare captions
What you ask:
Transcribe the episode in English and generate an SRT. Then check the text: fix proper names using this list (Marta Vidal, Lumen, Polimake) and split lines longer than 42 characters.
To transcribe, Claude Code will use whatever tool you have installed. With Whisper it would be something like:
whisper raw/episode-42.mp4 --model medium --language English --output_format srt --output_dir out/
If you'd rather not install Whisper yourself, the Polimake desktop app's local transcription does the same on your computer and exports timestamped text. It also keeps the transcript indexed, so six months from now you can find the episode by a single line.
What to check: proper names and numbers. That's where any automatic transcription gets it wrong most often, and a mistake in a burned-in caption can't be fixed afterwards. To set one caption style for the whole channel, see how to systematize captioning.
Task 3: choose and cut the clips
This is the part that saves the most time, because Claude does two things in a row: it decides on the text and then runs the cuts.
What you ask:
Using the SRT, propose six clips of 30 to 50 seconds, each with a single idea that makes sense without context. Show me the table (start, end, first and last line) before cutting anything. Only use timestamps that exist in the SRT.
Once you approve the table, it will cut each clip with something like:
ffmpeg -i raw/episode-42.mp4 -ss 00:12:04.500 -to 00:12:51.200 -c:v libx264 -crf 18 -c:a aac -b:a 192k out/2026-10-29_clip-01.mp4
With -ss and -to after -i, the cut is frame-accurate even if it takes a little longer, because it re-encodes.
What to check: the start and end of every clip. It shouldn't begin mid-word or end on a breath. If it does, ask it to move the cut half a second; it's faster than fixing it in the editor. And before posting all six everywhere, decide which version goes to each platform.
Task 4: reframe to vertical and burn in the captions
What you ask:
Convert the six clips to 1080 × 1920 by cropping the center of the frame and burn in the captions for each segment, with large text and an outline. Before processing them all, extract a frame from the first one and check it.
For each clip, something like:
ffmpeg -i out/2026-10-29_clip-01.mp4 -vf "crop=trunc(ih*9/16/2)*2:ih,scale=1080:1920,subtitles=out/clip-01.srt:force_style='FontSize=14,Outline=2'" -c:a copy out/2026-10-29_clip-01_vertical.mp4
Note the last sentence of the request. Claude Code can open images, so it can look at the extracted frame and tell you whether the person falls outside the crop. If they sit on the left of the shot, a centered crop cuts them off: ask it to shift the framing.
What to check: the crop on shots with two people. A fixed center crop doesn't follow whoever is talking. If the video alternates between two speakers, solve this step in your editor — the one in the Polimake desktop app opens the clips straight from the folder — or with an automatic reframing tool. If you need the opposite, vertical to horizontal, the options are in adapting a vertical video to every channel.
Task 5: match loudness and export in a batch
What you ask:
Normalize the audio of all the vertical clips to around -14 LUFS and save the final version with the agreed name.
For each clip:
ffmpeg -i out/2026-10-29_clip-01_vertical.mp4 -af loudnorm=I=-14:TP=-1.5:LRA=11 -ar 48000 -c:v copy out/2026-10-29_clip-01.mp4
Around -14 LUFS is a common reference for social video; if your client has a different spec, give it that. The -ar 48000 is there because loudnorm upsamples audio to 96 kHz unless told otherwise, which only bloats the file.
What to check: listen to at least one full clip on headphones. loudnorm evens out loudness; it doesn't fix bad audio. That takes a proper audio mix.
Turning it into a routine
Once all five tasks work, ask Claude Code to save them as a script or as a skill for the folder. The following week, the job comes down to dropping the raw file in raw/, approving the clip table and reviewing the result.
When it isn't worth it
- One-off pieces. Setting up the rules takes longer than cutting a single video by hand.
- Edits driven by visual rhythm. A commercial or product video is decided by watching, not by reading a transcript.
- Reframes with movement. A fixed crop follows nobody.
- Color grading and audio mixing. FFmpeg can apply a LUT or a filter, but color judgment and finishing stay in the editor.
For the other editing tasks AI can take off your plate, even outside the terminal, see editing videos with AI.
Start with the desktop app
The shortest way to set all this up is to download the Polimake desktop app, which is free for this use. It brings Whisper transcription, search across your folders, the video editor for touch-ups and the MCP connection that lets Claude reach your library. You only add Claude Code and FFmpeg. For now there is only a Windows version.
Frequently asked questions
Is Claude Code free?
No. Claude Code requires a paid Claude subscription (Pro, Max, Team or Enterprise) or an Anthropic Console account with pay-as-you-go billing; the free claude.ai plan doesn't include it. FFmpeg, on the other hand, is free, open-source software.
Does it work on Windows?
Yes. Claude Code runs on macOS, Linux and Windows, both natively and inside WSL. FFmpeg is also available for all three systems, so you can follow the workflow in this guide on any of them.
Does Claude edit the video directly?
It doesn't watch the video like a human editor or assemble it on a timeline. It writes and runs FFmpeg commands, reads transcripts and can review frames extracted as images. That is why it does well on tasks with clear rules, such as cutting, reframing or normalizing, and not on decisions about visual pacing.
Why doesn't the cut land exactly where I asked?
If the command copies the video without re-encoding (-c copy), FFmpeg can only cut on keyframes, which may be several seconds away from the requested point. For a frame-accurate cut you have to re-encode, as in this guide's examples: it takes longer, but the clip starts and ends where the table says.