meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8k stars 2.45k forks source link

Simulcast/Chrome: Increasing sender's bitrate limit causes receiver to thrash between substreams #1624

Closed jsdir closed 5 years ago

jsdir commented 5 years ago

With janus-gateway 0.7.0, we've observed that increasing the sender's bitrate limit causes the receiver to thrash between substreams, causing heavy artifacts and broken video.

Here are steps to reproduce the issue:

  1. Using Chrome (I tested this on v74), Open https://janus.conf.meetecho.com/echotest.html?simulcast=true and start the demo
  2. Set the local stream bandwidth cap to 128kbit
  3. Verify the receiver switches to the lowest quality substream
  4. Set the local stream bandwidth cap to 2mbit
  5. Wait a few seconds for the sender bandwidth to increase
  6. The receiver will now be thrashing between the lower and higher quality substreams

When running a similar test on our own gateway, we got these log messages:

[WARN] No packet received on substream 1 for a while, falling back to 0
[WARN] No packet received on substream 1 for a while, falling back to 0
[WARN] No packet received on substream 1 for a while, falling back to 0
[WARN] No packet received on substream 1 for a while, falling back to 0
[WARN] No packet received on substream 1 for a while, falling back to 0

Another note is that this behavior does not happen on Firefox.

lminiero commented 5 years ago

Make sure you're using janus.js from master and not 0.7.0, as explained in the changelog I published on the group. Try also the ?simulcast2=true query string with Chrome to see if the same thing happens there (different simulcast approach).

jsdir commented 5 years ago

I ran the same echotest locally with ?simulcast2=true, janus-gateway==0.7.0, and the janus.js from master, but I still get the thrashing between substreams.

lminiero commented 5 years ago

It's working as expected for me, with Chrome Canary and the latest Janus. When setting back to 2mbps after dropping to 128kbps, it goes to layer 1 after a few seconds (the time the browser figures out there's enough bandwidth) and then after a few seconds back to the highest layer.

lminiero commented 5 years ago

Closing as apparently not an issue. Feel free to reopen if you can provide more details.