Claude Code can batch rename video files based on their visual content by using ffmpeg to extract still frames and analyzing them. For each video, Claude extracts three frames (beginning, middle, end), identifies what’s happening in each, and generates descriptive filenames like 064_graduate-devin-explaining-heat-pump-visitor.MP4. A dry run shows proposed names before any files change. Processing 73 videos takes about 20 minutes.
What is ffmpeg?
ffmpeg is a free, open-source command-line tool for working with video and audio files. In this workflow, Claude Code uses ffmpeg to extract still frames from each video. Claude cannot watch video directly, but it can analyze images, so ffmpeg pulls screenshots that Claude uses to understand what each clip contains.
If you’ve ever ended up with a folder full of 1.MP4, 2.MP4, 3.MP4… you know the problem. If you have photos rather than videos, the simpler version is in How to Rename Photos Automatically. Same capability, no ffmpeg needed. Finding a specific clip later means scrubbing through every file until you recognize the right one. Or just giving up and using whatever’s easiest to grab.
This workflow fixes that. You point Claude Code at a folder of videos, it analyzes the content of each one, and renames them with descriptive names like 064_graduate-devin-explaining-heat-pump-visitor.MP4. For 73 videos, the whole thing takes about 20 minutes.
What you need before you start
Claude Code is an AI coding assistant made by Anthropic that runs in your terminal. You give it instructions in plain English, and it writes and runs code to carry them out. It can read files, run commands, and analyze images. If you haven’t installed it yet, start at the Claude Code docs.
ffmpeg is a free, open-source command-line tool for working with video and audio files. Claude Code uses it here to pull still frames out of your videos. Claude can’t watch a video directly, but it can analyze images. So ffmpeg pulls a few screenshots from each clip, and Claude looks at those.
Install ffmpeg before running this workflow:
- Mac:
brew install ffmpeg(requires Homebrew) - Ubuntu/Debian:
sudo apt install ffmpeg - Windows: Download from ffmpeg.org/download.html and add it to your PATH
Confirm it’s installed by running ffmpeg -version in your terminal. You should see version info, not an error.
What this workflow does
For each video in your folder, Claude will:
- Use ffmpeg to extract three frames (beginning, middle, end)
- Look at each frame visually and identify what’s happening
- Note who’s in the shot, what equipment or activity is visible, any readable text
- Generate a descriptive filename based on what it found
- Show you a dry run first (a list of proposed renames before anything changes)
- Apply the renames once you confirm
A dry run means Claude shows you exactly what it plans to do before doing it. You get to review the full list of proposed new names and say yes or no. Nothing gets renamed until you approve.
The prompt
Open Claude Code, then tell it what you need:
I need to rename these videos based on what's in them. They're here: /path/to/your/videos/
That’s the whole prompt. Claude figures out the rest.
If you have related photos from the same event with already-good filenames, you can point Claude at those too. It will use the photo names as context clues:
I need to rename these videos based on what's in them. They're here: /path/to/your/videos/
For context, check out the photo filenames here: /path/to/related/photos/
What the results look like
Here’s a real example from a 73-video batch filmed at a workforce training graduation event.
Before:
1.MP4
2.MP4
3.MP4
... (70 more)
After:
001_graduates-leak-detector-demo-fistbump-visitor.MP4
002_attendees-watching-niagara-training-video.MP4
003_graduate-visitor-conversation-city-backdrop.MP4
017_graduate-explaining-heat-pump-trainer.MP4
045_smart-bulbs-multicolor-pink-white-blue.MP4
064_graduate-devin-explaining-heat-pump-visitor.MP4
073_graduate-smart-lighting-demo-visitor-cap.MP4
Claude caught details like nametags, equipment brands, and what kind of interaction was happening (presenting vs. networking vs. hands-on demo). It kept a consistent naming format across the whole batch.
Why Claude can actually do this
Claude is multimodal, meaning it can process images, not just text. When Claude Code analyzes a frame from your video, it’s genuinely looking at it and describing what it sees. It’s not guessing based on the filename or metadata. It reads the visual content.
ffmpeg’s role is to pull those frames out. A typical video runs at 24-60 frames per second. Pulling one frame from the start, one from the middle, and one from the end gives Claude enough to understand what the clip is about without processing thousands of images.
When this is worth doing
- Event footage with camera-generated filenames (
DSC_0041.MP4,MVI_3822.MOV) - Downloaded videos with auto-generated titles
- Any batch where you want to find specific clips later without scrubbing
- When you’re matching video filenames to a set of already-named photos
It’s not worth the setup for 5 videos you’ll watch once. It’s very worth it for anything you’ll search through later.
A note on the tedium problem
The deeper reason this matters: “I’ll rename those videos eventually” almost always means never. The friction of opening 73 files one by one is enough to keep them in numbered chaos. The reorganization sits undone because you have other things to do.
What Claude Code is actually good at is exactly this category of task. Not the impressive stuff. The tedious stuff. The work that’s technically simple but takes long enough that you’d rather skip it.
Running this workflow takes about as long as asking the question. The 20 minutes is Claude doing the analysis. You just review the dry run and say yes.
Further reading
- Claude Code documentation for installation and getting started
- ffmpeg documentation if you want to understand what’s happening under the hood
- ffmpeg download page for Windows installation
- Homebrew for Mac users who need to install it first
tags: claude-code, ffmpeg, video organization, batch rename, file management, workflow automation
Common Questions
Can Claude Code rename video files based on their content?
Yes. Claude Code uses ffmpeg to extract frames from each video, then analyzes those frames visually. It identifies people, activities, equipment, and readable text, then generates descriptive filenames. The whole process runs from a simple prompt.
How does Claude Code analyze video content?
Claude cannot watch video directly. Instead, ffmpeg extracts three still frames per clip (beginning, middle, end). Claude’s multimodal vision analyzes each frame to understand what the clip is about. Three frames is usually enough to capture the main subject.
How do I install ffmpeg for video renaming?
On Mac: brew install ffmpeg (requires Homebrew). On Ubuntu/Debian: sudo apt install ffmpeg. On Windows: download from ffmpeg.org and add to PATH. Verify with ffmpeg -version.
What is a dry run in file renaming?
A dry run shows a list of proposed name changes before applying them. Claude displays the current filename next to the suggested new name for every file. Nothing gets renamed until you review the list and approve. This prevents unintended changes.
A note from Alex: hi i’m alex - i run code for creatives. i’m a writer so i feel that it is important to say - i had claude write this piece based on my ideas and ramblings, voice notes, and teachings. the concepts were mine but the words themselves aren’t. i want to say that because its important for me to distinguish, as a writer, what is written ‘by me’ and what’s not. maybe that idea will seem insane and antiquated in a year, i’m not sure, but for now it helps me feel okay about putting stuff out there like this that a) i know is helpful and b) is not MY voice but exists within the umbrella of my business and work. If you have any thoughts or musings on this, i’d genuinely love to hear them - its an open question, all of this stuff, and my guess is as good as yours.