438 CHAPTER 11 HTML5 supports multimedia
Video formats
The W3C is trying to come up with a video format that can be specified for all browsers to
support as a minimum. Having a minimum of one format that is common across browsers
would simplify the developer’s job as long as the format provided good compression and
quality and was royalty free. There are many formats; the following list describes the most
popular formats.
■■Ogg/Theora (.ogv extension) t one point, W3C specified the Ogg/Theora format, A
which appears to be a format that is royalty free without patent issues. Then the W3C
removed the Ogg/Theora from the specifications because of the possibility of litiga-
tion. This format is supported by the Firefox, Chrome, and Opera browsers.
■■WebM/VP8 (.webm extension) Google acquired the WebM/VP8 format when it
bought On2 Technology. According to Google officials, WebM works well on even
lower-power devices, including netbooks and handhelds. WebM will be available
under a royalty-free Berkeley Software Distribution (BSD) open-source license. The
WebM/VP8 video format is supported by the Firefox, Chrome, Opera, and Android
browsers. In addition, Internet Explorer 9+ will support this format when the VP8 codec
is installed. The current release of the VP8 codec is available here: https://tools.google
.com/dlpage/webmmf/.
■■MPEG-4/H.264 (.mp4 extension) This format is an evolution of previous formats
that was intended to create a standard capable of providing good video quality at
substantially lower bit rates than previous standards. The MPEG-4/H.264 format has
patented technologies, but MPEG LA, which is a private organization in charge of
administrating the patents, announced that the H.264-encoded Internet video that is
free to end users will never be charged royalties. MPEG-4/H.264 is supported by the
Internet Explorer, Chrome, and Safari browsers, but Chrome has announced its intent
to remove support for MPEG-4/H.264 in the near future.
MPEG-4/H.264 is the most common format for most video-editing software. It also pro-
vides the best performance when comparing data-stream size to picture quality, although
the difference is not great enough to make a decision based solely on performance. Many
existing mobile devices have MPEG-4/H.264 hardware decoders, which provide better perfor-
mance, and there are too many of these mobile devices to ignore. The result is that it could
take a long time for browser makers and the W3C to agree on a single format for the web.
Implementing the
The <video> element is used to play video. The following is a sample implementation of the
<video> element.
<video width="320" height="240" controls="controls">
<source src="movie.mp4" />
You need a browser that supports HTML5!
</video>