Giter Club home page Giter Club logo

webcams-to-screenshare's Introduction

Introduction

This prototype explores using Chrome to simulate to the role of an MCU in a BigBlueButton session.

Today, in a BigBlueButton each webcam is an individual stream sent to or received from Kurento. In regular classes (under 25 studnets) with a few webcams, this approach works very well. For each webcam shared by a user, the Kurento server receives the incoming webcam stream from the browser and forwards it to all other browsers in the session. In this sense, Kurento acts as a selective forwarding unit (SFU). There is no processing of the incoming stream. The CPU overhead is low.

However, the problem occurs when there are large numbers of users in the meeting. When a meeting grows to 100 users with 25 of them sharing webcams, for example, this would required Kurent to handle 2,500 webcam streams. Kurento does not have infinite capacity, so by default there are settings in BigBlueButton to limit the maximun number of allowed streams in a session or on the server.

To avoid large numbers of streams altogether, one solution is to have Kurento act as a media control unit (MCU). As a MCU, Kurento would take the incoming webcam streams and composits them into a single outgoing video stream. In the above scenario, Kurento would receive 25 webcam streams, composite into a single outgoing stream, and broadcast out 100 streams of the composit video (a totoal of 125 streams, not 2,500). However, compositing live video streams is very CPU intensive. The CPU overhead is high.

Prototyping using Chrome as a MCU

This project explores compositing the video streams outside of Kurento. This prototype uses Chrome to fulfill the role of an MCU by using screen sharing to send back a single video stream to Kurento.

In this prototype, Chrome runs within Docker container and can run on a different server. When run, chrome is controled using selenium, loads the BigBlueButton, and does the following:

  1. hides the User list and presentation (the screen becomes a grid of the webcams)
  2. takes presenter control, and
  3. begins screen sharing.

Once it starts, the presentation area for other users then displays a grid of webcams.

Install

This prototype uses a single BASH script to build the Docker image (if needed) and run the Docker container with a join URL.

./build-and-run.sh "https://bbb.example.com/bigbluebutton/api/join?fullName=BOT&meetingID=random-9225193&password=mp&redirect=true&checksum=d5c69b10f26eced2e9f9e0019b92c1341a501e36"

webcams-to-screenshare's People

Contributors

ffdixon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

webcams-to-screenshare's Issues

Bigbluebutton 2.3 beta, i've got this error

Closing Audio Modal!
< Audio Modal closed!
(node:1) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'parentNode' of undefined
at puppeteer_evaluation_script:2:85
at ExecutionContext._evaluateInternal (/usr/src/app/node_modules/puppeteer/lib/ExecutionContext.js:93:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (/usr/src/app/node_modules/puppeteer/lib/ExecutionContext.js:32:16)
-- ASYNC --
at ExecutionContext. (/usr/src/app/node_modules/puppeteer/lib/helper.js:82:19)
at DOMWorld.evaluate (/usr/src/app/node_modules/puppeteer/lib/DOMWorld.js:111:24)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- ASYNC --
at Frame. (/usr/src/app/node_modules/puppeteer/lib/helper.js:82:19)
at Page.evaluate (/usr/src/app/node_modules/puppeteer/lib/Page.js:792:47)
at Page. (/usr/src/app/node_modules/puppeteer/lib/helper.js:83:27)
at Page.takePresenter (/usr/src/app/src/core/page.js:10:15)
at /usr/src/app/src/index.js:73:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing
inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

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.