Prompt Details
Model
(claude-5-opus)
Token size
1,048
Example input
[width x height, fps, duration, audio yes or no]: 1920x1080, 30 fps, 3m20s, audio yes
[1080x1920 unless I say otherwise]: 1080x1920
[nothing may be cropped away / the subject is centred / crop to a given point]: nothing may be cropped away
[an SRT file, or none]: none
[YouTube Shorts / Instagram Reels / TikTok]: YouTube Shorts
Example output
1. Command
ffmpeg -i input.mp4 -filter_complex "[0:v]scale=1080:-2,gblur=sigma=20[bg];[0:v]scale=1080:-2[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2,crop=1080:1920,format=yuv420p[v]" -map "[v]" -map 0:a? -c:v libx264 -crf 20 -preset medium -c:a aac -b:a 128k -movflags +faststart out.mp4
2. Filtergraph in words: the source is scaled to the target width twice, once into the blurred background and once as the sharp foreground, then overlaid centred. Blurring happens on the small frame first, before any upscale, so the band does not stretch. The final crop pins the frame to exactly 1080x1920.
3. Captions: none given, so no ASS step is needed.
4. Verify
ffprobe -v error -select_streams v:0 -show_entries stream=width,height,codec_name -of csv=p=0 out.mp4 should print 1080,1920,h264. Then ffprobe -v error -show_entries format=duration -of csv=p=0 out.mp4 should match the source within one frame, and ffmpeg -v error -i out.mp4 -f null - should print nothing at all.
5. Pitfalls here: odd source height producing 1080x1918 unless the final crop pins it, and an audio map that drops audio if the source has none. The -map 0:a? form only maps audio when it exists.
6. This command does not do semantic framing. The crop window is geometric, so a subject that moves across the frame still needs a fixed band or an editor.
Get this prompt + 9 more with SelectFrom $14/mo · Cancel anytimeFrom $14/mo · Cancel anytime
View SelectBy purchasing this prompt, you agree to our terms of service
CLAUDE-5-OPUS
Turns a landscape or square source into a vertical shorts-ready master by writing the exact ffmpeg command: blurred-background fill, focal-point crop, or letterbox pad, with optional burned-in captions. It explains the filtergraph order, re-checks the output with ffprobe instead of trusting an exit code, and names the known traps including the libass caption canvas and Windows drive-colon escaping.
...more
Added 2 weeks ago
