anthumchris / opus-stream-decoder

Instantly decode Ogg Opus audio streams in chunks with JavaScript & WebAssembly (Wasm)
124 stars 21 forks source link

Decoding opus stream receiving from camera stream. #11

Closed kuldeepmore closed 4 years ago

kuldeepmore commented 4 years ago

I am using this opus-stream-decoder for decoding opus stream packets receiving from IP camera camera. But it is not able to decode it and giving error as follows.

Error: Could not enqueue bytes for decoding. You may also have invalid Ogg Opus file. 3 opus-stream-decoder.js:1:20337 ERROR: Cannot enqueue 237 bytes, overflows by 113. Used: 65412/65536, OggOpusFile discovered: false. Try reducing chunk or decode before enqueuing more opus-stream-decoder.js:1:14651

I am receiving opus packet on web socket and giving it to opus-stream-decoder. I have attached the test.html I am using to this issue you check it. test.zip P

anthumchris commented 4 years ago

This decoder only works with full, complete OpusFiles. Will not work with Opus packets that are not encapsulated in Ogg.