Janus as SFU has worse performance than AppRTC P2P under packet loss

692 views
Skip to first unread message

Piasy Xu

unread,
Sep 17, 2018, 9:23:56 AM9/17/18
to meetecho-janus
Hi, I write a native WebRTC based video call app and using Janus as SFU, but severe video lag was observed when the network has some packet loss. So I did some tests to compare between AppRTC's P2P video call and Janus video call, I find out that AppRTC's P2P call performs much better. 

Below are some details:

iPhone 6, iOS 11.4.1, vs Nexus 5X, Android 8.1, both iPhone 6, Nexus 5X and Janus server are behind the same NAT network.

iPhone's Network Link Conditioner profile:
In Bandwidth 10000
In Packet Loss 3.4
In Delay 380
Out Bandwidth 10000
Out Packet Loss 3.4
Out Delay 380
DNS Delay 100

No other network limit on Nexus 5X or Janus server.

Android native WebRTC sdk version: #24277
iOS native WebRTC sdk version: #24275
Janus commit: ef8477e6081c4015e244fbce37d9930e73b83412

For AppRTC's P2P test, I use the original WebRTC demo, with the same version of WebRTC sdk.

I recorded video during the tests and upload them to google drive, both devices record an online stopwatch, we could see that AppRTC P2P mode is much smoother than Janus SFU mode.


How could I improve this problem? Please help me.


Lorenzo Miniero

unread,
Sep 18, 2018, 4:43:54 AM9/18/18
to meetecho-janus
Please try with Janus master. We recently fixed several issues related to retransmissions, so good chances are you're incurring in packet loss that's never recovered properly.

Lorenzo

Piasy Xu

unread,
Sep 18, 2018, 4:54:31 AM9/18/18
to meetecho-janus
Thanks for your reply, I'll try it later.

在 2018年9月18日星期二 UTC+8下午4:43:54,Lorenzo Miniero写道:

Piasy Xu

unread,
Sep 18, 2018, 12:04:15 PM9/18/18
to meetecho-janus
I've built the latest version of Janus, it seems to be a little bit better, but still has very severe video lag issue.

Janus commit: 39aa61a6556e6d5cda8ad25b1757d46533e2c02e



在 2018年9月18日星期二 UTC+8下午4:43:54,Lorenzo Miniero写道:
Please try with Janus master. We recently fixed several issues related to retransmissions, so good chances are you're incurring in packet loss that's never recovered properly.

Lorenzo Miniero

unread,
Sep 20, 2018, 6:39:27 AM9/20/18
to meetecho-janus
You'll have to familiarise yourself with the Admin API to see what may be going wrong: http://www.meetecho.com/blog/understanding-the-janus-admin-api/
My two cents is considerable packet loss.

L.

Alessandro Toppi

unread,
Sep 20, 2018, 10:46:01 AM9/20/18
to meetecho-janus
Are you using a specific Janus plugin or a custom one?
In the iPhone Network Conditioner, is "10000" to be intended as 10Kbps ?


Il giorno lunedì 17 settembre 2018 15:23:56 UTC+2, Piasy Xu ha scritto:

Alessandro Toppi

unread,
Sep 20, 2018, 11:06:31 AM9/20/18
to meetecho-janus
Reporting Plasy Xu's response:

I'm using the video room plugin. In iPhone Network Conditioner, the bandwidth is in kbps, so it means 10000 kbps, which is 10 Mbps

Alessandro Toppi

unread,
Sep 20, 2018, 11:25:34 AM9/20/18
to meetecho-janus
This seems an issue related to outbound packet loss on the iPhone device.
My suspect is that the iPhone is not adapting the stream to the lossy network in the SFU scenario.
On the inbound traffic, there is not much you can do, because Janus is just relaying the traffic.

Check the negotiated codecs and attributes in both scenario.
Check the WebRTC stats on the iPhone (sent bitrate etc.) in both scenarios.
Reply all
Reply to author
Forward
0 new messages