anthumchris / fetch-stream-audio

Low Latency web audio playback examples for decoding audio streams in chunks with Fetch & Streams APIs
https://fetch-stream-audio.anthum.com
MIT License
372 stars 21 forks source link

Add WebM Support #13

Open anthumchris opened 4 years ago

anthumchris commented 4 years ago

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.

Brahmasmi commented 4 years ago

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.

anthumchris commented 4 years ago

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.

guest271314 commented 4 years ago

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