HTML and CSS Reference
In-Depth Information
Codecs and license issues
Audio files are usually stored in a compressed format. To be stored on a
computer, they must be encoded into that format; to be played back,
they have to be decoded once again. The software that performs this
encoding and decoding is called a codec . Music files on your computer
usually have a file extension that identifies which codec is needed to
decode them.
What is a codec?
In principal, it's possible to describe the raw data of audio and video streams to
an arbitrary accuracy. For audio, you'd store the amplitude of the sound wave
for each moment in time you wanted to play the sound back; for video, you'd
store the color of each pixel for each frame (usually 25-30 per second) as well
as the sound. But this would lead to impossibly large files for anything of a useful
In practice, you want to compress the audio and video data in the same way you
might compress a large file into a zip archive. A codec is what's used to com-
press audio and video data for storage and later to decompress the same audio
and video to be played through speakers and displayed on screens in real time.
Codecs can be split into two broad categories: lossless and lossy . Think about a
zip archive: when you extract the content from it, you expect to get back the ex-
act same files you put in—it's a lossless compression. In the same way, some
codecs are capable of compressing audio and video with no loss of information.
But these files are necessarily still large. The more interesting set of codecs for
the web are lossy—each time they're used to encode a video stream, some infor-
mation is thrown away, never to be seen again. These codecs can achieve far
greater compression at the expense of some loss of audible or visual quality; the
trick is to throw away data that makes as little difference to human perception
as possible.
You've almost certainly heard of at least one codec: MPEG 1 (or 2)
Audio Level III, commonly known as MP3. MP3 is a perfectly good
codec technically—it was the first popular codec able to make a
typical pop song small enough to be downloadable while retaining
CD quality—but there are issues other than the technical ones.
The problem with the MP3 codec is that there are several patents on it;
and if you want to distribute software that encodes and decodes MP3 ,
Search WWH ::

Custom Search