Re: Codecs for <video> and <audio>

On Jul 2, 2009, at 5:55 PM, Sam Ruby wrote:

> Ian Hickson wrote:
> >
>>> Even if a better place can be found, why not follow your previous  
>>> policy of adding a section to HTML5 and moving it out if/when a  
>>> better venue is found?
>> Because this isn't required for interop, and so it's not critical.
>
> Required for overlap?  I'm confused.
>
> If we don't have a commitment to support the video element at all by  
> the dominant browser vendor, and the effective overlap in supported  
> codecs between the next three major browser vendors is zero...
>
> ... what meaningful overlap remains?

If you're willing to encode video files twice, the following markup  
[1] will provide embedded video with CSS stylability and a consistent  
JavaScript API in the latest versions of Firefox and Safari, and in  
upcoming versions of Chrome and Opera, and likely in other upcoming  
WebKit-based browsers for mobile platforms:

<video>
     <source src="example-video.mp4" type="video/mp4" />
     <source src="example-video.ogv" type="video/ogg" />
</video>

I don't believe Microsoft has stated a position on whether they will  
implement <video> or not, and if so, what codecs they will support. So  
we can't tell if this markup will work in future versions of IE. Also,  
I concede that this is materially worse than encoding a video once.

This markup can also be extended [2] to cover browsers that don't have  
any native <video> support by in turn falling back to Flash, QuickTime  
or Windows Media. The markup for that is too complicated to paste  
inline here. Using such markup will deliver video to more users with  
better quality than just using Flash, even though it continues to  
depend on nonstandard technology than fallback. That is so because  
<video> is available on some platforms where Flash is not, and will  
also be available in high-quality browser-native implementations on  
some platforms where Flash is reported to be buggy.

I realize this is all not nearly as good as having a single tag and  
single video encoding that can target all browsers on all platforms.  
Format wars suck. However, I do not believe that adding codec  
requirements to the spec will help end the format war. I also don't  
think that removing <video> from the spec will help resolve the format  
war either; it seems to me it would likely lead to worse  
interoperability and remove some of the impetus for resolving the  
format war.

Regards,
Maciej


[1] http://daringfireball.net/2009/07/ffmpeg2theora
[2] http://camendesign.com/code/video_for_everybody

Received on Friday, 3 July 2009 02:00:37 UTC