Codec-related terms
Chances are you've run into various codec-related terms, but here are a few to help you familiarise yourself. We'll start with some audio codecs.
Audio codecs
MP3 - Stands for "MPEG 1 Audio Layer 3" and is an agreed standard for compressing audio. It achieves significant compression by discarding parts of the audio data that are largely inaudible to humans – including frequencies that are too high or low for us to hear.
The trick with encoding MP3s, as with any lossy method, is to try not to discard too much data. Trying to get the bitrate too low can result in distorted sounds. However, a single track from a CD, originally weighing in at around 40MiB, can be compressed to around a tenth of that without significant quality loss (as far as average ears and sound systems are concerned). It's possible to compress even further if playback is likely to happen in a noisy environment such as a tube train or motor car.
WMA - Windows Media Audio is a family of Microsoft-developed codecs for audio compression. Unlike MP3 there are now versions of WMA featuring digital rights management. This allows the file's creator to control its use, perhaps by limiting how many times the file can be put onto CD.
QuickTime - not a codec but Apple's multimedia container file and, so, dealt with some way further on.
AAC - The Advanced Audio Coding codec is part of later MPEG standards and has various improvements over MP3, including support for more audio channels and better coding efficiency. Apple uses AAC with its iTunes service, wrapping it in DRM to control the use of the files, wrongly making many people immediately associate AAC with Apple. Apple use AAC to compete with Microsoft's WMA.
Vorbis - This is an open source audio codec created by the Xiph.Org Foundation and often considered as a competitor to the MP3 codec. Although there is not a lot of difference in quality between Vorbis and MP3, what is significant is that Vorbis if free of patents and requires no license or fees to use. Support for Vorbis isn't as widespread as for some of other audio codecs, but there are audio players - hardware and software - that can handle Vorbis-encoded files.
FLAC - Another creation of the Xiph.Org Foundation. FLAC stands for Free Lossless Audio Compression, which is a bit of a giveaway as to what type of codec it is – yes, it's lossless. FLAC compresses audio streams without sacrificing quality, making it ideal for archiving and appealing to audiophiles. Of course, file sizes are not as small as with MP3, WMA or any of the lossy formats, but FLAC can still compress a track from an audio CD down to as little as half its original size.
RA, RM, RAM – file tails used in Real Audio files (standards created by RealNetworks) and encompassing a range of codecs including, most recently, MPEG-4, AAC and ATRAC.
There are many more audio codecs than video, so we can't detail them all. But among those you may bump up against are:
- ATRAC - Used in minidisc.
- MP1, MP2 - of a family with MP3. These are two levels of complexity of MPEG 1 Part 3 audio encoding (MP1 is Audio Layer 1 and MP 2 is Audio Layer 2)
Video codecs
Video codecs typically use lossy compression, either intraframe or interframe. With intraframe, each frame is treated as a complete still image. Compression is based solely on the information within that frame. Interframe compression compares differences between frames and another frame designated as a keyframe.
File sizes for interframe compression are smaller than for intraframe because it's possible to discard more information. It's normal for interframe compression to also use intraframe compression of the keyframes and difference frames (called P-frames). That further reduces file sizes, and is what most of the newer video codecs do.
The complexity of loading keyframes as well as the frames that refer to them has made it difficult to edit interframe video but the power of modern PCs coupled with improved software is causing that to change.
DivX - Owned by DivX Inc and not unreasonably described as the MP3 of video codecs. Like MP3, it is widely used and often associated with illegally-distributed media content (that's one of the political downsides of being a successful means of compressing media). A feature-length DVD can be DivX-encoded to fit onto a CD and still be of a good quality. Most users will notice a difference between the encoded video and the original. However, as with most codecs, the latest version - DivX 6 - gives better results and greater versatility than its forerunners.
XviD - After DivX Inc stopped producing an open source version of DivX, the technology was taken up and transformed into the open source XviD project. XviD is based on standards defined in MPEG-4. It should not be confused with DivX despite the similarities. There are some legal issues that mean some of the technology used in XviD is patented in some countries, limiting where it can be freely used.
WMV - Windows Media Video. Not so much a codec, more a group of steaming technologies which, since WMV 7, has been based on Microsoft's non-standard implementation of MPEG-4. Probably now the most popular method of streaming video over the internet, having overtaken the various methods used by Apple's QuickTime and RealNetworks' RealVideo. Like its audio counterpart, WMV supports licensing and digital-rights management. The latest family member is WMV HD - a high-definition version that can be played back only on a powerful computer with an up-to-date version of Windows Media player, or on a DVD player or media player compatible with WMV.
MPEG-2 – A wide-ranging set of video and audio standards agreed by MPEG. Typically used to produce quality comparable with (and ideally a little better than) that of terrestrial television broadcasts. Came to prominence with the arrival and massive uptake of DVD and takes the credit for squeezing movies onto 12cm discs. Also used for the broadcast of digital standard-definition terrestrial and satellite TV stations because it allows many standard-definition TV channels to be crammed into the limited bandwidth available to broadcasters. Another MPEG-2 application is SVCD video discs that give quality only a little worse than DVD but on CD. The older MPEG-1 video and audio standards are used in a lower-quality video CD format, VCD.
Theora - Another of the Xiph.Org Foundation's babies, and part of the Ogg project. That's why Theora-encoded video tends to be coupled with Vorbis-encoded audio. The codec competes with low bit-rate MPEG-4 compression systems including XviD, DivX, WMV and RealVideo.
Dirac - Still under development – but perhaps ready by early 2005 – Dirac, named after the early 20th-century British physicist, is one of the most interesting video codecs. It was created by the BBC and is being worked on in conjunction with open-source programmers. The intention was to create a free codec suitable for a wide range of video resolutions up to HD. The BBC holds some patents - not to profit from them but to ensure Dirac's survival. Such a codec will lessen the cost to the BBC and its license-holders of the corporation's introduction of internet television services comparable in breadth with its current broadcasts.
RV – RealVideo. A family of streaming video solutions from RealNetworks. At one time, the BBC only supported RealVideo (and RealAudio) but that's changing now and is symptomatic of RealNetworks' declining fortunes. That said, the company, a strong supporter of digital-rights management is capable of creating very fine codecs, as shoot-offs between current contenders still show.
QuickTime - Not a video codec but a multimedia container file that can be credited with kicking off the whole internet streaming-media game. Dealt with below.Indeo – a group of codecs and the one-time king. Formerly the work of Intel but now in the hands of Ligos, an early developer of MPEG codecs and systems.
Containers
Now for the containers in which the data produced by audio and video codecs are wrapped.
ASF - Microsoft's Advanced Streaming Format. Used to stream data over the internet. Not surprising, ASF is likely to be found encapsulating Microsoft's own WMA and WMV data. In theory, though, it could act as a container for just about any audio/video files since ASF only specifies the structure of the stream, not the codecs required. Videos encoded with WMV often carry .asf file extensions and that causes some confusion. So, let's make it clear - ASF is just a container, not a codec.
Ogg - The container commonly used for files based on the codecs of the Xiph.Org Foundation. Given that Vorbis audio files tend to come in this container, people have wrongly begun calling the audio codec Ogg Vorbis. So, remember, Vorbis is the codec, Ogg the container.
AVI - Another container created by Microsoft. It supports almost any compression codec, making it quite versatile. Many files distributed over the Internet or on disc come within this container and it's also been the container most widely used in video editing on Windows PCs.
QuickTime – A genuine innovation from Apple and far more versatile from the off than other container technologies which are still struggling to catch up, though that might not be reflected by Apple's diminished market share. QuickTime allows encapsulation of multiple tracks, each storing a different type of media or data – audio, video, special effects, 3D panoramic images, sub-title text and more
Matroska - An open source project, the Matroska container supports internet streaming and various features often find on DVDs, including chapters, subtitle-selection, audio-selection and more. Useable but still under development. Ultimately the developers hope that Matroska will prove to be a worthy rival to the likes of Microsoft's ASF.
RM - RealMedia is the container used by RealNetworks to encapsulate RealVideo and RealAudio streams. It's often used to stream video and audio content over the internet, although many sites now offer it as one of a choice of streaming formats – in part because users are frequently heard to complain about the invasive nature of RM and are reluctant to install the required proprietary RealNetworks' software and codecs.