# VP8

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

VP8 is a video format created by On2 Technologies and announced in 2008. Google bought On2 in 2010 and released VP8 that year as an open, royalty-free codec, together with the WebM container and the libvpx encoder and decoder. It was designed to compete with [H.264](/codecs/video/avc/), and it is the ancestor of [VP9](/codecs/video/vp9/) and [AV1](/codecs/video/av1/). Lossy [WebP](/codecs/images/webp/) images are VP8 intra frames in a RIFF container.

## When to use VP8

- **WebRTC.** Browsers must implement VP8 and H.264 Constrained Baseline ([RFC 7742](https://www.rfc-editor.org/rfc/rfc7742)), so VP8 is the safe common codec for realtime video.
- **Old WebM players and pipelines** that only accept VP8.

For anything else, use VP9 or AV1: both are much more efficient, and VP9 plays in every current browser.

## Format summary

| Property     | VP8                                                                    |
| ------------ | ---------------------------------------------------------------------- |
| Samples      | 8-bit YUV 4:2:0 only, progressive only (no interlacing)                |
| Picture size | Up to 16383×16383 (14-bit width and height fields)                     |
| Frames       | Keyframes and interframes; no B-frames                                 |
| Profiles     | Versions 1–3 replace the six-tap motion interpolation with bilinear or full-pixel filters for low-power decoders; virtually all streams use version 0 |
| Containers   | WebM/Matroska (`V_VP8`), IVF, RTP ([RFC 7741](https://www.rfc-editor.org/rfc/rfc7741)) |
| HDR, 10-bit  | Not supported; tone-map HDR sources to SDR before encoding             |

There is no lossless VP8 mode; WebP's lossless mode is a separate format. Alpha in WebM VP8 is carried as a second VP8 stream in Matroska `BlockAdditional` data, which browsers support but many other players ignore.

## Coding tools

VP8's design is close to H.264 Baseline with some ideas of its own:

- **16×16 macroblocks** (8×8 for each chroma plane), with 4×4 subblocks.
- **Intra prediction**: DC, vertical, horizontal and TrueMotion (TM_PRED) for 16×16 luma and 8×8 chroma; ten modes for 4×4 luma blocks. TrueMotion predicts each pixel as left + above − above-left.
- **Three reference frames**: the last frame, a **golden frame** (an older frame kept as a long-term reference, e.g. for a static background), and an **alternate reference (alt-ref) frame**, which is decoded but never shown. Encoders build alt-ref frames from future source frames, often temporally filtered, which recovers much of the benefit of B-frames without reordering.
- **Motion**: quarter-pel luma vectors with six-tap interpolation; `SPLITMV` lets a macroblock carry up to 16 motion vectors.
- **Transforms**: a 4×4 DCT, plus a Walsh–Hadamard transform over the 16 luma DC coefficients in 16×16-predicted macroblocks.
- **Quantisation**: a 0–127 quantiser index with per-component adjustments, and up to four segments per frame with their own quantiser and loop-filter level.
- **Entropy coding**: a boolean arithmetic coder. Probabilities are fixed within a frame and can be updated per frame, which is simpler than H.264's CABAC and helps error recovery.
- **Token partitions**: coefficient data can be split into 1, 2, 4 or 8 partitions by macroblock row, so decoders can run multiple threads.
- **In-loop deblocking** with "normal" and "simple" filters, adjustable per segment and per reference/mode, and skipped on internal edges of macroblocks that have no coefficients and don't use 4×4 prediction or split motion.

## History and reception

VP8 launched with bold efficiency claims that early tests did not bear out. Moscow State University's comparison, for example, showed libvpx well behind x264:

![VP8 rate–distortion on Pixar's "Up": libvpx compared with x264 and Xvid](/media/content/b793c1a831f2d857-vp8_rd_up.webp)

Fiona Glaser, an x264 developer and co-author of FFmpeg's fast native VP8 decoder, wrote an [influential analysis](https://web.archive.org/web/20150301015756/http://x264dev.multimedia.cx/archives/486) at launch. She liked parts of the design, including TrueMotion prediction and the simple arithmetic coding, but criticised the slow loop filter, parts of the transform design, and above all the specification: the "bitstream guide" was incomplete and libvpx's behaviour differed from it. That problem was never fully fixed. When the format was published as [RFC 6386](https://www.rfc-editor.org/rfc/rfc6386) in November 2011, it stated that the bitstream is defined by the reference decoder source code, and the text yields to the code where they conflict.

Later royalty-free formats learned from this: AV1 was developed with a written specification and conformance streams alongside the reference code. VP8 also set a precedent for web video by dropping interlacing entirely.

## Encoders and decoders

**VP8 implementations**

| Relationship | Project or format | Evidence and scope | Status |
| --- | --- | --- | --- |
| Implements by | [libvpx / vpxenc](/tools/software-encoders/vpxenc/) | libvpx v1.17.0 provides VP8 encoding and decoding. Scope: Encoder Decoder. Sources: [libvpx v1.17.0 source](https://chromium.googlesource.com/webm/libvpx/+/refs/tags/v1.17.0). | Documented |

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

[libvpx](/tools/software-encoders/vpxenc/) is the only encoder in practical use (`vpxenc`, or `libvpx` in FFmpeg). Decoding is cheap: FFmpeg's native `vp8` decoder and libvpx both run fast in software, and some Intel, NVIDIA and mobile SoCs also decode VP8 in hardware.

A VP8 WebM with FFmpeg:

```sh
ffmpeg -i input.mkv -c:v libvpx -crf 10 -b:v 1M -c:a libopus output.webm
```

For VP8, `-crf` (libvpx's `cq-level`, 0–63, lower is better) works as constrained quality: the encoder aims for that quality with `-b:v` as the bitrate ceiling. Always set both: without `-b:v`, FFmpeg falls back to a 256 kbit/s target, and that cap rather than `-crf` decides the quality. Choose `-b:v` for your resolution and content. See [vpxenc](/tools/software-encoders/vpxenc/) for realtime settings.

## Licensing

VP8 is royalty-free; Google licenses its patents under the WebM project's patent grant and libvpx is BSD-licensed. In 2013 Google and MPEG LA reached an agreement licensing VP8-related patents from a group of H.264 patent holders, which ended MPEG LA's effort to form a VP8 patent pool.
