0

I have a peer to peer videoconference app using simpleWebRTC and signalmaster for signaling. When more than 4 users connects the stress it causes on the network and the TURN server is too big, so I was thinking, is it possible to implement a MCU in this case? What would it take to do it?

ee11131
  • 51
  • 1
  • 6
  • Are you trying to create a group call with 4+ participants, or it's a scenario with 2+ peer-to-peer calls (2 participants per call)? – jamix Jan 03 '18 at 10:05
  • @jamix I want to support more than 4 participants. I'm also interested in an SFU (Selective Forwarding Unit) and I want to know which solution people think is the best for my case, SFU or MCU, and what approach should I have when implementing it. – ee11131 Jan 03 '18 at 12:00

1 Answers1

0

For more than 4 participants, full mesh (connecting each participant with everyone else peer-to-peer) is impractical. If there are n participants, then each of them needs to have n - 1 outgoing and n - 1 incoming video streams, which quickly saturates the bandwidth, especially on mobile.

An SFU, for example Janus, forwards packets between call participants. The advantage of the SFU for group calls is that each participant needs to push their video stream only once - to the SFU - which then forwards it to everyone else. There are still n - 1 incoming streams for each participant though.

An MCU is capable of combining multiple video streams into one, so each participant ends up with 1 outgoing video stream and 1 incoming composite video stream. To produce a composite video stream out of n - 1 individual ones, an MCU needs to re-encode video in realtime, which makes it a CPU hog.

I would suggest giving Janus (SFU) a try first and seeing how that works for you.

jamix
  • 5,484
  • 5
  • 26
  • 35
  • Thanks, I'll have a look at Janus, but is it possible to implement it in a scenario like mine (SimpleWebRTC + signalmaster)? If so, what would it take? – ee11131 Jan 03 '18 at 15:37
  • It looks like SimpleWebRTC is peer-to-peer only. Please see my answer here: https://stackoverflow.com/questions/48093080/is-jitsi-videobridge-compatible-with-other-webrtcs-api-or-do-we-have-to-use-it/48093761#48093761 – jamix Jan 04 '18 at 10:58