Best Practices for Higher Capacity Room

Hi All,

I am using Mediasoup in the creation of a multi-user online 3D environment similar to VRChat or Mozilla Hubs. To that end, Mediasoup is providing all of the real time communications, consisting of webcam audio and video.

I have implemented positional audio and each user’s video feed is textured around their 3D avatar. Now I would like to maximize capacity for the space (ideally it would have a capacity of 100+ simultaneous users). To that end, I am trying to implement a system where each client would dynamically adjust incoming feeds based on distance (i.e. those peers furthest in 3D space would be de-prioritized). Does one of which of the following approaches seem most bandwidth and computationally efficient?

  • each user uses consumer.pause() and consumer.resume() to dynamically shut off unnecessary feeds
  • each user adjusts incoming feeds using consumer.setPriority()
  • each user sends multiple feeds using SVC and adjusts incoming feeds using consumer.setPreferredLayers

Does one of these approaches seem like it would be most reliable or efficient? I would like an update rate that may be above what is typical of standard chat applications (i.e. each client updating feeds on all other clients 1 time per second), so any advice here is much appreciated!

pause() / resume() when possible. Then setPreferredLayers().

SVC (VP9) or simulcast (VP8 or H264).

2 Likes