Updated 10 July 2009
There are wide range of different digital audio and video formats, encoders and decoders available today. A format is a way to compress something. An encoder is software that implements the format and actually does the compression. The encoder is very important; it doesn’t matter how good the format is if the implementation is bad. A decoder is a program that decompresses something, either so it can be encoded by an encoder or so it can be watched or listened to.
It is very common to not know the difference between the video and audio format and the container format. The video and audio streams (encoded to a format with an encoder) are contained inside the container format.
There are two types of video and audio compression formats, lossy and lossless. Lossy compression formats will eliminate some of the information when compressing while lossless formats will not. How much information will be eliminated varies according to the settings. Information that is judged to be the least important will be the first to be eliminated. There is often little quality difference between high bitrate lossy compression and lossless compression (making the high bitrate lossy version indistinguishable from the source; transparent), but there is often a very big size difference. Deciding whether to use a lossy or lossless format means judging whether the great decrease in file size is worth the loss of information. Lossless is rarely used with video due to the fact that most videos are already in lossy formats (DVD video, Blu-ray video, etc) and because the bitrate is very high. Lossless is more popular with audio because CD audio is lossless and lossless audio is often around the more manageable bitrate of 800-1000Kbit/s.
Due to the fact that lossy formats eliminate information each time they encode, it is usually a bad idea to encode from one lossy format to another if you value quality, unless you are going to use very high bitrates. This applies more to audio than video, as DVDs use lossy formats and most people find the quality of DVDRips (lossy files encoded from a lossy source) acceptable. Since lossless formats do not eliminate information, it is safe to encode from a lossless format to another lossless format as much as you want, but it is not recommended to encode from a lossy format to a lossless format because it gains no quality (although it does not lose any either) but results in a much larger file size. It is also important to understand that once a lossy encoder eliminates some information, it is gone. Encoding a 128Kbit/s MP3 file to 320Kbit/s will only degrade the quality and greatly increase the file size. It will not sound like a 320Kbit/s MP3 file encoded from a CD.
Video Formats
MPEG-1 Part 2 (VCD video): An old format that is of little use today. Most commonly encountered as 1,150Kbit/s constant bitrate (CBR) 352×288 or 352×240 video on a Video CD, with quality comparable to that of a VHS. There is very little reason to encode to this format unless you want to burn it to a CD and play it back in a standard DVD player.
MPEG-2 Part 2 (DVD video): Very similar to MPEG-1 Part 2 but used at higher bitrates and with a variable bitrate (VBR; where the scenes that need more bitrate will get it, and the scenes that need less bitrate will get less) instead of a constant bitrate like VCD video. Most commonly encountered as video on a DVD. There is very little reason to encode to this format unless you want to burn it to a DVD and play it back in a standard DVD player.
Theora: Most notable for being open and free of royalties but its quality currently isn’t comparable to H.264.
MPEG-4 Part 2 ASP: A very popular format, widely used on the internet and supported by most video players. The format is often incorrectly referred to as Xvid or DivX, which are actually popular ASP encoders. Most commonly encountered on the internet with a size equivalent to one CD (700 MiB) or any multiple of this size. It enjoys wide support (except for certain features of the format which are used in some encodes) on the various DivX certified DVD players. It can also be decoded in real-time on older computers due to the lack of complexity, unlike newer formats.
VC-1: Microsoft’s modern video format intended to compete with H.264. It isn’t quite as good as H.264 but it is less processor intensive to decode. It is part of both the HD DVD and Blu-ray standards.
MPEG-4 Part 10 AVC/H.264: A format that isn’t as popular as MPEG-4 ASP but is much more modern and complex, resulting in greater encoding efficiency but slower decoding. The format is often incorrectly referred to as x264, which is actually a popular H.264 encoder. Most commonly encountered on high definition video (though it is not restricted to it) and videos made by Apple. It enjoys support (except for certain features of the format which are used in some encodes) on devices such as the PlayStation 3, Xbox 360, and Apple TV. It is also supported by the iPod, but with many very important features disabled, resulting in lower quality video (but easier to decode, which is important on a small portable device).
Audio Formats
MPEG-1 Audio Layer 2 (MP2): The predecessor to MP3 that is of little use today except sometimes on DVDs and in audio broadcasting.
MPEG-1 Audio Layer 3 (MP3): A very popular format, widely used on the internet and supported by most audio players. Most commonly encountered on the internet at 128Kbit/s when it goes with a video and 128-320Kbit/s when just used for music. It usually achieves solid transparency with music at 192Kbit/s, compared to modern (but less supported) formats such as AAC and Vorbis that can achieve transparency at 128Kbit/s. However, what bitrate achieves transparency varies depending on the audio, the listener, and the equipment being used. It enjoys very wide support on almost every software and hardware audio player.
Advanced Audio Coding (AAC): The successor to MP3. More modern and efficient, but without the almost universal support that MP3 has. Most AAC is LC-AAC, but there are also the HE-AAC and HE-AAC v2 extensions. HE-AAC is used to make low bitrates not sound as bad (but not to make them sound transparent), while HE-AAC v2 is used on even lower bitrates and only works with stereo. LC-AAC is usually at a bitrate of 128Kbit/s for stereo and 256-320Kbit/s for 5.1ch, while HE-AAC is usually at 48-64Kbit/s for stereo and 128-192Kbit/s for 5.1ch. HE-AAC v2 is usually at 24-32Kbit/s for stereo. LC-AAC offers quality that is equivalent to the best formats available, if a good encoder is used.
Vorbis: Most notable for being open and free of royalties, while still offering quality that is equivalent to the best audio formats available. It doesn’t have as much support as AAC, which has similar quality, but it is popular among the open source community. Not recommended for 5.1ch because of a lack of channel coupling for that channel configuration in available encoders. Vorbis is often incorrectly referred to as OGG, which is actually a popular container format for Vorbis.
Musepack (MPC): Based on MP2 but with improvements and optimized for transparency at 160-180Kbit/s. It offers a quality that is equivalent to the best formats available, AAC and Vorbis. Most commonly used for music.
Dolby Digital (AC-3): Commonly found on DVDs at 192Kbit/s for stereo and 384Kbit/s or 448Kbit/s for 5.1ch. It isn’t as efficient as newer formats that can also do 5.1ch sound such as AAC, but it is popular to copy directly from the source and include with videos instead of transcoding to another lossy format and losing quality.
Digital Theater System (DTS): Commonly found on DVDs at 1,536Kbit/s or 768Kbit/s for 5.1ch. It isn’t as efficient as newer formats that can also do 5.1ch audio such as AAC. Due to the high bitrate, it isn’t very popular to include with videos unless the video itself is high bitrate (such as some DVD5 or DVD9 size BDRips and HDDVDRips).
Free Lossless Audio Codec (FLAC): The most popular lossless audio format on the internet. It is an open format and free of royalties. It rivals other lossless formats in compression (being lossless, the quality is all the same as the source) and has a fast decoding time.
WavPack: An open lossless format that achieves slightly better compression than FLAC but is less widely used.
Container Formats
Audio Video Interlave (AVI): A very old and outdated container that is usually used with ASP video and MP3 or AC-3 audio. It is still the most popular container on the internet, despite it needing hacks to support modern video formats such as ASP and even more hacks to support the even more modern H.264 format. This container format is recommended when using ASP video and MP3 or AC-3 audio because of player compatibility, but using it with H.264 video is not recommended because it does not help with player compatibility.
MPEG-4 Part 14 (MP4): A modern container format, commonly used with H.264 and AAC but supports some other formats such as ASP, MP3 and AC-3 that are not widely used with it. It is the recommended container for H.264 when using AAC because it is the container that is most widely supported with H.264, being supported by various Apple products, the Xbox 360, and the PlayStation 3, among other players. It is sometimes incorrectly renamed with the .m4v extension for files with video, or .m4a for files that are just audio.
Matroska: A modern container format, commonly used with H.264 and Vorbis or AC-3 but supports a wide variety of other formats. It does not have as much support as MP4 does with H.264, but it is far more open with what it supports, which is why it is the recommended container for H.264 when not using AAC or any other audio format supported by MP4.
Video Encoders
x264: A free and open source H.264 encoder which is usually superior to commercial proprietary encoders that are often very expensive. It is under heavy development and is constantly being improved, which is why using a recent version is recommended.
Xvid: A free and open source ASP encoder that is the standard for ASP encoding.
DivX: A proprietary ASP encoder that was previously the standard for ASP encoding but can still rival Xvid with quality. It is also the name of the company that makes it.
Audio Encoders
LAME: A free and open source MP3 encoder. It is highly optimised and generally considered to be the best quality MP3 encoder available.
FAAC: A free and open source AAC encoder. It lacks the quality of some of the proprietary AAC encoders but is still widely used in many programs such as Handbrake and MEncoder.
Nero AAC: A proprietary AAC encoder that is free of cost. It is recommended instead of FAAC for AAC encoding. Binaries are available for Windows and GNU/Linux.
Comparisons
http://mirror05.x264.nl/Dark/website/compare.html – Dark Shikari, one of the x264 developers, has done a visual comparison of several different video encoders on three different videos. x264 has improved even more since the test, however.
http://mirror05.x264.nl/Dark/x264vsElecard/index.html – Another comparison by Dark Shikari, but only comparing two H.264 encoders (x264 and Elecard) with many frames from one video.
Submit Comment
Sorry, but commenting on this post is disabled.