Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

Is it possible to implement Opus as a codec? #39

Closed bram-dingelstad closed 9 years ago

bram-dingelstad commented 9 years ago

I've been trying to create a mumble bot that streams music to the server, only the stream (celt) seems to corrupt every now and again, stopping or just turning into straight robot voice. Any chance you might implement Opus?

Prior99 commented 9 years ago

Opus is already implemented, make sure your server and all clients in the channel have it enabled.

bram-dingelstad commented 9 years ago

It will automatically switch to the Opus codec when all of the clients have it enabled? Or do I need to pass some extra options to something?

Prior99 commented 9 years ago

No it will automatically select it then. Check the information of your server and connected clients to figure whether opus is used or not.

bram-dingelstad commented 9 years ago

I've forced opus on my server as well as in the code but didn't notice a change in quality or reliability, it still cuts out and the audio has the same quality as if I was streaming with celt. On Jun 9, 2015 8:50 AM, "Frederick Gnodtke" notifications@github.com wrote:

No it will automatically select it then. Check the information of your server and connected clients to figure whether opus is used or not.

— Reply to this email directly or view it on GitHub https://github.com/Rantanen/node-mumble/issues/39#issuecomment-110251326 .

Prior99 commented 9 years ago

I am not sure if you can improve the quality any further. One option would be to set the maximum bandwidth of the server. I have set the maximum bandwidth to an insane high value but did not really experience a gain in quality when streaming music.

Keep in mind that both celt and opus are optimized for realtime transmission of voice data with a delay as low as possible, not quality!

You will never achieve a quality similiar to any livestream method such as for example http livestreaming which has a delay of multiple seconds.

As for the cutouts: I also have those from time to time but I could eliminate them mostly when reducing the amount of computation needed for each frame as much as possible:

Prior99 commented 9 years ago

You could also have a look on how I did it here: https://git.cronosx.de/prior/mumble-bot/tree/master This is still work in progress but the music streaming does work smoothly.

bram-dingelstad commented 9 years ago

Dude, thanks a lot! I've never seen someone this dedicated to helping someone out on Github! Thanks again!

Prior99 commented 9 years ago

No problem. Have fun :)

Flet commented 9 years ago

@Prior99 cool repo! I wish I could star it :)

Prior99 commented 9 years ago

@Flet thank you. Maybe I can migrate it to Github if anyone is interested - currently the bot dies when a user diaconnects ^^

Prior99 commented 9 years ago

Here you go: Prior99/mumble-bot. I will be awaiting your contributions :)

Prior99 commented 9 years ago

@Rantanen This issue can be closed.

Rantanen commented 9 years ago

Good point!