[vlc-devel] Buffering when reading live HTTP streams

Robert Forsman bob.forsman at ericsson.com
Wed May 30 18:52:05 CEST 2012

On Tue, 29 May 2012 15:39:17 -0400
"Steinar H. Gunderson" <sgunderson at bigfoot.com> wrote:

> On Tue, May 29, 2012 at 02:03:27PM -0400, Robert Forsman wrote:
> > Probably the most important adjustment I would recommend is "buffer
> > based on time, not kilobytes".  If you're pulling down an 0.5Mbit/s
> > stream, only buffer 0.25 Mbyte (4 seconds).  If you're pulling down a
> > 19Mbit/s stream, buffer 9.5 Mbyte.  Feel free to pick a value other
> > than 4 seconds.  I think MPEG 2 has around an 0.5 second buffer, while
> > H.264 can go up to 10 seconds.  Unfortunately I'd have to go digging to
> > be certain about those numbers.
> Unfortunately, there's pretty much no way of knowing the maximum bitrate
> when you're just pulling down a stream over HTTP. Also, are not the
> recommended latencies you're referring to for the decoder, not a streaming
> layer?

OK, then don't care about the bit rate.  Just read bytes until you have
4 seconds worth of access units in the buffer.

> In any case, what you're referring to should surely stay after the socket
> buffer. I'm just talking about a band-aid since seemingly nobody (including
> me) has the time or interest to fix this properly. :-)

On the day that somebody has time to deal with it, maybe they'll
remember this discussion.

More information about the vlc-devel mailing list