What Is VP9?
VP9 is an open-source, royalty-free video compression codec developed by Google and released in 2013. It is the successor to VP8 and was designed to deliver video quality equivalent to HEVC (H.265) while being completely free to use — without patent royalties or licensing fees.
VP9 is the codec behind YouTube's high-quality streaming: since 2013, YouTube has served VP9 to compatible browsers for 720p and above content, representing billions of hours of daily video served in VP9. VP9 achieves approximately 30–40% better compression than H.264 at equivalent quality — a 1080p stream requires 2–3 Mbps in VP9 vs. 4–5 Mbps in H.264.
VP9 Architecture
VP9 is built on the same conceptual framework as H.264 and HEVC — block-based motion compensation plus transform coding — but with key differences:
Superblock Structure
VP9 uses a 64×64 superblock as its basic coding unit (HEVC later adopted this concept at 64×64, AV1 expanded to 128×128). Superblocks are recursively partitioned into coding units of 64×64, 32×32, 16×16, or 8×8 pixels in a quadtree structure.
This flexible block sizing was VP9's major advance over H.264's fixed 16×16 macroblock — allowing efficient coding of both large smooth regions and fine-detail areas.
Prediction
Intra prediction: VP9 has 10 intra prediction modes: DC, True Motion (TM), Vertical, Horizontal, and 6 diagonal/angular directions. Fewer modes than HEVC's 35, but sufficient for most content.
Inter prediction: VP9 uses:
- Up to 3 reference frames from the reference frame buffer
- Sub-pixel motion compensation with 8-tap interpolation filters (switchable: regular, smooth, sharp)
- Motion vector prediction from neighboring blocks
- Compound prediction (weighted average of two reference predictions)
Transform Coding
VP9 supports 4×4, 8×8, 16×16, and 32×32 DCT transforms (same as HEVC). An ADST (Asymmetric DCT/DST) is used for intra-coded residuals.
Entropy Coding
VP9 uses a boolean arithmetic coder with probability tables for each syntax element. The probability tables are updated within the frame (adaptive) — VP9 calls this its "context model." This is less efficient than HEVC's CABAC but simpler and faster to decode.
In-Loop Filtering
VP9 has two in-loop filters:
- Deblocking filter — reduces blockiness at block boundaries (similar to H.264/HEVC)
- Loop restoration filter — VP9 does not have HEVC's SAO filter, but the loop restoration helps reduce ringing artifacts
VP9 Profiles
| Profile | Bit depth | Chroma subsampling | Typical use |
|---|---|---|---|
| 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 or 12-bit | 4:2:0 | HDR video |
| Profile 3 | 10 or 12-bit | 4:2:2 or 4:4:4 | High-end professional |
YouTube uses VP9 Profile 0 for most content, with Profile 2 for HDR streams (YouTube HDR in VP9 uses 10-bit at BT.2020 color space).
VP9 Encoding with libvpx-vp9
FFmpeg's libvpx-vp9 is the primary software VP9 encoder.
# CRF-based encoding (target bitrate=0 forces CRF mode)
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 33 -b:v 0 output.webm
# Constrained quality (CQ mode — CRF + max bitrate)
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 33 -b:v 2000k output.webm
# Two-pass for accurate bitrate targeting
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2000k -pass 1 -f webm /dev/null
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2000k -pass 2 output.webm
# Good speed/quality balance with row-based multithreading
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 33 -b:v 0 \
-row-mt 1 -tile-columns 2 -frame-parallel 0 output.webm
VP9 Quality Scale
VP9 CRF values use a 0–63 scale:
- CRF 15-25: Very high quality (transparent)
- CRF 30-35: Good quality (recommended default for web)
- CRF 40-45: Acceptable quality (small file sizes)
- CRF 50+: Low quality
VP9 CRF 33 is roughly comparable to H.264 CRF 23 in visual quality but produces files about 30-40% smaller.
VP9 Speed Preset
The -speed flag (0-8) controls encoding speed:
- Speed 0: Best quality, very slow
- Speed 1-2: High quality, slow
- Speed 4: Default balance
- Speed 6-8: Fast, reduced quality
For production encoding: speed 2-4. For real-time: speed 5-7.
WebM: VP9's Container
VP9 is most commonly stored in the WebM container — an open web-friendly container based on Matroska (MKV). WebM supports:
- VP8 or VP9 video
- Vorbis or Opus audio
- VTT (WebVTT) subtitles
WebM files use the .webm extension. They are the native web video format for browsers that support VP9, and are smaller and faster to load than equivalent MP4 files.
VP9 can also be stored in MKV (.mkv) containers for local playback.
Browser and Platform Support
| Browser | VP9 support |
|---|---|
| Chrome | ✅ (since 2013) |
| Firefox | ✅ (since 2014) |
| Edge | ✅ (Chromium-based, 2019+) |
| Opera | ✅ |
| Safari | ❌ No VP9 support |
Safari does not support VP9. This is a significant limitation — all Apple devices (iPhone, iPad, Mac) running Safari cannot play VP9 video. This is the primary reason YouTube still maintains H.264 streams alongside VP9: Safari users need H.264.
When distributing VP9 video for web, always include an H.264 MP4 fallback:
<video>
<source src="video.webm" type="video/webm">
<source src="video.mp4" type="video/mp4">
</video>
VP9 Hardware Support
| Device | VP9 decode | Notes |
|---|---|---|
| Android (most 2016+) | ✅ | Nexus/Pixel devices specifically |
| Chrome OS | ✅ | Built around Chrome browser |
| NVIDIA GPU (GTX 950+) | ✅ | Hardware decode |
| Intel (6th gen+) | ✅ | Quick Sync VP9 decode |
| AMD (RX 400+) | ✅ | UVD/VCN hardware decode |
| Apple TV (4th gen+) | ✅ | Apple added VP9 support |
| Roku | ✅ (some models) |
VP9 vs. AV1: The Successor Relationship
VP9 was the stepping stone to AV1. Google contributed VP9's codebase and technical insights to the AOMedia consortium to help develop AV1. As a result:
| Feature | VP9 | AV1 |
|---|---|---|
| Royalty-free | ✅ | ✅ |
| Compression efficiency | ~30-40% better than H.264 | ~50-60% better than H.264 |
| Browser support | All except Safari | Chrome, Firefox, Edge, Safari 17+ |
| Hardware decode | Mature | Growing |
| Encoding speed | Fast (libvpx-vp9 fast mode) | Slow (libaom); Fast (SVT-AV1) |
YouTube's trajectory: YouTube began AV1 delivery in 2018 for certain content and has been expanding it since. VP9 remains the workhorse for the majority of YouTube traffic as AV1 hardware decode becomes more widespread.
When to Use VP9 in 2024
Despite AV1 being technically superior, VP9 remains relevant:
- YouTube encoding pipeline — YouTube still uses VP9 as the primary codec for most uploaded content
- Older AV1 hardware support gap — devices made 2013-2019 may have VP9 hardware decode but not AV1
- Faster VP9 software encoding — libvpx-vp9 at speed 5-7 is practical for encoding large video libraries; libaom AV1 is impractically slow for many use cases
- Chromebook / Android first — if targeting Chrome/Android users and not needing Safari, VP9 is reliable
- WebRTC/video calls — VP9 is widely used in WebRTC implementations (Google Meet, older WebRTC apps)
For new projects in 2024, AV1 via SVT-AV1 is generally the better choice for archival and streaming, but VP9 remains a solid option, especially when targeting Android/Chrome users primarily.
Related conversions
Common video conversions that pair well with this guide: