-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix increasing audio delay for WebRTC calls #30
Comments
@hrosa Any useful findings from the webrtc diagnostics tools we discussed? |
@ivelin https://github.com/webrtc/testrtc is our best candidate. I opened an issue to wire integrate it in Olympus so we can have a proper tool to measure call quality. |
After disabling RTCP from Mobicents MS I noticed that the RTT kept increasing on Chrome. Looking at the Wireshark trace, I noticed how Mobicents MS takes increasingly more time to reply to the STUN requests. This matches the information on Chrome's log where the RTT is measured accordingly to the STUN pings. |
I believe I know what is the problem with the audio delay in WebRTC calls. So, Chrome sends two streams of packets over the same port at different rates: RTP each 20ms and STUN each 400ms. The Media Server's Scheduler was designed on top of RTP 20ms golden rule, so from the logs I noticed that the UDP Manager invokes the receive() method each 20ms (this means we receive one packet each 20ms, either RTP or STUN). Now let’s assume this example, representing a sample of the stream coming from chrome: Notice how the interval between packets 4 and 5 is 12ms, and how interval between packets 5 and 6 is 8ms. This breaks the 20ms rule and that's how the congestion starts pilling up on the MS side. Based in the last 3 packets we can make the following analysis: "in the interval of 40ms, Chrome sends 3 packets (2 RTP, 1 STUN). In the same interval, Mobicents MS only receives 2 (1 RTP, 1 STUN). So, we add 20ms latency because the 3rd packet will only be received after 20 ms." ...and so on until we end up with latency in the order of n seconds. |
I will have to untie the UdpManager from the Scheduler, so that the UDP manager reads from the sockets continuously and not at a 20ms rate. |
…eduler to manage IO threads. Optimized code of the MultiplexedChannel and ProtocolHandlerPipeline. Performance tests show considerable number of failed calls and exceptions on Jitter Buffer. Next step is to make the JitterBuffer thread safe.
…e condition between scheduler thread and the UDP manager thread.
…ixes (pull request #30) Fix for combined SPEECH+DTMF mode Approved-by: Henrique Rosa <henrique.rosa@telestax.com>
The latency level keeps increasing for WebRTC calls.
https://groups.google.com/forum/#!msg/mozilla.dev.media/tkxeLEnBK9M/_4TMgrCShtMJ
The text was updated successfully, but these errors were encountered: