Learn

What Is a Video Codec?


A video codec is the algorithm that compresses raw video data into a manageable file and decompresses it for playback. The word "codec" is a contraction of coder/decoder, which describes its two jobs precisely: encoding raw frames into compressed data, and decoding that data back into frames you can watch.

Without codecs, digital video would be impractical. Understanding what they do, how they differ, and when to use each one gives you better control over your video workflow, from shooting through editing to final delivery.


Why compression matters

Uncompressed video generates an extraordinary amount of data. A single frame of 4K video (3840 x 2160 pixels) at 10-bit colour depth contains roughly 24 megabytes of data. At 60 frames per second, that adds up to about 1.4 gigabytes every second, or roughly 84 GB per minute. Even at 24 fps, you are looking at over 30 GB per minute.

No practical storage or transmission system can handle those data rates for any meaningful duration. A one-hour documentary would require over 5 terabytes uncompressed. Streaming would be impossible; even local playback from a fast SSD would be marginal at higher frame rates.

Codecs solve this by finding and removing redundancy in the video data. Much of what appears in one frame also appears in the next: the sky, a wall, a table. A codec identifies what has not changed and stores only the differences, along with using mathematical transforms to discard visual information that the human eye is unlikely to notice. The result is files that are tens or hundreds of times smaller than the raw data, with quality that ranges from visually identical to modestly degraded depending on the codec and settings.

This is why codec choice matters. The codec determines how much your file shrinks, how much quality is retained, how fast the file can be played back, and how well it performs in an editing timeline. Different codecs make different trade-offs, and no single codec is best for every purpose.


Types of compression

Lossy vs lossless

Lossy compression discards some data permanently to achieve smaller file sizes. When you encode video in H.264, the decoder cannot reconstruct the original pixel-perfect frames; some information has been permanently removed. The goal is to remove information that makes the least visible difference, so the result looks very close to the original even though it is not identical.

Lossless compression reduces file size without discarding any data. The decoded frames are bit-for-bit identical to the originals. Lossless video codecs exist (FFV1, HuffYUV) but produce much larger files, typically only two to three times smaller than uncompressed, compared to the fifty to two hundred times reduction that lossy codecs achieve. Lossless is used in archival and some intermediate workflows, but lossy compression handles the vast majority of video in the world.

ProRes and DNxHR sit in an interesting middle ground. They are technically lossy, but at their higher quality settings the compression artefacts are minimal enough that they behave as near-lossless for practical editing purposes. Both also offer genuinely lossless variants (ProRes 4444 XQ, DNxHR 444).

Intraframe vs interframe compression

This is the distinction that has the most impact on editing performance.

Intraframe compression treats each frame independently. Every frame is compressed on its own, like a series of individual JPEG images. ProRes and DNxHR use this approach. The advantage is that any frame can be decoded independently; the software does not need to decode neighbouring frames first. This makes scrubbing through a timeline fast, because the editing software can jump to any frame instantly.

Interframe compression exploits the similarity between consecutive frames. Rather than storing each frame independently, it stores reference frames (I-frames, or intra-coded frames) at intervals and then stores the subsequent frames as differences from the reference. P-frames (predicted frames) reference previous frames. B-frames (bi-directional frames) reference both previous and future frames. H.264, H.265, VP9, and AV1 all use interframe compression.

Interframe compression achieves dramatically better compression ratios because it eliminates redundancy across time, not just within a single frame. But it comes at a cost: to decode a B-frame, the decoder may need to first decode the nearest I-frame and all intervening P-frames. This makes random access (jumping to an arbitrary point in the timeline) slower, which is why editing with H.264 or H.265 footage can feel sluggish compared to editing with ProRes.

This trade-off is the fundamental reason that editing codecs and delivery codecs exist as separate categories.


The major codecs

H.264 (AVC)

Released in 2003, H.264 is the most widely deployed video codec in history. It is supported by virtually every device capable of playing video: phones, tablets, laptops, smart TVs, game consoles, web browsers, and dedicated media players. Hardware decoding for H.264 is built into essentially every processor and GPU manufactured in the last decade.

H.264 offers a good balance of compression efficiency and decoding complexity. At typical streaming bitrates, it produces clean, watchable video that holds up well even at lower resolutions. For video content creators who need a reliable delivery format, H.264 in an MP4 container is the safe default.

The codec supports a wide range of profiles and levels, from the constrained baseline profile used in older mobile devices to the high profile used in Blu-ray discs and high-quality streaming. For most purposes, the high profile at a sensible bitrate delivers excellent results.

H.264's main limitation is its age. Newer codecs like H.265 and AV1 achieve noticeably better quality at the same bitrate, or the same quality at lower bitrates. But compatibility remains H.264's trump card: nothing else plays everywhere the way H.264 does.

H.265 (HEVC)

H.265, also known as High Efficiency Video Coding, is the successor to H.264. It achieves roughly 50% better compression at equivalent visual quality, which means files can be half the size or the same size at noticeably higher quality.

For high-resolution content, particularly 4K and above, the compression improvement is significant. A 4K stream in H.265 can look as good as one in H.264 at a much lower bitrate, which matters for both storage and bandwidth. Many modern cameras record in H.265, and Apple devices have used HEVC as the default video codec since 2017.

The complication with H.265 is patent licensing. The codec is covered by multiple patent pools with complex and sometimes overlapping licensing terms. This has slowed adoption in some contexts, particularly on the web. Most browsers now support H.265 hardware decoding, but the rollout was slower than it was for H.264, and some open-source projects avoid it for licensing reasons.

Hardware decoding support for H.265 is widespread in devices from roughly 2016 onward. Software decoding is more CPU-intensive than H.264. For managing video libraries that include both H.264 and H.265 content, a workspace that plays both without requiring transcoding is valuable.

ProRes

ProRes is Apple's family of codecs, designed specifically for video editing rather than delivery. It is the dominant editing codec in workflows built around Final Cut Pro, and it is widely used in Premiere Pro and DaVinci Resolve as well.

The ProRes family includes several variants at different quality and file size points. ProRes 422 Proxy is the smallest, designed for offline editing. ProRes 422 LT is a step up. ProRes 422 (sometimes called "standard" or "normal") is the workhorse for most editing. ProRes 422 HQ offers higher quality for finishing. ProRes 4444 adds an alpha channel and higher colour fidelity. ProRes 4444 XQ is the highest quality variant, approaching lossless.

What makes ProRes effective for editing is its intraframe compression. Every frame is independently decodable, which means scrubbing, cutting, and colour grading are responsive even on modest hardware. The trade-off is file size: ProRes files are large, often ten to twenty times the size of an equivalent H.264 file. For videographers and editors, this is an acceptable trade-off during production. The standard workflow is to edit in ProRes and export the final deliverable in H.264 or H.265.

ProRes was historically macOS-only for encoding, though decoding worked cross-platform. Apple has since released ProRes encoding support for Windows via specific hardware, and DaVinci Resolve can encode ProRes on Windows as well. The ecosystem is more cross-platform than it once was, though macOS remains the most natural home for ProRes workflows.

DNxHR (and DNxHD)

DNxHR is Avid's answer to ProRes. It follows the same philosophy: intraframe compression optimised for editing, with large files and fast timeline performance. DNxHD is the older variant, limited to HD resolutions; DNxHR supports resolutions up to 8K.

DNxHR comes in several quality tiers: DNxHR LB (low bandwidth), DNxHR SQ (standard quality), DNxHR HQ (high quality), DNxHR HQX (high quality with 12-bit support), and DNxHR 444 (for compositing and finishing). The tier structure mirrors ProRes closely.

The main reason to choose DNxHR over ProRes is workflow compatibility. Avid Media Composer uses DNxHR natively, and broadcast facilities built around Avid infrastructure standardise on it. DNxHR is also fully cross-platform for both encoding and decoding, which gives it an advantage in mixed-OS environments.

For practical purposes, ProRes and DNxHR are interchangeable in quality and performance. The choice between them usually comes down to which editing software and ecosystem you work in. Many video editors are comfortable with both and switch between them as projects require.

AV1

AV1 is the most significant codec development in recent years. Developed by the Alliance for Open Media (whose members include Google, Apple, Microsoft, Netflix, Amazon, and others), AV1 is royalty-free and offers compression efficiency that matches or exceeds H.265.

The royalty-free aspect is important. Where H.265's patent licensing has created friction and fragmented adoption, AV1 can be implemented by anyone without licensing fees. This has driven rapid adoption in streaming: Netflix, YouTube, and other major platforms use AV1 for delivery, particularly for high-resolution content where the compression gains are most valuable.

AV1's weakness is encoding speed. Compressing video into AV1 is computationally expensive, often five to ten times slower than H.264 encoding and several times slower than H.265. For large streaming services that encode once and deliver millions of times, this is acceptable. For individual creators who need to export quickly, it can be impractical. Hardware AV1 encoding is improving rapidly, with recent GPUs from NVIDIA, AMD, and Intel all offering hardware AV1 encoders, but these are still less mature than their H.264 and H.265 counterparts.

Browser and device support for AV1 decoding is growing. Most modern browsers support it, and hardware decoding is present in newer mobile processors and GPUs. Within a few years, AV1 is likely to be as universally decodable as H.264 is today.

VP9

VP9 is Google's codec, the predecessor to AV1 in spirit. It is royalty-free and offers compression roughly comparable to H.265. YouTube uses VP9 extensively, and if you watch a video on YouTube in a web browser, there is a good chance it is being decoded in VP9.

VP9 is well supported in browsers (Chrome, Firefox, Edge) and on Android devices. Hardware decoding is present in many processors. It works well in WebM containers for web delivery.

As a practical matter, VP9 is being gradually superseded by AV1 in contexts where encoding cost is not a constraint. For web delivery today, VP9 remains a solid choice. For new projects looking at the longer term, AV1 is the direction the industry is heading.


Quality vs file size

The relationship between quality and file size is controlled by encoding settings, primarily bitrate or a quality metric like CRF (Constant Rate Factor).

Bitrate is the amount of data used per second of video, measured in megabits per second (Mbps). Higher bitrate means more data, which generally means better quality, up to a point of diminishing returns. A 1080p H.264 video at 5 Mbps looks noticeably worse than one at 15 Mbps, but the difference between 40 Mbps and 50 Mbps is difficult to see.

CRF (used by H.264, H.265, and others) and CQ (used by some hardware encoders) let you target a quality level rather than a specific bitrate. The encoder uses as much data as it needs to maintain the specified quality. This is often a better approach than fixed bitrate because it allocates more data to complex scenes (fast motion, fine detail) and less to simple ones (static shots, solid colours).

For H.264, a CRF value of 18 to 23 is typical for high-quality output. Lower numbers mean higher quality and larger files. CRF 18 is often called "visually lossless" for practical purposes, while CRF 23 is the default in many encoders and still looks good for most content. The video export settings guide covers these parameters in more detail.

File sizes vary significantly across codecs at comparable quality. As a rough guide for one minute of 1080p 24fps video at reasonable quality: H.264 might produce 100 to 200 MB, H.265 might produce 50 to 100 MB, ProRes 422 might produce 1 to 1.5 GB, and AV1 might produce 40 to 80 MB. These are approximations; the content (a static interview vs a fast-paced action sequence) affects the numbers substantially.


Editing codecs vs delivery codecs

The distinction between editing and delivery codecs is one of the most practical things to understand in video production.

Editing codecs (ProRes, DNxHR) are optimised for random access and timeline performance. They use intraframe compression so that any frame can be decoded independently. Files are large, but editing is responsive. They are designed to be decoded quickly, even at the cost of compression efficiency.

Delivery codecs (H.264, H.265, AV1, VP9) are optimised for efficient compression and smooth sequential playback. They use interframe compression to minimise file size. Files are small, but random access is slower because decoding a single frame may require decoding multiple reference frames first.

The standard professional workflow reflects this split. You shoot in whatever format your camera records (often H.264 or H.265). If the footage does not edit smoothly in your timeline, you transcode it to ProRes or DNxHR. You edit using those intermediate files. When the edit is complete, you export the final deliverable in H.264 or H.265 for distribution. Some workflows skip the intermediate step if the hardware is powerful enough to edit the camera-original files directly, or they use proxy workflows where low-resolution copies are used for editing and the full-resolution originals are used for final export.

For teams managing video projects with both editing and delivery files, keeping everything organised in one place avoids the confusion of scattered copies in different formats. A search system that indexes video files regardless of codec helps when you need to find a specific clip later.


Hardware encoding vs software encoding

Video can be encoded using either dedicated hardware circuits (hardware encoding) or general-purpose CPU instructions (software encoding). The trade-offs are speed vs quality.

Hardware encoders (Intel Quick Sync, NVIDIA NVENC, AMD VCE, Apple VideoToolbox) are fast, often several times faster than real-time. They also use less power. The downside is that their output quality, at a given bitrate, is typically slightly lower than what a good software encoder produces. The gap has narrowed significantly in recent hardware generations, and for many purposes the difference is invisible.

Software encoders (x264, x265, SVT-AV1, libvpx) produce higher quality at the same bitrate because they can spend more computation on optimisation. They are slower, sometimes much slower, but the results are measurably better, particularly at lower bitrates where every bit counts.

For streaming and real-time recording, hardware encoding is the practical choice. For final delivery of finished work where quality is paramount and encoding time is flexible, software encoding produces the best results. Many video editors use hardware encoding for previews and drafts, then switch to software encoding for the final export.


Future direction

AV1 is the most significant near-term development. Its royalty-free status removes the licensing barriers that held back H.265 adoption, and its compression efficiency is excellent. As hardware encoding and decoding support becomes ubiquitous (it is well on its way), AV1 is positioned to become the next default delivery codec after H.264.

VVC (Versatile Video Coding, also known as H.266) is the formal successor to H.265, offering roughly 50% better compression again. However, it faces the same patent licensing complexity as its predecessor, which may limit adoption outside of specific industries.

On the editing side, ProRes and DNxHR are likely to remain dominant for the foreseeable future. The problem they solve, fast random access for editing, is fundamental to their design, and no delivery-oriented codec matches their editing performance regardless of how efficient it is at compression.

For anyone working with video today, the practical advice is to use H.264 or H.265 for delivery, ProRes or DNxHR for editing, and to keep an eye on AV1 as hardware support matures. If your cloud storage handles all these formats without requiring conversion on upload, you can adapt to new codecs as they become practical without disrupting your existing library.


Frequently asked questions

What does "codec" stand for?

Codec is short for coder/decoder. The coder compresses raw video data into a compact format for storage or transmission, and the decoder decompresses it back into video frames for playback. Every time you record, export, or watch video, a codec is at work.

Is H.265 always better than H.264?

H.265 achieves better compression, producing smaller files or better quality at the same bitrate. But H.264 has broader compatibility and faster encoding. For delivery where you control the playback environment and know H.265 is supported, it is the better choice. For maximum compatibility, H.264 remains safer.

Why are ProRes files so large?

ProRes uses intraframe compression, encoding each frame independently without referencing other frames. This approach sacrifices compression efficiency for editing performance. The files are large because every frame contains all the information needed to display it, which makes timeline scrubbing and editing fast. See our video file formats guide for more on how this fits into the broader format landscape.

Can I edit directly with H.264 footage?

Yes, if your hardware is powerful enough. Modern editing software and hardware can handle H.264 editing, especially at 1080p. At 4K or with multiple streams, you may experience lag during scrubbing and playback. Transcoding to ProRes or DNxHR, or using a proxy workflow, solves this.

What is CRF and how do I choose a value?

CRF (Constant Rate Factor) is a quality-based encoding setting used by codecs like H.264 and H.265. Lower numbers mean higher quality and larger files. For H.264, CRF 18 is considered visually lossless by most people, CRF 23 is the default and produces good-looking output, and CRF 28 is acceptable for lower-priority content. The export settings guide provides more specific recommendations.

Should I use hardware or software encoding?

It depends on priority. Software encoding (x264, x265) produces slightly better quality at the same bitrate and is preferred for final exports. Hardware encoding (NVENC, Quick Sync) is faster and is preferred for streaming, recording, and draft exports where speed matters more than squeezing out the last bit of quality.

Is AV1 ready for everyday use?

For delivery and streaming, AV1 is increasingly practical. YouTube and Netflix already use it extensively. For encoding your own content, hardware AV1 encoders in recent GPUs make it feasible, though encoding is still slower than H.264. For most individual creators, H.264 and H.265 remain the more practical choices today, with AV1 as an option worth exploring if you have the hardware.

What is the difference between an editing codec and a delivery codec?

Editing codecs (ProRes, DNxHR) prioritise fast random access so that editing software can jump to any frame instantly. Delivery codecs (H.264, H.265, AV1) prioritise small file sizes for efficient streaming and storage. You typically edit in one and deliver in the other.

Does YouTube re-encode my uploads?

Yes. YouTube re-encodes every upload into multiple resolutions and codecs (typically VP9 and AV1) regardless of what you upload. Uploading a high-quality source gives YouTube's encoder better material to work with. MP4 with H.264 at a high bitrate is a reliable upload format, though YouTube accepts many others. See the resolution guide for how upload resolution affects YouTube's processing.

How do LUTs relate to codecs?

LUTs (look-up tables) and codecs serve different purposes. A codec handles compression; a LUT handles colour transformation. However, codec choice can affect colour workflows. Codecs with higher bit depth (like ProRes 4444 at 12-bit) preserve more colour information, giving you more latitude when applying LUTs and colour grades. Delivery codecs at 8-bit may show banding after aggressive colour adjustments.


Related pages

The workspace that thinks with you.

Ready when you are.

The workspace that thinks with you.

Ready when you are.

The workspace that thinks with you.

Ready when you are.