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

Your phone does not actually know how much battery it has left; a fuel-gauge chip estimates the percentage from current, voltage, temperature, and a model of the cell, with a late correction sometimes turning 15 percent into 3 percent in less than a minute
When you type an address into a browser, your computer first asks a DNS resolver for the site’s IP — a query that may bounce through your router, your ISP, and one of just 13 root server clusters before the page ever begins to load
Voyager 1 is still transmitting from more than 25 billion kilometres away, powered by less than 250 watts of decaying plutonium — a signal that now takes over 23 hours to reach Earth, carried by a radio no stronger than a refrigerator lightbulb
In September 1947, engineers at Harvard pulled a moth from a relay inside the Mark II computer, taped it into the logbook, and wrote ‘first actual case of bug being found’ — the pest was literal
When Sony shipped the first Walkman in 1979, chairman Akio Morita insisted on a second headphone jack and a “hotline” talk button, convinced it would be rude for one person to listen to music alone — and within a few years buyers had ignored the sociable features so completely that Sony quietly dropped them
Russia still custom-builds the Soyuz return seats for ISS crew members using plaster casts taken weeks before launch, because astronauts grow as much as five centimetres taller during a long-duration stay and a seat moulded to their Earth-shaped spine would no longer fit the body that comes home
The “CrackBerry” nickname stuck for a reason — and the variable-reward psychology that hooked early-2000s executives on their BlackBerrys is the exact same machinery now running every push notification on every smartphone in your pocket
In 1843, Ada Lovelace described a brass-and-punched-card engine that could act on symbols as well as numbers, even composing music if harmony could be reduced to rules, inside seven translator’s notes three times longer than the paper itself