[whatwg] Limiting the amount of downloaded but not watched video

Markus Ernst derernst at gmx.ch
Mon Jan 17 09:36:28 PST 2011

Am 17.01.2011 17:41 schrieb Jeroen Wijering:
> Hello all,
> We are getting some questions from JW Player users that HTML5 video is quite wasteful on bandwidth for longer videos (think 10min+). This because browsers download the entire movie once playback starts, regardless of whether a user pauses the player. If throttling is used, it seems very conservative, which means a lot of unwatched video is in the buffer when a user unloads a video.
> I did a simple test with a 10 minute video: playing it; pausing after 30 seconds and checking download progress after another 30 seconds. With all browsers (Firefox 4, Safari 5, Chrome 8, Opera 11, iOS 4.2), the video would indeed be fully downloaded after 60 seconds. Some throttling seems to be applied by Safari / iOS, but this could also be bandwidth fluctuations on my side. Either way, all browsers downloaded the 10min video while only 30 seconds were being watched.
> The HTML5 spec is a bit generic on this topic, allowing mechanisms such as stalling and throttling but not requiring them, or prescribing a scripting interface:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-resource
> Are there people working on ways to trim down the amount of not-watched data for video playback? Any ideas on this, anything in the pipeline?
> ---
> A suggestion would be to implement / expose a property called "downloadBufferTarget". It would be the amount of video in seconds the browser tries to keep in the download buffer.
> When a user starts (or seeks in) a video, the browser would try to download "downloadBufferTarget" amount in seconds of video. When "downloaded>  currentTime + downloadBufferTarget", downloading would get stalled, until a certain lower treshold is reached (e.g. 50%) and the browser would start downloading additional data.
> A good default value for "downloadBufferTarget" would be 60 seconds. Webdevelopers who have short clips / do not care about downloads can set "downloadBufferTarget" to a higher value (e.g. 300). Webdevelopers who have long videos (15min+) / want to keep their bandwidth bill low can set "downloadBufferTarget" to a lower value (e.g. 15). Webdevelopers might even change the value of "downloadBufferTarget" per visitor; visitors with little bandwidth get a sizeable buffer (to prevent stuttering) and visitors with a big pipe get a small download buffer (they don't need it).

Could this be done at the user side, e.g. with some browser setting? Or 
even by a "stop downloading" control in the player? An intuitive user 
control would be separate stop and pause buttons, as we know them from 
tape and CD players. Pause would then behave as it does now, while stop 
would cancel downloading.

This would be helpful, as there are various viewing situations, that are 
not under control of the web developer:

1. Start playback, pause, do something else and wait until the movie is 
downloaded (the case Boris Zbarski mentioned)

2. On a page with multiple movies, such as a Myspace profile of a 
musician, you start playback of a movie, pause it to see the next one, 
pause it to see the third one... and soon you have several movies 
downloading, instead of only the last one you really want to see at the 

While in situation 1 the download buffer would be a hassle, it would be 
helpful in situation 2. Separate pause and stop controls would help in 
both cases.

More information about the whatwg mailing list