HTML5 Guidelines for Web Developers

(coco) #1

76 Chapter 4—Video and Audio


It was mostly the huge success of Apple’s mobile devices (iPod, iPhone, iPad)
that contributed to the rapid spreading of the MP4 file format. To achieve an
acceptable performance when playing back videos on devices with weak pro-
cessors (such as cell phones), the computer-intensive process is transferred to a
separate chip. This hardware acceleration saves energy and prolongs battery life.
The patent problem regarding the H.264 codec should not be under-
estimated. The type of encoding is patent protected until at least 2028—a veri-
table sword of Damocles hanging over the software manufacturers who could be
required at any time to pay fees for the encoding process.

4.3.3 WebM: VP8 and Vorbis


As mentioned at the beginning of this section, Google caused some excitement
and euphoria by founding the WebM project. The video codec VP8 received very
good feedback in general, and the audio codec Vorbis had already proven suc-
cessful. Google decided to use the open-source format Matroska as a container,
which was already tried and tested as well. But although the Matroska format
supports a number of different codecs, the WebM container only allows for the
video codec VP8 and the audio codec Vorbis.
The standard file extension for WebM videos is .webm, and the corresponding
MIME type is video/webm.
Immediately after Google’s announcement, the browser manufacturers of Mozil-
la Firefox, Opera, and even Microsoft for Internet Explorer announced that they
would support the WebM format. It goes without saying that Google’s browser
Chrome offers support for WebM, so there is only one browser without support
for the new codec (at least at the time of this writing): Apple’s Safari.

4.4 Tools for Video Conversion


Because most peoples’ digital cameras usually do not produce videos in WebM
or Ogg format, the next section introduces different tools for converting videos.
They are all open-source products that run on Windows, Mac OS, and Linux,
except for the Miro Video Converter.

4.4.1 FFmpeg


FFmpeg is sometimes referred to as the Swiss army knife of video conversion.
And rightly so, because the list of audio and video formats that FFmpeg can read
and write is remarkably long. It can also split multimedia files into their compo-
nents; for example, it can strip out only the audio track of a film and then convert
Free download pdf