[whatwg] Codecs (was Re: Apple Proposal for Timed Media Elements)
Martin Atkins
mart at degeneration.co.uk
Thu Mar 22 01:29:20 PDT 2007
Maciej Stachowiak wrote:
>
> - Even if all browsers end up supporting Ogg Theora/Vorbis, these are
> not the best-compression codecs available. So a large-scale video
> content provider that wants to save on bandwidth may wish to provide
> H.264/AAC content to those browsers that can handle it, even if all
> browsers could handle a lower-quality codec as well.
>
> - Many mobile devices cannot practically implement decoding in software,
> and rely on custom hardware which can handle only a fixed set of codecs.
> While hardware decoders for H.264 are widely available, I don't think
> there are any for Ogg Theora. Even in cases where the CPU in theory has
> the power to do some software decoding, this will be a much bigger
> battery drain than hardware decoding. So you really want the ability to
> serve the right codec to such devices.
>
> So while your average blogger may only upload media content in one
> codec, larger scale video service providers may want to take advantage
> of codec-based selection.
>
This seems like a problem that can be solved by content negotiation.
Content negotiation has the advantage that it doesn't potentially add
extra requests to find the right representation: the browser just says
"here's what I support" and the server does the best it can, or returns
an explicit "I don't have anything for you" message. ("Not Acceptable")
However, as others have pointed out, MIME types only represent the
container format and not the codecs inside, so content negotiation would
need to be extended to somehow allow audio and video codecs to be
presented in addition to container formats. Note that this problem
applies when doing object-style fallback on the <video> element too, as
you need to specify something in the type="..." attribute to avoid the
browser having to request every representation in turn to reject it.
More information about the whatwg
mailing list