A small WebM demuxer & decoder library. It uses Google's libwebm for WebM/Matroska parsing, libvpx for VP8/VP9 video decoding & libopus / libvorbis for audio decoding.
- WebM/Matroska demuxing
- VP8 & VP9 video decoding
- Opus & Vorbis audio decoding
- CMake 4.0+
- C++11 or above compiler
- libvpx
- libopus
- libvorbis
- pkg-config
Note
libwebm's required sources are included in the repo.
cmake -S . -B build
cmake --build buildThe example takes a WebM file & decodes its video & audio streams:
./build/libsimplewebm_example video.webm WebM / Matroska file
│
▼
┌─────────────┐
│ libwebm │
│ mkvparser │
└──────┬──────┘
│
▼
┌─────────────┐
│ WebMDemuxer │
└──────┬──────┘
│
┌─────────┴─────────┐
▼ ▼
┌────────────┐ ┌───────────────┐
│ VPXDecoder │ │ OpusVorbis │
│ │ │ Decoder │
└─────┬──────┘ └───────┬───────┘
│ │
▼ ▼
VP8/VP9 Opus/Vorbis
frames PCM audio