Every Video Format and Codec Explained: MP4, MOV, H.264, HEVC, AV1 and More
Containers, codecs, editing codecs, camera raw and the settings inside every video file, explained in plain language for creators.
On this page
Why does the same video play perfectly on one device and fall apart on another? Almost always, it’s a mismatch between the container, the codec and the settings inside the file.
This guide covers every video format and codec you’ll meet as a creator. Facts were checked in October 2026 against official documentation where it exists: YouTube Help, Apple, Blackmagic, OBS, and the Matroska and WebM projects. Numbers that aren’t from a named source are examples.
Quick answer: one format per job
Video has four jobs, and most mistakes come from using one format for all of them.
| Job | What to use |
|---|---|
| Record | Your camera’s best 10-bit option, or H.264 if that’s all it has |
| Edit | Proxies, or an editing codec like ProRes or DNxHR |
| Deliver to YouTube | MP4 with H.264 video and AAC audio |
| Archive | A high-quality master (ProRes or DNxHR) plus project files |
The big idea: containers vs codecs
- A container is the box. It’s the file that holds the video track, the audio track, and extras like subtitles, chapters and metadata, and keeps them in sync.
.mp4,.movand.mkvare containers. - A codec is the compressor (coder plus decoder). It squeezes video small enough to store and stream, then unpacks it to play. H.264, HEVC and AV1 are codecs.
The trap: a file extension only names the container. An MP4 can hold H.264, HEVC or AV1 video, and a MOV can hold ProRes or H.264. Same extension, different codec. That’s why one file plays and another with the same name doesn’t.
Lossy, lossless and long-GOP
Most video codecs are lossy: they discard detail you’re unlikely to notice. Lossless codecs keep every bit, so their files are huge.
Codecs also compress in two different ways:
- Intra-frame codecs compress each frame on its own. Editing is smooth, but files are large.
- Long-GOP (group of pictures) codecs store a full frame now and then, plus only the changes in between. Files are far smaller, but your computer works harder to scrub through them.
Inside a long-GOP stream:
| Frame type | What it stores |
|---|---|
| I-frame | A complete picture that stands alone |
| P-frame | Only the changes from earlier frames |
| B-frame | Changes using both earlier and later frames |
More I-frames make video easier to edit and seek through, but raise the bitrate.
Containers
| Container | What to know |
|---|---|
| MP4 | MPEG-4 Part 14, the most widely supported. Holds H.264, HEVC, AV1 and AAC. The safe default for uploads. |
| MOV | Apple’s QuickTime container (1991). MP4 was built from it. The usual home of ProRes. |
| MKV | Matroska, an open container. OBS recommends it for recording because a crash shouldn’t corrupt the file. |
| WebM | Open and royalty-free, built on Matroska, with VP8/VP9 video and Vorbis/Opus audio. |
| AVI | Microsoft, 1992. Not designed for modern features like B-frames, with no standard timecode. Still accepted by YouTube. |
| FLV | Flash Video. Flash is gone, but the RTMP streaming protocol it used lives on in YouTube Live. |
| MXF | A professional SMPTE wrapper for broadcast cameras and editing systems, with full timecode and metadata. |
Two terms worth knowing:
- The moov atom: an MP4 stores details like resolution and frame rate in a block called the moov atom. If it sits at the end and the file is cut short, the video may not play at all. YouTube recommends putting it at the front, often called fast start.
- Remuxing moves the same video and audio into a different container without re-encoding. It’s fast and loses no quality. OBS can remux MKV recordings to MP4 automatically when you stop recording.
Coming soon: a full MP4 vs MOV vs MKV comparison.
YouTube’s accepted upload formats include MOV, MPEG-1, MPEG-2, MPEG-4, MP4, MPG, AVI, WMV, MPEG-PS, FLV, 3GPP, WebM, DNxHR, ProRes, CineForm and HEVC. Accepted doesn’t mean ideal.
Delivery codecs: H.264, HEVC, VVC, VP9 and AV1
| Codec | Released | Efficiency | Licensing | Best for |
|---|---|---|---|---|
| H.264 (AVC) | 2003 | Baseline | Patented (pool), widely licensed | Safe delivery, plays almost everywhere |
| H.265 (HEVC) | 2013 | 25–50% better than H.264 | Several patent pools, higher fees | Smaller files on newer devices |
| H.266 (VVC) | 2020 | Claims ~50% better than HEVC | Patent pools | Not ready yet, one to watch |
| VP9 | 2013 (Google) | Similar class to HEVC | Open, royalty-free | YouTube playback, WebM |
| AV1 | 2018 (AOMedia) | Beats VP9 and H.264 in tests | Open, royalty-free | Efficiency, where supported |
A few details matter:
- H.264 is by far the most used codec for recording, compressing and distributing video. Cheap hardware encoders everywhere (Intel Quick Sync since 2011, for example) made it fast.
- HEVC halves the bitrate in some examples, such as a 4K stream needing about 100 Mbps in older H.264 profiles and about 50 Mbps in HEVC. But licensing slowed web adoption, and some browsers need hardware support. iPhones record HEVC in High Efficiency mode.
- VP9: YouTube says new 4K uploads play in 4K only on browsers and devices that support VP9.
- AV1: Facebook reported about 34% lower bitrate than VP9 and about 50% lower than x264 at similar quality. The trade-off is much slower encoding, although hardware decoding is spreading (iPhone 15 Pro and later, Apple M3 and later, many recent GPUs). YouTube has used AV1 since 2018.
Coming soon: H.264 vs HEVC vs AV1, which codec creators should use.
Editing codecs: ProRes, DNxHR and CineForm
Editing (intermediate) codecs are built for smooth editing and for quality that survives many re-saves. They’re usually intra-frame, so files are big but scrubbing is fast.
Apple ProRes comes in six flavours. Apple’s target data rates at 1080p 29.97 fps:
| ProRes flavour | ~Mbps (1080p29.97) | Notes |
|---|---|---|
| Proxy | 45 | Lightest |
| LT | 102 | |
| 422 | 147 | |
| 422 HQ | 220 | 10-bit; Apple calls it visually lossless across generations |
| 4444 | 330 | Up to 12-bit, supports alpha |
| 4444 XQ | 500 | Up to 12-bit, supports alpha |
Avid DNxHD (2004) and DNxHR (2014) are intra-frame and resolution-independent, with levels from LB up to 444, in MXF or MOV files. GoPro CineForm is less common, but YouTube accepts it alongside ProRes and DNxHR.
Can you just edit H.264? Yes, but long-GOP footage makes your computer work harder. Editing codecs cost storage and give smoother playback in return. A common middle path is proxies: lightweight copies you edit with, swapped back to the originals for export. YouTube’s own 4K guide suggests 1080p or 720p proxies for slower computers.
Coming soon: ProRes vs DNxHR vs H.264 for editing.
Camera raw video
Raw video keeps sensor data with much of the processing undone, so colour, exposure and white balance are decided in editing. It’s the most flexible option, but files are large and need a powerful computer.
- Blackmagic RAW (
.braw): constant-bitrate options 5:1, 8:1, 12:1 and 18:1, constant-quality options Q0–Q5, partial in-camera processing for faster decoding, and a free SDK. - ProRes RAW: ProRes compression applied to raw data. It’s recorded by cameras and recorders from Nikon, Panasonic, DJI and Atomos, and supported in Premiere Pro, Media Composer and DaVinci Resolve.
- REDCODE RAW (
.r3d): RED’s proprietary cinema format since the RED One (2007).
Honest answer: most YouTube creators don’t need raw. It earns its keep with heavy grading, difficult lighting or visual effects. For talking heads and tutorials, a good 10-bit codec is plenty.
Settings inside every file
| Setting | What it means | Creator tip |
|---|---|---|
| Resolution | Pixels per frame: 360p up to 8K | More pixels need more bitrate |
| Aspect ratio | Frame shape (16:9, vertical, square) | Don’t bake black bars into the video |
| Frame rate | Pictures per second (24, 25, 30, 50, 60…) | YouTube: upload at the rate you recorded |
| Progressive vs interlaced | Whole frames vs alternating lines | Deinterlace before uploading (e.g. 1080i60 → 1080p30) |
| Bitrate | Data per second (Mbps) | Your biggest quality dial after the codec |
| CBR vs VBR | Constant vs variable bitrate | CBR for live streams, VBR for uploads |
| Bit depth | Shades per channel: 8-bit = 256, 10-bit = 1,024 | 10-bit means smoother gradients and better grading |
| Chroma subsampling | Colour stored at lower resolution | YouTube recommends 4:2:0 for uploads |
| Colour space | How devices read the colour numbers | YouTube: BT.709 for SDR |
For HDR, YouTube wants PQ or HLG transfer, Rec. 2020 primaries and 10 or 12-bit colour (VP9 Profile 2, AV1 or HEVC). Viewers without HDR screens automatically get an SDR version. The frame rate and resolution guide goes deeper on those settings.
Audio inside video files
| Codec | Type | Notes |
|---|---|---|
| PCM / WAV | Uncompressed | Standard for recording and editing |
| AAC | Lossy (1997) | MP3’s successor; AAC-LC at 48 kHz is YouTube’s recommendation |
| MP3 | Lossy | Supported almost everywhere; patents expired 2017 |
| Opus | Lossy, open (IETF 2012) | 6–510 kbps, great for speech and music; YouTube lists it as recommended |
| FLAC | Lossless | Typically 50–70% of original size; ideal for archives |
YouTube recommends AAC-LC or Opus at 48 kHz: 128 kbps for mono, 384 kbps for stereo and 512 kbps for 5.1. For the full story, see the audio formats guide.
From camera to YouTube
- iPhone: High Efficiency records HEVC, while Most Compatible records H.264. Choose Most Compatible if you edit on an older computer. Turn on Keep Originals so USB imports aren’t converted.
- OBS: record to MKV, then remux to MP4 (automatic remux is available).
- Export for YouTube: YouTube’s recommended settings are MP4 with the moov atom at the front, H.264 High profile, progressive, 4:2:0, AAC-LC at 48 kHz, variable bitrate and BT.709 colour. For 1080p at 24–30 fps that means about 8 Mbps.
- Processing: YouTube re-encodes everything. It builds a low-quality version first, then higher resolutions. A 60-minute 4K30 video can take up to four hours, so missing HD options right after upload are normal.
- Live streaming: RTMPS, H.264/HEVC/AV1, constant bitrate, keyframes every 2 seconds (never above 4). Around 17 Mbps is suggested for 1080p60 H.264.
- Archive: keep a high-quality master, your project files and lossless audio. Storage is cheaper than re-shooting.
Common problems
| Problem | Likely cause |
|---|---|
| File won’t play | The codec, not the container |
| Editing stutters | Long-GOP footage: use proxies or transcode |
| Files are huge | Intra-frame or raw where you don’t need it |
| Upload looks soft | Low bitrate, or YouTube is still processing |
Five mistakes to avoid
- Judging a file by its extension.
- Uploading at the wrong frame rate.
- Forgetting to deinterlace.
- Using raw when you don’t need it.
- Exporting at a low bitrate, then blaming YouTube.
Try it: open your last export in the free tool MediaInfo, check its container and codec, and see if it’s the right one for the job.


