Bitrate control does not work with video codec set to
h264. With the following command:
ffmpeg -b 192 -ab 48 -bufsize 256 -i "$1" -vcodec h264
-acodec aac -s 360x288 -cropleft 20 -cropright 20
-cropbottom 16 -croptop 16 -ac 1 -ar 22050 "$dest_file"
The expected result is that a file with an average
total bitrate of around 250kbps will be generated.
The actual result is a file with average total bitrate
of around 550kbps.
FFmpeg correctly does correctly report the bitrates
that is is attempting to achieve. Complete output follows:
ffmpeg version CVS, build 3342336, Copyright (c)
2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-libogg
--enable-vorbis --enable-theo
ra --enable-faad --enable-faac --enable-xvid
--enable-x264 --enable-gpl --disabl
e-ffserver --disable-ffplay
built on Dec 21 2005 15:44:47, gcc: 3.3.4
Input #0, avi, from 'ident_oil_music-mpeg4.avi':
Duration: 00:00:15.5, start: 0.000000, bitrate: 2708 kb/s
Stream #0.0, 25.00 fps(r): Video: mpeg4, yuv420p, 720x576
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 192 kb/s
File 'test.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'test.mp4':
Stream #0.0, 25.00 fps(c): Video: h264, yuv420p,
320x256, q=2-31, 192 kb/s
Stream #0.1: Audio: aac, 22050 Hz, mono, 48 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[h264 @ 0x8498990]no need for a SAR
[h264 @ 0x8498990]VBV maxrate or buffer size specified,
but not both.
[h264 @ 0x8498990]using cpu capabilities MMX MMXEXT SSE
3DNow!
Press [q] to stop encoding
frame= 43 q=31.0 Lsize= 126kB time=1.7 bitrate=
598.6kbits/s
video:113kB audio:11kB global headers:0kB muxing
overhead 1.430395%
[h264 @ 0x8498990]slice I:4 Avg QP:26.00 size:
6042 PSNR Mean Y:55.97 U:54.49 V:54.57 Avg:55.42
Global:41.77
[h264 @ 0x8498990]slice P:39 Avg QP:30.54 size:
2321 PSNR Mean Y:38.82 U:37.11 V:37.10 Avg:38.16
Global:37.68
[h264 @ 0x8498990]mb I I16..4: 51.9% 0.0% 48.1%
[h264 @ 0x8498990]mb P I16..4: 7.9% 0.0% 6.1%
P16..4: 26.6% 17.2% 7.5% 0.0% 0.0% skip:34.7%
[h264 @ 0x8498990]final ratefactor: 33.45
[h264 @ 0x8498990]PSNR Mean Y:40.418 U:38.726 V:38.722
Avg:39.768 Global:37.930 kb/s:533.39
This bug was encountered with the CVS version of ffmpeg
as of December 21st 2005.
This Sourceforge bug tracker here has been abandoned many years ago.
Our new tracker can be found through http://www.ffmpeg.org/bugreports.html