FFMPEG Command to Crop or Clip Portion of Video Using Crop Filter in Windows 10 Full Tutorial For Beginners


Use the crop filter:

ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4

Where the options are as follows:

  • out_w is the width of the output rectangle
  • out_h is the height of the output rectangle
  • x and y specify the top left corner of the output rectangle



Example 1


To crop a 80×60 section, starting from position (200, 100):

ffmpeg -i in.mp4 -filter:v "crop=80:60:200:100" -c:a copy out.mp4



Example 2


To crop the bottom right quarter:

ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4

This is the same as:

ffmpeg -i in.mp4 -filter:v "crop=320/2:240/2:320/2:240/2" -c:a copy out.mp4

Which is the same as:

ffmpeg -i in.mp4 -filter:v "crop=160:120:160:120" -c:a copy out.mp4



Example 3


Crop 20 pixels from the top, and 20 from the bottom:

 ffmpeg -i in.mp4 -filter:v "crop=in_w:in_h-40" -c:a copy out.mp4
  • The filter will automatically center the crop if x and y are omitted such as in this example.


You can take a crop (heh heh) and preview it live with ffplay:

ffplay -i input -vf "crop=in_w:in_h-40"

Leave a Reply