mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.28k stars 1.11k forks source link

Packages loss on Murmur when speaking from Mumble-web client through Websockify. #3321

Closed florinpopescu closed 6 years ago

florinpopescu commented 6 years ago

Steps to reproduce:

  1. Have a system with Mumble-web (https://github.com/Johni0702/mumble-web), Websockify (https://github.com/novnc/websockify), Murmur and Mumble desktop client.
  2. From Mumble-web make a long PTT.

Expected result: The Mumble desktop client receives all sound.

Actual result: After ~ 7 seconds there is a 1 second voice gap which then reappear at every ~ 10 seconds.

Protocols: Mumble-web <----> Websockify: ---- Websockets Websockify <----> Murmur: ---- TCP sockets Murmur <----> Mumble desktop client: ---- TCP or UDP

Debugging: I've digged with tcpdump and the packages that are not transmitted are from Murmur to Mumble desktop client. All other packages from the other connections are transmitted just fine.

Tested on: Ubuntu 16.04 with latest Google Chrome.

mkrautz commented 6 years ago

My first reaction was: why is this filed against this repo? :-) But that's fair enough, happy to track it somewhere.

I wonder if it also happens when using a Mumble client in TCP mode? If not, why?

Also piping in @Johni0702 and @rubenseyer since they're more familiar with the WebSocket code and client(s) than I. Perhaps they've seen this before.

Johni0702 commented 6 years ago

I have no clue as to why that would happen and unfortunately cannot reproduce it.

Tested using Firefox 57.0.1, Chromium 60.0.3112.113, Murmur (master, 11 days ago) and any combination of Mumble 1.2.19, another mumble-web and server loopback (had to slightly modify mumble-web for that because it doesn't yet support whispering / server loopback).

I do have some tiny (~5ms) artifacts every 15-30 seconds but I think those somehow originate from my OS because I also have them in trivially simple webaudio apps (e.g. here with just a live input node connected to the output).

florinpopescu commented 6 years ago

@Johni0702 What version of websockify did you use? I want to have the same testing environment like you.

Johni0702 commented 6 years ago

@florinpopescu 0.8.0 built from the source package on PyPI

florinpopescu commented 6 years ago

@Johni0702 Thanks. I am still able reproduce it.

Did you used the latest mumble-web from master?

Also, I've tested with Grumble and it seems to work just fine.

Johni0702 commented 6 years ago

@florinpopescu Yes, I've used the demo mumble-web I'm hosting which should be master unless I've forgotten to update it and my local checkout which is definitely master.

Can you reproduce it with this mumble-web on the linked server?

florinpopescu commented 6 years ago

@Johni0702 Yep, I can reproduce it on that mumble-web link.

florinpopescu commented 6 years ago

But If I connect with the provided credentials then I can't reproduce it.

florinpopescu commented 6 years ago

On what OS is your Murmur reside? I am using Ubuntu 16.04.

Johni0702 commented 6 years ago

I'm running GuixSD with this hastily updated package which is based on the one in their repo but for 1.3 with gRPC patches (because I need them for other stuff).

florinpopescu commented 6 years ago

@Johni0702 I've installed Murmur OSX version and its the same thing. I dont think that is an OS issue.

Maybe it is something from murmur.ini. Do you have some custom configs in your murmur.ini file? Mine is the default one.

florinpopescu commented 6 years ago

I've tested on two public Murmur servers and it works fine: server1999.go.ro (port 10011) vadelma.duckdns.org (port 64738)

So the problem is that I didn't configure Murmur properly. Maybe it is something from murmur.ini. How I installed murmur: Downloaded archive from http://mumble.info/snapshot/Murmur-OSX-Static-1.2.19.tar.bz2 ---> run murmurd from command line. Am I doing something wrong?

florinpopescu commented 6 years ago

I've found a public server where I can reproduce the problem: 77.92.221.240 (port 64738) and the machine is an Ubuntu 16.04.3 LTS.

florinpopescu commented 6 years ago

@Johni0702 I've installed GuixSD following the instructions from here, using the BETA ISO on their website in a VMWare machine. https://www.gnu.org/software/guix/manual/html_node/Installation.html#Installation However, when I am running your updated package I've got the following error: ice-9/boot-9.scm: 3823:12: package: unbound variable. hint: Did you forget '(use-modules (guix packages))'? There is something else that I should do before?

Thanks!

rubenseyer commented 6 years ago

I can repro this using the demo mumble-web to transmit audio, Mumble 1.3.0\~2586\~6894ade2 to receive, latest websockify from PyPI and both Murmur 1.2.19 and 1.3.0\~2569\~gd196a4b on OSX (and in an Ubuntu 16.04 VM using the offical packages), just like you. Using PTT I get intermittent drops of audio. (The native Mumble client on "Force TCP" mode does not exhibit this behaviour.) Interestingly, transmitting on Continuous sometimes works, sometimes doesn't.

Looking at WebSocket frames passing through websockify, nothing is out of the ordinary. No frames dropped, packets broken over frames, buffers filled or anything like that. Most of my audio problems have come from browser issues but it seems like this isn't what is happening here.

Johni0702 commented 6 years ago

@florinpopescu That's only a snippet of the whole file, it's missing imports and the grpc package (which isn't in the repos).

So, I've installed Ubuntu Xenial on a new VM, installed mumble-server from the repos and can reproduce the issue with that setup.

I'm also pretty confident that I've found the reason for the problem and it's far less complicated than one might have though. As always, the devil is in the detail, specifically this detail:

Maybe it is something from murmur.ini. Do you have some custom configs in your murmur.ini file? Mine is the default one.

Connecting with Mumble to the Murmur running on Ubuntu (with default config), I'm greeted with:

Server maximum network bandwidth is only 72 kbit/s. Audio quality auto-adjusted to 32 kbit/s (10 ms)

and indeed, I've had an increased bandwidth limit configured for all Murmur servers I had ever tested on and lowering it on any of them causes the issue to start happening.

So, to sum up, the issue here is that mumble-web doesn't comply with the bandwidth limits sent by Murmur (in fact, it doesn't handle them at all) and therefore Murmur is enforcing them by itself and cutting audio in the process.

I've updated the issue over on mumble-web (johni0702/mumble-web#22), so afaict this can be closed.

mkrautz commented 6 years ago

Seems plausible. Closing for now.