Man at desk with camera and laptop.

Common Video File Formats, Codecs, and Containers in 2020

You can spend all of the time and effort you want making amazing video content but it won’t mean anything if you can’t give it to people in a way that they can watch it. This makes choosing the right video file format incredibly important. Unfortunately, video file formats are not as straightforward as many other computer file types. If you’re saving a document or spreadsheet, you don’t have to think much beyond just hitting save. With video, you have to make some decisions about how you want to save your file to ensure that it will work where you want it to. Are you unsure of where to start with choosing a video file format? We’re here to help you figure it out.

What is a Video File Format

The importance of video file formats is the result of two primary factors. First, video files are significantly bigger than most other files you are likely to save, and as video resolutions continue to increase, their file sizes only grow. What format you choose will play a huge role in determining the final size of your video file. The second is that videos have a lot of different parts that need to be put together into the final package. You have not only the actual video portion, but also the audio streams and additional information such as optional subtitles, metadata, in some cases menu structures, and more that has to all work together. Your final video format takes both of these components into consideration. There’s a codec, which compresses (and decompresses) your video and a container that bundles everything together and makes it work with whatever video player you are going to use. Remember, the codec plus the container equals the video file format.

Closeup camera menu.

Codecs

A codec is used to compress and then decompress a video file. This compression can be either lossy or lossless. Lossy compression creates smaller file sizes, but it leaves out some of the data, resulting in lower video quality. This is especially apparent with repeated compressions that lead to a cumulative loss of significant amounts of data. Lossless compression, on the other hand, keeps all of the data from the original file. This gives you higher video quality and prevents progressive degradation from multiple saves. You do, however, end up with larger files. Not all codecs are compatible with all video players. When you decide on what codec to use, you need to consider compatibility as well as the compromise between video quality and file size.

Blackmagic Codecs menu

Common Codecs

There are a few common video codecs that will meet most of your needs.

HEVC/H.265

H.265, also called HEVC, has become the preferred codec for many people. It’s designed specifically for 4K video streaming and offers very efficient compression, giving high quality video with relatively small file sizes. There are still some compatibility challenges with H.265, but at this point most of the streaming video players will readily play it. H.265 is perhaps the most efficient codec currently available, at least until the recently announced H.266 becomes available.

H.264

H.264 was more or less the standard for video streaming for quite a while. It was developed for BluRay discs, but found wide adoption across all kinds of players and streamers. It offers very good image quality and efficient compression, but it’s not as powerful as the newer H.265. If you’re worried about compatibility and don’t mind having a somewhat larger file, H.264 is still probably the safest option.

MPEG-4

MPEG-4 was another extremely common codec for online streaming, though it has lost popularity to H.264 and H.265. There were multiple standards within MPEG-4, with some of them being identical to H.264. MPEG-4 is still very much usable, but you might have to search to find compelling reasons to choose it over H.264 or H.265.

DivX

DivX, along with the open source version XviD, is an older codec that is designed to maximize video quality at the expense of having significantly larger file sizes. It’s still used in a variety of commercial settings where there is less concern over file size, such as when videos are stored and transported directly on hard drives.

Video Containers

Video containers bundle and store all elements of a video into one package. Elements include the video and audio streams, subtitles, video metadata, codec and more. Each video container type is compatible with certain video codecs. Your video editing software should only allow you to choose compatible pairings, but try to plan what codec and container you want to use ahead of time, to avoid running into issues when you go to render your final video.

Common Video Containers

Like video codecs, there are a few common video containers to choose from.

MP4

The .MP4 container is probably the closest thing to a universal standard that currently exists. It can use H.265, H.264, and all versions of MPEG-4 are compatible with a huge range of players. Videos using the .MP4 container can have relatively small file sizes while retaining high quality. Many of the largest streaming services, including YouTube and Vimeo, prefer .MP4.

AVI

One of the oldest and most universally accepted video file formats is .AVI. It can use an enormous range of codecs, resulting in a large variety of different file settings. While .AVI videos can be played on a wide range of players, file sizes tend to be large making it less ideal for streaming or downloading. It’s a great option for videos you plan to store on a computer.

MOV (Quicktime)

Apple developed the .MOV container to use with its Quicktime player. Videos using .MOV generally have very high quality, but also fairly large file sizes. Quicktime videos don’t have as much compatibility with non-Quicktime players, though there are third party players that will read them.

FLV (Flash)

Made for Adobe’s Flash player, .FLV videos were extremely common for a number of years thanks to their very small file size and a wide range of browser plugins and third party Flash video players. There has been a significant decline in Flash videos recently. Flash video is still hanging in there, but just barely.

WMV (Windows Media)

Windows Media videos tend to have the smallest file size, which makes them a good option if you need to send through email or other methods with file size limits. However, this comes with the tradeoff of having a significant drop in quality. A common use for .WMV is emailing video previews to clients.

What Video File Format Should You Use?

Consider how you will be distributing and delivering your video. In 2020, .MP4 and H.265 are a good choice, but H.264 is also still valid if you’re concerned about compatibility. These are preferred by sites such as YouTube and are commonly available on video cameras. Learn more about how to choose a camera for vlogging in The 15 Best Cameras for YouTube Videos. Deciding on the best file format is based on your specific needs. Keep in mind your audience and how they’ll be watching your videos. Refer back to our guide for common codecs and containers to help with your decision.

This post has been updated to reflect recent recommendations.

Ivan Quinones is San Jose based and has a background in filmmaking. He studied film at Brooks Institute of Film and Photography in Ventura, California. He then moved to Los Angeles to work on the production side of filmmaking. He is currently working on his own film projects and street photography while working as a repair technician at Borrowlenses.com.

7 Comments

  • Stu

    I’m dealing with the old “one person’s computer WILL play the video, but another person’s computer WON’T” LOL, not so much which codec is the best, but what is a codec etc? And HOW to adjust the default apps in win 10 so that it DOES play the video!

  • lisa cambruzzi

    Hi!
    I’m struggling to find the right video format for a vodeo course. From a first tes it semms that many devices don’t support eithet the audio or the video format that I’ve choose. Can you kindly have a look in the details and tell me what do you think can be the main issue in compatibility with this format:
    Thanks a lot in advance. I’m going mad!!

    General
    Complete name XXXXXXXXXXXXXXXX
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 42.8 MiB
    Duration : 8 min 51 s
    Overall bit rate mode : Variable
    Overall bit rate : 675 kb/s

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L5.1
    Format settings : CABAC / 3 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference : 3 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 8 min 51 s
    Bit rate : 492 kb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 25.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.009
    Stream size : 31.2 MiB (73%)
    Codec configuration box : avcC

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : mp4a-40-2
    Duration : 8 min 51 s
    Bit rate mode : Variable
    Bit rate : 176 kb/s
    Maximum bit rate : 192 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 44.1 kHz
    Frame rate : 43.066 FPS (1024 SPF)
    Compression mode : Lossy
    Stream size : 11.2 MiB (26%)
    Default : Yes
    Alternate group : 1

  • RenderSys1608

    The best video codec for high compression would be hevc or h265 however this codec isn’t really royalty free and not many devices can support it natively. Another choice could be h264 using crf 23.
    A preferable container would be mp4 as many devices support it (the only codec that can be put in mp4 is the mpeg family codec including h264 and h265).

  • Saigo

    what video codecs and containers are recommended for video clips 20 mbs to 60 mbs, and lengths of 10 min to 30 mins, with high quality?

  • Kasio joseph

    I will appreciate very much for your support

  • Rusty

    This is just what I needed and is so well set out. I’m just dipping in to this area and so much to learn. Thanks for putting it together.

  • Karran

    Its awesome knowledge you have given

Comments are closed.

Get 20% your first rental with promo code BLOG20

Cameras
Mirrorless, Medium
Format and more.

Lenses
Anamorphic, Cinema,
Wide Angle and more.

Lighting
Aputure, Manfrotto,
Profoto and more.

About BL

BorrowLenses is an online camera gear rental service that started in the San Francisco Bay Area in 2007. We offer a wide selection of camera gear ranging from camera bodies, lenses, lighting and accessories. We make it easy to rent gear by shipping your order straight to you.