[Ffmpeg-devel] How to get the current bitrate?

Luca Abeni lucabe72
Fri Jul 29 09:26:58 CEST 2005

Hi M?ns,

On Thu, 2005-07-28 at 16:42 +0100, M?ns Rullg?rd wrote:
> Luca Abeni said:
> > I am trying to understand such spikes and to do this I am currently
> > using tcpstat to monitor the actual bitrate streamed to the network.
> > But I'd like to read the "current" bitrate (not the average one)
> > directly from the codec... To respect the "maximum rate" constraint
> > libavcodec needs some kind of estimation of the current bitrate, right?
> > Is it possible to read it in some way?
> You should be streaming at a constant rate, no matter what the instantaneous
> rate of the video is.  That's what the RC buffer is all about.
Yes, I know the theory... :)
The problem is that the istantaneous rate of the encoded video becomes
sometimes too high, and if I stream at a constant rate some packets will
arrive "too late" and the receiver will drop the frame. (in other words,
if I stream at the "expected bitrate", sometime I have to buffer more
than rc_buffer_size... Am I misunderstanding the RC buffer?)

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

More information about the ffmpeg-devel mailing list