What a video codec is (and what it isn’t)
A video codec is the method used to compress and decompress moving images. The word is short for “coder-decoder.” When a camera records, a screen recorder captures, or an editing app exports, a codec squeezes the raw picture data down to a manageable size. When you play the file back, the same codec rebuilds the picture.
The different types of video codecs are easiest to understand by what they’re designed to do. Some are built to make files as small as possible for streaming. Some are built to be easy on your computer while editing. Others are built to keep as much image data as possible straight off a camera sensor, or to store a master copy without losing anything at all.
One point trips up many people: a codec is not the same thing as a file format. Extensions like .mp4, .mov and .mkv are containers. A container is a wrapper that holds one or more video streams, audio streams, subtitles and metadata. The codec is what’s inside. An .mp4 file usually holds H.264 or H.265 video, but it can hold others. A .mov file might hold H.264, HEVC or Apple ProRes. So when someone says “export it as an MP4,” they’re naming the wrapper, not the compression. If you want a closer look at the wrappers themselves, our rundown of common video file extensions covers them.
The main ways to group video codecs
There’s no single official classification, but working editors tend to sort codecs into four broad groups.
Delivery codecs
Delivery (or distribution) codecs are designed for the final file your audience watches. Their goal is good-looking video at the lowest practical bitrate, so they lean on heavy, clever compression.
- H.264 (AVC): The most widely supported codec in use. Nearly every phone, browser, TV, editing app and streaming platform can play it. It’s the safe default for exports.
- H.265 (HEVC): The successor to H.264. It was designed to deliver similar quality at roughly half the bitrate, though real-world savings vary. Many phones and cameras record in it, but it takes more processing power to decode, and licensing has slowed its adoption in some browsers.
- VP9: Developed by Google and used heavily on YouTube. It’s royalty-free and broadly comparable to HEVC in efficiency.
- AV1: A royalty-free codec from the Alliance for Open Media, a group that includes major tech and streaming companies. It’s generally more efficient than VP9 and HEVC, but encoding it in software is slow. Hardware support for AV1 encoding and decoding has been spreading in newer GPUs, phones and TVs.
- H.266 (VVC): A newer standard finalized in 2020 that aims to improve on HEVC. Support in consumer devices and editing software is still limited.
- MPEG-2 and MPEG-4 Part 2: Older codecs you’ll still meet on DVDs, broadcast archives and older downloaded files. They’re far less efficient than H.264. If you’re working with tapes and discs, our guide to old digital video formats goes deeper.
Intermediate and mezzanine codecs
Intermediate codecs are made for editing, not for watching. They use lighter compression and store each frame independently, so your editing software can jump to any frame quickly without heavy decoding. The trade-off is much larger files.
- Apple ProRes: A family of codecs with several levels, including ProRes 422 Proxy, 422 LT, 422, 422 HQ, 4444 and 4444 XQ. Higher levels keep more detail and color information at higher data rates. ProRes is common in Final Cut Pro, DaVinci Resolve and Premiere Pro workflows, and many professional cameras and external recorders can record it directly.
- Avid DNxHD and DNxHR: Avid’s equivalent family. DNxHD covers HD resolutions, while DNxHR extends to 2K, 4K and beyond. It’s a common choice on Windows systems and in Avid Media Composer.
- GoPro CineForm: Another intermediate codec, now available as open source. It’s less common than ProRes or DNx today but still supported in many tools.
Editors often convert hard-to-edit camera files into one of these, a process called transcoding, or create smaller proxy files that stand in for the originals while cutting.
Camera and acquisition codecs, including raw
Cameras record using whatever their manufacturer supports. Consumer cameras and phones usually record H.264 or HEVC, sometimes under brand names such as XAVC (Sony) or AVCHD (an older consumer camcorder format). Higher-end cameras may offer ProRes, or a raw format.
Raw video records data much closer to what the sensor captured, before most in-camera processing. That gives you more freedom in color grading, such as adjusting white balance or exposure after the fact. Examples include Blackmagic RAW, Apple ProRes RAW, REDCODE RAW and ARRIRAW. Raw files are large and need software that supports the specific format.
Lossless and archival codecs
Most codecs are lossy, meaning they throw away some information that, ideally, viewers won’t notice. Lossless codecs compress video without discarding anything, so the decoded result is identical to the original. FFV1 is a well-known open lossless codec that’s used by some archives and libraries. Uncompressed video is also an option, though file sizes are very large.
Lossless and uncompressed formats make sense for archive masters and for some visual effects work. They’re rarely practical for day-to-day editing or delivery.
Common video codecs at a glance
| Codec | Main use | Compression | Strengths | Trade-offs |
|---|---|---|---|---|
| H.264 (AVC) | Delivery, consumer recording | Lossy, usually long-GOP | Plays almost everywhere | Less efficient than newer codecs |
| H.265 (HEVC) | Delivery, phone and camera recording | Lossy, usually long-GOP | Smaller files at similar quality | Heavier to decode, licensing complexity |
| VP9 | Web streaming | Lossy | Royalty-free, efficient | Limited use outside the web |
| AV1 | Web streaming, newer devices | Lossy | Royalty-free, very efficient | Slow software encoding, newer hardware needed |
| Apple ProRes | Editing, finishing, pro recording | Lossy, intraframe | Smooth editing, high quality | Large files |
| Avid DNxHD/DNxHR | Editing, finishing | Lossy, intraframe | Smooth editing, cross-platform | Large files |
| Raw formats | High-end acquisition | Varies by format | Maximum grading flexibility | Very large files, format-specific support |
| FFV1 | Archiving | Lossless | No quality loss | Large files, limited playback support |
Interframe vs. intraframe compression
Codecs also differ in how they treat each frame, and this matters a lot for editing.
Intraframe (sometimes labeled “All-I” on cameras) compression treats every frame as its own image. ProRes and DNx work this way. Because each frame stands alone, scrubbing and cutting are fast.
Interframe or long-GOP compression stores occasional complete frames and, in between, mostly records what changed. GOP stands for “group of pictures.” This saves a lot of space, which is why H.264, HEVC and AV1 usually work this way. The catch is that to show a frame in the middle of a group, your computer may have to decode several other frames first. That’s a big reason long-GOP footage, especially HEVC from phones, can feel sluggish on a timeline.
Some cameras let you choose. All-I modes create bigger files that edit more smoothly; long-GOP modes save card space.
Other settings that change what a codec can do
The codec name alone doesn’t tell you everything. A few other settings shape the result.
- Bitrate: How much data per second the file uses, often in megabits per second (Mbps). Within the same codec, more bitrate generally means fewer compression artifacts. If you record or stream with OBS, our article on how to improve video quality obs settings walks through bitrate in practice.
- Bit depth: 8-bit video stores 256 levels per color channel; 10-bit stores 1,024. More levels mean smoother gradients and more room in color grading. Many delivery files are 8-bit, while 10-bit is common for HDR and log footage.
- Chroma subsampling: Written as ratios like 4:2:0, 4:2:2 or 4:4:4. These describe how much color detail is kept relative to brightness. 4:2:0 is typical for delivery, 4:2:2 is common in professional recording and editing codecs, and 4:4:4 keeps full color detail, which helps with green screen and graphics.
- Hardware vs. software encoding: Many GPUs and chips include dedicated encoders and decoders, such as NVIDIA NVENC, Intel Quick Sync, AMD’s encoder, and Apple’s media engines. Hardware encoding is fast; software encoders, such as x264 or x265, can be slower but are often tuned for efficiency. Whether your hardware supports a codec can matter more than the codec’s theoretical efficiency.
Licensing and royalty-free codecs
H.264 and HEVC are covered by patent pools, which affects how companies license them in hardware and software. For most individual editors this happens behind the scenes, since the software or device maker deals with it. It does explain why support for some codecs varies between browsers and platforms. VP9 and AV1 were designed to be royalty-free, which is part of why web platforms have embraced them.
How to choose a codec for each stage of a project
A practical way to think about codecs is to match each one to a stage of the workflow:
- Recording: Use the highest-quality setting your camera and storage can reasonably handle. If you plan heavy color work, 10-bit, log profiles, ProRes or raw give you more room.
- Editing: If your camera files play back smoothly, edit them directly. If the timeline stutters, create proxies or transcode to ProRes or DNxHR.
- Delivery: Export H.264 for the widest compatibility. Consider HEVC when you want smaller files and know the viewer’s device supports it. Platforms such as YouTube will re-encode your upload anyway, so giving them a high-quality file usually helps.
- Archiving: Keep a high-quality master, such as ProRes 422 HQ or a similar intermediate, rather than relying only on a compressed delivery file.
If you’re weighing specific options, our guide to which codec is best for video quality looks at the trade-offs in more detail.
Quick answers to common codec questions
Is MP4 a codec? No. MP4 is a container. The video inside is usually H.264 or HEVC, and the audio is often AAC.
Is H.264 the same as MPEG-4? H.264 is also called MPEG-4 Part 10 (AVC), which is one part of the larger MPEG-4 family. It’s different from the older MPEG-4 Part 2 codec used by DivX and Xvid. The question of which is better, H.264 or MPEG-4, comes down to which “MPEG-4” you mean.
Why won’t my video play? Often the player doesn’t support the codec inside the container, even though it recognizes the file extension. Tools like MediaInfo, or the file inspector in your editing app, can show you which codec a file uses.
Do audio codecs matter too? Yes. Video files carry audio compressed with codecs such as AAC, Opus or uncompressed PCM. Bluetooth headphones use their own codecs too, which is a separate topic from file formats.