orottier/web-audio-api-rs

Fail to decode opus codec

subframe7536 opened this issue · 3 comments

Thanks for your great work!

I'm just using the example decode_multithreaded with sample files to test decoding, but it fails:

./samples/flac.flac - Success - decoded 442368 samples
./samples/ogg.opus - Error - Unsupported("core (codec):unsupported codec")
./samples/mp3.mp3 - Success - decoded 441216 samples
./samples/wav.wav - Success - decoded 441344 samples

Hello and thanks for flagging.
We use the symphonia library for decoding and it appears they do not have support for opus yet pdeljanov/Symphonia#8
Adding opus capabilities directly into this lib is something I would rather not do as it is not core to the audio api feature set.
Perhaps you can convert the files beforehand?

Thanks for your explaination!

Im trying to migrate the audio control from frontend to backend, and just encounter this upstream issue. Maybe your advice is the best way currently.

Thanks for understanding.
I'm leaving this issue open for visibility and future reconsideration.
Regarding encoding, in #508 we plan to add support for more types so perhaps that might result in changes to decoding support