Cropping / Masking a Video for Kdenlive

I was helping a friend with creating a video and we need to mask out the distracting content around the video subject. If I had this problem with a static image I would use Gimp and the ‘Crop’ tool but I couldn’t find anything in Kdenlive to allow me to crop out a small square of a video, so following some advice on a forum I used mencoder.

I first took a screenshot of the video to determine the dimensions I needed for the crop. I made sure that Gimp was showing just the video dimensions (1280×720) without any window decorations. Then I used the crop tool to draw a square around the portion of the video I wanted to keep. This allowed me to determine the width and height of the area I wanted to keep (600×600 in the example below) and also the x,y co-ordinates for the starting point (300,50 in the example below).

With those values I used an mencoder command with the name of the video file as follows:

mencoder -oac pcm -ovc x264 -vf crop=600:600:300:50 -o cropped_video.mp4 original_video.MOV

Mencoder started processing the video and within a few seconds I had a cropped video that I could import into Kdenlive for compositing.

 

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>