[whatwg] On implementing videos with multiple tracks in HTML5

Lachlan Hunt lachlan.hunt at lachy.id.au
Mon May 31 03:54:02 PDT 2010


On 2010-05-23 05:40, Carlos Andrés Solís wrote:
> Imagine a hypothetical website that delivers videos in multiple languages.
> Like on a DVD, where you can choose your audio and subtitles language. And
> also imagine there is the possibility of downloading a file with the video,
> along with either the chosen audio/sub tracks, or all of them at once. Right
> now, though, there's no way to deliver multiple audio and subtitle streams
> on HTML5 and WebM. Since the latter supports only one audio and one video
> track,

WebM, just like Matroska, certainly does support multiple video and 
audio tracks.  The current limitation is that browser implementations 
don't yet provide an interface or API for track selection.

Whether or not authors would actually do this depends on their use case 
and what trade offs they're willing to make.  The use cases I'm aware of 
for multiple tracks include offering stereo and surround sound 
alternatives, audio descripitons, audio commentaries or multiple languages.

The trade off here is in bandwidth usage vs. storage space (or 
processing time if you're doing dynamic server side muxing). 
Duplicating the video track in each file, containing only a single audio 
track saves bandwidth for users while increasing storage space. Storing 
all audio tracks in one multi-track webm file avoids duplication, while 
increasing the bandwidth for users downloading tracks they may not need.

The latter theoretically allows for the user to dynamically switch audio 
tracks to, e.g. change language or listen to commentary, without having 
to download a whole new copy of the video.  The former requires the user 
to choose which tracks they want prior to downloading the appropriate file.

If there's only a choice between 2 or maybe 3 tracks, then the extra 
bandwidth may be insignificant.  If, however, you're offering several 
alternate languages in both stereo and surround sound, with audio 
descriptions and directors commentary — the kind of stuff you'll find on 
many commercial DVDs — then the extra bandwidth wasted by users 
downloading so many tracks they don't need may not be worth it.

> with no embedded subtitles,

Timed text tracks within WebM (most likely WebSRT) will eventually be 
supported.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/



More information about the whatwg mailing list