Turn raw clips into a clean, ready-to-post vertical reel (9:16) with Claude. It reframes landscape clips, trims dead air, joins clips, adds hook text and captions, and evens out the audio.
Upload your clips to Claude and say: "Edit this into a reel". Add details like "cut the silences", "add captions" or your hook text if you want them.
---
name: simple-reel-editor
description: Edit raw video clips into a clean, ready-to-post vertical reel (9:16) for Instagram, TikTok, YouTube Shorts or LinkedIn. Use when the user uploads video clips and says "edit this into a reel", "make this vertical", "cut this video", "add captions", "join these clips", or "make this a short".
---
# Simple Reel Editor
Turn raw clips into a clean vertical reel using ffmpeg. Keep edits simple, fast and reliable.
## Before editing
1. Check ffmpeg is available: `ffmpeg -version`. If missing, install it (`apt-get install -y ffmpeg` or `pip install imageio-ffmpeg`).
2. Inspect every uploaded clip: `ffprobe -v error -show_entries stream=width,height,duration,codec_type -of json INPUT`
3. If the user hasn't said, ask once (in a single message):
- Which parts to keep (or "cut the dead air / silences")
- Captions: yes or no
- Any text for the hook (first 2–3 seconds)
If they don't answer, use the defaults below.
## Defaults
- Output: 1080x1920 (9:16), 30 fps, H.264 + AAC, MP4
- Keep all clips in the order uploaded
- Trim the first and last 0.3s of silence/fumbles where obvious
- Captions: off unless asked
- Background music: none unless the user provides a track
## Step 1 — Make every clip vertical
Landscape or square clips: fill the frame with a blurred copy behind the video (never stretch).
```bash
ffmpeg -i in.mp4 -filter_complex \
"[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,boxblur=20:5[bg]; \
[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg]; \
[bg][fg]overlay=(W-w)/2:(H-h)/2,fps=30,format=yuv420p[v]" \
-map "[v]" -map 0:a? -c:v libx264 -crf 20 -preset medium -c:a aac -b:a 160k -ar 48000 v1.mp4
If the clip is already 9:16, just normalize it: -vf "scale=1080:1920,fps=30,format=yuv420p".
If a clip has no audio, add silence so joins don't break:
-f lavfi -i anullsrc=r=48000:cl=stereo -shortest
Cut a section: ffmpeg -ss START -to END -i v1.mp4 -c:v libx264 -crf 20 -c:a aac v1_cut.mp4
To find silences to remove:
ffmpeg -i v1.mp4 -af silencedetect=noise=-35dB:d=0.6 -f null - 2>&1 | grep silence_
Cut out gaps longer than ~0.6s, leaving ~0.15s of padding around speech.
printf "file '%s'\n" v1_cut.mp4 v2_cut.mp4 v3_cut.mp4 > list.txt
ffmpeg -f concat -safe 0 -i list.txt -c copy joined.mp4
All clips must share the same size, fps and audio settings (Step 1 handles this). If copy fails, re-encode instead of -c copy.
Put the hook on screen for the first 3 seconds, in the upper third:
ffmpeg -i joined.mp4 -vf "drawtext=text='YOUR HOOK HERE':fontcolor=white:fontsize=72:\
box=1:[email protected]:boxborderw=24:x=(w-text_w)/2:y=h*0.18:enable='between(t,0,3)'" \
-c:a copy hooked.mp4
Keep the hook under ~8 words. Escape apostrophes and colons in the text. Use a bold system font if available (fontfile=/path/to/font.ttf).
pip install faster-whisper and transcribe with word timestamps..srt with 2–5 words per caption line.ffmpeg -i hooked.mp4 -vf "subtitles=captions.srt:force_style='FontName=Arial,FontSize=14,Bold=1,\
PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,Outline=3,Alignment=2,MarginV=320'" \
-c:a copy captioned.mp4
Even out the volume:
ffmpeg -i captioned.mp4 -af loudnorm=I=-14:TP=-1.5:LRA=11 -c:v copy final.mp4
Background music (if provided), kept low under the voice:
ffmpeg -i final.mp4 -i music.mp3 -filter_complex \
"[1:a]volume=0.12,afade=t=out:st=DURATION_MINUS_2:d=2[m];[0:a][m]amix=inputs=2:duration=first[a]" \
-map 0:v -map "[a]" -c:v copy -c:a aac final_music.mp4
ffprobe the final file: confirm 1080x1920, has audio, sensible duration.ffmpeg -ss 1 -i final.mp4 -frames:v 1 check1.pngGive the user the final MP4 plus a one-line summary of what was done (length, cuts made, captions on/off). Offer one quick tweak (e.g. "want the hook text changed or captions bigger?").