3

I have a server which is able to relay the WebRTC media data from A to B. For the video conferencing, if we go with P2P approach then a mesh network is created. Whenever P2P doesn't work, we can have this relay server.

The main problem is that in the mesh network, the number of upload link is "N - 1" for N participants. Hence the number of connection goes upto N * (N-1). Usually mesh network allows 5-6 stable connections.

Many online sources suggest to implement SFU. If SFU decrypts the media data and then re-encrypts for every peer then that virtually requires a WebRTC component on the server side. Are there any lightweight C/C++ based library which helps in this regard?

Any better alternative strategy for the same?

BTW, I tried to share the same offer to all the peers with their own answer, but as expected it didn't work. The peer gets disconnected after receiving few chunks.


I have referred below related posts:

iammilind
  • 68,093
  • 33
  • 169
  • 336

1 Answers1

2

There are quite a few free and open source projects that implement an SFU:

  • Jitsi is probably the best known, but it is written in Java, and might therefore be unsuitable in some deployments;
  • Janus is written in C; it is small, efficient, and well supported, but might not be the easiest to understand;
  • Ion-SFU and Galène are written in Go, and might be easier to adapt to your needs.
jch
  • 5,382
  • 22
  • 41
  • Janus is officially supported for Linux. Are you aware of any C++ based cross platform library or a subset, which can generate offer/answer SDPs and then encode/decode the stream. Quite equivalent to what Chrome browser does. Even a minimal WebRTC subset of Chrome is also fine. But not sure, how to set it up. – iammilind Dec 31 '20 at 11:57
  • @jch what do you think of mediasoup? – Mehulkumar Mar 23 '21 at 13:03
  • I'm not good at reading node.js code, so I haven't looked at it much. Sorry. – jch Mar 23 '21 at 22:49