The subject sits in the left third of the frame. A burned-in logo haunts the corner. The 16:9 export carries pillarbox bars it never needed. Cropping cuts pixels away — unlike trimming (which cuts time) — and it's the difference between "zoom-enhance" wishful thinking and actually cleaning up a frame.
The crop filter
```bash ffmpeg -i input.mp4 -vf "crop=w:h:x:y" -c:a copy output.mp4 ```
- `w:h` — output width and height in pixels - `x:y` — the top-left corner of the crop region within the source
Example — a 1920×1080 clip whose action lives center-left, watermark bottom-right:
```bash ffmpeg -i in.mp4 -vf "crop=1440:1080:0:0" -c:a copy out.mp4 ```
That takes a 1440-wide region from the left edge: the watermark (bottom-right) is gone, the subject remains. The output's aspect ratio changed (1440:1080 = 4:3) — sometimes that's the point; sometimes you re-letterbox to 16:9 after (see our aspect-ratio guide).
The four jobs cropping does
1. Removing watermarks and logos
A corner logo occupies a known region — crop it off and lose a strip of frame. `crop=w:h:0:0` (left-anchored), `crop=w:h:x:0` (top strip removal), or anchor to the opposite corner as needed. The trade is honest: the watermark region takes real frame with it. Center watermarks can't be cropped without losing the subject — those need blur instead:
```bash # box-blur a region (x=1600,y=940,w=300,h=130 area on 1080p) ffmpeg -i in.mp4 -filter_complex \ "[0:v]crop=300:130:1600:940,boxblur=10[fg];[0:v][fg]overlay=1600:940" out.mp4 ```
2. Cutting pillarbox/letterbox bars
Auto-detect and remove the black bars a player or converter added:
```bash ffmpeg -i in.mp4 -vf "cropdetect=24:2:0" -f null - 2>&1 | grep crop # then apply the suggested crop=w:h:x:y from the last line ```
`cropdetect` prints the optimal crop for each frame — take the last (or most common) suggestion and apply it manually. This recovers the true frame under the bars.
3. Reframing / digital zoom
Crop tighter on the subject, effectively a zoom: `crop=1280:720:320:180` on 1920×1080 centers a 2/3-size window. Downside: upscaling back to delivery resolution softens the image — a 1280-crop delivered at 1280 is fine; delivered at 1920 it visibly degrades. Zoom in camera when you can; crop when you must.
4. Format conversion (16:9 → 9:16 and friends)
Vertical platforms want vertical frames (see our aspect-ratio guide for the full map). Cropping a landscape clip to 9:16 loses the frame's sides — center-crop with:
```bash ffmpeg -i in.mp4 -vf "crop=ih*9/16:ih" -c:a copy out.mp4 ```
The expression keeps full height, computes width from it. Works when the subject stays centered; fails when it wanders off the sides — that's what tracking auto-reframe in editors is for.
Even dimensions matter
Most codecs need even width/height. If your `cropdetect` result is odd, subtract one (1441→1440). FFmpeg errors on odd crops with cryptic messages; rounding evens avoids the whole genre.
Quality economics
Cropping re-encodes the video stream (audio copies free). One crop = one compression generation — do it as part of your final export, not as a standalone pass before more edits. Stack crop with scale, fps, and other filters in one `-vf` chain and spend the generation once.
The takeaway
`crop=w:h:x:y` — anchor to a corner to shed watermarks and bars, center-crop for reframing and format conversion, blur what cropping can't remove. Keep dimensions even, re-encode once in the final pass, and crop deliberately: the pixels you cut are the story you're re-telling.
No comments yet