fredag 29 februari 2008

HTML standard will support video

Video on the web

Video on the web is getting more and more popular. According to a study done by comScore in July 2007, 75 percent of U.S. Internet users watched an average of three hours of online video during the month, and internet video use is still growing by the month.

Put video on a web page

When you put an image on your web page you use the simple img tag and provide a source to a jpeg/png or gif image and you can be quite sure visitors to your web site will see your image.

If you want to add video to your web page you have a little more work to do. Depending on the browser you should use the object or the embed tag, There is currently no video tag to use and you really don’t know if your visitors will be able to see your video as there is no standard video decoder you know is installed with all web browsers.

Video html tag
Now there might be changes to this situation on the way. The world wide web consortium W3C has in their HTML 5 specification added a new video tag. When this web standard eventually will be adopted by all browsers you will be able to add video to a web page using a simple html tag just as you add an image to the page.

A video tag on your web page will look something like this:

<video id="myVideo" src="videofile.ogg">Missing decoder</video>

Just as an <img> tag you use the src element to specify the file to use in the tag. Id can be used for scripting control and the text inside the video tag is displayed if there is a problem playing the video.

What this new tag does so far is simply to replace the <embed> or <object> tag with a new more natural tag. At the moment the HTML 5 working draft does not specify that all browsers have to support a standard baseline of codec. This is what the document says about codecs:

“It would be helpful for interoperability if all browsers could support the same codecs. However, there are no known codecs that satisfy all the current players: we need a codec that is known to not require per-unit or per-distributor licensing, that is compatible with the open source development model, that is of sufficient quality as to be usable, and that is not an additional submarine patent risk for large companies. This is an ongoing issue and this section will be updated once more information is available.”

Today the defacto standard web video codec is the codec supported in the Flash player but that is not open and free and therefore does not seem to satisfy the requirement. Theora is relative new format that might satisfy the requirements but it is yet fairly untested.

The w3c is working on and it is going to be very interesting to see what they will come up will. I will continue to follow the progress on this blogg.