- Home
- Claude video editing
- Reframe to 9:16
On this page
What you need
- Claude Code in a terminal, pointed at a folder with your footage.
- ffmpeg and ffprobe on your PATH.
- A local Whisper model for word-level transcripts.
- Python with numpy, soundfile and OpenCV for the checks.
Measure the face per shot
Sample frames every couple of seconds, detect the face, and take the median position for each shot. One median for the whole clip is why heads get cut off.
Track the face
Sample a frame every 2 s with a face landmarker (MediaPipe works) and record the centre and height.
Median per shot
Group the samples by shot and take each shot's own median. A clip-wide median leaves faces 150 to 250 px off-centre.
Measure the head top
Find the crown from the picture, where the wall colour gives way to hair, not from a model. Landmark arithmetic overshoots a bald head by about 170 px.
Crop
A 9:16 window, face centred horizontally, face centre at about 40% of the height for a close-up.
Check the output
Measure head tops and face offsets on the finished video. Any cut crown fails the build.
ffmpeg -i shot.mp4 -vf "crop=ih*9/16:ih:1104-ih*9/32:0,scale=1080:1920" out/shot_9x16.mp4Framing rules that hold up
One placement rule per element, measured per shot, and a still of every frame state before any video renders.
- Face first: the first frame of every short is the speaker, never a title card.
- Slow push only, about 2%. No punch-in bursts.
- In a split screen, the face re-centres in its own window with the crown kept.
- Before any render, Claude renders stills of every frame state. You look. Then video.
Every Claude video editing guide
Frequently asked questions
How do I auto reframe a video to 9:16?
Detect the face in each shot, take that shot's median face position, and crop a 9:16 window around it with ffmpeg. Claude Code runs the detection and writes the crop for every shot.
How do I resize a video for Reels without cutting off heads?
Crop per shot around the measured face rather than centre-cropping the whole video, and check head tops on the finished file.
What resolution is 9:16?
1080 x 1920 for Reels, Shorts and TikTok.
Want finished ads, not editing sessions?
Director by Sprites is a full creative team for your startup. Every Monday you get finished, on-brand video ads, reviewed by a human. Strategy, hooks, scripts, shooting and editing, end to end. You never write a prompt. You pick the winners. Sprites ships the campaigns. In private beta.