Out-of-sync audio in hundreds of videos? Build a checker
You cannot scrub a whole folder by eye, and you do not have to. Here is how to build a tool that batch checks video sync for you, with Claude Code at your side.
the quick answer
To batch check video sync, build a small command line tool that reads every file in a folder, measures how far the voice is from the lips, and writes a report. Use a lip-sync model for faces, and trust a second check only for sharp sounds like claps. Claude Code can build it with you. If you add the editing side, Remotion needs Node 16 or newer6, as of November 2026.
Safe to try? Medium risk The tool only reads your videos, but keep every original untouched and write fixed copies somewhere else.
The problem, in your words
You have a pile of recorded interviews, video calls and AI-made clips. Some of them have lips that do not match the voice. People keep asking how to find these without watching every file.
Nothing is wrong with you or your footage. A clip that is a fifth of a second off is easy to miss and still feels odd to a viewer. Scrubbing hundreds of files by eye is not realistic. So we built a checker, and we run it. These are our lessons.
What a good solution does
A good checker does five things, and it does them without you watching.
First, it takes a folder and walks every video in it. Second, it samples several moments in each file, not one. Third, it gives each file a plain verdict: pass, drift (the gap grows over time), step (the gap jumps), review, or unmeasurable. Fourth, it writes an HTML report and a spreadsheet you can sort. Fifth, it remembers what it has done, so a run of 500 files can stop and start again.
We built two pieces that share one command. The first is the analyzer. The second is a video editor on Remotion, which makes video from React code1. The editor runs the checker as a gate on every render, so a bad file never leaves quietly.
What you need before you start
- A computer with Node 16 or newer for Remotion6, Python 3.11 or newer, and ffmpeg.
- Claude Code, an AI coding assistant that builds features and runs commands for you5. See /start-here/ for a safe setup.
- A few gigabytes of free disk for the sync model.
- A folder of sample videos, including one you already know is off.
Whisper, a speech recognition model, can give you word timings if you want the editing side3. It needs ffmpeg installed too3. If you have no terminal habits yet, start with /start-here/ and come back.
The playbook
Work in an empty folder, and let Claude Code ask before each command. Go one phase at a time.
Scaffold the tool.
Ask Claude Code for a Python package with one command,
sync <folder>. It walks the folder, pulls the audio out and samples several time windows per video. Ffprobe, which reads facts about each stream4, helps here.Add a lip-sync model for faces.
Pick a published lip-sync network. Pin its weights by checksum, and keep its Python environment outside any cloud-synced folder.
Add a fallback for faces-free clips.
Use audio-to-video cross-correlation, which compares sound spikes with picture changes. Trust it only when two or more windows agree. Otherwise say "unmeasurable".
Write the verdicts.
Pass, drift, step, review, unmeasurable. Save results as JSON lines, plus the HTML report and a CSV.
Make it resumable.
Keep a small cache per file so you can stop a long run and restart it.
Test with shifts you made yourself.
Take a good clip. Delay its audio by known amounts. Confirm the checker reads them back within a few milliseconds.
Build the editor side, if you want it.
Describe each cut in one small file, in seconds, and keep the frame math in whole frames. In Remotion, a video's first frame is 0 and its last is durationInFrames minus 11. Put the duration math in one function.
Add word timings.
A transcript with a time for every word lets you delete a line and cut those frames.
Chain the stages.
A recipe file can run analyze, cut, captions, render and check, and write a lock file so reruns match.
Finish with a loudness pass.
Do it after the render, and let the sync checker gate every render.
That is the whole build. Nice work, even if you only get through step 6 today.
Did this fix work?
One tap tells the next reader what to expect. No sign-up.
What we got wrong the first time
We averaged two checks. That was worse than gating them. On real talking heads, cross-correlation and the lip model disagreed by hundreds of milliseconds, because lips lead the voice by a changing amount. Now faces go to the lip model, and the second check only counts on sharp events.
Our checker also looked too narrowly at first. In one batch, a remote-recording tool's combined export had the host's video drifting against the audio by about 10 to 14 ms per minute, up to about a second. Readings past our search window were invisible, so the problem hid. For two-person calls, search wide, and check each face on its own.
A few more lessons, quickly:
- Call recordings carried a different steady offset per person. AI avatar clips ran a steady amount late. One global fix cannot work.
- The best repair used each person's raw audio track. We aligned the tracks to the edit and shifted each voice by its own measured curve. All 33 files in that batch passed again.
- Padding an odd number of frames at 25 fps biased a reading by 20 ms. Put cuts between speakers, not only at the quietest moment.
- Gain applied inside the render clipped the audio. Loudness belongs in a two-pass step after the render, with a true-peak limiter.
- Before you blame the checker, check the source tracks. In one case a guest could not be understood because the edit used a poor call-audio copy, not the person's own microphone. In another, a host on speakers had the guest's voice in their mic.
What it costs to run
As of November 2026, Remotion is free for individuals and companies up to three people2. Larger companies need a license, so read its terms first. The sync model, ffmpeg and a local Whisper are free. Our transcript-based cutter calls an AI model, and we used a Claude subscription through the command line rather than a paid API key. Disk is the real cost. Our model environment took about 1 GB.
Keep it safe
Footage and transcripts are personal data. Keep the outputs next to the footage, and keep them out of public repositories. Never overwrite an original. If you pull ad-platform numbers into the editor, use a read-only token, and type it only into the tool's own settings, never into a chat. Download model weights from their official page and check them against a published checksum, so you are never running a file nobody verified.
One last habit: give Claude Code a plain, empty folder to work in. Keep its approval mode on, so it asks before it runs anything at all.
Common questions
How do I fix audio that is out of sync with the video?
Measure first. Find out whether the gap is steady, grows over time, or jumps, because each one needs a different repair, and ffprobe reads stream facts you can start from4. Then fix a copy. Never touch the original, and check the copy again when you finish.
Why does audio drift in a long recording?
Two clocks rarely agree. In our batches, one export drifted by about 10 to 14 ms per minute, and each person on a call also had their own steady offset. That is why a single global shift did not fix a whole file.
Can I check every video in a folder at once?
Yes, that is the whole point. Have your tool walk the folder, sample several windows per file, and save a cache so you can stop and restart a long run. Before you trust it, test it on one clip where you added a known delay.
Is Remotion free to use?
For individuals and companies up to three people, yes, as of November 20262. Anything bigger needs a company license, so check the terms before you build on it.
Do I need Whisper?
Only for the editing side. Whisper turns speech into text3, and word times let you cut by deleting lines. The sync check does not need it.
Nice work for reading this far. The time you get back is the evenings you would have spent scrubbing clips. Spend one of them with someone you love.
James
Made with care: researched from 6 official sources and checked step by step against them on November 12, 2026. Written with AI, security-scanned before publishing.
This is general help, not professional support. For account recovery, the company that runs the account is the only real authority.
Back up anything you can't replace before you start.
Sources
- Remotion. "The core idea." Official docs, read November 12, 2026. remotion.dev
- Remotion. "Licensing." Official docs, read November 12, 2026. remotion.dev
- OpenAI (Whisper project). "openai/whisper." Official docs, read November 12, 2026. github.com
- FFmpeg. "ffprobe Documentation." Official docs, read November 12, 2026. ffmpeg.org
- Anthropic. "Overview, Claude Code Docs." Official docs, read November 12, 2026. code.claude.com
- Remotion. "Creating a new project." Official docs, read November 12, 2026. remotion.dev
Spotted a mistake? Tell us. We fix it in place and note the change.
Notes from readers
Found a better way, or did a step change? Tell me. Every note is read by a person before it goes up, and the best ones make the guide better.