[Ffmpeg-devel] Decreased resolution ignored during transcoding

Micah Galizia micahgalizia
Thu Jan 11 06:29:15 CET 2007

Hello all,

Recently I've encountered a problem transcoding video using ffmpeg.  Before
I start, I did see a previous post about the same problem at
but the original poster never followed up!  I appologize if I'm repeating
someone elses bug, but I looked and I didn't find anything!

Anyways, I'm trying to transcode from mpeg4 video/mp3 audio in an avi to
xvid/aac in an mp4.  This worked for me until the Debian packages were
recently upgraded.  I checked out a fresh copy from SVN just now and the
problem persists.  The problem is that that the specified output resolution
is ignored.  The command line I used was:

ffmpeg -f mp4 -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -ab
96 -acodec aac -s 320x180 -aspect 16:9 -i input.avi output.mp4

The "banner" that ffmpeg displays on the screen is:

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --prefix=/usr --libdir=${prefix}/lib
--shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared
--enable-mp3lame --enable-gpl --enable-faad --mandir=${prefix}/share/man
--enable-vorbis --enable-pthreads --enable-faac --enable-xvid --enable-dts
--enable-amr_nb --enable-amr_wb --enable-pp --enable-libogg --enable-libgsm
--enable-x264 --enable-a52 --extra-cflags=-Wall -g -fPIC -DPIC
  libavutil version: 49.1.0
  libavcodec version: 51.28.0
  libavformat version: 51.7.0
  built on Jan  7 2007 09:13:54, gcc: 4.1.2 20061115 (prerelease) (Debian

Seems stream 0 codec frame rate differs from container frame rate:
23.98(65535/2733) ->
23.98 (23976024/1000000)
Input #0, avi, from 'input.avi':
  Duration: 00:42:59.4, start: 0.000000, bitrate: 1138 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 608x336, 23.98 fps(r)
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Output #0, mp4, to 'output.mp4':
  Stream #0.0: Video: xvid, yuv420p, 608x336, q=3-5, 0 kb/s, 23.98 fps(c)
  Stream #0.1: Audio: aac, 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding

So, as you can see, the output stream is set to the input streams
resolution.  Also, if I set the resolution to a greater value it is still
ignored.  So no matter what I do with the -s flag, my requested resolution
is ignored. I have access to a debugger, and I know how to use it, so if
anyone can suggest where I should be looking, I'll take a look!

Thanks in advance!
"The mark of an immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for one."
--W. Stekel

More information about the ffmpeg-devel mailing list