Learn
Video File Formats Explained

Video files are more complex than they appear. A single .mp4 file contains multiple streams of data, compressed using specific algorithms, all wrapped in a standardised structure. Understanding that structure helps you make better decisions about how you store, edit, and deliver video, whether you are working on a short social clip or managing terabytes of production footage in a workspace like Fabric.
Containers vs codecs: the core distinction
The most important concept in video file formats is the difference between a container and a codec. They are often confused because file extensions refer to containers, but the codec inside is what determines quality and file size.
A container is the wrapper. It is a file format that holds video, audio, subtitles, metadata, and other streams together in a single package. Think of it as an envelope: it organises and structures the contents but does not determine how those contents were created. Common containers include MP4, MOV, MKV, AVI, and WebM.
A codec is the compression method applied to the video and audio data inside the container. "Codec" is short for coder/decoder: it defines how raw video data is compressed for storage and decompressed for playback. H.264, H.265, ProRes, and AV1 are all codecs. For a deeper look at how codecs work and how they compare, see our guide to video codecs.
The same codec can live inside different containers. H.264 video, for example, can be wrapped in an MP4 file, a MOV file, or an MKV file. The container determines compatibility with players and editing software; the codec determines quality, file size, and editing performance. When someone says "I'll send you an MP4," they are specifying the container. The codec inside could be H.264, H.265, or something else entirely.
This distinction matters in practice. If a piece of editing software cannot open a file, the issue might be the container, the codec, or both. Renaming a .mkv file to .mp4 will not fix a codec incompatibility, because the underlying compressed data has not changed.
The major containers
MP4 (MPEG-4 Part 14)
MP4 is the universal video container. It works on virtually every device, operating system, browser, and media player in existence. If you need to send a video to someone and you do not know what they will play it on, MP4 is the safe choice.
MP4 supports H.264, H.265, and AV1 video codecs, along with AAC and MP3 audio. It handles chapter markers, subtitles, and basic metadata. Most cameras, phones, and screen recorders output MP4 by default. Social media platforms, messaging apps, and web browsers all expect it.
The variant M4V is essentially MP4 with Apple's DRM layer. You will encounter it primarily in content purchased from the iTunes Store. For practical purposes, M4V and MP4 are the same container.
MP4's main limitation is flexibility. It supports fewer codec and stream combinations than MKV, and it does not natively handle some professional codecs as cleanly as MOV. But for delivery and sharing, it is the default for good reason.
MOV (QuickTime)
MOV is Apple's container format, developed alongside the QuickTime framework. It is the standard container in professional video production, particularly in workflows that use Apple hardware or Adobe and Apple editing software.
MOV's primary advantage is its support for professional codecs, especially ProRes. While ProRes can technically be wrapped in MKV or MP4, MOV is the expected and best-supported container for ProRes workflows. Most cameras that record ProRes, including recent iPhones, output .mov files.
MOV also supports H.264, H.265, and many other codecs. It handles timecode tracks, multiple audio channels, and rich metadata well. If you work with video editing tools in a professional capacity, you will encounter MOV files constantly.
The trade-off is compatibility. MOV files play well on macOS and iOS, and professional software on any platform handles them without issue. But on Windows and Linux, consumer-grade players sometimes struggle, particularly with less common codec combinations. For delivery to a general audience, transcoding to MP4 is usually the right step.
MKV (Matroska)
MKV is the open-source container format, and it is the most flexible of the lot. It can hold virtually any video codec, any audio codec, multiple subtitle tracks in different languages, chapter markers, and extensive metadata, all in a single file. The name comes from Matroska dolls (Russian nesting dolls), reflecting the format's ability to contain many things.
MKV is the container of choice for media archivists and anyone who needs to preserve multiple audio or subtitle streams. A single MKV file might contain a film in H.265 with 5.1 surround audio in three languages, plus subtitle tracks in ten languages and chapter markers. No other common container handles this as elegantly.
The downside is that MKV is not universally supported for playback. Most dedicated media players (VLC, mpv, Plex) handle it perfectly, but web browsers, mobile devices, and many smart TVs do not play MKV files natively. It is not accepted by most social media platforms. MKV is excellent for storage and archival; it is not the format for distribution.
AVI (Audio Video Interleave)
AVI is Microsoft's legacy container format, introduced in 1992. It is simple and well understood, but it lacks modern features. AVI does not support modern codecs well, has limited metadata capabilities, and does not handle variable frame rates or advanced subtitle formats.
You will encounter AVI files primarily in older archives and legacy workflows. Some older capture hardware and software still output AVI. If you are managing a library of older footage, you will likely have AVI files that need to be organised and stored alongside newer formats.
There is rarely a reason to create new AVI files. For any modern use case, MP4, MOV, or MKV will serve better.
WebM
WebM is Google's container format, designed specifically for web use. It supports VP8, VP9, and AV1 video codecs with Vorbis or Opus audio. Every major web browser plays WebM natively, which makes it useful for web embedding and streaming.
WebM's strength is its royalty-free nature and web optimisation. YouTube processes uploads into WebM (using VP9 or AV1) for streaming. If you are building web content or embedding video on a site, WebM is efficient and widely compatible within browsers.
Outside of web contexts, WebM is less useful. Most editing software does not work with it natively, cameras do not record in it, and it is not a standard exchange format in professional workflows. Consider it a web delivery format, not a general-purpose one.
Choosing a format by use case
The right container depends on what you are doing with the video. Different stages of a video workflow call for different formats, and it is normal for a single project to involve several.
For delivery and sharing, MP4 with H.264 is the most reliable combination. It plays everywhere, uploads everywhere, and streams well. If you are sharing files for review or sending finals to a client, MP4 is almost always correct. When file size is a concern, MP4 with H.265 offers better compression, though you should verify that the recipient's playback setup supports it.
For editing workflows, MOV with ProRes (on Apple-centric pipelines) or MKV/MOV with DNxHR (on Avid-centric pipelines) gives you the editing performance that compressed delivery codecs cannot match. These files are large, sometimes ten to twenty times the size of an equivalent H.264 file, but the trade-off is snappy playback and fast rendering in your timeline. For teams working with large volumes of footage, a workspace that handles large video files without compression makes this process smoother.
For archival, the answer depends on your priorities. If maximum flexibility matters, MKV can wrap almost any codec and preserve multiple audio and subtitle tracks. If compatibility is more important, MP4 or MOV ensures that the files remain easy to open in the future. The codec matters more than the container for archival quality; a high-bitrate H.264 in MP4 will serve well for decades. For long-term storage considerations, our guide to cloud storage needs covers the maths involved.
For web embedding, MP4 (H.264) is the safest choice, with WebM (VP9 or AV1) as a modern alternative that offers better compression. Many web developers provide both: an MP4 fallback and a WebM source for browsers that support it.
For social media, MP4 with H.264 at 1080p is the safe default across every platform. Each platform re-encodes uploads anyway, so there is limited benefit to uploading in exotic formats. What matters more is providing a clean source at a reasonable bitrate. For content creators managing assets across multiple platforms, standardising on MP4 for delivery simplifies the workflow.
File size implications
The same video content can vary enormously in file size depending on the container and codec combination. Consider a one-minute clip of 1080p footage at 24 frames per second.
In ProRes 422 (wrapped in MOV), that clip might be around 1 to 1.5 GB. In H.264 at a standard streaming bitrate (wrapped in MP4), the same content might be 50 to 150 MB. In H.265, it could be 25 to 75 MB at comparable visual quality. The difference is the codec's compression efficiency; the container itself adds negligible overhead.
This has real implications for storage and transfer. A videographer shooting a full day in ProRes might generate 500 GB or more of footage. The same content in H.264 might be 30 to 50 GB. But those ProRes files will edit more fluidly, which is why professional workflows accept the size penalty during production and transcode to smaller delivery formats at the end.
Understanding these trade-offs helps you plan storage. If you are building a library of creative assets and b-roll clips, knowing which format your source files are in lets you estimate how much space you need. The codec page linked above provides more detail on compression ratios.
Compatibility considerations
Compatibility is the practical reason container choice matters. A file that will not open on the recipient's machine is useless regardless of its quality.
For maximum compatibility, MP4 with H.264 and AAC audio remains unbeatable. It plays on Windows, macOS, Linux, iOS, Android, every major web browser, smart TVs, game consoles, and media players. If you are uncertain about the playback environment, this combination is the safest choice.
MOV files play reliably on macOS and iOS, and on Windows with modern media players or codecs installed. Professional software (Premiere Pro, DaVinci Resolve, Final Cut Pro, Avid Media Composer) handles MOV without issue on all platforms.
MKV files require a capable media player. VLC and mpv handle them well on all desktop platforms. Browser support is absent. Smart TV support varies by manufacturer.
WebM plays in all modern browsers but has limited support in dedicated media players and almost no support in professional editing software.
When collaborating on video projects, it helps to agree on formats early. A shared workspace that preserves files in their original format, without re-encoding on upload, avoids the compatibility problems that arise when files are converted unexpectedly. Fabric's approach of storing your files as-is keeps the original container and codec intact.
Metadata and streams
Containers differ in what metadata and additional streams they support. This matters less for casual use but becomes important in professional workflows.
MP4 supports basic metadata (title, author, creation date), a single subtitle track, and limited chapter markers. MOV supports richer metadata, timecode tracks, and multiple audio channels. MKV supports the broadest range: multiple video tracks, dozens of audio and subtitle streams, chapter markers, and extensive tagging. AVI has minimal metadata support. WebM supports basic metadata and a single subtitle track.
If you need to store transcription data alongside video, or if your workflow involves multiple language tracks, the container's stream support matters. MKV is the most accommodating, followed by MOV, then MP4.
A note on file extensions
File extensions are a hint, not a guarantee. A file named .mp4 almost certainly uses the MP4 container, but the codec inside is not specified by the extension. Two .mp4 files might use entirely different codecs, one H.264 and one H.265, with very different compatibility profiles.
Similarly, some files use non-standard or ambiguous extensions. M4V is MP4 with DRM. .ts files use the MPEG transport stream container, common in broadcast and streaming. .mts and .m2ts are AVCHD recordings, which use a specific profile of the MPEG transport stream.
When troubleshooting playback issues, check the codec, not just the extension. Tools like MediaInfo (free, cross-platform) will tell you exactly what codec and container a file uses.
Frequently asked questions
What is the difference between MP4 and MOV?
Both are containers that can hold the same codecs, but MP4 is more universally compatible across devices and platforms, while MOV offers better support for professional codecs like ProRes and richer metadata. For delivery, MP4 is usually better. For professional editing workflows, MOV is often preferred.
Can I convert MKV to MP4 without re-encoding?
Often, yes. If the MKV contains H.264 or H.265 video with AAC audio, tools like FFmpeg can remux (repackage) the streams into an MP4 container in seconds without any quality loss. If the codecs inside the MKV are not compatible with MP4, a full re-encode is needed.
Why are ProRes files so much larger than H.264 files?
ProRes uses intraframe compression, where each frame is compressed independently. H.264 uses interframe compression, which also removes redundancy between frames, achieving much higher compression ratios. ProRes prioritises editing speed over file size; H.264 prioritises efficient delivery. Our codec guide covers this distinction in detail.
Which video format should I use for YouTube?
YouTube recommends MP4 with H.264 video and AAC audio. YouTube will re-encode your upload regardless of format, but starting with a high-quality MP4 gives the encoder good source material to work with. Some creators upload in ProRes for the highest quality source, but the file sizes are much larger and upload times increase accordingly.
Is AVI still worth using?
For new projects, no. AVI lacks support for modern codecs and features. If you have existing AVI files in an archive, they remain perfectly usable, but there is no reason to choose AVI for new recordings or exports.
What format should I use for archiving video?
For long-term archival, a widely supported codec in a stable container is ideal. MP4 or MKV with H.264 at a high bitrate is a practical choice. MKV is preferable if you need to preserve multiple audio or subtitle tracks. Some archives use lossless codecs (FFV1 in MKV, for example) when preserving the original quality exactly is a requirement. See our cloud storage types guide for more on storage strategies.
Does the container affect video quality?
The container itself does not affect quality. Quality is determined by the codec and the encoding settings (bitrate, resolution, and so on). The container simply packages the encoded streams. Switching containers via remuxing does not change quality in any direction.
What is the best format for sending video to a client?
MP4 with H.264 at a reasonable bitrate. It will play on any device the client uses without requiring special software. For clients who need to review and annotate, using a review and approval workflow that handles playback in-browser avoids format issues entirely.
Can I play MKV files on my phone?
On Android, VLC and other third-party players handle MKV well. On iOS, VLC and Infuse both play MKV files. The default media players on both platforms have limited or no MKV support. If you are distributing video to mobile users, MP4 is the safer choice.
What is the difference between H.264 and H.265 inside an MP4?
Both codecs can live inside an MP4 container, but they differ in compression efficiency and compatibility. H.265 produces smaller files at similar quality (roughly 50% smaller), but older devices and some browsers cannot decode it. H.264 plays everywhere. The resolution guide and export settings guide cover how resolution and export choices interact with codec selection.