VideoBB
Upload Premium Sign in

H.264 vs H.265 vs AV1

One codec plays on everything, one halves the bitrate but carries licensing baggage, and one is royalty-free and gaining ground. How to choose between them for encoding, upload and delivery.

H.264 is the safe choice and still the right upload codec for most people. H.265 and AV1 give similar quality at much lower bitrates. AV1 is royalty-free, and H.265 has better support on Apple hardware. Both take longer to encode and play on fewer devices.

Abstract illustration of three overlapping grids of decreasing density, suggesting successive generations of video compression

Twenty years separate the first H.264 specification from the AV1 hardware decoders now shipping in phones. The story of that gap is a single trade: more computing for fewer bits. Each new codec spends more processor time studying the picture, so it can describe the same frames with less data. The question for anyone encoding video is simple. Is that saving worth a slower encode and fewer devices that can play the result?

This comparison covers the three codecs that matter for delivery today: H.264 (AVC), H.265 (HEVC) and AV1. It explains how they differ inside and what the licensing means in practice. It shows where each one plays. It also says what to encode when you plan to upload rather than deliver the file yourself. The video formats hub covers the containers and audio codecs that sit around them.

Three generations of the same idea

All three codecs are block-based hybrid coders. They split each frame into blocks. Each block is predicted from nearby pixels (intra prediction) or from earlier and later frames (inter prediction with motion vectors). The leftover difference is transformed, quantised and entropy-coded. Efficiency gains come from doing each stage with more options: larger and more flexible block sizes, more prediction directions, better motion compensation and smarter entropy coding.

H.264, published jointly by ITU-T and ISO/IEC in 2003 as H.264 and MPEG-4 Part 10, uses fixed 16×16 macroblocks with sub-partitions down to 4×4. H.265, published in 2013 as H.265 and MPEG-H Part 2, replaces macroblocks with coding tree units of up to 64×64 pixels and adds 35 intra prediction modes. AV1 came from the Alliance for Open Media in 2018. It uses superblocks of up to 128×128 and adds tools such as compound prediction and film grain synthesis. It was designed from the start to be free of royalty claims from its contributors.

The codecs compared

Efficiency figures are the conventional rules of thumb quoted by the codec developers, not measurements from this site; real results vary widely with content and encoder settings.

PropertyH.264 / AVCH.265 / HEVCAV1
StandardITU-T H.264, ISO/IEC 14496-10 (2003)ITU-T H.265, ISO/IEC 23008-2 (2013)AOMedia AV1 specification (2018)
Largest coding block16×16 macroblock64×64 coding tree unit128×128 superblock
Bitrate at similar qualityBaselineRoughly 25-50% lower (rule of thumb)Roughly 30-50% lower (rule of thumb)
Encoding speedFast; mature encodersSlowerSlowest, improving with SVT-AV1
Hardware decodingEssentially universalMost devices since ~2015Recent phones, GPUs and TVs only
Browser playbackAllSafari; Chrome and Edge with hardware; limited elsewhereChrome, Firefox, Edge; Safari on AV1-capable hardware
Royalty positionPatent pool licencesMultiple pools; historically fragmentedRoyalty-free by design
HDR and 10-bitVia High 10 profile; rarely usedMain 10 profile, widely usedMain profile supports 10-bit
Common encodersx264, hardware encodersx265, hardware encoderslibaom, SVT-AV1, rav1e

H.264: the codec you can rely on

H.264's advantage is not technical. Every phone, laptop, games console, television and browser made in the last decade decodes it in dedicated chips. That means smooth playback at low power, even on hardware that would struggle with a software decoder. Profiles (Baseline, Main, High) and levels (such as 4.1 or 5.1) define what a decoder must handle. High profile at level 4.1 or 4.2 covers 1080p at normal frame rates and is the safe target.

x264 is the leading open-source encoder. It is mature enough that its "medium" preset gives good results quickly. Its slower presets close much of the gap to newer codecs at moderate resolutions. For uploads to a platform that will re-encode anyway, an H.264 source at a generous bitrate is the ideal start. The bitrate guide gives numbers by resolution.

H.265: more efficient, less certain

HEVC was built for 4K. Its larger coding tree units suit high resolutions, where large flat areas can be coded in a single block. Its Main 10 profile made 10-bit HDR mainstream, as the HDR guide explains. iPhones have recorded HEVC by default since iOS 11, and Apple platforms play it natively. Encoding costs several times the processor time of H.264 for the same content.

The complication is licensing. HEVC patents are held across several pools and independent holders, and the uncertainty about terms slowed browser adoption for years. Safari supports it. Chrome and Edge play HEVC when the operating system provides a hardware decoder. Firefox support depends on platform. So an HEVC MP4 is not a file you can hand to any web viewer with confidence. That is true even when it is exactly what your camera produced. If you need an H.264 copy, the free video converter makes MP4 files with H.264 video and AAC audio.

AV1: open, efficient, and still spreading

AV1 was created by a group that includes Google, Mozilla, Amazon, Netflix, Microsoft, Apple and others. Its specification is published under an open licence. Its patent policy grants royalty-free use of the technology members contributed. It matches or beats HEVC efficiency and adds tools that suit streaming. The best known is film grain synthesis. It strips grain before encoding and adds it back as an effect on decode, instead of spending bits describing noise.

Decoding support arrived in Chrome and Firefox in 2018-2019 and in hardware on newer GPUs, phones and televisions since. Apple added hardware AV1 decoding with its A17 Pro and M3 chips, which brought Safari playback with it on those devices. Software decoding with dav1d works well on capable laptops but drains batteries on older phones. So a file encoded only in AV1 still leaves out a real share of viewers. Encoding speed was the early complaint. SVT-AV1 has made it workable for batch pipelines, while libaom remains the reference.

Which codec for which job

Uploading to a hosting platform

H.264 High profile at a generous bitrate. The platform transcodes anyway, and an H.264 source is probed and queued fastest.

Recommended
Archiving camera footage

Keep whatever the camera recorded, HEVC included. Transcode copies for delivery; never re-encode the master to save space.

Keep the original
Self-hosted web delivery

H.264 as the baseline rendition, with AV1 or HEVC as optional alternates a player can select when the device supports them.

Layered
Bandwidth-constrained delivery

AV1 where players are known to support it. The bitrate savings compound across every view.

Efficiency first

Encoding realities worth knowing

  • Efficiency claims assume a slow, careful encode. A fast HEVC or AV1 encode can be beaten by a slow x264 encode at the same bitrate.
  • Hardware encoders (NVENC, Quick Sync, VideoToolbox) are quick but usually less efficient than software encoders at the same bitrate. They suit real-time capture more than final delivery.
  • 10-bit encoding reduces banding in gradients, even for SDR content. HEVC and AV1 both handle it routinely. H.264 10-bit exists but has poor hardware support.
  • A codec change always means a full decode and re-encode. That is why the transcoding guide matters even if you never run ffmpeg yourself.
  • Whatever codec you upload, VideoBB delivers HLS renditions the viewer's device can play, so codec compatibility becomes the platform's problem rather than yours.

Frequently asked questions

Does AV1 look better than H.264?

At the same bitrate, a careful AV1 encode usually looks better because it can describe the same picture with fewer bits. At the same visual quality, the AV1 file is smaller. Neither codec has a higher quality ceiling in absolute terms: given enough bitrate, both can look essentially transparent. The difference shows up at the constrained bitrates used for streaming.

Should I upload HEVC footage from my iPhone or convert it first?

Upload it as recorded. VideoBB accepts HEVC in MOV or MP4 and transcodes it to HLS renditions that play in any browser. So the compatibility problem disappears on the platform side. Converting first would add a lossy generation for no benefit. Keep the original as your master. Only transcode to H.264 yourself if you need a file that plays directly on unknown devices.

Why is my AV1 encode so slow?

The reference encoder, libaom, prioritises compression over speed and explores far more coding decisions per block than x264. SVT-AV1 with a moderate preset is much faster, at a small cost in efficiency. Hardware AV1 encoders on recent GPUs are faster still. For a one-off upload, encoding H.264 instead is usually the more practical route.

Is H.264 going to be phased out?

Not in any timeframe that matters for planning. It remains the baseline rendition in almost every streaming ladder precisely because every device decodes it. Newer codecs are added alongside it for capable devices, not instead of it. Expect H.264 to remain the compatibility floor for years even as AV1 becomes the efficiency choice for large-scale delivery.

Sources

h264h265hevcav1video codecscompression

Related guides