Videos come to your screen with a wide variety of extensions, and it can be confusing to keep track of what they all mean. You can use this guide to familiarize yourself with popular video container formats and compression codecs.
ContentsWhat is a Video Container? Popular Container Formats Popular Compression Codecs Conclusion
What is a video container?
- Matroska (.mkv) :The Matroska format is one of the most flexible container formats available, but it is not widely supported. It can hold just about anything and supports a full range of subtitle, chapter, and audio options. However, encoding and playback requires the installation of third-party utilities such as MakeMKV and VLC. It is also freely licensed, avoiding the encumbered patent status of most container formats.
- MP4 (.mp4) :MP4s are widely supported and flexible and might be the best general-purpose container format for today's usage. They aren't as endlessly flexible as .mkv files, but they support the majority of modern codecs and include options for streaming, chapters, subtitles, and more. MP4 files are natively supported by almost all modern devices.
- QuickTime (.mov) :Apple's proprietary QuickTime format is the ideal choice for professional video, supporting a wide range of high-quality codecs for the highest fidelity content delivery. QuickTime files can be played in Microsoft Media Player and are supported by many non-Apple devices.
- AVI (.avi) :The AVI format is probably the worst on this list. It does not support chapters, captions, or subtitles by default, and it cannot support menus or streaming. Even players that support AVI playback usually break when searching through a video. However, AVIs are extremely flexible and adapt to almost all existing video codecs. This once made it a key choice for heavily compressed video, but it has since been supplanted by Matroska's superior implementation and flexibility.
You can see more comparisons on other video container formats on the Wikipedia page dedicated to the subject.
Popular compression codecs
Compression codecs are the algorithms used to compress digital video for distribution. Unlikely container formats, they are essentially invisible to the viewer. There are dozens of them, but only a handful are widely used.
- H.264/MPEG-4 AVC :Although H.264 is the most popular modern codec, its days are numbered. It is a powerful compression codec designed specifically for digital HD video, offering a good mix of quality and space saving. H.264 playback is almost universally supported, from DSLR video to embedded playback. However, the constant move towards higher resolution video means that H.264 won't be available for very long.
- H.265/HEVC :Unlike its predecessor, H.264, the H.265 codec can handle video up to 8K UHD. This modern successor to H.264 also compresses video twice as efficiently, with files of the same visual quality using about half the disk space. It is not yet supported on all devices, but its popularity will continue to grow in the years to come.
- WMV :Microsoft's proprietary WMV format has drawn some criticism over the years for its association with broken digital rights management implementations. It is a custom implementation of the MPEG-4 Part 2 standard and is supported almost exclusively by Microsoft software. It fell into disuse in favor of more widely usable compression codecs.
- MPEG-2 :The old MPEG-2 codec was originally created for DVDs, and its age is showing. It should only be used for legacy hardware compatibility or when specifically mastering DVDs.
- Pro-Res :This professional-grade codec is used for sharing high-resolution footage with minimal degradation, and is best suited for streaming content by multimedia professionals.
If you need to choose a video container and a compression codec, a combination of MP4 container and H.264 codec will probably be the best choice. It is flexible and widely playable, which makes it a great choice for streaming on unknown devices. But if you're working with higher resolution video, you'll want to dig deeper into the H.265 standard.