[whatwg] video tag: pixel aspect ratio

Ian Hickson ian at hixie.ch
Wed Oct 15 02:40:34 PDT 2008


On Tue, 14 Oct 2008, Sander van Zoest wrote:
> 
> I just recently started looking at HTML5 and noticed the video tag. Neat 
> addition. I also noticed that it as an attribute named 'pixelratio', 
> however, as you know this is never an integer, but rather is the result 
> of a fraction (i.e. ratio). As for proper playback of video frames, it 
> is important to understand exact float and therefore I would suggest 
> either expressing it as a ratio of two 32-bit integers separated by a 
> colon (or slash) or use two different attributes. This avoids 
> unintentional rounding.
> 
> Something roughly along the lines of:
> 
> <source pixelratio="10:11"> <!-- 525 composite NTSC -->
> <source pixelratio="59:54"> <!-- 625 composite PAL -->
> <source pixelratio="1018:1062"> <!-- 1920x1035 HDTV SMPTE RP 187-1995 -->

Currently pixelratio is a floating point number, as in:

   <source pixelratio="0.909090909"> <!-- 525 composite NTSC -->
   <source pixelratio="1.09259259"> <!-- 625 composite PAL -->
   <source pixelratio="0.958568738"> <!-- 1920x1035 HDTV SMPTE RP 187-1995 -->

Is that not enough?

This isn't expected to be used often. It's really only provided to allow 
for simple override of the actual value in the video file, for when the 
video file is known to be wrong. I am very reluctant to make up a whole 
new microsyntax and corresponding parser algorithm, along with all the 
tests, etc, to handle this one case.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list