bigbluebutton / docker

Docker files for BigBlueButton
GNU Lesser General Public License v3.0
360 stars 242 forks source link

2.4 how to use mediasoup #176

Closed dsjiern closed 2 years ago

dsjiern commented 2 years ago

Hey,

can someone already say how to switch from kurento to mediasoup in the docker-variant?

thx

alangecker commented 2 years ago

with a brief look at the instructions I see at least following steps:

but I didn't try anything :D

prlanzarin commented 2 years ago

What @alangecker said should be correct. add mediasoup to media-server-adapters is not needed, though. Already set by default.

I skimmed through the updated Dockerfile for webrtc-sfu and it also seems correct (alpine -> slim, new deps are ok).

I'll try to test your v2.4.x branch with mediasoup this weekend, @alangecker, and give feedback.

Edit: haven't had the time over the weekend, but will certainly test over the week.

dsjiern commented 2 years ago
  * forward mediasoup ports or use host networking (latter would include changing networking references like in `mod/nginx/bbb/webrtc-sfu.nginx`)

thank you, I can't find any informations about, which port's I have to forward... (and how? docker-compose.yml? 🙈)

when I just change the other points, the frontend tries to connect to mediasoup, but it failes with error 1107

for the settings in html5 it should be sufficient to change the lines 54-56 in webrtc-settings from Kurento to Mediasoup

listenOnlyMediaServer: Kurento
videoMediaServer: Kurento
screenshareMediaServer: Kurento

because in html5/settings.yml (line 231):

# Default is undefined, which means the default setting in bbb-webrtc-sfu
# prevails (screenshareMediaServer).
alangecker commented 2 years ago

@dsjiern In the webrtc-sfu config I found

mediasoup:
  worker:
    rtcMinPort: 24577
    rtcMaxPort: 32768

maybe these ports are enough?^^ but I have no idea :D

to forward them append following in the docker-compose.tmpl.yml:

  webrtc-sfu:
      ports:
      - "24577-32768/udp"

with any change to the template, don't forget to run ./scripts/generate-compose afterwards ;)

prlanzarin commented 2 years ago

If you're going the port-forward route then whatever is configured in rtcMinPort/rtcMaxPort. But I'd recommend just running network host. It breaks network isolation in a way, but AFAIK port forwarding for large ranges is not that performant in docker containers (and this container is performance-sensitive).

PS.: AFAIK mediasoup has an option to use a shared UDP/TCP port (and then does RTP demuxing by correlating RTP packets with the STUN info previously gathered). If that works, then port-forwarding could be used because it would just need a single port to be bound. But I haven't tested that option nor exposed its usage in the application yet, so maybe something for the future.