# VP9

Canonical URL: https://encode.wiki/codecs/video/vp9/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): caf0f3a8b4f429169c481c9b1c3de6023dc189caaf0ba24f04c63ca51e50933a

VP9 is a royalty-free video format developed by Google as the successor to [VP8](/codecs/video/vp8/) and released in June 2013 as part of the WebM Project. It competes with [HEVC](/codecs/video/hevc/): efficiency is in the same range, decoding is relatively light, and licensing is simpler. YouTube adopted it early and still serves much of its catalogue in VP9; it is also widely used in WebRTC, where its scalable (SVC) mode suits multi-party video calls.

VP9 was never put through a standards body. The bitstream has been frozen since 2013, and the WebM Project's published specification is still labelled draft v0.7 (2017).

## When to use VP9

- **Web delivery** to browsers and devices that lack AV1 decode. Nearly every browser plays VP9, including Safari (macOS since Safari 14.1, iOS since 17.4).
- **HDR on the web or YouTube** via profile 2 (10-bit), where HEVC is not an option.
- For new encodes where [AV1](/codecs/video/av1/) decode is available, AV1 is more efficient; VP9 remains a solid middle rung between AV1 and [H.264](/codecs/video/avc/).

## Profiles and levels

| Profile | Bit depth | Chroma                 |
| ------- | --------- | ---------------------- |
| 0       | 8         | 4:2:0                  |
| 1       | 8         | 4:2:2, 4:4:0, 4:4:4    |
| 2       | 10, 12    | 4:2:0                  |
| 3       | 10, 12    | 4:2:2, 4:4:0, 4:4:4    |

RGB is coded as 4:4:4 in profile 1 or 3. Profile 0 is what every decoder supports; profile 2 at 10-bit is the usual HDR profile and is widely hardware-decoded on recent devices. Profiles 1 and 3 are mostly software-only.

[Levels](https://www.webmproject.org/vp9/levels/) run from 1 to 6.2 and limit sample rate, picture size, bitrate and tile columns. They matter mostly for hardware decoders.

## Coding tools

VP9 sits between VP8 and AV1 in design:

- 64×64 superblocks, recursively partitioned down to 4×4.
- 10 intra modes: DC, vertical, horizontal, six diagonal directions and TrueMotion.
- Three active references per frame (last, golden, alt-ref), chosen from eight stored frames, with compound prediction and 1/8-pel motion vectors using regular, sharp or smooth interpolation filters.
- **Alt-ref frames**: hidden frames built from future (often temporally filtered) source frames and used only as references. They do much of the job of B-frames without frame reordering; libvpx's `--auto-alt-ref` and `--lag-in-frames` control them.
- DCT and ADST transforms (mixed per direction) from 4×4 to 32×32, and a lossless mode using a Walsh-Hadamard transform.
- A boolean arithmetic coder whose probabilities adapt between frames.
- Segmentation (up to 8 segments with their own quantiser, loop-filter level, reference or skip), a deblocking loop filter, tiles for parallel encoding and decoding, and reference scaling so resolution can change without a keyframe.

## Encoders and decoders

**VP9 implementations**

| Relationship | Project or format | Evidence and scope | Status |
| --- | --- | --- | --- |
| Implements by | [libvpx / vpxenc](/tools/software-encoders/vpxenc/) | libvpx v1.17.0 provides VP9 encoding and decoding. Scope: Encoder Decoder. Sources: [libvpx v1.17.0 source](https://chromium.googlesource.com/webm/libvpx/+/refs/tags/v1.17.0), [VP9 bitstream and decoding process specification](https://www.webmproject.org/vp9/). | Documented |
| Implements by | [SVT-VP9](/tools/software-encoders/svt-vp9/) | SVT-VP9 v0.3.1 provides an experimental VP9 encoder. Scope: Experimental Encoder. Sources: [SVT-VP9 v0.3.1 repository](https://github.com/OpenVisualCloud/SVT-VP9/tree/v0.3.1). | Documented |

[Open the complete typed relationship catalog](/api/v1/catalog.json).

- **[libvpx](/tools/software-encoders/vpxenc/)** (`vpxenc`, or `libvpx-vp9` in FFmpeg) is the reference and practically the only software encoder in use. High-bit-depth (profile 2/3) encoding needs a build with high-bit-depth support enabled; most FFmpeg builds have it.
- **[SVT-VP9](/tools/software-encoders/svt-vp9/)** and **[Eve-VP9](/tools/software-encoders/eve-vp9/)** are alternatives with limited adoption.
- **Hardware encoding**: on PCs only Intel GPUs encode VP9 ([Quick Sync](/tools/hardware-encoders/qsv/), [VA-API](/tools/hardware-encoders/vaapi/)); NVIDIA NVENC and AMD AMF do not. Some Android SoCs (Qualcomm, Samsung Exynos) expose VP9 encoders through [MediaCodec](/tools/hardware-encoders/mediacodec/), mainly used by WebRTC.

A constant-quality VP9 WebM with FFmpeg:

```sh
ffmpeg -i input.mkv -c:v libvpx-vp9 -crf 31 -row-mt 1 -c:a libopus output.webm
```

With `-crf` and no bitrate, FFmpeg runs libvpx in constant-quality mode (older guides add `-b:v 0` for the same effect; with a non-zero `-b:v`, `-crf` becomes constrained quality with that bitrate as a cap). `-row-mt 1` enables row-based multithreading, which libvpx leaves off by default and which speeds up encoding considerably on multi-core machines. Lower CRF means higher quality; see [vpxenc](/tools/software-encoders/vpxenc/) for speed (`-cpu-used`), two-pass and tile settings.

**Decoders**: FFmpeg's native `vp9` decoder is fast and is what most players use; libvpx also decodes. Hardware decode of profile 0 is near-universal on current GPUs and phones; on NVIDIA it starts with the GTX 950/960 (8-bit only) and 10/12-bit with Pascal (GTX 10 series). See [video codec support](/reference/video-codec-support/) for browsers.

## Containers and HDR

**VP9 container mappings**

| Relationship | Project or format | Evidence and scope | Status |
| --- | --- | --- | --- |
| Carried By | [WebM](/containers/webm/) | WebM's documented codec subset includes VP9. Scope: Container Subset. Sources: [WebM container guidelines](https://www.webmproject.org/docs/container/). | Documented |
| Carried By | [ISO Base Media File Format](/containers/isobmff/) | The WebM Project publishes a VP codec binding for ISO Base Media File Format. Scope: Container Mapping. Sources: [VP Codec ISO Media File Format Binding](https://www.webmproject.org/vp9/mp4/). | Documented |
| Carried By | [Matroska](/containers/matroska/) | The Matroska mapping uses the V_VP9 Codec ID. Scope: Container Mapping. Sources: [Matroska codec mappings](https://www.matroska.org/technical/codec_specs.html). | Documented |

[Open the complete typed relationship catalog](/api/v1/catalog.json).

- **WebM / Matroska** (`V_VP9`) is the normal container.
- **MP4** via the WebM Project's [VP codec ISOBMFF binding](https://www.webmproject.org/vp9/mp4/) (`vp09` sample entry). Browser MSE and DASH players support it, but some players and editors expect VP9 only in WebM.
- **IVF** is the simple raw format `vpxenc` writes for testing.

VP9's own header carries bit depth, chroma subsampling, range and a colour-space value. It has no field for the transfer function (PQ or HLG), so HDR VP9 relies on the container's colour metadata: WebM/Matroska `Colour` elements, or in MP4 the `vpcC` box (primaries, transfer, matrix) plus `SmDm`/`CoLL` boxes for mastering metadata. Check that your muxer writes them. HDR10+ metadata can be carried in WebM as ITU-T T.35 data.

## Licensing

Google released VP9 royalty-free with an [additional patent grant](https://www.webmproject.org/license/additional/) for its own patents, and libvpx is BSD-licensed. Sisvel has offered a VP9 patent pool to device makers since 2019, claiming patents from third parties not bound by Google's grant.

## Pitfalls

- **Slow encoding at default settings**: libvpx's best-quality modes are slow; use `-row-mt 1` and a higher `-cpu-used` for faster turnaround.
- **Profile 1/3 output**: 4:4:4 or RGB input produces profile 1 or 3 streams that many hardware decoders reject. Use `-pix_fmt yuv420p` (or `yuv420p10le` for HDR) for delivery.
- **HDR without metadata**: a 10-bit profile 2 stream with no transfer and primaries in the container plays as SDR with wrong colours.
