Programster's Blog

Tutorials focusing on Linux, programming, and open-source

FFMPEG - Crop Video

The following command will crop your video to the left side of the video using the first 1920 x 1080 pixels. This is useful if you accidentally recorded two 1080p monitors and just want the left one.

ffmpeg \
  -i input.mp4 \
  -filter:v "crop=1920:1080:0:0" \
  output.mp4

The following command will keep the right monitor (assuming 2 x 1920 x 1080p monitors)

ffmpeg \
  -i input.mp4 \
  -filter:v "crop=1920:1080:1920:0" \
  output.mp4

Obviously change the 1920 and 1080 to your screen resolutions, and the last two numbers are the x/y coordinate to crop from.

Last updated: 2nd March 2020
First published: 4th March 2020