W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] <video> element proposal

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 17 Mar 2007 00:49:04 +0100
Message-ID: <tb0mv2tca0hp8n9j49dq0cn1jgbhhq9kcg@hive.bjoern.hoehrmann.de>
* H?kon Wium Lie wrote:
>Namespaces are hard and I doubt that any markup that requires using
>them will succeed. Also, the vendor-specific string is troublesome for
>general use. If we want to make video a first-class citizen on the web
>(and I think we do) we can afford to give it its own element in HTML.
>The name and attributes can be borrowed from other specs, but the
>element itself should be in HTML.
>
>Second, about the codecs. I believe it's vital that we find a video
>format that is sufficiently open. It should be described in a freely
>available specification and there should be no (known or unresolved)
>patent claims. I don't think this is the case for the codecs on the
>other side of the t:video element.

Yes, well, there are only so and so many variables you can optimize for.
So let me just pick some and see where we stand. The first is, I want to
leverage my knowledge of related technologies like SMIL, SVG, and Flash.
This is important, for example, if I start with a plain HTML video page
and later want a more sophisticated interface with vector graphics, ani-
mation and so on, so I might switch from HTML to XHTML+SVG. Here is how
we fare for some basic features:

  +----------------+-----------------+-----------------+---------------+
  | SMIL           | SVG             | IE              | "WHATWG"      |
  +----------------+-----------------+-----------------+---------------+
    beginElement() | beginElement()  | beginElement()  | play()
    endElement()   | endElement()    | endElement()    | stop()
    -              | pauseElement()  | pauseElement()  | pause()
    -              | resumeElement() | resumeElement() | togglePause()
    -              | isPaused        | isPaused        | state == PAUSED
   ...

We can also compare with Flash:

  +----------------------------------+---------------------------------+
  | Flash/ActionScript               | "WHATWG"                        |
  +----------------------------------+---------------------------------+
    pause()                          | togglePause()
    pause(true)                      | pause()
    pause(false)                     | togglePause()
    seek(s)                          | seek(1000 * s)
    time                             | position / 1000
  ...

So if I move from xhtml:video to svg:video or smil:video or ie:video, I
would have to rewrite most of my scripts, whereas moving between the
others can be done effortlessly. "Web application technologies should be
based on technologies authors are familiar with", except when you don't
feel like it?

The next is compatibility. I want my content to work in as many cases as
possible. It goes without saying that "WHATWG" video works nowhere. I
think "Any solution that cannot be used with the current high-market-
share user agent without the need for binary plug-ins is highly unlikely
to be successful."

Clearly "WHATWG" video cannot be made to work in IE either because at
the very least that would require making the internal representation of
the document invalid. I cannot effort that, as some people would think
I might be actively sabotaging the work of web standards and W3C, or at
the very least, be demonstrating an almost unbelievable lack of
competence. So you can consider web standards compliance a third item in
my list (I understand this is not shared by "WHATWG", as using tag soup
is considered a reasonable transition strategy).

As for codecs, I recently had to put a bunch of my old videos into a
form that I could publish and did try to use sufficiently open formats.
Some of my findings are in the logs on <http://swhack.com/>, but to give
a quick summary: that's far from working as yet.

It is hard to find tools that take care of transcoding, they are
difficult to use (lack of advise on which settings to use, crude command
line interfaces, ...) and using Ogg Theora generally meant considerably
reducing the quality while at the same time considerably increasing file
size, not to mention that going from various of the formats I had meant
going from works almost everywhere to works almost nowhere.

For some of them I could not find free tools at all, and in a few cases
I could find no tools whatsoever (old Intel Indeo encoded AVIs created
under Win3.11, I have the codecs somewhere on backups, but they are not
on the web and apparently not implemented independently, so much for
proprietary formats).

It would be easier, of course, if I still had the raw video data and
could encode it directly, just like you get better HTML if you just
write the HTML directly instead of going through your Word process and
several conversion layers, but I don't have them. So, where does that
leave me? Ah, yes,

? <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
?   <MediaElement Source="example.video" />
? </Page>

which, too, has the benefit of actually working in my web browser. It
also happens to be much simpler than the equivalent "HTML5" document.
So, sure, don't pick the not-invented-here APIs, don't be compatible
with Internet Explorer, and don't allow me to use it with my less open
formats and codecs, but then also don't complain if I don't actually
use it.
-- 
Bj?rn H?hrmann ? mailto:bjoern at hoehrmann.de ? http://bjoern.hoehrmann.de
Weinh. Str. 22 ? Telefon: +49(0)621/4309674 ? http://www.bjoernsworld.de
68309 Mannheim ? PGP Pub. KeyID: 0xA4357E78 ? http://www.websitedev.de/ 
Received on Friday, 16 March 2007 16:49:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC