Code Monkey home page Code Monkey logo

bbb-webrtc-sfu's Introduction

BigBlueButton

BigBlueButton is an open-source virtual classroom designed to help teachers teach and learners learn.

BigBlueButton supports real-time sharing of audio, video, slides (with whiteboard annotations), chat, and the screen. Instructors can engage remote students with polling, emojis, multi-user whiteboards, shared notes, and breakout rooms. During the session, BigBlueButton generates analytics that are visible to moderators in the Learning Analytics Dashboard.

Presenters can record and playback content for later sharing with others.

We designed BigBlueButton for online learning, it can be used for many other applications as well. The educational use cases for BigBlueButton are

  • Online tutoring (one-to-one)
  • Flipped classrooms (recording content ahead of your session)
  • Group collaboration (many-to-many)
  • Online classes (one-to-many)

The latest version is BigBlueButton 2.7. You can install BigBlueButton 2.7 on Ubuntu 20.04 using bbb-install.sh within 30 minutes (or your money back 😉).

For full technical documentation of BigBlueButton -- including architecture, features, API, and GreenLight (the default front-end) -- see https://docs.bigbluebutton.org/.

BigBlueButton and the BigBlueButton Logo are trademarks of BigBlueButton Inc.

bbb-webrtc-sfu's People

Contributors

antobinary avatar dependabot[bot] avatar eduardohfnascimento avatar fcecagno avatar ffdixon avatar germanocaumo avatar lfzawacki avatar lkiesow avatar mariogasparoni avatar pedrobmarin avatar prlanzarin avatar ritzalam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbb-webrtc-sfu's Issues

Connection.js: FSESL connection received error (`EPIPE","errno":-32,"message"`)

Hi!
This is on a fresh Ubuntu 20.04.4 fresh install with an initial installation of 2.5-rc via the official bash script, then updating on the last 2.5.1.
I end up having an authentication timeout in the demo mode.

This is the only really important log I think keeps on coming back:
juin 14 17:57:03 bbb-preprod bbb-webrtc-sfu[7722]:

{"error":{"code":"EPIPE","errno":-32,"message":"write EPIPE","stack":"Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:817:11)
    at Socket._write (node:net:829:8)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at module.exports.Connection.send (/usr/local/bigbluebutton/bbb-webrtc-sfu/node_modules/modesl/lib/esl/Connection.js:183:21)
    at module.exports.Connection.sendRecv (/usr/local/bigbluebutton/bbb-webrtc-sfu/node_modules/modesl/lib/esl/Connection.js:211:10)
    at module.exports.Connection.auth (/usr/local/bigbluebutton/bbb-webrtc-sfu/node_modules/modesl/lib/esl/Connection.js:514:10)","syscall":"write"},"label":"core","level":"error","message":"FSESL connection received error EPIPE","timestamp":"2022-06-14T16:01:03.517Z"}

Thanks in advance for any help,
Hadrien

Extend the configuration scheme to allow an override file

Is your update request related to a problem? Please describe.

We need a way to specify an override configuration file that lives somewhere else other than /<app>/config/*.

While node-config naturally allows overrides based on NODE_ENV, the config directory is hardcoded right now.

Add some way to specify the override file location (/etc/*) and then merge that with the base configuration.

More

Same rationale as:

Target is 2.3, so development/master branches.

Too many mediasoup-worker processes on beefy hardware by default.

I know this can be configured, but there should probably be a sensible upper default limit for mediasoup-workers on hardware with more than, say, 32 cores?

For example: ceil( min(nproc,32)*0.8 + max(0,nproc-32)/2 ) -> Use 80% of the the first 32 cores, and half of any additional cores beyond 32. This leaves some cores free for other important processes and still scales with large servers.

ROUND_ROBIN balancing strategy: make it production ready

Hello,

I was trying to add 2 external kurento servers like this way:

- ip: External_IP_1
  url: ws://External_IP_1:8888/kurento
  # mediaType: (main|audio|content)
  ipClassMappings:
    local:
    private:
    public:
  options:
    failAfter: 5
    request_timeout: 30000
    response_timeout: 30000
- ip: External_IP_2
  url: ws://External_IP_2:8888/kurento
  # mediaType: (main|audio|content)
  ipClassMappings:
    local:
    private:
    public:
  options:
    failAfter: 5
    request_timeout: 30000
    response_timeout: 30000

And balancing-strategy: ROUND_ROBIN
But I saw bbb-webrtc-sfu was selecting first server only. It wasn't select second one. Am I following correctly? Please help to find in where I'm doing mistake.

Log:

2020-09-28T09:45:47.359Z - info: [mcs-freeswitch-esl-wrapper] Connected to FreeSWITCH ESL
2020-09-28T09:45:47.369Z - info: [mcs-balancer] Available hosts => [{"url":"ws://External_IP_1:8888/kurento","ip":"External_IP_1","mediaType":"all"}]
2020-09-28T09:45:47.371Z - info: [mcs-balancer] Available hosts => [{"url":"ws://External_IP_1:8888/kurento","ip":"External_IP_1","mediaType":"all"},{"url":"ws://External_IP_2:8888/kurento","ip":"External_IP_2","mediaType":"all"}]

Thanks

memory leak detected

The following entries appear regularly in 2.2.36 in the syslog

syslog:Apr 12 10:15:12 webm-11 bbb-webrtc-sfu[5099]: (node:5162) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 MCS_DISCONNECTED listeners added. Use emitter.setMaxListeners() to increase limit
syslog:Apr 12 10:15:13 webm-11 bbb-webrtc-sfu[5099]: (node:5162) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 DisconnectAllClientsSysMsgMeetingID listeners added. Use emitter.setMaxListeners() to increase limit
syslog:Apr 12 10:21:03 webm-11 bbb-webrtc-sfu[5099]: (node:5157) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 2001 listeners added. Use emitter.setMaxListeners() to increase limit
syslog:Apr 12 10:22:05 webm-11 bbb-webrtc-sfu[5099]: (node:5162) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 DisconnectAllClientsSysMsg-MeetingID listeners added. Use emitter.setMaxListeners() to increase limit

Users report (it fits in time) that the audio connection is being terminated.

pegjs post-install script is failing with npm 7.x

The npm postinstall script was always problematic by itself, but now it just doesn't work with npm 7.x

Consider fixing it or just replacing it by bundling pegjs in SIP.js's fork rather than working around it in a postinstall.

Ref.:

image

After being updated to mediasoup, the video cannot be used

I find that my video cannot be connected when ice is different at this location.
In kurento-utils.js
pc.setRemoteDescription(answer)
IN mediasoup

v=0
o=mediasoup-client 10000 1 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-lite
a=fingerprint:sha-224 52:EF:17:58:DB:3D:87:75:EF:99:F7:20:97:70:6D:A9:0E:57:E5:50:B4:E7:01:AC:09:5F:2F:E6
a=msid-semantic: WMS *
a=group:BUNDLE 0
m=video 7 UDP/TLS/RTP/SAVPF 96
c=IN IP4 127.0.0.1
b=TIAS:200000
b=AS:200
a=rtpmap:96 VP8/90000
a=fmtp:96
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=setup:active
a=mid:0
a=msid:L5zc9ZYjLmvHEPkC 83ea5667-136f-4f1f-8909-adc63b5aecbc
a=recvonly
a=ice-ufrag:avmiuhfy5fkewuduvgfb3msb68t353mj
a=ice-pwd:0p40wfxwndu4u8vch6htpoud4yr571cx
a=candidate:udpcandidate 1 udp 1076558079 PUBLICIP 31102 typ host
a=candidate:tcpcandidate 1 tcp 1076302079 PUBLICIP 29879 typ host tcptype passive
a=end-of-candidates
a=ice-options:renomination
a=rtcp-mux
a=rtcp-rsize
a=content:main

IN Kurento

v=0
o=- 3869174617 3869174617 IN IP4 0.0.0.0
s=Kurento Media Server
c=IN IP4 0.0.0.0
t=0 0
a=extmap-allow-mixed
a=msid-semantic: WMS 4TVY2TkFcnbeOReXF7vP7g5laZoPAr6mb7v9
a=group:BUNDLE 0
m=video 1 UDP/TLS/RTP/SAVPF 96
b=TIAS:50000
b=AS:50
a=rtpmap:96 VP8/90000
a=fmtp:96
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=setup:active
a=mid:0
a=recvonly
a=ice-ufrag:0/tW
a=ice-pwd:cgmLbHyv9H7/5R8BLdYvRd
a=fingerprint:sha-256 EF:F0:A2:BF:50:A7:5B:C3:A3:CA:F5:3B:2B:C3:0B:EC:0C:34:2E:0C:98:ED:01:01:5E:84:99:FA:63:8E:CE:9E
a=ssrc:176234920 cname:user2843940848@host-1c4be482
a=rtcp-mux
a=content:main

The main differences are as follows:
a=ice-lite
a=ice-options:renomination

Will this affect the local IP selection of ice?

My environment is EC2 of AWS. Can these changes be configured in mediasoup?

Error: EACCES: permission denied, mkdir '/var/log/bbb-webrtc-sfu'

The following error occurred when I ran the server through docker.

`> [email protected] start /app

node server.js

internal/fs/utils.js:332
throw err;
^

Error: EACCES: permission denied, mkdir '/var/log/bbb-webrtc-sfu'
at Object.mkdirSync (fs.js:1014:3)
at File._createLogDirIfNotExist (/app/node_modules/winston/lib/winston/transports/file.js:691:10)
at new File (/app/node_modules/winston/lib/winston/transports/file.js:92:28)
at Object. (/app/lib/common/logger.js:31:26)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18) {
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/var/log/bbb-webrtc-sfu'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

Then i added " && chown -R webrtc-sfu:webrtc-sfu /var/log " to Dockerfile and issue resolved.
Please help if I forgot to set some config or apply the following change to the repo.

Thanks.

update(audio): make fullaudio module completely bidirectional

Today the fullaudio module does a differentiation between microphone and listenonly. Ideally we want to make this bidirectional as default and make both listenonly and microphone to use the same module fullaudio module to handle microphone only

There's also lots of functions specific for listeonly that were kept for compatibility and could be removed when changing this module do be bidirectional : more info can be found in #106 (comment) and #106 (comment)

This is related to: bigbluebutton/bigbluebutton#13539

MaxListenersExceededWarning. Possible EventEmitter memory leak detected

Some other admin (not me) got the following error:

bbb-webrtc-sfu[2463686]: (node:2463686) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 DisconnectAllClientsSysMsgdd5916b92e8b69db9f8820f1fab7e4700bf6fb8d-1683023698009 listeners added to [BigBlueButtonGW]. Use emitter.setMaxListeners() to increase limit
bbb-webrtc-sfu[2463686]: (node:2463686) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 MCS_DISCONNECTED listeners added to [MCSAPIWrapper]. Use emitter.setMaxListeners() to increase limit

EventEmitter will only allow 10 listeners per event by default, unless told otherwise. The first line is almost certainly triggered by

this.bbbGW.once(C.DISCONNECT_ALL_USERS_2x+this.meetingId, this.disconnectUser);
. I'm not sure if this is a leak (event not properly de-registered in certain scenarios) or if there are actually more than 10 valid instance of Video per meeting at the same time (in which case the limit should be increased?), or if it is something else.

Missing 'S' of constant 'WEBSOCKET_MESAGE'

In the message/Constant.js
WEBSOCKET_MESAGE: "ws_message"

But It used for ConnectionManager.js and WebSocketConnectionManager.js with C.WEBSOCKET_MESSAGE

It's working but let me known if this is not correct.

Build error: mediasoup fails to build

Mediasoup version specified in bbb-webrtc-sfu/package.json produces an error during build:

npm ERR! cc -Isubprojects/libuv-v1.43.0/libuv.a.p -Isubprojects/libuv-v1.43.0 -I../../../subprojects/libuv-v1.43.0 -I../../../subprojects/libuv-v1.43.0/include -I../../../subprojects/libuv-v1.43.0/src -fdiagnostics-color=always -DNDEBUG -std=c89 -O3 -fPIC -pthread -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112 -MD -MQ subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -MF subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o.d -o subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -c ../../../subprojects/libuv-v1.43.0/src/unix/stream.c
npm ERR! ../../../subprojects/libuv-v1.43.0/src/unix/stream.c: In function ‘uv__write’:
npm ERR! ../../../subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: error: C++ style comments are not allowed in ISO C90
npm ERR!   929 |   // XXX(jwn): this must call uv__stream_flush_write_queue(stream, n) here, since we won't generate any more events
npm ERR!       |   ^
npm ERR! ../../../subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: note: (this will be reported only once per input file)

Setting newer version of mediasoup and mediasoup-client fixes this issue. This problem was encountered here: bigbluebutton/docker#236 (comment)

bbb-webrtc-sfu: mediasoup routers are being leaked

Describe the bug

There have been a few mitigations to this already but routers are still leaking.
Active routers should be proportional to the number of producers with a transition delay.
That isn't the case in servers with a long lifespan, indicating a leak. See:

image
image

Additional context

Need to implement the definitive solution which is tying room and user lifecycle in SFU
to akka-apps counterparts to get rid of stale users holding on to routers.

Minor wiki documentation suggestions

Unfortunately, I can't send a PR for the wiki page, so I'm trying with this issue.

I know the github wiki isn't a "real" documentation yet, but I wanted to let you know two things I stumbled over when trying to enable mediasoup on my 2.4-rc3 server following the section "Using mediasoup in a 2.4 (> RC.2) installation":

  1. On my NAT setup, I also had to add the listenIp: "0.0.0.0" lines to both the plainRtp and webrtc section to make it work, as you described in the development section below. So if this is neccessary to make it run behind NAT it would be great if you could add it.
  2. As far as I can tell it's not public.app.kurento.signalCandidates but public.kurento.signalCandidates in the last line of step 3. At least it worked for me and the connection time dropped significantly as I changed it :-)

Thank you for the great work! Really looking forward to using mediasoup in production.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.