Skip to content
Novus Examples
webm44.4 KB

Alpha Channel — VP9 in WebM

Video with a real per-pixel alpha channel: VP9 yuva420p in WebM, the one alpha path browsers decode natively. Composite it over a page background and the transparency is genuine, not a chroma key. Roughly 90% of each frame is fully transparent. Two traps this file exists to expose. First, auto-alt-ref must be disabled at encode time or libvpx silently drops the alpha plane, producing a valid file with no transparency and no error. Second, WebM stores VP9 alpha in BlockAdditional and signals it with AlphaMode=1, so FFmpeg's NATIVE vp9 decoder reports pix_fmt yuv420p and decodes fully opaque — you must force `-c:v libvpx-vp9` to see the alpha at all. Probing this file with default settings and concluding it has no alpha is the expected mistake.

Browser-playable test video · 1 seconds

Specifications

Resolution
480x270
Fps
24
Codec
VP9 (libvpx-vp9)
Pixel Format
yuva420p — 4:2:0 plus an alpha plane
Alpha Storage
Matroska BlockAdditional, signalled by AlphaMode=1
Transparent Area
≈90% of each frame
Container
WebM
Browser Support
Chrome, Firefox, Edge; Safari does not decode VP9 alpha
Auto Alt Ref
disabled — required for alpha to survive encoding
Probe Caveat
ffprobe reports yuv420p unless -c:v libvpx-vp9 is forced

Testing contract

Expected to pass
Scenario
Decode the file with libvpx-vp9 forced, composite it over a solid background, and sample a pixel in the transparent region.
Expected result
An alpha plane is present: the pixel format is yuva420p, carried in Matroska BlockAdditional and signalled by AlphaMode=1, and roughly 90% of each frame is transparent. Two traps are recorded here and both must be handled - ffprobe reports yuv420p unless `-c:v libvpx-vp9` is forced, and Safari does not decode VP9 alpha at all while Chrome, Firefox and Edge do.

What is a .webm file?

WebM is a deliberately narrow profile of Matroska, restricted to codecs anyone may implement royalty-free. It keeps Matroska's EBML structure but permits only VP8, VP9, or AV1 video with Vorbis or Opus audio, which is what made it the open counterpart to MP4 in an HTML5 `<video>` element. Google announced it at I/O in 2010 alongside the newly open-sourced VP8 and added VP9 and Opus in 2013. That restriction is also its limit: a WebM cannot carry H.264 or AAC at all.

How to use this file

Use an example WebM to test HTML5 `<video>` playback, EBML demuxing, and VP8/VP9 decoding, checking that a converter turning an MP4 into WebM re-encodes rather than attempting a stream copy, since neither H.264 nor AAC has any place in the container.

How to use this file for testing

“Alpha Channel — VP9 in WebM” is a deterministic Novus Examples fixture for Video codecs, Video matting, Conversion testing, Video QA. One source encoded as H.264, HEVC, AV1, VP9, MJPEG, and a ProRes-compatible mezzanine, across 8/10/12-bit and 4:2:0/4:2:2/4:4:4, for testing decoder support, transcode pipelines, and container remuxing.

Documented properties for this file: 24 fps. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.

Media fixtures are short and synthetic by design. Prefer waveform or transcript ground truth in the same group when measuring ASR, trim, upscale, or sync tools; do not assume broadcast-quality masters.

Code examples

<video controls preload="metadata" width="640" src="vp9-alpha.webm"></video>

Generated by generation/video_codecs_wave.py. Free for any use, no attribution required, license.