How to crop videos using ffmpeg
Sometime you might want a specific resolution for a video(ofcourse, smaller than the original). You can either resize the video and degrade the quality or you can just crop the video to achieve that resolution. This might affect the content of the video but if the content is mostly centric then it is probably a good option.
Suppose, we have a video of resolution 1920x1200 and we want to convert into a video of resolution 1200x1024. This is how you will do it using ffmpeg.
[shredder12]$ ffmpeg -i inputfile.avi -croptop 88 -cropbottom 88 -cropleft 360 -cropright 360 outputfile.avi
Just take a look at the original resolution the width of the video was 1920 pixels and we want it to be 1200, the difference is 720 so we removed 360 pixels each from right and left. Similarly, we did the same for the height.





. 





















3 Comments
Post new comment