Thursday, February 23, 2012

Crop Using FFMPEG

The ffmpeg parameter for cropping is:

-vf crop=1920:800:0:140

This takes a 1920x1080 resolution input, and crops 140px off of the top and bottom. The syntax is:

-vf crop=x:y:left_and_right:top_and_bottom

Here is an example:

ffmpeg -i INPUT.mkv -acodec copy -vcodec libx264 -crf 0 -vf crop=1920:800:0:140 OUTPUT.mkv

This takes INPUT.mkv, keeps the audio, transcodes it with x264 in lossless mode, and crops 140px from the top and bottom of the video.

1 comment:

  1. iDealshare VideoGo is not only a video converter but also a professional Video Cropper app which has both Mac and Windows version. It can easily crop all kinds of video files whatever it is in AVI, MP4, MKV, VOB, WMV, MOV, FLV, 3GP, SWF, OGV, WebM, RMVB, Apple ProRes, MXF, AVCHD,etc

    Step by step guide at