Crop a Video with FFmpeg
Trim unwanted borders or content from the sides of a video using the crop filter, keeping the audio stream untouched.
Run ffmpeg -i input.mp4 -vf "crop=1280:720:100:60" -c:a copy output.mp4 to cut a 1280x720 area starting 100px from the left and 60px from the top.
01Command
Command
$ ffmpeg -i input.mp4 -vf "crop=1280:720:100:60" -c:a copy output.mp402What it does
The crop filter's four numbers are width, height, and the x/y position of the crop window's top-left corner — it cuts pixels, it doesn't resize. You can compute values with expressions, for example crop=in_w-200:in_h to trim 100 pixels from each side, or crop=iw/2:ih/2 to keep the center quarter. Audio is stream-copied so sound quality is unaffected, and unlike trimming (-t), the video duration stays exactly the same.
03Risk
!Warning: Keep both the width and height even numbers, or many encoders and players will reject the output; add round() in your expressions if needed.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ffmpeg(1) — Linux manual pageEvidence: Documents -vf filter chains and audio stream copying with -c:a copy.
- FFmpeg Filters Documentation (crop filter)Evidence: The crop filter takes width:height:x:y, where x and y locate the top-left corner of the crop window and expressions like in_w are supported.
Last verified: 2026-09-18 · Category: Media