Convert a video to a fixed screen size by cropping and resizing
28
votes
4
answers
60959
views
I've tried to figure this out myself, but the myriad of options just baffles me.
I want to use ideally either
ffmpeg
or mencoder
(or something else, but those two I know I have working) to convert any incoming video to a fixed screen size.
If the video is wider or too short for it, then centre crop the video. If it's then not the right size, the resize up or down to make it exactly the fixed screen size.
The exact final thing I need is 720x480 in a XVid AVI with an MP3 audio track.
I've found lots of pages showing how to resize to a maximum resolution, but I need the video to be exactly that resolution (with extra parts cropped off, no black bars).
Can anyone tell me the command line to run - or at least get me some/most of the way there? If it needs to be multiple command lines (run X to get the resolution, do this calculation and then run Y with the output of that calculation) I can script that.
Asked by Andy Jeffries
(283 rep)
Mar 16, 2015, 08:54 AM
Last activity: Mar 10, 2017, 06:19 PM
Last activity: Mar 10, 2017, 06:19 PM