VP9
What Is VP9?
VP9 is an open video codec that Google released in 2013 through its WebM project, as the successor to VP8. MDN puts its picture quality on a par with H.265 at similar bitrates, and every WebM player has to decode it.
Its biggest change from VP8 is the size of the blocks it codes. VP9 splits each frame into superblocks of 64 × 64 pixels and cuts each one into smaller blocks wherever the picture holds more detail, which helps most with high-resolution video.
YouTube was its first major user, and Google says VP9 can cut bitrates by as much as 50% compared with other known codecs.
When Should You Use VP9?
VP9 fits video that plays in a browser. An internal news app, for example, can export each announcement as a VP9 WebM for its intranet player and keep an H.264 MP4 for anyone who downloads the file.
Use VP9 for
-
Video on your own website
Browsers widely support VP9, and it is CE.SDK's default codec for WebM, so your app needs no extra setting to use it.
-
Overlays with see-through areas
A VP9 WebM can hold transparency, so a lower third or a sticker lets the video underneath show through its empty areas.
-
Browsers that cannot encode H.264
Some open-source Linux browser builds have no H.264 encoder, so an MP4 export fails there, while a VP9 WebM export can still work.
Pick another codec for
-
The smallest file at the same quality
AV1 compresses further than VP9, according to MDN and CE.SDK's docs. CE.SDK exports it to WebM as well, though it takes longer to encode.
-
Files that have to be MP4
CE.SDK pairs VP9 with WebM only. For an MP4 file, choose H.264 or H.265, because any other pairing fails.
-
Transparent video for Safari
MDN notes that Safari has no support for VP9's alpha channel, so plan another route for overlays Safari users will see.
What Are VP9 Profiles?
A profile fixes the bit depths and color sampling a VP9 file may use, and a device has to support the profile to decode the file. VP9 has four, in two pairs.
Profiles 0 and 1 carry 8-bit color
Profile 0 stores color at a quarter of the brightness resolution (4:2:0). Profile 1 adds 4:2:2 and 4:4:4 sampling, which keep more color detail.
Profiles 2 and 3 carry 10 or 12-bit color
The extra bits are what HDR video needs, and profile 2, at 4:2:0, is the one used for HDR encodes. Profile 3 pairs the higher bit depths with 4:2:2 and 4:4:4. CE.SDK imports 10-bit VP9 files but shows them with SDR colors.
How VP9 Works in CE.SDK
VP9 files open in CE.SDK’s video editor on Web, iOS, Android and Server, so your users can cut them like any other clip, and every WebM export uses VP9 unless your app asks for VP8 or AV1.
In the browser, the export runs on the browser’s own VP9 encoder, and CE.SDK won’t swap in another codec when that encoder is missing. Check vp9Encode first. Where it reads unsupported, try VP8, the oldest of the three WebM codecs and one that CE.SDK’s docs say almost every player decodes. Where neither works, export MP4.
import { VideoCodec } from '@cesdk/engine';
await engine.editor.checkCapabilities();
const { editor } = engine;
const opus = editor.getCapabilityState('opusEncode') === 'supported';
const vp9 = editor.getCapabilityState('vp9Encode') === 'supported';
const vp8 = editor.getCapabilityState('vp8Encode') === 'supported';
// CE.SDK never switches codecs on its own, so the fallbacks live here.
const blob =
opus && (vp9 || vp8)
? await engine.block.exportVideo(page, {
mimeType: 'video/webm',
videoCodec: vp9 ? VideoCodec.VP9 : VideoCodec.VP8
})
: await engine.block.exportVideo(page, { mimeType: 'video/mp4' }); Which of these codecs does this browser decode and encode?
A web export can only use the encoders the browser ships, and those differ between browsers and operating systems.
| Codec | Decodes | Encodes |
|---|---|---|
| VP9 video | Not checked Checking Yes No | Not checked Checking Yes No |
| VP8 video | Not checked Checking Yes No | Not checked Checking Yes No |
| AV1 video | Not checked Checking Yes No | Not checked Checking Yes No |
| H.264 video | Not checked Checking Yes No | Not checked Checking Yes No |
| Opus audio | Not checked Checking Yes No | Not checked Checking Yes No |
Decoding opens and plays a file. Encoding writes one, as an export does.
The check asks about 1080p video at 30 fps through WebCodecs, the API
CE.SDK's web export encodes with. In your app, go by CE.SDK's own checkCapabilities() result. Mobile browsers may report codecs here, but CE.SDK doesn't support
video editing in them.
How Do You Export a Transparent VP9 Video in CE.SDK?
A transparent WebM suits a lower third, a logo or a sticker that goes over other footage. CE.SDK writes one on iOS, Android, macOS and with its native Node.js package, but not in the browser.
Turn off the page’s background fill
Call setFillEnabled(page, false) so the page has no color of its own. With the fill on, the page paints every pixel and nothing can come out transparent.
Leave part of the page uncovered
Whatever the blocks leave uncovered comes out transparent. A lower third across the bottom of the page, for example, leaves the rest of the frame clear for the footage it will sit on.
Export a VP9 WebM with the alpha option on
Set exportAlpha: true on a WebM export with VP9 or VP8, and the file carries the transparency as a second video stream next to the picture. With AV1, with MP4 or in a browser, the option fails the export instead. Whether the transparency shows depends on the player that opens the file.
FAQs
Google does not ask for royalties on VP9, and MDN describes the format as open and royalty-free. In 2019 the patent pool administrator Sisvel announced a pool of patents it says cover VP9 and AV1, with fees aimed at device makers rather than at the people who publish video. The WebM project answered that it cannot stop third parties from asking for license fees on technology offered free of charge.
The MP4 format can hold VP9, and the WebM project publishes the rules for storing it there. CE.SDK keeps the usual pairing instead: VP9 goes into WebM, and an export that asks for VP9 in an MP4 file fails with a codec and container mismatch error.
AV1 is the codec that followed VP9. Instead of building a VP10, Google joined the Alliance for Open Media, whose founding members include Amazon, Cisco, Intel, Microsoft, Mozilla and Netflix, and its VP10 work went into AV1. Like VP9, AV1 goes into WebM files, and CE.SDK can export both.
No. WebM is the container, the file that holds the streams, and VP9 is one of the codecs that can fill its video stream. A WebM file can also hold VP8 or AV1 video, with Opus or Vorbis audio next to it.
Opus. CE.SDK picks it for every WebM export unless you set another audio codec, and no browser encodes Vorbis, so a web export always carries Opus. That is why a web app should check that the browser can encode Opus as well as VP9.
Links
Documentation and references for this concept.
Video Editor SDK
Let your users edit video in your app and export it as VP9 WebM or H.264 MP4.
Export to WebM
Check for a VP9 encoder, choose between VP8, VP9 and AV1, and export with Opus audio.
File format support
See which video codecs and containers CE.SDK imports on each platform.
Related Terms
AV1
An open video codec from the Alliance for Open Media, published in 2018 and licensed royalty-free by AOMedia's members. …
Video Codec
The software or hardware that compresses video into a compact stream and decodes it again for playback, as H.264, H.265,…
Video Overlay
A layer placed over the main footage, such as a logo, a title, a graphic or a second video. The footage shows through th…
WebM vs MP4
Two video containers. WebM, the web profile of Matroska, keeps by spec to two video codecs, VP8 and VP9, and two for sou…



