-
Notifications
You must be signed in to change notification settings - Fork 44
Back of the envelope calculations: mediasoup
Paulo Lanzarin edited this page Oct 15, 2021
·
16 revisions
- If your server is behind NAT (otherwise skip to step 2):
- Let $SERVER_IPv4 be your server's IPv4
yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.webrtc.listenIps[0].announcedIp $SERVER_IPv4
yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.plainRtp.listenIp.announcedIp $SERVER_IPv4
- If you wish to enable IPv6 in mediasoup (otherwise skip to step 3):
- Let $SERVER_IPv6 be your server's IPv6
yq w -i /etc/bigbluebutton/bbb-webrtc-sfu/production.yml mediasoup.webrtc.listenIps[1].ip $SERVER_IPv6
- Follow https://github.com/bigbluebutton/bigbluebutton/pull/13112 to control mediasoup usage per meeting (metadata) or server (settings.yml) and then
sudo bbb-conf --restart
- If you're going to use mediasoup server wide, we recommend running the following command as an optional optimization:
yq w -i /etc/bigbluebutton/bbb-html5.yml public.app.kurento.signalCandidates false
- If you're going to use mediasoup server wide, we recommend running the following command as an optional optimization:
git clone https://github.com/bigbluebutton/bbb-webrtc-sfu.git
-
npm install -D
- https://github.com/bigbluebutton/bbb-webrtc-sfu/blob/5835e76748ede4c328becf78d42c99fc3410f186/package.json#L29-L31
- mediasoup related stuff is listed as dev dependencies; so you can either install them separately or run npm install -D (or NODE_ENV=development)
-
cp /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml <CLONE_DIR>/bbb-webrtc-sfu/config/
- Or set up a new default.yml on your own if you know your way around it
- Set https://github.com/bigbluebutton/bbb-webrtc-sfu/blob/5835e76748ede4c328becf78d42c99fc3410f186/config/default.example.yml#L309-L310
- Server: if NAT,
listenIp: 0.0.0.0, announcedIp: pub-IP
- Server: if ~NAT,
listenIp: pub-IP
- It's an array, so you can set an
ip: <IPv6>
entry as well
- Server: if NAT,
-
https://github.com/bigbluebutton/bbb-webrtc-sfu/blob/5835e76748ede4c328becf78d42c99fc3410f186/config/default.example.yml#L329-L330
- Same as step 4 but single stack (just used internally, listen only/mic interop stuff, so prefer IPv4)
- Instruct webrtc-sfu to load the mediasoup adapter: https://github.com/bigbluebutton/bbb-webrtc-sfu/blob/5835e76748ede4c328becf78d42c99fc3410f186/config/default.example.yml#L135-L139
- Add a new entry: with path: mediasoup/mediasoup-adapter.js and name: mediasoup
- At bbb-html5's config:
- https://github.com/bigbluebutton/bigbluebutton/blob/835f1a8dc9f19f7c73b69db3bbdc71f87b73e41a/bigbluebutton-html5/private/config/settings.yml#L210 set to false
- https://github.com/bigbluebutton/bigbluebutton/blob/835f1a8dc9f19f7c73b69db3bbdc71f87b73e41a/bigbluebutton-html5/private/config/settings.yml#L476 set to false
- Motivation behind both: payload type normalization; am thinking about making false default in 2.4
- Steps 1-7 should get you ready to use mediasoup, but the default is still Kurento. Bring the system's webrtc-sfu down (
systemctl stop bbb-webrtc-sfu
), start your local clone (npm start
). - Follow https://github.com/bigbluebutton/bigbluebutton/pull/13112 to control mediasoup usage per meeting (metadata) or server (settings.yml)