How do I crop a video clip?
I've recorded a video using recordmydesktop
, but have unfortunately chosen for capturing the whole screen (1600*896) instead of a small part with geometric 900*690.
How do I crop this video? Preferably in the editor I'm using, Kdenlive, to minimize quality loss. I've tried the Crop, Pan & Zoom and Scale0tilt effects, modifying the pixel ratio, movie size inside project settings options without success. A step-by-step guide would be preferred or at least some hints.
Cropping a video can be done multiple ways in Kdenlive.
One way is to set the project to the desired size then set the video to original size so that only the cropped part is visible in the project.
How to do it:
- Start a new project with the desired crop size. If no profile available with required size you should create a new project profile by clicking on Manage project profiles button.
Then click on create new profile.
Change the profile settings as required in your case make it 900x690.
- Import your clip to project bin and add it to timeline.
- Add Position and Zoom effect to your clip.
Click on adjust to original size in the effect settings.
Change the X and Y to adjust the position of the cropped region as desired.
If nothing else works, you could use mencoder
. It is not an interactive editor and will result in re-encoding of the video. If you can live with that, here's how: mencoder -oac pcm -ovc x264 -vf crop=900:690:0:0 -o output.mp4 input.mp4
where the :0:0 part is upper left coordinates of the cropped area. You may want to play around with -oac and -ovc options and see which codecs produce the best results. Use mencoder -ovc help -oac help
to get a listing of available options.