W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] HTML5 video <source> dimensions and bitrate

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 24 Aug 2010 08:32:55 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1008240829141.1138@ps20323.dreamhostps.com>
On Tue, 10 Aug 2010, Zachary Ozer wrote:
> 
> I thought about suggesting something like bitrate a bandwidth to media 
> queries. The syntax would look something like:
> 
> <video width=720>
> <source src="video-480.mp4" media="(width:480px) and (min-bitrate:2mbps)">
> <source src="video-720.mp4" media="(width:720px) and (min-bitrate:4mbps)">
> <source src="video-1080.mp4" media="(width:1080px) and (min-bitrate:20mbps)">
> </video>

For media queries changes, I recommend posting to www-style at w3.org.


> I can think of a few solutions that might make sense here:
> 
>  * Allow source sub-elements / groupings and provide a call to switch
> between elements of a group. Ideally, this would look something like:
> 
> <video width="720px">
> <sourcegroup type="video/mp4" media="screen and (device-aspect-ratio: 16/9)">
> <source src="video-1080.mp4" meta="width:1920px;height:1080px;bitrate:20mbps;">
> <source src="video-720.mp4" meta="width:1280px;height:720px;bitrate:4mbps;">
> </sourcegroup>
> <sourcegroup type="video/mp4" media="screen and (device-aspect-ratio: 4/3)">
> <source src="video-480.mp4" meta="width:640px;height:480px;bitrate:2mbps;">
> </sourcegroup>
> <sourcegroup type="video/ogv">
> <source src="video-480.ogv" meta="width:640px;height:480px;bitrate:2mbps;">
> <source src="video-720.ogv" meta="width:1280px;height:720px;bitrate:4mbps;">
> <source src="video-1080.ogv" meta="width:1920px;height:1080px;bitrate:20mbps;">
> </sourcegroup>
> </video>

We'll have to see how common this kind of problem is, but if it's common, 
then this will be a natural extension in a future version.

> * Have user agents keep track of information about dropped frames. 
> Publishers could then list multiple valid sources in order of rank. When 
> the dropped frame rate increased, either the user agent or a bit of 
> JavaScript could remove that source and re-run the resource selection 
> algorithm.

This is definitely a feature we'll add in a future version (probably as 
soon as we have the subtitles stuff figured out).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 24 August 2010 01:32:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:00 UTC