[FFmpeg-user] rc buffer overflow (codecs mpeg4, flv)
Andrey Utkin
andrey.krieger.utkin at gmail.com
Fri Apr 13 15:14:18 CEST 2012
Hi. I encounter problems with flv encoder at desired bitrate.
Both ffmpeg.org and libav.org behave in same way.
It gives 'rc buffer underflow' warnings (more times on high-motion input video).
Visually, it manifests as remarkable picture quality degradation after
such message is produced.
Is this really a bug, or my misuse of parameters? If it's a bug, is it
known, and how can i help fixing it?
ffmpeg -i ~/big_buck_bunny_480p_surround-fix.avi -an -vcodec flv -s
192x144 -b:v 100000 -maxrate 100000 -minrate 100000 -bufsize 100000
-y out.flv -loglevel debug
ffmpeg version N-39765-g84d7461 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 13 2012 15:32:36 with gcc 4.5.3
configuration: --enable-encoder=pcm_s16be --enable-encoder=libx264
--enable-encoder=libfaac --enable-static --enable-shared
--enable-libx264 --enable-libfaac --enable-libfreetype
--enable-nonfree --disable-zlib --enable-gpl --extra-libs=
--extra-cflags= --extra-ldflags= --disable-debug
--enable-optimizations --enable-yasm --enable-asm
libavutil 51. 46.100 / 51. 46.100
libavcodec 54. 14.101 / 54. 14.101
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 69.101 / 2. 69.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
libpostproc 52. 0.100 / 52. 0.100
[avi @ 0x9386380] Format avi probed with size=2048 and score=100
[AVI demuxer @ 0x93868c0] use odml:1
[avi @ 0x9386380] All info found
Input #0, avi, from '/home/krieger/big_buck_bunny_480p_surround-fix.avi':
Duration: 00:09:56.45, start: 0.000000, bitrate: 2957 kb/s
Stream #0:0, 1, 1/24: Video: mpeg4 (Simple Profile) (FMP4 /
0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 1/24, 24 tbr, 24
tbn, 24 tbc
Stream #0:1, 1, 1/56000: Audio: ac3 ([0] [0][0] / 0x2000), 48000
Hz, 5.1(side), s16, 448 kb/s
[buffer @ 0x938dbe0] w:854 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1
sws_param:flags=2
[scale @ 0x93c1840] w:854 h:480 fmt:yuv420p sar:1/1 -> w:192 h:144
fmt:yuv420p sar:427/320 flags:0x4
[flv @ 0x93c0e40] intra_quant_bias = 0 inter_quant_bias = -64
[mpeg4 @ 0x938c600] detected 1 logical cores
Output #0, flv, to 'out.flv':
Metadata:
encoder : Lavf54.3.100
Stream #0:0, 0, 1/1000: Video: flv1 ([2][0][0][0] / 0x0002),
yuv420p, 192x144 [SAR 427:320 DAR 427:240], 1/24, q=2-31, 100 kb/s, 1k
tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> flv)
Press [q] to stop, [?] for help
[flv @ 0x93c0e40] rc buffer underflow
Last message repeated 9 times
vbv buffer overflow q=2.1 size= 3773kB time=00:04:59.50 bitrate=
103.2kbits/s
[flv @ 0x93c0e40] vbv buffer overflow
Last message repeated 2 times
rc buffer underflow q=10.7 size= 5280kB time=00:06:59.33 bitrate=
103.2kbits/s
[flv @ 0x93c0e40] rc buffer underflow
Last message repeated 6 times
frame=10455 fps=112 q=11.0 Lsize= 5488kB time=00:07:15.62 bitrate=
103.2kbits/s
video:5325kB audio:0kB global headers:0kB muxing overhead 3.071879%
Received signal 2: terminating.
=================
libav.org
=================
avconv -i ~/big_buck_bunny_480p_surround-fix.avi -an -vcodec flv -s
192x144 -b:v 100000 -maxrate 100000 -minrate 100000 -bufsize 100000
-y out.flv -loglevel debug
avconv version v0.8-1396-gde7f22a, Copyright (c) 2000-2012 the Libav developers
built on Apr 13 2012 15:27:27 with gcc 4.5.3
configuration: --enable-encoder=pcm_s16be --enable-encoder=libx264
--enable-encoder=libfaac --enable-static --enable-shared
--enable-libx264 --enable-libfaac --enable-libfreetype
--enable-nonfree --disable-zlib --enable-gpl --extra-libs=
--extra-cflags= --extra-ldflags= --disable-debug
--enable-optimizations --enable-yasm --enable-asm
libavutil 51. 27. 2 / 51. 27. 2
libavcodec 54. 11. 1 / 54. 11. 1
libavformat 54. 2. 0 / 54. 2. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
[avi @ 0x846da80] Probed with size=2048 and score=100
[avi @ 0x846da80] All info found
Input #0, avi, from '/home/krieger/big_buck_bunny_480p_surround-fix.avi':
Duration: 00:09:56.45, start: 0.000000, bitrate: 2957 kb/s
Stream #0.0, 1, 1/24: Video: mpeg4 (Simple Profile), yuv420p,
854x480 [PAR 1:1 DAR 427:240], 1/24, 24 tbn, 24 tbc
Stream #0.1, 1, 1/56000: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
[buffer @ 0x8474f00] w:854 h:480 pixfmt:yuv420p
[scale @ 0x849fea0] w:854 h:480 fmt:yuv420p -> w:192 h:144 fmt:yuv420p flags:0x4
[mpeg4 @ 0x846f940] detected 1 logical cores
Output #0, flv, to 'out.flv':
Metadata:
encoder : Lavf54.2.0
Stream #0.0, 0, 1/1000: Video: flv, yuv420p, 192x144 [PAR 427:320
DAR 427:240], 1/24, q=2-31, 100 kb/s, 1k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> flv)
Press ctrl-c to stop encoding
[flv @ 0x8475be0] rc buffer underflow
Last message repeated 24 times
rc buffer underflow q=31.0 size= 27kB time=1.71 bitrate= 129.0kbits/s
[flv @ 0x8475be0] rc buffer underflow
Last message repeated 9 times
vbv buffer overflow q=12.7 size= 3766kB time=299.04 bitrate= 103.2kbits/s
[flv @ 0x8475be0] vbv buffer overflow
Last message repeated 2 times
^Cframe= 9256 fps=104 q=10.4 Lsize= 4853kB time=385.67 bitrate=
103.1kbits/s
video:4709kB audio:0kB global headers:0kB muxing overhead 3.075800%
Received signal 2: terminating.
--
Andrey Utkin
More information about the ffmpeg-user
mailing list