On Wed, Mar 7, 2012 at 1:55 PM, Ashwin Rao <[email protected]>wrote:

> > Our media cache already calls suspend/resume "as needed" to throttle
> > downloading when the cache fills up. It is a blunt hammer :-).
> >
> > The good news is that the media cache already knows exactly what is being
> > read by the decoder and when, and makes download decisions based on that.
> > Improving the download management policy is therefore not architecturally
> > difficult.
> >
>
> Is the rate throttling available in the dev tree? In Firefox 10.0.1 I
> am not seeing this throttling. For example entire HTML5 videos on
> YouTube, of even 20 minutes in duration, were downloaded at the end to
> end available bandwidth (of 100 Mbps in my lab).
>

The media cache size is 500MB. If your video is smaller than that, you
won't see any throttling.

Try setting media.cache_size to say 50MB, preload a 200MB video, you should
see downloading pause after approximately 50MB has been loaded. Then start
playing, and eventually you should see downloading resume; the download
will pause and resume to keep a window of data ahead of the play point.

(I wouldn't call this "rate throttling", since it's not explicitly based on
rate.)

A work by Don Towsley suggests that the rate of up to 2 times the
> median encoding rate is sufficient for smooth playback [
> http://dl.acm.org/citation.cfm?id=1027735 ]. About the buffering I did
> some measurements  on YouTube where I observed that YouTube begins a
> streaming session (for Flash videos) by buffering 40 seconds of
> playback data before limiting the download rate to 1.25 times the
> video encoding rate. The details of the results are available at [
> http://hal.inria.fr/inria-00638063/en/ ].
>

Either of those could be implemented in Gecko pretty easily I guess,
although as I said before, I'm not sure pausing and resuming the Necko
download is adequate to hit a smooth target rate.

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to