461
Chapter 14
Facilitating Audio and Video
by Elad Elrom
Video and audio are the key elements in rich, compelling experiences across platforms: Web, desktop,
and mobile. They are used everywhere—in news, blogs, music videos, web TV, social media, live Internet
radio, amateur productions, and movie promotions.
In particular, video has become one of the critical components of the Web experience and, according to
Comcast in August 2008, Flash is used 86 percent of the time when online videos are viewed in the U.S.
Flash Player has supported video playback across multiple platforms since version 6.
Creating a video and audio player is a simple process; however, constraints such as bandwidth differences
can complicate matters. It’s not easy to cover all of the issues in one chapter, but we’ll tell you enough so
you’ll understand your options, and we’ll give you practical examples you can use. We’ll show you how to
build an audio and video player that uses progressive download as well as streaming. And we’ll
demonstrate how to play audio and video files using the Open Source Media Framework (OSMF).
Supported Video and Audio Formats
Video and audio files that are to be deployed on platforms with constraints and limitations—such as the
Web and mobile devices—need to be compressed.
The compression is done by a codec (enCOder/DECoder) algorithm. Codecs, as their name implies, are
programs that compress and decompress data. There are audio codecs as well as video codecs.
Compression has two purposes: reducing the file size to speed up transmission, and reducing the data
storage space needed on the destination device.
Most codecs are lossy. Lossy compression (or data lossiness) means that some of the data is lost during
compression and can’t be recovered during subsequent decompression.
Get AdvancED Flex 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.