How does WebRTC handle many-to-many connections?

12,975

Solution 1

A TURN server works as a fallback relay server in order to enable connectivity when direct peer-to-peer connectivity is impossible because of firewalls or other network issues. (More information here: press P for speaker notes.) TURN servers are not designed for media distribution.

A Multipoint Control Unit could solve the problem you refer to: there's an example topology for this here. As stated in the notes for that slide:

This is a server that's made specifically to do distribution of media, and can handle large numbers of participants; it can also do smart things like selective stream forwarding, mixing of the audio or video, or recording.

Solution 2

Have a look at https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-use-cases-and-requirements-06 for details about WebRTC use cases. The authors mention a multi-user conferencing solution that uses a central server. So the best solution of establishing multi-user A/V conferences using WebRTC is to have such a central server that does the audio mixing and A/V "broadcasting" to all peers.

This circumvents the bandwidth problems you mention in your question. Currently a whole bunch of start-ups and established service providers are working on WebRTC-based conferencing solutions, just let your favourite web search engine pick some examples.

A TURN server alone doesn't suffice since TURN is only used to relay data for hosts that can't be reached directly (possibly because of firewalls). TURN servers don't terminate WebRTC connections.

Solution 3

Yes, you would have to establish separate connections to each of your peers. In order to solve this you could use a media server like kurento.

With a media server every peer would connect to the media server, the server would then combine the video streams from your peers into one by placing them side by side and then send you the new stream. This saves peers the trouble of having to download streams from every other peer.

Share:
12,975

Related videos on Youtube

M4rk
Author by

M4rk

Updated on July 02, 2022

Comments

  • M4rk
    M4rk almost 2 years

    if I am in a room with other 7 users, I am wondering if WebRTC force every user to establish a connection to each one of other participants.

    Obviously it would consume something like 7kb/s*7 download and even upload, and many connection cannot handle this if their connection is already busy. Instead with some kind of media relay the bandwidth usage would be only 7kb/s but you would lose bandwidth adaptation between peers.

    Do you know any media relay, or way to solve this problem? is TURN server ( like https://code.google.com/p/rfc5766-turn-server/ ) suitable for this kind of job ( multicast included )?

  • ggarber
    ggarber over 9 years
    It is not possible to use VP8 scalability support in WebRTC browsers (you have not access with the existing API). Hangouts use simulcast (that is supported in existing APIs) to send multiple versions of the stream with different qualities so that the server (forwarding unit) is able to select which one to send to each destination.