Codec

VP9 Codec: What It Is, How It Works, and When to Use It

16 min read
VP9
Reading Time: 12 minutes

YouTube delivers more than 500 hours of video every minute. A large share of that traffic runs on VP9 — Google’s open-source codec that cuts bandwidth by up to 43% compared to H.264 at the same perceptual quality.

If you’re building a streaming app, OTT platform, or any product that delivers video at scale, understanding the VP9 codec matters. It affects your storage costs, your CDN bills, your viewer experience, and which devices your content reaches.

This guide covers what VP9 is, how it encodes video, how it compares to H.264, H.265, and AV1, and when it makes sense to use it in your stack.

What Is the VP9 Codec?

The VP9 codec is a royalty-free, open-source video compression format developed by Google. Released in 2013, it was designed as a direct alternative to H.265 (HEVC) — delivering comparable compression efficiency without licensing fees.

A video codec is a standard that defines how raw video data is encoded into a compressed bitstream for storage or transmission, and then decoded back into frames for playback. VP9 is Google’s ninth generation in the VP codec family, building on the VP8 codec it open-sourced in 2010.

VP9 is a codec, not a container format. For web delivery, it’s typically paired with the WebM container format (`.webm` file extension), though it also works inside Matroska (`.mkv`) containers and fragmented MP4 for MPEG-DASH streaming.

In plain terms: VP9 is an open-source video codec that delivers 30–50% better compression than H.264 at equivalent quality, making it a cost-effective choice for web video delivery, 4K streaming, and adaptive bitrate pipelines.

A Brief History of VP9

VP9’s origins trace back to Google’s acquisition of On2 Technologies in February 2010 for $124.6 million. On2 had developed the VP3 through VP8 codec lineage. After the acquisition, Google open-sourced VP8 and began work on what became VP9.

Development started in late 2011 under the internal codename “NGOV” (Next Generation Open Video). Google released VP9 publicly on June 17, 2013, with initial support in Chrome 29.

YouTube adopted VP9 in 2014–2015 as its primary codec for 4K content. The scale of that deployment — billions of VP9 streams per day — helped establish VP9 as a production-ready standard rather than an experimental format.

In September 2015, Google co-founded the Alliance for Open Media (AOM) alongside Amazon, Netflix, Microsoft, Mozilla, and others. AOM went on to develop AV1 as VP9’s official successor. VP9 is now in maintenance mode, but it remains widely deployed across YouTube, Netflix, Twitch, and Meta.

How VP9 Encoding Works

VP9 uses a block-based hybrid coding approach — the same general family as H.264 and H.265 — but with larger maximum block sizes and more advanced prediction tools.

Understanding how video encoding works at this level helps you make better decisions about encoder settings, quality profiles, and when VP9 is worth the compute cost.

Superblocks and Block Partitioning

VP9 divides each frame into superblocks — 64×64 pixel regions that can be recursively split into smaller blocks down to 4×4 pixels. Larger blocks handle flat, uniform areas efficiently. Smaller blocks handle fine detail and sharp edges. This adaptive partitioning lets the encoder allocate bits where the visual complexity actually is.

Prediction Modes

VP9 reduces redundancy through two types of prediction:

  • Intra prediction — predicts a block’s content from adjacent blocks within the same frame, using 10 directional modes (vs. 9 in H.264)
  • Inter prediction — predicts blocks by referencing up to 3 previously decoded frames, tracking object movement using motion vectors

Inter prediction accounts for the majority of compression gains. Describing “this block moved 12 pixels to the right” takes far fewer bits than re-encoding the same pixel data in every frame.

Transform and Quantization

The difference between the predicted block and the actual pixel data — the residual — is transformed using discrete cosine transform (DCT) or an asymmetric discrete sine transform (ADST). The result is then quantized: rounded to fewer precise values. This step discards perceptually invisible detail, which is how VP9 achieves its compression ratios.

Loop Filter

After decoding each frame, VP9 applies a deblocking loop filter to smooth block boundary artifacts — a common side effect of block-based coding at lower bitrates. The filter adapts based on coded block signals, smoothing flat regions while preserving edges.

Bitrate Control Modes

VP9 supports several bitrate modes suited to different use cases:

Mode Description Best For
CRF (Constant Rate Factor) Quality-driven, variable bitrate VOD encoding
CBR (Constant Bitrate) Fixed output bitrate Live streaming
VBR (Variable Bitrate) Target bitrate with allowed variation General delivery
CQ (Constrained Quality) Quality floor with bitrate ceiling Adaptive streaming

For live streaming, CBR is the right choice — it prevents encoder queue buildup and keeps latency predictable. For VOD, CRF mode (value of 33 is a good starting point) gives a solid quality-to-size ratio.

VP9 Codec Profiles

VP9 defines four encoding profiles that control color depth and chroma subsampling configuration:

Profile Bit Depth Chroma Subsampling Use Case
Profile 0 8-bit 4:2:0 Standard web video
Profile 1 8-bit 4:2:2 or 4:4:4 Professional production
Profile 2 10/12-bit 4:2:0 HDR content
Profile 3 10/12-bit 4:2:2 or 4:4:4 HDR professional

Most streaming deployments — including YouTube and Netflix — use Profile 0 for standard dynamic range content. Profile 2 is used for HDR streams requiring 10-bit color depth and wide color gamut support.

VP9 also specifies 14 encoding levels (1.0 through 6.2) that cap maximum resolution, frame rate, and bitrate. Level 5.1 supports 4K at 60fps with a maximum bitrate of 120 Mbps — the level used for YouTube’s 4K streams.

VP9 vs H.264: Compression Compared

H.264 (AVC) is the most widely deployed codec on the internet. VP9 was built to outperform it on compression while staying patent-free.

YouTube’s own testing showed VP9 delivered:

  • 43% lower data rate for 1080p at equivalent quality
  • 35% lower data rate for 720p at equivalent quality

Independent testing with modern encoders consistently shows VP9 achieving 30–50% better compression than H.264 at equivalent quality, when both are encoded at comparable effort levels.

Factor H.264 VP9
Compression efficiency Baseline 30–50% better
Royalty-free No Yes
Browser support ~100% ~96%
Encoding speed Fast 10–20x slower
Hardware encode Universal Post-2016 GPUs
Max resolution 4K 65,536 × 65,536 px
WebRTC support Yes Yes

When to use H.264 over VP9: Real-time live encoding on constrained hardware without GPU acceleration, targeting older devices, or when your encoder stack doesn’t support VP9 well. H.264 also makes sense when encoding latency is more important than bandwidth savings.

When VP9 wins: Bandwidth-constrained delivery, 4K streaming, high-volume VOD pipelines where encoding cost is amortized against CDN savings.

VP9 vs H.265 (HEVC): Open-Source vs. Patented

H.265 (HEVC) and VP9 were designed for the same generation of video compression. Both deliver roughly 40–50% better compression than H.264.

The critical difference is licensing. H.265/HEVC has fragmented patent pools — MPEG LA, HEVC Advance, and Velos Media each assert their own terms — which created significant uncertainty around royalties and slowed web adoption. VP9 is fully royalty-free.

Factor H.265 / HEVC VP9
Compression vs H.264 ~40–50% better ~30–50% better
Licensing Patent royalties Royalty-free
Browser support Limited (Safari-focused) 96%+
Hardware encode Widely available Post-2016 GPUs
Primary container HLS, DASH WebM, DASH
Apple ecosystem Native hardware Software decode

For web delivery, VP9 has a clear advantage in browser reach. H.265 still wins in the Apple ecosystem — iPhones and Macs accelerate HEVC natively — and for broadcast workflows where HEVC tooling is mature.

For a fuller look at how HEVC stacks up against older codecs, see our H.265 vs H.264 comparison.

VP9 vs AV1: The Next Generation

AV1 is VP9’s successor, developed by the Alliance for Open Media (AOM) with contributions from Google, Amazon, Netflix, Microsoft, Mozilla, and Apple. Released in 2018, it was explicitly built to beat VP9 on compression.

AV1 delivers around 30% better compression than VP9 at equivalent quality — enough of a gain that YouTube and Netflix are actively migrating content to AV1 for mobile delivery.

Factor VP9 AV1
Compression vs H.264 ~30–50% better ~50% better
Royalty-free Yes Yes
Browser support ~96% ~90%+
Software encoding speed Moderate Very slow
Hardware encode Post-2016 GPUs Post-2021 (RTX 40 series+)
Hardware decode Widespread Growing
Live streaming readiness Yes Limited

The AV1 codec has a real compression advantage, but hardware encoder support is still catching up. For live streaming today, VP9 with hardware acceleration on modern server GPUs is more practical than software AV1 encoding.

For a detailed look at how AV1 compares to the prior generation, see AV1 vs H.265.

General rule: Use AV1 for new VOD pipelines where encoding time isn’t a bottleneck. Use VP9 where AV1 hardware encoding isn’t available, or where you need solid legacy device coverage.

Advantages of VP9

30–50% Bandwidth Savings vs H.264

VP9’s core value is compression efficiency. At the same perceptual quality, VP9 uses 30–50% less video bitrate than H.264. For a platform serving millions of views per day, this directly reduces CDN costs and improves buffering rates on slower connections.

Royalty-Free and Open-Source

VP9 carries no licensing fees. Google’s patents covering VP9 are available royalty-free under a license that remains free as long as you don’t sue other VP9 users for VP9-related patent infringement. This eliminates the licensing risk that complicated HEVC adoption and makes VP9 safe to deploy at any scale.

Wide Browser and Platform Support

VP9 is natively supported in Chrome, Firefox, Edge, and Opera. Safari added VP9 support in iOS 14 and macOS Big Sur in 2020. Current global browser coverage for VP9 is approximately 96% — close enough to H.264’s near-universal support that it’s no longer a meaningful obstacle for most web deployments.

Proven at Scale

VP9 powers a significant portion of YouTube’s 4K traffic. Netflix, Twitch, and Meta have all deployed VP9 in production at scale. This history means the encoding tools, decoder implementations, and platform behaviors around VP9 are mature and well-understood.

Hardware Acceleration

VP9 hardware decoding is standard on GPUs and SoCs manufactured after 2016. Intel Kaby Lake (7th gen), AMD Polaris, Nvidia Maxwell 2nd gen, and Qualcomm Snapdragon 800 series all support VP9 hardware decode. This means modern mobile devices play VP9 without the battery drain of software decoding.

For encoding, hardware VP9 encode is available on Intel Quick Sync (8th gen+), Nvidia NVENC (Turing+), and AMD VCE/VCN (Vega+) — making real-time VP9 encoding practical on current server hardware.

HDR and Wide Color Gamut

VP9 Profile 2 and Profile 3 support 10-bit and 12-bit color depth with HDR metadata, covering HDR10 and HLG. This gives platforms a royalty-free path to HDR streaming without HEVC’s licensing complexity.

Disadvantages of VP9

Encoding Is 10–20x Slower Than H.264

VP9 software encoding with libvpx is significantly slower than H.264 encoding with x264. A 1-hour 1080p video that takes 10 minutes to encode as H.264 can take 2–3 hours as VP9 at high quality settings. This matters for transcoding pipelines with large backlogs or tight publishing deadlines.

Hardware encoders close that gap considerably, but software-only VP9 encoding is a real constraint for teams with high-volume workflows. Cloud-based video encoding platforms that manage large encoder fleets at scale can help you absorb that compute cost without building your own infrastructure.

Being Phased Out by AV1

VP9 is in maintenance mode. Google’s codec development focus shifted to AV1 after contributing to the AOM. For new long-term infrastructure decisions, AV1 offers better compression and has a clear roadmap for growing hardware support. VP9 will remain in production for years, but if you’re designing a new codec pipeline today, AV1 is the forward-looking choice for VOD.

Higher CPU Load for Software Decoding

On devices without VP9 hardware decode, software decoding VP9 uses more CPU than H.264 — sometimes noticeably so on older Android devices (4.4–5.x era). This is a diminishing concern as post-2016 devices dominate the market, but it’s worth considering if your audience includes budget devices or embedded systems.

Patent Pool Ambiguity

While Google’s VP9 patents are royalty-free, the Sisvel licensing pool has asserted that additional third-party patents may cover VP9 implementations. For most deployments, this hasn’t resulted in real legal exposure, but it’s a relevant consideration for organizations in industries with aggressive patent enforcement.


The trade-offs above make more sense in practice once you see VP9 alongside real encoding configurations. Here’s how to put it to work.


VP9 Browser and Hardware Support

Browser Compatibility

Browser VP9 Support Available Since
Chrome Yes v29 (2013)
Firefox Yes v28 (2014)
Edge Yes Chromium-based
Opera Yes v16 (2013)
Safari Yes iOS 14, macOS Big Sur (2020)
Samsung Internet Yes v4
Internet Explorer 11 No

Hardware Decode Support

Platform VP9 Hardware Decode Notes
Intel 7th gen Kaby Lake+ Yes Intel Quick Sync
AMD Polaris+ Yes VCE/VCN
Nvidia Maxwell 2nd gen+ Yes NVDEC
Apple A9 chip+ Yes Hardware decode
Qualcomm Snapdragon 800+ Yes Adreno 430+
Android 4.4 KitKat Software only Hardware post-2016

For live streaming targets, hardware VP9 decoding is the norm for any device made after 2016. If a segment of your audience uses older Android (4.4–5.x) or pre-2020 Safari, factor in software decode limitations.

How to Encode Video with VP9 Using FFmpeg

FFmpeg with libvpx-vp9 is the standard open-source path to VP9 encoding. Here are working commands for the most common scenarios, based on Google’s VP9 encoding guidelines.

VOD Encoding (Two-Pass CRF)

Two-pass encoding produces the best quality for VOD content:

# First pass — analyze the source
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 33 -pass 1 -an -f null /dev/null

# Second pass — encode with quality data from pass 1 ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 33 -pass 2 \ -c:a libopus -b:a 128k output.webm

`-b:v 0` with `-crf 33` sets constrained quality mode — quality-driven encoding with no bitrate ceiling. Lower CRF values (e.g., 15) produce higher quality at the cost of larger file size. CRF 63 is the lowest quality extreme, suitable only for aggressive file size reduction.

Live Streaming Encoding (CBR)

For real-time live encoding, use CBR mode with speed settings tuned for throughput:

ffmpeg -i rtmp://input/live/stream_key \
  -c:v libvpx-vp9 \
  -b:v 2500k -minrate 2500k -maxrate 2500k \
  -deadline realtime -cpu-used 8 \
  -c:a libopus -b:a 128k \
  -f webm rtmp://output/live/stream_key

`-deadline realtime -cpu-used 8` selects the fastest encode mode, trading compression efficiency for real-time throughput. For higher quality at the cost of more CPU, use `-deadline good -cpu-used 2`.

4K HDR Encoding (VP9 Profile 2)

ffmpeg -i input_4k_hdr.mp4 \
  -c:v libvpx-vp9 -profile:v 2 \
  -b:v 0 -crf 18 \
  -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc \
  -pix_fmt yuv420p10le \
  -c:a libopus -b:a 320k \
  output_4k_hdr.webm

`-profile:v 2` activates 10-bit encoding. `-color_primaries bt2020` and `-color_trc smpte2084` set the HDR10 color metadata required for proper display on HDR screens.

Tile-Based Multi-Threading

On multi-core systems, tile columns and row multi-threading significantly speed up encoding:

ffmpeg -i input.mp4 -c:v libvpx-vp9 \
  -b:v 0 -crf 33 \
  -tile-columns 2 -row-mt 1 \
  -threads 8 \
  -c:a libopus -b:a 128k output.webm

`-tile-columns 2` splits each frame into 4 vertical tiles encoded in parallel. `-row-mt 1` enables row-based multi-threading within each tile. On an 8-core server, this can cut encode time by 40–60% compared to single-threaded VP9.

If you’d rather not manage FFmpeg configurations yourself, video transcoding APIs handle codec selection, quality profiles, and encoder scaling for you — you submit a video and get back an optimized output.

VP9 Use Cases

Web Video and OTT Delivery

VP9 is the default codec for adaptive bitrate streaming on YouTube. When you upload a 1080p video, YouTube transcodes and serves it as VP9 by default for Chrome and Android users. For OTT platforms targeting web and modern Android, VP9 is a strong codec choice for the quality ladder.

4K and HDR Streaming

VP9 Level 5.1 supports 4K at 60fps. Its Profile 2/3 support for 10-bit color and HDR metadata makes it one of the accessible royalty-free options for HDR streaming. Netflix has used VP9 alongside HEVC for HDR content on Android devices.

WebRTC Video Conferencing

WebRTC supports VP9 as one of its mandatory-to-implement codecs alongside H.264. In Chrome-to-Chrome sessions, VP9 is often selected for its bandwidth efficiency. If you’re building a video conferencing or real-time collaboration app, your media server likely supports VP9 codec negotiation already.

MPEG-DASH Streaming

VP9 packages cleanly into HLS and DASH delivery pipelines. In MPEG-DASH streams, VP9 is delivered in WebM segments or fragmented MP4 containers, with quality levels selected dynamically based on viewer bandwidth through adaptive bitrate logic.

Is VP9 Right for Your Project?

Use VP9 if:

  • Your primary delivery targets are Chrome, Firefox, Edge, and modern Android
  • You’re building a VOD platform and can afford longer encode times in exchange for lower CDN costs
  • You need a royalty-free codec with better compression than H.264
  • You’re implementing WebRTC video and want highest quality per bit
  • Your CDN and player stack already supports VP9/WebM

Stick with H.264 if:

  • You’re doing real-time live encoding on constrained hardware without GPU acceleration
  • A significant share of your audience uses older iOS (pre-iOS 14) or legacy Android
  • Your media players or CDN don’t support VP9 yet

Consider AV1 instead if:

  • You’re starting a new VOD pipeline and can accept longer encode times
  • You’re targeting mobile-first delivery with aggressive bandwidth optimization
  • Your encoder hardware supports AV1 (Nvidia RTX 4000 series, Intel Arc, AMD RDNA 3+)

For teams building on top of a live streaming API, codec selection happens at the infrastructure layer — you configure a quality profile, and the platform handles encoding into the right format for each device. That keeps your application code clean while the encoding pipeline handles delivery.

VP9 Codec FAQ

What is the VP9 codec used for?
VP9 is used for web video delivery, 4K streaming, OTT platforms, and WebRTC video calls. YouTube uses it as the primary codec for 4K content, serving billions of VP9 streams per day. Netflix uses it for HD and HDR content on Android. It’s also the default codec for VP9-capable browsers in WebRTC sessions.

Is VP9 better than H.264?
VP9 produces better compression — roughly 30–50% fewer bits for equivalent quality. But H.264 encodes 10–20x faster and has near-universal hardware support. For bandwidth-constrained delivery, VP9 wins on efficiency. For real-time encoding or legacy device support, H.264 is often more practical.

Is VP9 better than H.265?
VP9 and H.265 offer similar compression. The main difference is licensing: VP9 is royalty-free, H.265 is not. For web delivery, VP9 has wider browser support. H.265 has deeper hardware encoder support and is native to Apple devices. Neither is universally better — the choice depends on your target platform.

Does VP9 work in all browsers?
VP9 works natively in Chrome, Firefox, Edge, Opera, and Samsung Internet. Safari added VP9 support in iOS 14 and macOS Big Sur in 2020. Global browser coverage is approximately 96%. Internet Explorer (under 1% market share) does not support VP9.

How does VP9 compare to AV1?
AV1 offers around 30% better compression than VP9 at the same quality level. Both are royalty-free. AV1’s main limitation is encoding speed — software AV1 encoding is much slower than VP9 — and limited hardware encoder support on older GPUs. AV1 is better for new VOD pipelines; VP9 is more practical for live encoding today.

What container format does VP9 use?
VP9 is most commonly used with the WebM container (`.webm`) for web delivery. It also works inside Matroska (`.mkv`) containers and can be packaged in fragmented MP4 for MPEG-DASH streaming, though WebM is the standard choice for VP9 web delivery.

Is VP9 royalty-free?
Yes. Google’s patents covering VP9 are available royalty-free under a license that stays free as long as you don’t sue other VP9 users for VP9-related patent infringement. The Sisvel patent pool has asserted additional claims, but this has not resulted in widespread licensing demands for typical deployments.

What bitrate should I use for VP9 encoding?
For 1080p VOD, start with CRF 33 in two-pass mode — adjust down (e.g., 18–25) for higher quality, up (e.g., 40–45) for smaller files. For live 1080p streaming, a CBR target of 2,500–4,000 Kbps is common. For 4K content, 8,000–15,000 Kbps covers most quality requirements. Set minimum bitrate to 50% of target and maximum to 145% for adaptive bitrate profiles.

Closing

The VP9 codec earns its place in production video infrastructure through proven compression efficiency and a genuinely patent-free license. It’s the codec that made 4K streaming practical on bandwidth-constrained networks, and it continues to power a significant share of global video traffic on YouTube, Netflix, and Twitch.

For most web video workloads, VP9 sits in a useful middle ground: better compression than H.264 without HEVC’s licensing complexity, and more practical for live encoding today than AV1. As hardware AV1 encoders become standard, that balance will shift — but VP9 remains a well-supported, battle-tested choice for any HLS streaming or adaptive delivery pipeline.

If you want to skip codec management entirely, LiveAPI handles encoding, transcoding, and adaptive delivery for both live and on-demand video — with multi-CDN delivery through Akamai, Cloudflare, and Fastly built in. Get started and ship your streaming features without building encoder infrastructure from scratch.

Join 200,000+ satisfied streamers

Still on the fence? Take a sneak peek and see what you can do with Castr.

No Castr Branding

No Castr Branding

We do not include our branding on your videos.

No Commitment

No Commitment

No contracts. Cancel or change your plans anytime.

24/7 Support

24/7 Support

Highly skilled in-house engineers ready to help.

  • Check Free 7-day trial
  • CheckCancel anytime
  • CheckNo credit card required

Related Articles