>FFmpegLab Start free
FFmpeg Guide

How to crop video with FFmpeg

Cut a clip down to an exact region with the crop filter — center it, reframe to a square or vertical aspect ratio, or strip black bars off the edges.

The crop filter takes crop=w:h:x:y — the output width and height, then the top-left corner where the crop begins. The corner is optional; leave it off and FFmpeg centers the crop automatically. Every value can use the input dimensions iw and ih as variables, which is what makes centering and aspect-ratio crops clean.

Key takeaways

Crop to an exact size, centered

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
# 1280x720 region, centered automatically
ffmpeg -i in.mp4 -vf "crop=1280:720" -c:a copy out.mp4

# exact region starting 100px from left, 50px from top
ffmpeg -i in.mp4 -vf "crop=1280:720:100:50" -c:a copy out.mp4

Crop to a square (1:1) or vertical (9:16)

Reframing for Instagram or TikTok is the most common reason to crop. Drive the math off the input height so it works on any source resolution:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
# square, centered
ffmpeg -i in.mp4 -vf "crop=ih:ih" -c:a copy square.mp4

# vertical 9:16 from a landscape source, centered
ffmpeg -i in.mp4 -vf "crop=ih*9/16:ih" -c:a copy vertical.mp4

Remove black bars (letterboxing)

If a clip has baked-in black bars, the cropdetect filter inspects the frames and prints a suggested crop you can paste straight into a second pass:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
# step 1: detect the content region
ffmpeg -i in.mp4 -vf cropdetect -f null -

# step 2: apply the crop=... it printed
ffmpeg -i in.mp4 -vf "crop=1920:800:0:140" -c:a copy out.mp4

Crop visually instead

FFmpegLab lets you drag a crop box over the preview and writes the matching crop=w:h:x:y for you — no guessing pixel offsets — and it runs fully offline. Pair it with scaling to hit an exact export resolution, or compress the result for delivery.

✦  Fresh from the render queue

Better FFmpeg workflows, delivered.

Get practical commands, new templates, and deep-dive guides for the edits that are usually hardest to get right.

✓  Copy-pasteable commands    ✓  Editor templates    ✓  No noise
One useful email at a time.

Crop and reframe video — in your browser.

Free in your browser — nothing to install, nothing uploaded.