Your Guide to Popular Video Container Formats and Codecs

Your Guide to Popular Video Container Formats and Codecs Featured Image

Videos arrive on your screen with a wide variety of extensions, and it can be confusing to keep what they all mean straight. You can use this guide to get a handle on popular video container formats and compression codecs.

What’s a video container?

video-container-codec-comparison-1

A video container format, like any other digital container format, is essentially a digital wrapper for your content. They’re easy to distinguish because they determine the extension of your video file. Popular container formats include MP4 (.mp4), AVI (.avi), QuickTime (.mov) and Matroska (.mkv).

The different container formats all have different strengths and weaknesses, with certain formats preferred by certain content providers. Not all containers support all compression standards or allow for secondary features like subtitles and chapters. The container itself doesn’t effect the quality of the video directly, but it can limit the compression codecs available for use.

If you’re choosing a container format to use for an encoded video, you’ll want to pick one that has the right mix of supported compression codecs and features.

video-container-codec-comparison-2

  • Matroska (.mkv): The Matroska format is one of the most flexible container formats available, but it’s 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 like MakeMKV and VLC. It’s also freely licensed, avoiding the patent-encumbered status of most container formats.
  • MP4 (.mp4): MP4s are widely supported and flexible and might be the best all-purpose container format for current usage. They’re not as infinitely flexible as .mkv files, but they support the majority of modern-day codecs and include options for streaming, chapters, subtitles and more. MP4 files are natively supported by nearly every modern device.
  • QuickTime (.mov): Apple’s proprietary QuickTime format is the choice for professional video, supporting a huge range of high-quality codecs for the highest-fidelity content delivery. QuickTime files can be played back in Microsoft’s Media Player and are supported by many non-Apple devices.
  • AVI (.avi): The AVI format is likely the worst on this list. It doesn’t support chapters, captions or subtitles by default, and it can’t support menus or streaming. Even players that support AVI playback typically break when seeking through a video. However, AVIs are extremely flexible, accommodating just about any video codec that exists. This once made it a key choice for heavily-compressed videos, 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 devoted to the topic.

video-container-codec-comparison-3

Compression codecs are the algorithms used to compress digital video for distribution. Unlikely container formats, they’re essentially invisible to the viewer. There are dozens in existence, but only a handful are widely used.

  • H.264/MPEG-4 AVC: While H.264 might be the most popular modern codec, its days are numbered. It’s a powerful compression codec designed specifically for digital HD video, achieving a good mix of quality of space savings. H.264 playback is nearly universally supported, from DSLR video to embedded playback. However, the steady move towards higher-resolution video means that H.264 won’t be around for much longer.
  • H.265/HEVC: Unlike it’s 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 up about half as much disk space. It’s not yet supported on every device, but its popularity will continue to grow in the years to come.
  • WMV: Microsoft’s proprietary WMV format has drawn some flack over the years for its association with broken digital rights management implementations. It’s a custom implementation of the MPEG-4 Part 2 standard and is supported almost exclusively by Microsoft software. It’s fallen out of use in favor of more broadly-usable compression codecs.
  • MPEG-2: The ancient MPEG-2 codec was originally created for DVDs, and its age shows. It should only be used for legacy hardware compatibility or when mastering DVDs specifically.
  • Pro-Res: This professional-grade codec is used for sharing high-resolution footage with minimal degradation, and it’s best suited for content delivery by multimedia professionals.

Conclusion

If you need to choose a video container and compression codec, a combination of MP4 container and H.264 codec will probably be the best choice. It’s flexible and broadly playable, making it a great fit for delivery to unknown devices. But if you work with higher-resolution video, you’ll want to further investigate the H.265 standard.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Alexander Fox Avatar

Read next

ARPANET sent its first message on 29 October 1969 from a lab at UCLA to a machine at Stanford, and the message was supposed to read ‘LOGIN’ — but the system crashed after the L and the O, meaning the first word ever transmitted over the network that became the internet was, by accident, ‘LO’.
In 1995, Microsoft shipped a cartoon-house interface called Bob, led by Melinda French, who married Bill Gates while it was in development — it demanded twice the memory of a typical home PC, sold roughly 30,000 copies, and was dead within a year, leaving behind the font Comic Sans and the animated assistant that became Clippy.
The Greenland shark grows about one centimetre a year, does not reach sexual maturity until around age 150, and a specimen carbon-dated by Danish researchers in 2016 was estimated to be at least 272 years old, meaning it was already swimming the North Atlantic when Mozart was composing symphonies.
When Apple shipped iOS 12 in June 2018, a small feature called Screen Time slipped onto every iPhone with a counter nobody had quite prepared for — a tally of pickups — and within a day Tim Cook was telling CNN the number of times he picked up his own phone was simply too many
When NASA lost contact with the IMAGE satellite in 2005, an amateur radio operator in Canada named Scott Tilley picked up its signal in January 2018 while hunting for a classified spy satellite, and the spacecraft turned out to be still spinning, still powered, and still trying to phone home after 13 years of silence.
The original iPhone Steve Jobs unveiled in January 2007 could not record video, could not copy and paste text, could not run a single third-party app, and could only reach the internet over 2G — and Jobs spent ninety minutes on stage at Macworld arguing, one missing feature at a time, that every absence was actually a design decision.
In 1965, Joe Sutter’s Boeing team began shaping the 747 around a future they thought would belong to supersonic jets, lifting the cockpit onto a hump so the nose could open for cargo once the giant subsonic passenger plane had outlived its brief moment
Apple’s original 1984 Macintosh keyboard had no arrow keys, no function keys, and no numeric pad because Steve Jobs wanted users to reach for the mouse first. Then Apple quietly sold the missing keys as an accessory.