[vlc-devel] [vlc-commits] commit: stream_filter/httplive.c: HTTP Live Streaming (Jean-Paul Saman )

Rémi Denis-Courmont remi at remlab.net
Wed Oct 13 11:53:49 CEST 2010


On Wed, 13 Oct 2010 09:48:16 +0200, Jean-Paul Saman <jpsaman at gmail.com>
wrote:
>> - What is the protocol to detect bw_up and bw_down? Was that not too
>> difficult with VLC arch?
> 
> It is fairly simple, measure the download speed per segment and base a
> decision on that.
> Since the stream_filter initiates the download itself it can also
> measure how long that takes and
> calculate the average download speed in terms of bandwidth of the stream.

This assumes that the HTTP server will agree to serve the file at a much
larger TCP bandwidth than playback bandwidth of the media. That works for a
plain "dumb" HTTP server, like Apache. But most modern streaming servers
cap the per-connection TCP bandwidth to the playback bandwidth or slightly
more only. This is used for fair distribution of the costly Internet
bandwidth to the many simultaneous customers.

Thus your simple algorithm will select lower bandwidth if needed. But it is
likely to fail to ever select a higher bandwidth, at least with some clever
servers. Thus there is a risk that even the slightest transient congestion
might make VLC needless scale down the video.

I don't think there is a magic solution here. Measuring bandwidth is a
unsolvable problem without specific knowledge of the IP network. In other
words, the only solution is to let the user decide.

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list