A Guide to Codecs and Containers (or "MKV? AC3? WTF?!")

Definitions

  • Codec: A contraction of “compressor/decompressor”, a codec is a mathematical algorithm used to compress audio or video for easy storage or transmission, and then decompress it for viewing. Different codecs have different pros and cons, and there really isn't one perfect codec for all occasions. The most common video codecs on CG are Divx/Xvid and h.264, and the most common audio codecs are MP3 and AC3.
  • Container: A protocol for arranging audio/video/subtitle tracks in a single file. If a video file is a sandwich, the audio and video tracks are the meat and cheese, and the Container is the bread that holds it together. The two most common containers on CG are AVI and MKV.

—–

Video Codecs

  • Divx/Xvid: The closest thing to a “standard” codec for videos distributed over p2p. Divx and Xvid are both reverse-engineered hacks of the original MPEG4 codec. They are very similar in structure, and most programs/devices that can play one can play both. Divx is the most commonly supported codec by standalone video players (DVD players and PMPs). It compresses and decompresses fairly quickly and has a very decent compression ratio. It does not produce the highest quality video, but it is not bad. Many people feel that the minor reduction in quality (compared to h.264) is a fair trade for higher compatibility.
  • H.264: The highest quality video codec available, h.264 will give a much more detailed picture at the same file size as Divx (or a significantly smaller file size for the same level of detail). This the preferred codec for people who want a video file that is virtually indistinguishable from the original DVD. The down side of this codec is that few standalone players support it. It is also very taxing to encode and decode. Encoding h.264 videos can take 2-3 times longer than divx, and older computers (even some new netbooks) cannot play it back. X.264 is an open-source, reverse-engineered version of h.264. The two are similar enough that any device that can play one can play both, so the two names can be used interchangeably.
  • MPEG2: This is what all DVDs are encoded with. MPEG2 is an old codec and it is not very efficient, which is why DVDs take up 4-8GB and divx or h.264 rips look nearly as good and are only 1-2GB. The benefits of MPEG2 are that it is very easy to encode and decode, which is why many camcorders and capture cards record in this codec. It is also the most universally playable, as any DVD player can play back (properly formatted) MPEG2 video.

—–

Audio Codecs

  • MP3: By now everybody should be familiar with the MP3 (MPEG2 layer 3) audio codec. It is the nearly-universal standard format for audio compression. It gives a very good compression ratio and is playable by almost all devices. Its only down side is that it is limited to two channels (stereo).
  • AC3: Also known as Dolby Digital (DD), AC3 is a multichannel audio codec used on most DVDs. It is not as compressed as MP3 (which leads to larger file sizes), but is of slightly higher quality and is capable of 5.1 channel surround sound. Higher quality rips will often keep the original 5.1 AC3 track intact if it is available on the disc.
  • AAC: Advanced Audio Coding is a successor to MP3. This is Apple's default audio codec for its iPod and iPhone devices. Though technically (slightly) superior to MP3, it is usually only found in MPEG4 files that have been encoded specifically for the iPod.
  • FLAC: Free Lossless Audio Codec is exactly what it sounds like. It is an open source lossless standard for delivering an exact duplicate of CD audio. It is almost never used in a video file container, but you will occasionally see high quality sountrack rips in this format.

—–

Containers

  • AVI: Audio Video Interleave is a long-time standard for video files on the computer. Although technically capable of housing any media in any codec, it is most frequently used for Divx/Xvid video with MP3 or AC3 audio. The container's only limitation is that it only allows for one audio track and cannot contain subtitles. Sub tracks for AVI files are usually included in separate files.
  • MKV: The Matroska container is a fairly new one, developed to overcome some of AVI's limitations. It can contain multiple audio and subtitle tracks, as well as chapter breaks and basic menu features. Technically any audio or video codec can be contained in an MKV file, but it is generally used for h.264 video and AC3 audio.
  • VOB: This is the container used by the DVD spec. You will probably never see a VOB file distributed on its own, but if you open up a VIDEO_TS folder in a DVD, the VOB files are the ones that contain the audio, video, and subtitle data.
  • MPEG4: Another attempt to replace AVI, this is the container used by Apple for iPod/iPhone video. It will usually have a .mp4 or .m4v extension and contain h.264 video with AAC audio.

—–

Subtitle Formats

  • SRT: Sub Rip Text files are basically just text files that have been formatted with timecodes. The timecodes tell the video player when to display each line of text. This is the most popular soft-sub (not permanently burned into the video) format, and can either be included in a MKV file, or provided with an AVI as a separate .srt file.
  • SSA: SubStation Alpha is a more advanced text-based subtitle format. It allows for more color, formatting, and placement options than SRT. Though technically superior, it is not used as frequently as SRT due to its lower compatibility with hardware and software players.
  • VOBsub: On a DVD, subtitles are stored as images which are displayed on screen at specific times. VOBsub rips these images and timecodes and saves them as .sub and .idx files respectively. Many software video players will recognize and play back sub/idx subtitles that are either included in MKV files or are named the same as an AVI file.

—–

Less Popular Codecs and Containers

  • MPG: The original MPEG1 container/audio/video codec. It is very much outdated and surpassed by other options. Generally, if you see an MPG file on CG, it is a direct VCD rip.
  • VCD/SVCD: An older method for compressing video (~1hr for VCD, ~40min for SVCD) on to a standard CD. This format was popular in Asian countries in the late 90s, but never really caught on elsewhere. It uses the older MPEG1 audio and video codecs, which provide very poor quality compared to newer codecs. These disc images are only acceptable as a “last resort” if no other copies of a film are available. Though they will play back in most DVD players, they are undesirable due to their low resolution (352×240 for VCD, 352×480 for SVCD) and poor compression.
  • MOV: Apple's original Quicktime format, the MOV container is being replaced by MPEG4.
  • RealMedia: RealNetworks container format for their proprietary audio and video codecs. Usually seen with a .rm extension, this container is primarily used for streaming web video and is almost always of low quality. Additionally, hardly any standalone devices are capable of playing it.
  • OGM: The Ogg Media container is a competitor to MKV. It has an almost identical feature set, but it has not become nearly as popular, and has poorer device compatibility. It is sometimes used by Anime fansubbers, but hardly anyone else.
  • FLV: The Flash Video container is used almost exclusively for streaming web video on sites like Youtube and DailyMotion. Any .flv video was almost certainly ripped from one of these sites and will be of low quality.
  • WMV: Microsoft's Windows Media Video format. This container is used exclusively by Microsoft along with their proprietary audio and video codecs. Its use is to be avoided as it is difficult to play back on non-windows PCs and most standalone players.
  • DTS: This audio codec is a competitor to AC3. It is technically superior to AC3, though only someone with good ears and very good home theater equipment would notice a difference. DTS tracks are only included on big-budget DVD releases of major films. In other words: nothing that is likely to end up on CG.

guides

About WikiTorrents: WikiTorrents is user-created wiki pages of BitTorrent links to movies, music, & more. Pages have a theme, like a category, person, or subject. This site specializes in feature-length videos in "good enough" quality and encoded in XViD / DiVX / MP4 / H.264 / ISO that use public torrents. WikiTorrents links to many trackers and BitTorrent search engines. We welcome links to videos that are mainstream, documentary, artsy, independent, rare, and obscure.

WikiTorrents is not your typical BitTorrent site. WikiTorrents is not a tracker. WikiTorrents does not host torrent files. Torrents are linked in user-created pages that are practical and useful. For example, WikiTorrents links to over 1,000 feature-length documentaries, sorted by category, to assist you in your own personal quest for knowledge and understanding. Our goal is that you will use WikiTorrents for both research and entertainment purposes.

To use a .torrent file requires a BitTorrent app, like uTorrent or Azureus Vuze. To share a .torrent requires a tracker, like OpenBitTorrent. To watch movies requires a media player, like VLC, Media Portal, and ffdshow tryouts.