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

Inside a six-walled wedge-foam chamber on Microsoft’s Redmond campus, the background sound is so far below human hearing that visitors start to perceive the grinding of their own joints, the rush of blood in their ears, and eventually a faint ringing that turns out to be the firing of their own nerves.
In November 1988, an unmanned Soviet space shuttle called Buran flew a full orbital mission and landed itself in a blizzard at Baikonur without a single human input, and three years later the country that built it no longer existed.
In 1901, sponge divers off the Greek island of Antikythera pulled a corroded lump of bronze out of a Roman shipwreck, and it sat in an Athens museum for half a century before anyone realised they had found a 2,000-year-old computer that could predict eclipses 19 years in advance.
When Boeing 747-400 pilots needed to update their navigation database as late as 2020, a technician would walk onto the flight deck with eight 3.5-inch floppy disks and feed them one at a time into a slot beside the captain’s seat, because recertifying anything newer than the 1989 avionics would have cost hundreds of millions of dollars.
When the U.S. military finally deployed frequency-hopping spread spectrum on Navy ships during the 1962 Cuban Missile Crisis blockade, the patent that described the technique had expired three years earlier, and its inventor was watching the news in a Los Angeles bungalow without any idea her idea was at sea.
Suzanne Simard sealed paper birch and Douglas fir seedlings inside plastic bags, fed them carbon-14 and carbon-13 dioxide, and nine days later found carbon had crossed between species through fungal threads in the British Columbia soil beneath her boots
In the small hours of 2 September 1859, a telegraph operator in Portland, Maine disconnected his batteries because they were throwing sparks, and then discovered he could still send a clean message to Boston using nothing but the current the aurora was pushing through the wire above his head.
In 1992, a container ship leaving Hong Kong lost 28,800 plastic bath toys overboard in the North Pacific, and oceanographer Curtis Ebbesmeyer spent the next two decades tracking yellow ducks and blue turtles as they washed up in Alaska, Maine, and eventually the coast of Scotland, quietly rewriting the textbook map of ocean currents.