The world of video formats can be pretty confusing, but there are only a few things you really need to know. First, it’s important to note that a video format is more than just its file extension. Extensions like AVI are not, in fact, video codecs—they’re containers. A container is the file format which can use multiple different codecs—such as DivX or x264—to compress a certain standard of video—such as MPEG-4 or H.264, respectively—into a hard-drive friendly amount of space. Here’s what you need to know about both codecs and containers, and what that means for the videos you rip yourself.
What Is a Codec?
Most of the video you’ll come across is compressed, meaning its been altered to take up less space on your computer. For example, a regular Blu-Ray disc usually takes up around 30 or 50GB of space—which is a lot for a normal person to download or store on their hard drive. So, we compress movies to make them more manageable, usually with some loss in video quality. A codec compresses and decompresses data. It interprets the video file and determines how to play it on your screen. Your computer comes with many codecs pre-installed, though you can install codec packs for wider support, or a program like VLC orPotPlayer (which we prefer to codec packs). Some examples include:
- FFmpeg (which includes formats like MPEG-2, the format in which DVDs are stored, and MPEG-4, which is the video format Apple uses in the iTunes store)
- DivX, which works with a certain type of MPEG-4 file, and was often used to rip DVDs in the pre-HD era
- XviD, an open source version of DivX, popular among movie pirates
- x264, which compresses H.264 videos (Also known as MPEG-4 AVC), and is very popular for high definition videos
There are a lot of different codecs out there, and it can get really confusing with all the different versions of MPEG standards.
What Is a Container?
A container is, essentially, a bundle of files. Usually a container consists of a video codec and an audio codec, though it can also contain things like subtitles. Containers allow you to choose one codec for your video and one for your audio, which is nice—that way, you can choose to use the high-quality DTS audio, or compress your audio to something like MP3 for even more space savings. It just gives you a bit more control over how you record your videos or rip your movies. Popular containers include:
- Matroska (which uses the extension MKV)
- MP4 (which has been popularized by Apple in the iTunes Store—note that this can also come with the M4V extension, but the container is the exact same)
- MOV (which was created by Apple)
The main difference between different containers is not only the codecs they support but what other features they support—like subtitles or chapters. These days, MKV is an extremely popular container, mainly because it supports nearly any video codec under the sun, as well as a ton of extra features (plus it’s open source).