H.264 vs VP8 vs AV1: Video Codecs Compared
Three codecs cover most video on the web and in calls. Here is how they differ, what each costs you, and which one to send first.
H.264 vs VP8 vs AV1 at a glance
|
H.264 |
VP8 / AV1 | |
|---|---|---|
|
Released |
2003 (ITU-T and ISO/IEC) |
VP8: 2010 (Google). AV1: 2018 (Alliance for Open Media) |
|
Compression |
Baseline for comparison |
VP8: similar to H.264. AV1: up to about 50% better than H.264 |
|
Encoding cost |
Low; hardware encoders are common |
VP8: low. AV1: high in software |
|
Hardware support |
Almost every phone, laptop and browser |
VP8: patchy. AV1: decode on newer devices, encode rarer |
|
Licensing |
Patent pool licensing for commercial use |
Both royalty-free |
|
WebRTC status |
Mandatory (Constrained Baseline profile) |
VP8: mandatory. AV1: optional, varies by browser |
|
Scalable video (SVC) |
Limited in WebRTC |
VP8: temporal layers only. AV1: full SVC support |
|
Best for |
Maximum reach and battery life |
VP8: royalty-free reach. AV1: quality on low bandwidth |
What is H.264?
H.264, also called AVC (Advanced Video Coding), was standardized jointly by ITU-T and ISO/IEC in 2003. It became the default codec for web video, Blu-ray, broadcast and video calls, and almost every device made in the last decade can decode it in hardware.
That hardware support is its main advantage for calls: encoding and decoding on a dedicated chip saves CPU and battery. The trade-off is licensing. Commercial use falls under patent pools such as the one administered by Via LA. Cisco distributes a free OpenH264 binary and doesn't pass its licensing costs on, which is one way apps and browsers ship H.264 without paying per copy.
What is VP8?
VP8 was created by On2 Technologies and released by Google in 2010 as an open, royalty-free codec under a patent non-assertion promise. Its quality per bit is close to H.264.
The IETF made VP8 mandatory in WebRTC alongside H.264, so every compliant browser can send and receive it. It's a common default for browser-based calls. Its weak spot is hardware: many devices encode VP8 in software, which costs more CPU than hardware H.264. VP8's successor, VP9, compresses better and adds scalable video coding.
What is AV1?
AV1 comes from the Alliance for Open Media, a group including Google, Mozilla, Netflix, Microsoft and Apple. Version 1.0 shipped in 2018. It is royalty-free and designed for both web playback and WebRTC.
MDN puts AV1's compression at up to about 50% better than H.264, which means the same quality at roughly half the bitrate, or noticeably better quality on a weak connection. The cost is encoding effort. Software AV1 encoders need much more CPU than H.264 or VP8, and hardware encoders are only in newer chips. Real-time encoders also run fast presets that give up some compression, so measure the gain on your own calls rather than trusting offline benchmarks. Hardware decoding is spreading faster; Safari, for example, plays AV1 only on devices with a hardware decoder.
Where VP9 fits
VP9 sits between VP8 and AV1. It is Google's royalty-free successor to VP8, compresses noticeably better, and supports scalable video coding with both spatial and temporal layers. Many browsers can send and receive it in WebRTC, though it isn't on the mandatory list.
For group calls, VP9 has been a popular middle ground: an SFU can forward the lower spatial layer to a participant on a weak connection and the full layer to everyone else, all from one upload. Its encoding cost is higher than VP8 but well below software AV1. If AV1 is too heavy for your users' devices, VP9 is the next thing to test.
Key differences
Compression: AV1 is clearly ahead. H.264 and VP8 are roughly level.
CPU and battery: H.264 is cheapest thanks to hardware. VP8 costs more in software. AV1 costs the most to encode unless the device has an AV1 encoder.
Reach: H.264 and VP8 work in every WebRTC browser because the standard requires them. AV1 must be checked per device.
Licensing: VP8 and AV1 are royalty-free. H.264 is licensed, though the details depend on how you ship it.
Group calls: VP9 and AV1 support scalable video coding, which lets a media server drop layers for slower receivers without re-encoding.
Example: prefer AV1 with a fallback
You can ask WebRTC to try AV1 first and fall back to VP8 and H.264 when the other side can't decode it.
const tx = pc.addTransceiver(videoTrack, { direction: 'sendrecv' });
const codecs = RTCRtpReceiver.getCapabilities('video').codecs;
const order = ['video/AV1', 'video/VP8', 'video/H264'];
const rank = c => {
const i = order.indexOf(c.mimeType);
return i === -1 ? order.length : i; // rtx, red and others go last
};
tx.setCodecPreferences([...codecs].sort((a, b) => rank(a) - rank(b)));
// Then create the offer as usual; the answer settles on a shared codec.
Which codec should you use?
Building video calls for the widest audience: start with H.264 or VP8. Both are guaranteed in WebRTC, and H.264 is easier on phone batteries.
Users on weak or expensive mobile data: offer AV1 first where both sides support it, with H.264 or VP8 as the fallback.
Large group calls: VP9 or AV1 with SVC lets a media server serve slow and fast receivers from one upload.
Recorded or on-demand video: encode H.264 for compatibility and AV1 for efficiency, and let the player choose.
Screen sharing: text and code need sharp frames more than smooth motion. Lower the frame rate before you lower the resolution, whichever codec you use.
Avoiding licensing questions: VP8 or AV1.
Practical default: negotiate AV1 where both sides support it, and keep H.264 or VP8 in the offer so every call still connects.
Limits and pitfalls
Software AV1 can overload phones: test encode CPU on mid-range Android devices before making it the default.
Codec mismatch in group calls: a media server that only forwards streams needs every receiver to decode the sender's codec. Pick a codec all participants share.
H.264 profiles differ: WebRTC requires Constrained Baseline. Higher profiles may not be accepted by every peer.
Compression numbers vary: published gains depend on content, encoder settings and speed presets. Measure on your own video.
Recordings: a stream recorded in one codec may need transcoding before it plays everywhere.
Video codecs in CometChat calls
If you're adding video calling with CometChat, you don't have to manage codec negotiation across browsers and devices yourself.
Codec selection handled by the Calls SDK
The CometChat Calls SDK is built on WebRTC. Its docs say video calls support VP8, VP9 and H.264, and the SDK picks the best codec based on browser and device capabilities, then negotiates resolution and frame rate. Audio uses Opus. Group calls run through a Selective Forwarding Unit, and quality adapts to each user's network. The same API is available on web, iOS, Android, React Native and Flutter.
Frequently asked questions
Is AV1 better than H.264?
For compression, yes: AV1 can deliver similar quality at a much lower bitrate. H.264 is still better for reach, hardware support and low CPU use, so many apps use both.
Is VP8 better than H.264?
They are close in quality per bit. VP8 is royalty-free; H.264 has better hardware support. Both are mandatory in WebRTC, so either works for browser calls.
Does WebRTC support AV1?
AV1 is optional in WebRTC. Several browsers support it, but not all devices can encode it efficiently. Check RTCRtpSender.getCapabilities('video') before relying on it.
Which codec uses the least bandwidth?
AV1, followed by VP9. H.264 and VP8 need more bits for the same quality.
Why do video calls still use H.264?
Because hardware encoders for it are nearly universal, which keeps CPU and battery use low, and because WebRTC requires every browser to support it.