HTML5 Guidelines for Web Developers

(coco) #1
4.3 Video Codecs 75

innovation, believing that the core techniques of the World Wide Web need to be
based on open standards, which H.264 is not.


After this brief history we will now explain a little more about the individual for-
mats. Don’t worry; we will not discuss the technical details of video compression
at great length. We will just introduce the common formats for the Internet.


4.3.1 Ogg: Theora and Vorbis...............................................................


When the Fraunhofer society began to demand license fees for the popular MP3
format at the end of the last millennium, the Xiph.Org Foundation developed the
free audio codec Vorbis. Based on the video codec VP3.2, which was released in
2002 (developed by the aforementioned company On2), Xiph also created the
video format Theora. Video and audio are combined in a container format, Ogg,
and the container can contain one or more audio and video tracks. The MIME
type for Ogg video files is video/ogg, and the corresponding filename extension
is .ogv. (The file extension .ogg also works, but according to Xiph.org, we should
avoid it and instead use the more explicit file extension .ogv for Ogg video and
.oga for Ogg audio.)


Do not confuse the Ogg Media container format (file extension .ogm) with the Ogg
container discussed here. The Ogg Media (OGM) container is an extension that
supports a large number of additional video codecs. Initially, this sounds very
useful, but it does lead to some problems: Xiph insists that Ogg should be men-
tioned only in the context of free formats, but this is not the case with Ogg Media,
which can also use patented formats.


4.3.2 MPEG-4: H.264 and AAC


The MPEG-4 (MP4) container is a derivation of the multimedia format Quick-
Time commonly used in Apple operating systems. Like the Ogg container, MP4
can have audio and video tracks; it even goes one step further and can embed
images and text. The most common codecs in MP4 are the patented video codec
H.264 and the audio codec Advanced Audio Coding (AAC). The file extension is
.mp4, and common media types are video/mp4, audio/mp4, and application/mp4.


Apple created some confusion when files with the extension .m4a started to
appear on iPods and other Apple devices. These are MP4 files, but Apple wanted
the file extension to indicate that it is a pure audio file. Other file extensions used
are .m4b for audio books and .m4r for iPhone ringtones.

NOTE
Free download pdf