This demo shows how decoding pipelines can serve as preprocessors or extractors to prepare media data for decoding, encoding and rendering via the WebCodecs API.
This pipeline uses libogg
, libtheora
, and libvorbis
for decoding,
then leverages the VideoEncoder
and AudioEncoder
from WebCodecs (if available) to re-encode streams
into MP4 compliant format using mp4mx
.
In most browsers, WebCodecs support is experimental or unavailable. This demo works best on Google Chrome starting from version 94.
We decode the ogg file trailer_1080p.ogg that contains a theora video stream and a vorbis audio stream using the universal video tag :
<video is="universal-video_1" src="../test_sequences/trailer_1080p.ogg" using="solver_1"
with="ogg_1;vorbis_1;theora_1;isobmff_1" use-webcodecs controls> </video>
The specifications of the test sequence are :
Format | Ogg |
FileSize | 27873937 |
Duration | 33 sec |
Overall BitRate | 6757932 |
Video | Theora |
BitRate | 6401458 |
FrameRate | 24 |
Width | 1920 |
Height | 1080 |
FrameRate | 25 |
FrameCount | 825 |
StreamSize | 26 MB |
Audio | Vorbis |
BitRate | 80000 |
Channels | 2 |
SamplingRate | 48000 |
StreamSize | 329,9 kB |