Open Video for Everybody

Kroc Camen’s Video for Everybody is an attempt to produce code which shows a video to everyone, no matter what browser they are using. This is laudable, but it strikes me that total success here is defined as the author going out of his way to encode the video in two formats such that the user is able to play the video without caring about the technology behind it.

I think there is therefore space for a similar project, “Open Video for Everybody”, where the goals are slightly different. The starting point in this case would be that the video would only be available in an open format. Within that constraint, the code would then attempt to play it or, if that was not possible, point the user at the resources they need to install (e.g. Ogg codecs for Quicktime in the case of Safari on Mac).

Possible play methods include the <video> tag, and the Cortado Java applet. (Has anyone yet come up with a way of playing Ogg Theora videos in-browser in IE, or a Flash applet which can play Ogg, or does Flash not have that sort of low-level capability?)

Clearly, different sites will want to make different decisions on whether to go for the “play the video at all costs” approach, or the “get the user to install the capability to play open video” approach. But I think both are valid, and it would be great if someone could provide best-practice code for the latter.

19 thoughts on “Open Video for Everybody

  1. Love it :) TinyVid.tv already kind of does this, by falling back to Cortado for other browsers, but there’s a number of issues I have to highlight with using Cortado:

    * Do you really want to force people to download and install Java—of all things—to play a video? How is this any better than forcing people to install Flash? Video for Everybody does not force anybody to install anything, it doesn’t fire off a plugin prompt. If it can’t play the video, download links for the video files are provided.

    * The Java experience is not pretty. When it gets initialised, it’ll lock your machine up for a couple of seconds. It does this even on my high end Mac.

    * Cortado’s player controls are wordy and too small, I wonder if it’s easy to change them to be more like Firefox’s controls. (They would have to be localised otherwise)

    Now, if there was a Flash player that could play OGG, I’d be all over that.

    Lastly, I would just like to note that iPhone will only play H.264 so supporting that still requires the MP4 encode.

    It seems we have a number of hurdles to get over to get an ideal solution.

  2. Kroc Camen’s comment already said what I was going to say, but better (but I’m commenting anyway…)

    Is the openness of the video format itself the only thing that matters? Having people play ogg video by using a java applet in IE doesn’t seem particularly more open as an overall solution.

    Asking people to get ogg codecs for Safari seems reasonable, but cortado not so much, and that still leaves iPhone users stuck.

  3. Googling [flash ogg] turns up FOgg, “a proof of concept implementation of Xiph.Org’s ogg and vorbis decoder libraries in haXe.”

  4. Hi Gervase, Adobe Flash Player does not currently include an Ogg Theora video decoder. Player 6 in 2002 introduced the Sorenson Spark decoder… Player 8 in 2005 added the On2 VP6 decoder (successor to the VP3 version which started Theora)… Player 9 Update 3 in late 2007 added H.264.

    There was some talk a year or so ago about whether it would be useful to lobby Adobe to consider adding a Theora decoder, to support sites which wished to support toolmakers who did not wish to support the codec developers via licensing, but not much came of it… Flash was seen as “impure”, and VIDEO tag still excludes cross-browser plugin renderers anyway.

    jd/adobe

  5. Hi Gervase, Adobe Flash Player does not currently include an Ogg Theora video decoder. Player 6 in 2002 introduced the Sorenson Spark decoder… Player 8 in 2005 added the On2 VP6 decoder (successor to the VP3 version which started Theora)… Player 9 Update 3 in late 2007 added H.264.

    There was some talk a year or so ago about whether it would be useful to lobby Adobe to consider adding a Theora decoder, to support sites which wished to support toolmakers who did not wish to support the codec developers via licensing, but not much came of it… Flash was seen as “impure”, and VIDEO tag still excludes cross-browser plugin renderers anyway.

    jd/adobe

  6. to support sites which wished to support toolmakers who did not wish to support the codec developers via licensing

    That makes it sound like “supporting codec developers” is a moral obligation :-)

    And I’m not sure what you mean by “VIDEO tag still excludes cross-browser plugin renderers”. It would be great if the Flash platform supported Ogg; then, people could encode their videos once and have them work in browser-native or in Flash players, and people could write shims so that <video> tags could be replaced by flash embedding in legacy browsers. That would be a great thing for open video, and therefore for the web.

  7. There seems to be some confusion here between Vorbis (audio) and Theora (video).

    The links above are about audio in Silverlight. It is possible to implement new video codecs in Silverlight and there is a Theora video codec in C# (http://www.wreckedgames.com/forum/index.php/topic,1053.0.html) but I’m unaware of anyone who has put the two together or what state they are in (I’m aware that the Java code needed tweaked to fully support Vorbis 1.0 features that the Thusnelda branch intended to take advantage of).

    Flash has multiple ways to support Vorbis from Flash 10 onwards, including one library compiled from C++ by Adobe themselves (http://labs.adobe.com/wiki/index.php/Alchemy:Libraries). I think there is a great possibilty to hide these behind a compatible javascript interface but again I’m not aware of a Open Audio for Everybody project.

    (It’s worth noting that Flash now supports the Speex audio codec for speech since version 10, which is part of the Xiph family of codecs and a contender along with FLAC for more widespread web use. I wonder if and how Adobe “support the codec developers” when paying for a licence isn’t an option. Personally I’d think just using it would be enough, but Adobe seem to feel that’s not enough in other cases.)

    To answer the original question I think Wikipedia is leading the pack here with serving Theora to anyone. They’ve discovered reliability problems with both the Cortado Java Applet and the VLC-based plugin and issues with the way Safari currently reports the availability of XiphQT provided codecs. For more see the “Serving up Theora <video> in the real world” thread on WhatWG:

    http://www.mail-archive.com/whatwg@lists.whatwg.org/msg15985.html

    There has been a build-up of steam around Theora lately. I’ve already mentioned the work done to get Cortado to be fully spec compliant, XiphQT had a release after quite a gap (though could still do with copying the install and update process from Perian) and encoding tools are appearing from all sorts of interesting angles. Interesting times.

  8. I still don’t understand what’s wrong with just putting an .mpeg on the server and linking to it with a standard anchor element and href attribute.

    The *only* reason to fiddle around with other ways of playing video, as near as I can tell, is to confuse the user into thinking of the video as part of the web page, which it isn’t, and this is fundamentally a bad idea.

    Blurring the distinctions between the web page and other content actively causes problems and serves *no* useful purpose. Users are confused enough *without* deliberate attempts on the part of the developer to conflate things that are really distinct.

    When Adobe Reader embeds itself in the browser window, the user can’t figure out why the back button and the browser’s printing features don’t work properly. Fortunately Firefox has a way to turn this behavior off in the case of PDF, because I’d just about given up trying to explain it to folks. Did you know the difference between a web page and a PDF isn’t visually apparent to non-geeks, even if you try to point it out?

    When the Flash player embeds itself in the browser window, instead of opening up as a helper app like it ought to do, it causes the same kinds of problems and confusions. FlashBlock helps a little, because then they at least clicked on that arrow thingy to see the content. But it doesn’t solve the whole problem, not by a long shot. What I want is the ability to make the Flash player open in a separate window, sized to the content, with the words “Flash Player” prominent in the titlebar, when the user clicks on a Flash object.

    Do I think the video tag is a step in the right direction? I do not.

    Truth be told there isn’t much about HTML5 that I’m real crazy about. The change I really want in a new version of HTML is the ability to put block-level elements within paragraphs. (That, and I’d kind of like for IE to recognize the xhtml+xml content type, but only Microsoft can fix that one.) Do I want more ways for web developers to confuse the users to no purpose? I do not. Do I want the web browser to be a media player? I do not.

  9. Jonadab: You are right in that something like plugin-based video or embedded Acrobat is a bad compromise between the cleanness of a separate media player or viewer and proper integration into the page. But I don’t see why you are opposed to the latter. Why is information contained in moving images less eligible to be part of a web page than information contained in still images? The whole point of the video tag is to do video in a proper browser-like way, so you don’t get things like back-button confusion or random key capture.

  10. re: And I’m not sure what you mean by “VIDEO tag still excludes cross-browser plugin renderers”.

    Browsers which parse VIDEO tag don’t themselves take Adobe Flash Player into account… think of it, nearly every Firefox installation already has an H.264 decoder within its Adobe Flash Player, and yet the browser will not invoke Player if it sees an H.264-encoded file in a VIDEO tag. Right now, it’s content authors who must successfully write fallback schemes themselves.

    There’s a bit more on this idea of VIDEO using Player in the Adobe presentation to the W3C in 2007:
    http://www.w3.org/2007/08/video/positions/adobe.pdf
    http://www.w3.org/2007/08/video/minutes#item06

    jd/adobe

  11. jd: Sure, the browser doesn’t just pass the video off to Flash because if you want any sort of controls or controllability you need a Flash application to embed the video and provide that, right? And that’s something the site has to choose. YouTube have their player, DailyMotion have theirs, and so on. I don’t see how the browser could do that automatically – at least not without giving Flash a privileged position among other plugins, and baking some sort of “flashappleturl=” attribute directly into the standard for the <video> tag.

  12. > Why is information contained in moving images less eligible to
    > be part of a web page than information contained in still images?

    Can the web browser do the things with the video that it can do with still images? Use it as an anchor and go to another page when it’s clicked? Scale it to fit available space? Print it? Handle it correctly in print preview?

    The main reason, though, is because everybody already has a media player.

  13. Yes, yes, yes and yes. (In print and print preview, you get a screenshot of how the video was at the moment you requested the print or preview.) You can also Save Video As…, view it standalone in a new page, or all the other things that an open solution for video should allow you to do and Flash doesn’t.

    You say “everyone already has a media player”. Everyone already has a text editor and an image viewer too, but that doesn’t mean web browsers open web pages or images in them. Magazines you buy at the newsagent don’t have all the pictures collected together at the back with the text at the front.

  14. Sorry, I may have missed something at the third turn there… we started at “Can Flash Player display Theora video?”, went to “VIDEO tag doesn’t invoke Player”, and are now at “How to handle video UIs?”

    (If a site wants to use VIDEO tag I assume they’ll be specifying a playback UI too, and JavaScript controls can control Player’s video playback already.)

    jd/adobe

  15. jd: specifying a <video> tag doesn’t necessarily mean specifying a playback UI. There’s one built in to the implementation, and many people will just do <video type=”video/ogg” src=”url”></video> and be done with it. That’s one of the great advantages of <video> – simplicity.

  16. > (In print and print preview, you get a screenshot of how the
    > video was at the moment you requested the print or preview.

    So if I hit print preview, see what I want, close the preview, and hit print, will I get the same thing on paper that I saw in the preview?

    If so, then I’m impressed. This would be a significant improvement over browser handling of video in the past. (I’m still not sure I care, but that’s probably just my grumpy curmudgeonly side coming through.)

  17. Try it and see :-) You may have to press the Print button on the Preview pane rather than closing the Preview pane and invoking the Print subsystem again (because the video will have moved on, unless you paused it). But I think it’s reasonable to expect it to work that way.