-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing opus support #8
Comments
Naive question, but can't snapweb use the built-in browsers codecs (like OPUS) and achieve sync by using browser internal mechanisms like this? https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/playbackRate |
No. We need to be able to decode raw Opus, browsers handle Ogg Opus. I don't think playbackrate helps us with this but maybe I'm misunderstanding you. Something like https://github.com/samirkumardas/opus-to-pcm goes some way to explain the issue (I'm not an expert on Ogg but I'm not convinced about the framing implementation and the flushing config setting). More interesting is the upcoming https://w3c.github.io/webcodecs/ API which would be perfect. Looks like it's in Chrome 86 (behind a feature flag) and Firefox are working on supporting it. I guess it won't be available for a long while yet. Best off finding a libopus wasm library in the meantime, we probably don't care about a huge file size. |
I understand that snapcast needs the raw opus stream, not the ogg encapsuled opus, so that's a problem if the built-in codec cannot decode raw opus. In any case, it seems that other programs successfully integrated emscripten versions of opus, specifically the aurora.js project... |
Yes, someone just needs to do it. |
Can anyone give an update on this situation for non technical users ? Was there any progress regarding this issue ? After some years of using snapcast already, I ended up here today because I was testing the builtin Snapweb client on Firefox (http://myserver:1780/). I rarely use a web browser as a client, so I hadnt noticed this before. After many years of using Firefox I was quite surprised to find this messages:
and
I am 99.99 % sure that I have already listened to other radio streams in ogg or opus in Firefox, so this "not supported" message has nothing to do with Firefox itself. Am I correct ? It's some "opus support" or "ogg support" missing from Snapcast . Am I correct ? |
Any progress on this issue? From what I understand the possible solutions would include:
Is my understanding correct that the Btw if the problem is only with raw opus and not with ogg opus then why do I get |
It's not on Snapcast, technically speaking. If you configure That's because those applications use the native Opus decoders. The problem is only with the Web side, as raw Opus (apparently) isn't natively supported, thus support can be added either through an external library, or by sideloading the codec through a WASM wrapper. |
https://github.com/eshaz/wasm-audio-decoders might be useful in solving this and #14 |
Snapweb should support opus. There is a opus branch with a emscripten cross compiled opus library, but it's getting out of sync during playback, maybe the decoding must be done in a thread.
The text was updated successfully, but these errors were encountered: