[FFmpeg-user] rc buffer overflow (codecs mpeg4, flv)

Michael Niedermayer michaelni at gmx.at
Fri Apr 13 17:38:57 CEST 2012

On Fri, Apr 13, 2012 at 06:11:03PM +0300, Andrey Utkin wrote:
> 2012/4/13 Michael Niedermayer <michaelni at gmx.at>:
> > But if you really want CBR h263/flv, this can be implemented
> > If you are interrested i can explain how it can be done.
> Thanks, no necessity in very-very strict bitrate const-ness. But if
> you have time, i'd be glad if you explain what this means and share
> some references to read.

supporting minrate requires that the encoder can fill frames with
something to achive that minrate if even at the highest quality the
frame is too small bitrate wise.
This is achived by stuffing the frame with something. For H.263
this is done by MCBPC stuffing (see the spec, it should be quite easy
to unnderstand).
for the implementation side grep for stuffing_count in mpegvideo_enc.c
theres code to handle mpeg1/2/4 but not h263/flv

also, as you mentioned x264, -vcodec flv is h263 not h264, for h264 in
flv you need -vcodec libx264 which might support stuffing but its
still just filling frames with "zeros" to match the minrate.

stuffing makes most sense with hardware players that just cant play
mpeg1/2 that has a too low bitrate, i dont think this ever applies
to flv neither h263 nor h264 style.


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120413/a7bd77aa/attachment.asc>

More information about the ffmpeg-user mailing list