anthumchris / fetch-stream-audio

Low Latency web audio playback examples for decoding audio streams in chunks with Fetch & Streams APIs

Home Page:https://fetch-stream-audio.anthum.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add WebM Support

anthumchris opened this issue · comments

audio/webm codecs=opus files should be supported. WebM seems to be the preferred web web container moving forward and is also supported by Media Source Extensions (MSE) which is another mechanism for playing audio quickly. WebM support would also allow direct comparisons of playback immediacy between MSE and the Web Audio API.

A WebAssembly or JS module would be needed to extract Opus packets from the container file. The current opus-stream-decoder WASM cannot decode on a Opus packet-only basis

I don't know the WebM/Matroska container specs and will need to spend time reading those.

Namaste Chris,

Would https://github.com/brion/ogv.js be of any assistance in bringing opus-in-webm support to fetch-stream-audio?

If I am not wrong, that repository has the wasm and js versions of opus decoders and webm demuxers.

Hope this helps.

Dhanyavaad.

Thanks @Brahmasmi. I've been referencing ogv and Brion's been very helpful in pointing me in the right directions. Been reading source for nestegg and Parsing EBML has been helpful in learning.

ts-ebml is capable of reading WebM files with Opus encoded audio.