Client side "jitter buffer" for the audio?

831 views
Skip to first unread message

Kaplan

unread,
Dec 28, 2016, 5:14:47 PM12/28/16
to meetecho-janus
Hi Janusers,
I am running an audio bridge room on Janus, and sometimes the audio "crackles" from what I think is network latency on the UDP packets.  Is there some sort of jitter buffer client side that I could use that you guys know about?

The audioroom does not have jitter buffers as far as I can see...

Lorenzo Miniero

unread,
Dec 29, 2016, 6:15:56 AM12/29/16
to meetecho-janus
We do have a tiny pre-buffer (6 packets = 120ms) in the audiobridge:
but it's not a real jitter buffer as we don't reorder anything, it's just there to make sure we have enough packets to start with.

We use that same value (*2) as an indicator to drop packets that are too old and as such avoid cumulating delays for troubled users:

You can try playing with that prebuffer and/or with the *2 threshold to see if things improve, but beware that increasing the buffer will increase the static delay (you cumulate more packets before adding them to the mix) and reduxing it makes missing packets more noticeable.

L.

Kaplan

unread,
Dec 30, 2016, 8:57:31 AM12/30/16
to meetecho-janus
OK, thanks! Yes, I will try to double it... I do see quite a bit of "Too many packets in queue (12 > 12), removing older ones" on my logs.
Users are screen sharing at 1024kbps and also talking into the audio bridge. Sometimes the audio crackles for many minutes. I am trying to reduce that.
Is it worth playing with the opus bitrate? currently using opus/48000/2... Not sure I need stereo or 48000...

Lorenzo Miniero

unread,
Jan 2, 2017, 4:00:54 AM1/2/17
to meetecho-janus
48khz on users or in the mix? A reduced audio sampling rate would make mixing lighter on the CPU, and save a little bandwidth. Anyway, crackling audio might be caused by a too high bandwidth used for video which results in users not being able to send proper audio too.

L.

Kaplan

unread,
Jan 2, 2017, 1:32:29 PM1/2/17
to meetecho-janus
Thanks, 48k clientside I believe is what I see on the SDP in Chrome. Is there a way to tell  janus.js to request opus/16k from getUserMedia?
I believe I create the audio bridge at 16000...

Mirko Brankovic

unread,
Jan 3, 2017, 3:27:04 AM1/3/17
to Kaplan, meetecho-janus
You can check the Admin API or webrtc-internals how much bandwidth you are using for each handle / peer connection and if and how much there are nacks or packet drops. Start troubleshooting from there, maybe even limit bitrate to see if it helps.

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Mirko
Reply all
Reply to author
Forward
0 new messages