Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to use FFMPEG to resize a video using -s 480x272. Unfortunately something is causing FFMPEG to output a video with 483x272.

For those curious this is the command I am using:

ffmpeg -i 'BirdyNamNam.mp4' -an -pass 1 -vcodec libx264 -vpre fastfirstpass -b 512k -bt 512k -threads 2 -s 480x272 BirdyNamNam1256333420.mp4

ffmpeg -i 'BirdyNamNam.mp4' -acodec libfaac -ab 96k -pass 2 -vcodec libx264 -vpre hq -b 512k -bt 512k -threads 2 -y -s 480x272 BirdyNamNam1256333420.mp4

Is FFMPEG trying to maintain the aspect ratio or something like that? Any advice is appreciated.

share|improve this question

migrated from stackoverflow.com Oct 26 '09 at 6:05

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Yes. You probably want -padbottom, -padtop, -padleft, -padright or--if you don't mind losing some of the frame---cropbottom, -croptop, -cropleft and -cropright.

share|improve this answer
    
These options have been removed from recent FFmpeg, so this answer is no longer valid. The -vf "pad=width:height:x:y" (or crop) filter should be used instead. See: How can I crop a video with ffmpeg? –  slhck Jan 10 '13 at 10:01

You can force FFmpeg to respect your size by adding this to your command:

-aspect:v 480:272
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.