matthieugrieger / mumbledj

A Mumble bot that plays audio fetched from various media sites.
MIT License
170 stars 59 forks source link

Packet loss on clients #94

Closed floube closed 8 years ago

floube commented 8 years ago

Hey, I am running mumbledj on my server which also runs the mumble server itself. But some of the audio packets (about 30 packets of a 5 minute track) get lost on the clients side. The thing is, you can clearly hear that something is missing or skipping a few beats of the song.

Any way to fix this or is it related to the server?

System: Debian 8 with dependencies installed murmur.x86, mumbledj and ffmpeg priorities are each set to -20

ghost commented 8 years ago

I doubt this is a server issue, have 2 servers (1 debian, 1 CentOS) running mumbledj without any problems @ real high audio quality (opus@1000kbit/s) As you mentioned, I recommend to try different settings on the client side... changing priority on the server imho hasn't the expected impact.

Which bandwidth do you have server/client side? Could you post some server/client UDP stats?

matthieugrieger commented 8 years ago

It is probably related to the server, but it is nearly impossible to get a perfect stream of a song via Mumble. I usually experience a few skips here and there in each song.

It may also be related to the client's connection to the server. When on WiFi, the audio cuts out often. Doesn't happen nearly as much on Ethernet.

ghost commented 8 years ago

...but how to blame UDP for packet loss ;) There's no retransmission.

gplassard commented 8 years ago

There is a support for TCP Tunneling in the protocol : https://mumble-protocol.readthedocs.org/en/latest/voice_data.html#tunneling-audio-over-tcp

But I don't know if this API is accessible through gumble and how good it would be perform...

floube commented 8 years ago

Setting priorities pretty much removed the audio problems, but some still remain. It looks like it also depends on the track itself, maybe the filesize is the thing?

And I do certainly not blame UDP for this :)

ghost commented 8 years ago

This surprised me much... have you tried a realtime audio kernel too?

matthieugrieger commented 8 years ago

@floube: Are you still experiencing issues? This seems to be something that is out of my power to fix at the moment if you are still having issues.

matthieugrieger commented 8 years ago

Closing due to inactivity. Let me know if you are still having issues and I'll reopen it. I suspect that this issue was not an issue with MumbleDJ anyway.