Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Oct 26 '09 at 6:05

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

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

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

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

Your Answer


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.