Server Customization
BigBlueButton has many configuration files that offer you opportunities to customize your installation.
General
Preserving changes to configuration files
BigBlueButton's components use various configuration files which are included with the installation packages. If you were to make a change to these configuration files, your changes would be lost when an updated version of the package is installed during upgrades. To prevent this loss of customizations, most components also accept overriding configuration files from /etc/bigbluebutton. That directory is not interfered with by BigBlueButton (except in cases when using the command bbb-conf --setip or --setsecret placing new values you specify).
For the full list of the configuration files and their overriding counterpart, see Configuration Files
Preserving customizations using apply-config.sh
Note that starting with BigBlueButton 2.6 we strongly recommend adding your custom settings to /etc/bigbluebutton instead. See the list of override files
Whenever you upgrade a server to the latest version of BigBlueButton, either using the manual upgrade steps or the bbb-install.sh script, if you have made custom changes to BigBlueButton's configuration files [that are deployed from packages], the packaging scripts may overwrite these changes.
To make it easier to apply your configuration changes, you can create a BASH script at /etc/bigbluebutton/bbb-conf/apply-config.sh that contains commands to apply your changes. The bbb-conf script, which is run as part of the last steps in a manual upgrade steps or using bbb-install.sh, will detect apply-config.sh and invoke it just before starting all of BigBlueButton's components.
In this way, you can use apply-config.sh to apply your custom configuration changes after all packages have updated but just before BigBlueButton starts.
For example, if you create /etc/bigbluebutton/bbb-conf/apply-config.sh with the following contents and make it executable with chmod +x /etc/bigbluebutton/bbb-conf/apply-config.sh
#!/bin/bash
# Pull in the helper functions for configuring BigBlueButton
source /etc/bigbluebutton/bbb-conf/apply-lib.sh
enableUFWRules
then when called by bbb-conf, the above apply-config.sh script will
- use the helper function
enableUFWRulesto restrict access to specific ports, and
Notice that apply-config.sh includes a helper script apply-lib.sh.
This helper script contains some functions to make it easy to apply common configuration changes, along with some helper variables, such as HTML5_CONFIG.
The contents of apply-config.sh are not owned by any package, so it will never be overwritten.
Common Customizations
Recording
Delete raw data from published recordings
When a meeting finishes, the BigBlueButton server archives the meeting data (referred to as the "raw" data).
Retaining the raw data lets you rebuild a recording if there was a processing issue, to enabled a new recording format, or if it was accidentally deleted by a user; however, the tradeoff is the storage of raw data will consume more disk space over time.
By default, BigBlueButton server automatically remove the raw data for a recording after 14 days of its being published. You can adjust this by editing the file /etc/cron.daily/bigbluebutton. Look for this line near the top of the file:
published_days=14
And adjust it to the desired number of days. If you would instead like to completely disable the cleanup of raw recording data, comment out the following line, near the bottom of the file:
remove_raw_of_published_recordings
Delete recordings older than N days
To delete recordings older than 14 days, create the file /etc/cron.daily/bbb-recording-cleanup with the contents
#!/bin/bash
MAXAGE=14
LOGFILE=/var/log/bigbluebutton/bbb-recording-cleanup.log
shopt -s nullglob
NOW=$(date +%s)
echo "$(date --rfc-3339=seconds) Deleting recordings older than ${MAXAGE} days" >>"${LOGFILE}"
for donefile in /var/bigbluebutton/recording/status/published/*-presentation.done ; do
MTIME=$(stat -c %Y "${donefile}")
# Check the age of the recording
if [ $(( ( $NOW - $MTIME ) / 86400 )) -gt $MAXAGE ]; then
MEETING_ID=$(basename "${donefile}")
MEETING_ID=${MEETING_ID%-presentation.done}
echo "${MEETING_ID}" >> "${LOGFILE}"
bbb-record --delete "${MEETING_ID}" >>"${LOGFILE}"
fi
done
for eventsfile in /var/bigbluebutton/recording/raw/*/events.xml ; do
MTIME=$(stat -c %Y "${eventsfile}")
# Check the age of the recording
if [ $(( ( $NOW - $MTIME ) / 86400 )) -gt $MAXAGE ]; then
MEETING_ID="${eventsfile%/events.xml}"
MEETING_ID="${MEETING_ID##*/}"
echo "${MEETING_ID}" >> "${LOGFILE}"
bbb-record --delete "${MEETING_ID}" >>"${LOGFILE}"
fi
done
Change the value for MAXAGE to specify how many days to retain the presentation format recordings on your BigBlueButton server. After you create the file, make it executable.
$ chmod +x /etc/cron.daily/bbb-recording-cleanup
Move recordings to a different partition
Most of BigBlueButton's storage occurs in the /var/bigbluebutton directory (this is where all the recordings are stored). If you want to move this directory to another partition, say to /mnt/data, do the following
$ sudo bbb-conf --stop
$ mv /var/bigbluebutton /mnt/data
$ ln -s /mnt/data/bigbluebutton /var/bigbluebutton
$ sudo bbb-conf --start
Migrate recordings from a previous version
Depending of the previous version there may be some differences in the metadata generated. In order to fix that it will be necessary to execute the corresponding scripts for updating the migrated recordings.
$ cd /usr/local/bigbluebutton/core/scripts
From version 0.9
$ sudo ./bbb-0.9-beta-recording-update
$ sudo ./bbb-0.9-recording-size
From version 1.0
$ sudo ./bbb-1.1-meeting-tag
If for some reason the scripts have to be run more than once, use the --force modifier.
$ sudo ./bbb-x.x-script --force
Enable playback of recordings on iOS
The presentation playback format encodes the video shared during the session (webcam and screen share) as .webm (VP8) files; however, iOS devices only support playback of .mp4 (h.264) video files. To enable playback of the presentation recording format on iOS devices, edit /usr/local/bigbluebutton/core/scripts/presentation.yml and uncomment the entry for mp4.
video_formats:
- webm
- mp4
This change will cause BigBlueButton to generate an additional .mp4 file for the video components (webcam and screen share) that was shared during the session. This change only applies to new recordings. If you want this change to apply to any existing recordings, you need use the bbb-record command to rebuild them.
This change will increase the processing time and storage size of recordings with video files as it will now generate two videos: .webm and .mp4 for the webcam and screen share videos.
Always record every meeting
By default, the BigBlueButton server will produce a recording when both of the following are true:
- the meeting has been created with
record=truein the create API call, and - a moderator has clicked the Start/Stop Record button (at least once) during the meeting.
However, you can configure a BigBlueButton server to record every meeting and disable the ability for a moderator to stop the recording. Edit /etc/bigbluebutton/bbb-web.properties and set the following properties:
# Start recording when first user joins the meeting.
# For backward compatibility with 0.81 where whole meeting
# is recorded.
autoStartRecording=true
# Allow the user to start/stop recording.
allowStartStopRecording=false
To apply the changes, restart the BigBlueButton server using the command
$ sudo bbb-conf --restart
Transfer recordings
When setting up BigBlueButton on a server, you may want to transfer recordings from an older server. If your old server has all of the original recording files in the /var/bigbluebutton/recording/raw directory, then you can transfer these files to the new server using rsync.
For example, running this rsync command new server will copy over the recording file from the old server.
$ rsync -rP root@old-bbb-server.example.com:/var/bigbluebutton/recording/raw/ /var/bigbluebutton/recording/raw/
Alternatively, you could create a tar archive of the /var/bigbluebutton/recording/raw directory, and copy it with scp, or use a shared NFS mount.
After you copy over the files (either through rsync or tar-and-copy), you will then need to fix the permissions on the new server using the following chown command.
$ chown -R bigbluebutton:bigbluebutton /var/bigbluebutton/recording/raw
After transfer of recordings, view a sampling of the recordings to ensure they playback correctly (they should).
Re-process raw recordings
If you have transferred over the raw content, you can also reprocess the recordings using the newer scripts to rebuild them with the latest playback format (including any bug fixes made in the latest version). Note: Re-processing can take a long time (around 25% to 50% of the original length of the recordings), and will use a lot of CPU on your new BigBlueButton server while you wait for the recordings to process.
If you are interested in reprocessing the older recordings, try it first with one or two of the larger recordings. If there is no perceptible difference, you don't need to reprocess the others.
And initiate the re-processing of a single recording, you can do
$ sudo bbb-record --rebuild <recording_id>
where <recording_id> is the the file name of the raw recording in /var/bigbluebutton/recording/raw, such as
$ sudo bbb-record --rebuild f4ae6fd61e2e95940e2e5a8a246569674c63cb4a-1517234271176
If your old server has all of the original recording files in the /var/bigbluebutton/recording/raw directory, then you can transfer these files to the new server, for example with rsync:
If you want to rebuild all your recordings, enter the command
Warning: If you have a large number of recordings, this will rebuild all of them, and not process any new recordings until the rebuild process finishes. Do not do this unless this is you intent. Do not do this command to troubleshoot recording errors, instead see Recording Troubleshooting.
$ sudo bbb-record --rebuildall
The BigBlueButton server will automatically go through the recordings and rebuild and publish them. You can use the bbb-record --watch command to see the progress.
Transfer published recordings from another server
If you want to do the minimum amount of work to quickly make your existing recordings on an older BigBlueButton server, transfer the contents of the /var/bigbluebutton/published and /var/bigbluebutton/unpublished directories. In addition, to preserve the backup of the original raw media, you should transfer the contents of the /var/bigbluebutton/recording/raw directory.
Here is an example set of rsync commands that would accomplish this; run these on the new server to copy the files from the old server.
$ rsync -rP root@old-bbb-server:/var/bigbluebutton/published/ /var/bigbluebutton/published/
$ rsync -rP root@old-bbb-server:/var/bigbluebutton/unpublished/ /var/bigbluebutton/unpublished/
$ rsync -rP root@old-bbb-server:/var/bigbluebutton/recording/raw/ /var/bigbluebutton/recording/raw/
Other methods of transferring these files can also be used; for example, you could create a tar archive of each of the directories, and transfer it via scp, or use a shared NFS mount.
You will then need to fix the permissions on the newly copied recordings:
$ chown -R bigbluebutton:bigbluebutton /var/bigbluebutton/published /var/bigbluebutton/unpublished /var/bigbluebutton/recording/raw
If the recordings were copied from a server with a different hostname, you will have to run the following command to fix the stored hostnames. (If you don't do this, it'll either return a 404 error, or attempt to load the recordings from the old server instead of the new server!)
Note that this command will restart the BigBlueButton server, interrupting any live sessions.
$ sudo bbb-conf --setip <ip_address_or_hostname>
For example,
$ sudo bbb-conf --setip bigbluebutton.example.com
The transferred recordings should be immediately visible via the BigBlueButton recordings API.
Change processing time
On a 2.2.x BigBlueButton server, the server will process recordings as meetings finish. You can restrict the recording processing interval to specific hours by creating the file /etc/systemd/system/bbb-record-core.timer.d/override.conf with the contents
[Timer]
OnActiveSec=
OnUnitInactiveSec=
OnCalendar=21,22,23,00,01,02,03:*:00
Persistent=false
and do systemctl daemon-reload. This file overrides the timing of when systemd runs bbb-record-core.target. In the above example, recordings will start processing between 21:00 and 03:59.
Allow all recordings to be returned
In 2.6.x a new configuration property, allowFetchAllRecordings, was added to bigbluebutton.properties. This property determines whether every recording on the server can be returned in a single response from a getRecordings call. By default this property is set to true. On a server with a large number of recordings an attempt to return every recording in a single response can cause a large amount of load on the server and therefore it is advised that this property be switched to false. When this is done any request to getRecordings that does not specify any recording or meeting IDs as well as no pagination parameters will return no recordings to prevent all recordings from being returned.
Increase the number of recording workers
Warning
If the
defaultKeepEventsormeetingKeepEventssetting in bbb-web is enabled, you must not increase the number of BigBlueButton recording workers. Doing so could result in data loss, as meeting events will not be correctly archived.For more information, see BigBlueButton issue #12503.
Run systemctl edit bbb-rap-resque-worker.service, and insert the following into the editor, replacing the number with the desired number of recordings to process concurrently.
[Service]
Environment=COUNT=3
Then restart the worker process: systemctl restart bbb-rap-resque-worker.service
If you run systemctl status bbb-rap-resque-worker.service now, you will see that it has the desired number of workers ready to process recordings in parallel:
● bbb-rap-resque-worker.service - BigBlueButton resque worker for recordings
Loaded: loaded (/usr/lib/systemd/system/bbb-rap-resque-worker.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/bbb-rap-resque-worker.service.d
└─override.conf
Active: active (running) since Sat 2021-01-09 12:19:22 UTC; 6s ago
Main PID: 23630 (sh)
Tasks: 15 (limit: 4915)
CGroup: /system.slice/bbb-rap-resque-worker.service
├─23630 /bin/sh -c /usr/bin/rake -f ../Rakefile resque:workers >> /var/log/bigbluebutton/bbb-rap-worker.log
├─23631 /usr/bin/ruby /usr/bin/rake -f ../Rakefile resque:workers
├─23650 resque-2.0.0: Waiting for rap:archive,rap:publish,rap:process,rap:sanity,rap:captions
├─23651 resque-2.0.0: Waiting for rap:archive,rap:publish,rap:process,rap:sanity,rap:captions
└─23652 resque-2.0.0: Waiting for rap:archive,rap:publish,rap:process,rap:sanity,rap:captions
Install additional recording processing formats
In addition to the presentation format that is installed and enabled by default, there are several optional recording formats available for BigBlueButton:
notes: Makes the shared notes from the meeting available as a document.screenshare: Generate a single video file from the screensharing and meeting audio.podcast: Generate an audio-only recording.video: Generate a recording containing the webcams, presentation area, and screensharing combined into a single video file.
The processing scripts and playback support files for these recording formats can be installed from the packages named bbb-playback-formatname (e.g. bbb-playback-video)
There is currently an issue where the recording formats are not automatically enabled when they are installed - see #12241 for details.
In order to enable the recording formats manually, you need to edit the file /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml. Look for the section named steps:. In this section, the recording processing workflow is defined, including what recording processing steps are performed, and what order they need to be performed in. To ensure that your modifications are not lost when a new version of the packages is installed, you can [create the file and] write your changes to /etc/bigbluebutton/recording/recording.yml.
To enable a new recording format, you need to add a new step named process:formatname that runs after the step named captions, and a new step named publish:formatname that runs after process:formatname. You may have to convert some of the steps to list format.
For example, here are the stock steps in BigBlueButton 3.0 with the presentation format enabled:
steps:
archive: 'sanity'
sanity: 'captions'
captions: 'process:presentation'
'process:presentation': 'publish:presentation'
If you additionally enable the video recording format, the steps will have to be changed to look like this:
cat /etc/bigbluebutton/recording/recording.yml
steps:
archive: 'sanity'
sanity: 'captions'
captions:
- 'process:presentation'
- 'process:video'
'process:presentation': 'publish:presentation'
'process:video': 'publish:video'
This pattern can be repeated for additional recording formats. Note that it's very important to put the step names containing a colon (:) in quotes.
After you edit the configuration file, you must restart the recording processing queue: systemctl restart bbb-rap-resque-worker.service in order to pick up the changes.
To disable one or more enabled recording formats for a single meeting, pass meta_bbb-disable-recording-formats on the create API call with a comma-separated list of format names. For example, meta_bbb-disable-recording-formats=video,presentation (or meta_bbb-disable-recording-formats=[video,presentation]) skips the video and presentation recording formats for that meeting. The format names are case-insensitive and match the format part of the recording steps. Disabled formats are not processed or published, so they do not trigger recording-ready callbacks.
The following script will enable the video recording format of a BigBlueButton 2.6+ server.
#!/bin/bash
mkdir -p /etc/bigbluebutton/recording
cat > /etc/bigbluebutton/recording/recording.yml << REC
steps:
archive: "sanity"
sanity: "captions"
captions:
- process:presentation
- process:video
process:presentation: publish:presentation
process:video: publish:video
REC
if ! dpkg -l | grep -q bbb-playback-video; then
apt install -y bbb-playback-video
systemctl restart bbb-rap-resque-worker.service
fi
Enable generating mp4 (H.264) video output
By default, BigBlueButton generates recording videos as .webm files using the VP9 video codec. These are supported in most desktop web browsers, but might not work on iOS mobile devices. You can additionally enable the H.264 video codec in some recording formats (Keep in mind that the following .yml files mentioned ahead only exist when the respective format package is installed):
video
Edit the file /usr/local/bigbluebutton/core/scripts/video.yml and uncomment the lines under the formats: label for the mimetype video/mp4.
The encoding options can be adjusted to speed up encoding or increase quality of video generation as desired.
presentation
Edit the file /usr/local/bigbluebutton/core/scripts/presentation.yml and uncomment the entry for mp4:
video_formats:
- webm
- mp4
screenshare
Edit the file /usr/local/bigbluebutton/core/scripts/screenshare.yml and uncomment the lines under the :formats: label for the mime type video/mp4:
- :mimetype: 'video/mp4; codecs="avc1.640028, mp4a.40.2"'
:extension: mp4
:parameters:
- [ '-c:v', 'libx264', '-crf', '21', '-preset', 'medium', '-profile:v', 'high', '-level', '40', '-g', '240',
'-c:a', 'aac', '-b:a', '96K',
'-threads', '2', '-f', 'mp4', '-movflags', 'faststart' ]
The encoding options can be adjusted to speed up encoding or increase quality of video generation as desired.
Video
Reduce bandwidth from webcams
You can use a bandwidth usage on your BigBlueButton server using a tool such as bmon (sudo apt-get install bmon). You can change the maximum bandwidth settings for each webcam options (low, medium, high, high definition) by editing /usr/share/bigbluebutton/html5-client/private/config/settings.yml and modifying the entries for
cameraProfiles:
- id: low
name: Low quality
default: false
bitrate: 100
- id: medium
name: Medium quality
default: true
bitrate: 200
- id: high
name: High quality
default: false
bitrate: 500
- id: hd
name: High definition
default: false
bitrate: 800
The settings for bitrate are in kbits/sec (i.e. 100 kbits/sec). After your modify the values, save the file, restart your BigBlueButton server sudo bbb-conf --restart to have the settings take effect. The lowest setting allowed for WebRTC is 30 Kbits/sec.
If you have sessions that like to share lots of webcams, such as ten or more, then setting the bitrate for low to 50 and medium to 100 will help reduce the overall bandwidth on the server. When many webcams are shared, the size of the webcams get so small that the reduction in bitrate will not be noticeable during the live sessions.
To ensure that your modifications are not lost when a new version of the packages is installed, you can [create the file and] write your changes to /etc/bigbluebutton/bbb-html5.yml.
Validating client settings overrides
When you override the HTML5 client settings - via /etc/bigbluebutton/bbb-html5.yml, or per meeting via the clientSettingsOverride / clientSettingsOverrideJsonUrl create parameters - keys that do not exist in the base settings.yml (typos, obsolete parameters, or values placed at the wrong level in the structure) are merged in but never read by the client, so they are silently ignored.
BigBlueButton logs a WARN in bbb-apps-akka for each such key so the problem is visible. The warning is non-blocking: the value is still applied.
For test and staging environments you can additionally enable strict validation, which turns those warnings into hard failures. It is disabled by default and controlled by a single setting, clientSettingsOverrideStrictValidation, in /etc/bigbluebutton/bbb-web.properties. Both bbb-web and bbb-apps-akka read this same property (akka reads the file directly at boot), so there is one switch and no risk of the two processes disagreeing. When set to true:
- Filesystem override (
/etc/bigbluebutton/bbb-html5.yml), enforced bybbb-apps-akkaat boot. If the override file has issues,bbb-apps-akkalogs an explicit error listing each offending key and exits (the service fails to start), so a bad config breaks the deploy instead of running silently wrong. - API override (
clientSettingsOverride/clientSettingsOverrideJsonUrl), enforced bybbb-webat create. If a/createcall carries an override with issues, the call is rejected withreturncode=FAILEDandmessageKey=clientSettingsOverrideValidationError, with the offending keys listed in the message; the meeting is not created.
Keep it false in production unless you specifically want such overrides to be rejected.
Disable webcams
You can disable webcams by setting enableVideo to false in the /etc/bigbluebutton/bbb-html5.yml file for the HTML5 client.
yq e -i '.public.kurento.enableVideo = false' /etc/bigbluebutton/bbb-html5.yml
and run bbb-conf --restart
Disable screen sharing
You can disable screen sharing by setting enableScreensharing to false in the /etc/bigbluebutton/bbb-html5.yml file for the HTML5 client.
yq e -i '.public.kurento.enableScreensharing = false' /etc/bigbluebutton/bbb-html5.yml
Reduce bandwidth for webcams
If you expect users to share many webcams, you can reduce the bandwidth for webcams.
For this you would need to make changes to public.kurento.cameraProfiles through an override.
Note: if you have made other changes in the section public.kurento.cameraProfiles in /etc/bigbluebutton/bbb-html5.yml
you would want to proceed with caution. You would likely only want to run the commands on the bottom, skipping the loading of cameraProfiles.
The following command will copy ALL of the DEFAULT camera profiles from the source /usr/share/bigbluebutton/html5-client/private/config/settings.yml to
the override location /etc/bigbluebutton/bbb-html5.yml. If you had previous related overrides, you likely do not want to run this command.
yq eval -i '.public.kurento.cameraProfiles = (load("/usr/share/bigbluebutton/html5-client/private/config/settings.yml") | .public.kurento.cameraProfiles)' /etc/bigbluebutton/bbb-html5.yml
Now that you have the list of camera profiles in /etc/bigbluebutton/bbb-html5.yml, the following yq commands will tweak the bitrate and whether the profile is default.
echo " - Setting camera defaults"
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "low") ).bitrate = 50' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "medium") ).bitrate = 100' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "high") ).bitrate = 200' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "hd") ).bitrate = 300' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "low") ).default = true' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "medium") ).default = false' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "high") ).default = false' /etc/bigbluebutton/bbb-html5.yml
yq eval -i '( .public.kurento.cameraProfiles[] | select(.id == "hd") ).default = false' /etc/bigbluebutton/bbb-html5.yml
Change screen sharing quality parameters
Screen sharing quality can be tweaked to either improve quality or reduce bandwidth usage. There are different configurations for live meetings and recordings and they need to be changed independently from each other.
For recordings, the following parameters can be changed (presentation format):
/usr/local/bigbluebutton/core/scripts/presentation.yml:deskshare_output_width(default: 1280)/usr/local/bigbluebutton/core/scripts/presentation.yml:deskshare_output_height(default: 720)/usr/local/bigbluebutton/core/scripts/presentation.yml:deskshare_output_framerate(default: 5)
As an example, suppose you want to increase the output resolution and framerate of the recorded screen share media to match a 1080p/15 FPS stream. The following changes would be necessary:
$ yq e -i '.deskshare_output_width = 1920' /usr/local/bigbluebutton/core/scripts/presentation.yml$ yq e -i '.deskshare_output_height = 1080' /usr/local/bigbluebutton/core/scripts/presentation.yml$ yq e -i '.deskshare_output_framerate = 15' /usr/local/bigbluebutton/core/scripts/presentation.yml
For live meetings, the following parameters can be changed:
/etc/bigbluebutton/bbb-html5.yml:public.kurento.screenshare.bitrate/etc/bigbluebutton/bbb-html5.yml:public.kurento.screenshare.constraints
The bitrate is specified in kbps and represents screen sharing's maximum bandwidth usage. Setting it to a higher value may improve quality but also increase bandwidth usage, while setting it to a lower value may reduce quality but will reduce average bandwidth usage.
The constraints are specified as an YAML object with the same semantics as the MediaTrackConstraints from the WebRTC specification. We recommend checking the aforementioned MDN link as well as the Media Capture and Streams API spec for an extensive list of constraints.
To set new screen sharing constraints, translate the JSON constraints object into an YAML format object and put it into public.kurento.screenshare.constraints. Restart BigBlueButton afterwards (sudo bbb-conf --restart).
As an example, suppose you want to set the maximum screen sharing resolution to 1080p, alter the maximum bitrate to 2000 kbps and set a 10 FPS target. The following would need to be added to /etc/bigbluebutton/bbb-html5.yml:
public:
kurento:
screenshare:
bitrate: 2000
constraints:
audio: true
video:
width:
max: 1920
height:
max: 1080
frameRate:
ideal: 10
max: 10
Limit overall media streams
On any setup for BigBlueButton server there is a cap for how many media streams can be shared. A media stream is created when a user broadcasts or receives a webcam or screen share video, or when a user joins audio listening only. If your server will be using webcams, you can set limits per user, per room, and an overall limit per server in /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml. The default is no limit.
mediaThresholds:
global: 0
perRoom: 0
perUser: 0
For example, the following settings would limit the overall number of media across all meetings to 1000 streams, the maximum number of webcam streams per meeting to 300, and no limit on the number of webcam streams per user.
mediaThresholds:
global: 1000
perRoom: 300
perUser: 0
On a BigBlueButton 2.3 (or later) server, you can place the above in /etc/bigbluebutton/bbb-webrtc-sfu/production.yml, which bbb-webrtc-sfu will use to override the settings in default.yml (even after package upgrades).
If any of these thresholds are reached, then a user will receive a "Media resources not available (2002)" error when sharing webcams.
BigBlueButton will dynamically reduce the number of webcams in a meeting as the meeting grows larger. These are set in /usr/share/bigbluebutton/html5-client/private/config/settings.yml, but you can override them by placing them in /etc/bigbluebutton/bbb-html5.yml.
For example, the following /etc/bigbluebutton/bbb-html5.yml file would ensure that no single meeting will have more than 300 streams. For example, in a meeting with 30 users, the moderator will see 25 webcams and the viewers 6 webcams. This gives 25 + 29 _ 6 = 196 webcam streams. If the meeting grows to 100 users, the moderator will see 8 webcams and viewers will see 2 webcams. This gives 8 + 99 _ 2 = 206 webcam streams.
public:
app:
defaultSettings:
application:
paginationEnabled: true
kurento:
pagination:
desktopPageSizes:
moderator: 0
viewer: 5
mobilePageSizes:
moderator: 2
viewer: 2
paginationToggleEnabled: false
paginationThresholds:
enabled: true
thresholds:
- desktopPageSizes:
moderator: 25
viewer: 6
users: 30
- desktopPageSizes:
moderator: 20
viewer: 5
users: 40
- desktopPageSizes:
moderator: 16
viewer: 4
users: 50
- desktopPageSizes:
moderator: 12
viewer: 4
users: 60
- desktopPageSizes:
moderator: 8
viewer: 3
users: 70
- desktopPageSizes:
moderator: 8
viewer: 2
users: 80
- desktopPageSizes:
moderator: 8
viewer: 2
users: 90
- desktopPageSizes:
moderator: 8
viewer: 2
users: 100
HERE
Use custom images for virtual background
Starting from version 2.4 BigBlueButton offers virtual background for webcams.
To use your own background images copy them into the directory
/usr/share/bigbluebutton/html5-client/resources/images/virtual-backgrounds.
For each image copy a thumbnail of the image of 50x50 pixels size into
/usr/share/bigbluebutton/html5-client/resources/images/virtual-backgrounds/thumbnails.
To generate thumbnails you can use the following shell snippet:
#!/bin/bash
FULL="/usr/share/bigbluebutton/html5-client/resources/images/virtual-backgrounds"
THUMB="${FULL}/thumbnails"
cd "$FULL"
for pic in *.jpg; do
convert "$pic" -resize 50x50^ -gravity Center -extent 50x50 "${THUMB}/${pic}"
done
Reference them in the configuration file /etc/bigbluebutton/bbb-html5.yml:
public:
virtualBackgrounds:
fileNames:
- image1.jpg
- image2.jpg
- image3.jpg
Background images should not be too large as clients have to download them. You
can optimize them using the jpegoptim command which is available as an Ubuntu
package.
Audio
Mute all users on startup
If you want to have all users join muted, you can add an overwrite in /etc/bigbluebutton/bbb-web.properties and set this as a server-wide configuration.
# Mute the meeting on start
muteOnStart=true
Mute state is applied to all users joining the meeting, except telephone (dial-in) users.
If desired, enforcement can be enabled for telephone users by setting the following property in /etc/bigbluebutton/bbb-apps-akka.conf:
voiceConf {
dialInEnforceMuteOnStart = true
}
Restart your server with sudo bbb-conf --restart to apply the changes.
Turn off "you are now muted"
When using audio through FreeSWITCH and/or mediasoup, you can remove this sound for all users by editing /opt/freeswitch/etc/freeswitch/autoload_configs/conference.conf.xml and moving the lines containing muted-sound and unmuted-sound into the commented section.
<profile name="cdquality">
<param name="domain" value="$${domain}"/>
<param name="rate" value="48000"/>
<param name="interval" value="20"/>
<param name="energy-level" value="100"/>
<!-- <param name="sound-prefix" value="$${sounds_dir}/en/us/callie"/> -->
<param name="muted-sound" value="conference/conf-muted.wav"/>
<param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
<param name="alone-sound" value="conference/conf-alone.wav"/>
<!--
<param name="moh-sound" value="$${hold_music}"/>
<param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
<param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-->
<param name="kicked-sound" value="conference/conf-kicked.wav"/>
<param name="locked-sound" value="conference/conf-locked.wav"/>
<param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
<param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
<param name="pin-sound" value="conference/conf-pin.wav"/>
<param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
<param name="caller-id-name" value="$${outbound_caller_name}"/>
<param name="caller-id-number" value="$${outbound_caller_id}"/>
<param name="comfort-noise" value="true"/>
<!-- <param name="conference-flags" value="video-floor-only|rfc-4579|livearray-sync|auto-3d-position|minimize-video-encoding"/> -->
<!-- <param name="video-mode" value="mux"/> -->
<!-- <param name="video-layout-name" value="3x3"/> -->
<!-- <param name="video-layout-name" value="group:grid"/> -->
<!-- <param name="video-canvas-size" value="1920x1080"/> -->
<!-- <param name="video-canvas-bgcolor" value="#333333"/> -->
<!-- <param name="video-layout-bgcolor" value="#000000"/> -->
<!-- <param name="video-codec-bandwidth" value="2mb"/> -->
<!-- <param name="video-fps" value="15"/> -->
</profile>
If you're using audio through LiveKit, you can turn off the mute sound via /etc/bigbluebutton/bbb-html5.yml:
public:
app:
defaultSettings:
application:
muteUnmuteAudioAlerts: false
Afterwards, restart bbb-apps-akka: $ sudo systemctl restart bbb-apps-akka.
Enable background music when only one person is in a session
p
FreeSWITCH enables you to have music play in the background when only one users is in the voice conference. To enable background music, edit /opt/freeswitch/conf/autoload_configs/conference.conf.xml (as root) and around line 204 you'll see the music on hold (moh-sound) commented out
<!--
<param name="moh-sound" value="$${hold_music}"/>
<param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
<param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-->
Uncomment it and save this file.
<param name="moh-sound" value="$${hold_music}"/>
<!--
<param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
<param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-->
The default BigBlueButton installation does not come with any music files. You'll need to upload a music file in WAV format to the server and change a reference in /opt/freeswitch/conf/vars.xml.
For example, to use the file /opt/freeswitch/share/freeswitch/sounds/en/us/callie/ivr/48000/ivr-to_listen_to_moh.wav as music on hold, edit /opt/freeswitch/conf/vars.xml and change the line
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
to
<X-PRE-PROCESS cmd="set" data="hold_music=/opt/freeswitch/share/freeswitch/sounds/en/us/callie/ivr/48000/ivr-to_listen_to_moh.wav" />
and then restart BigBlueButton
$ bbb-conf --restart
and join an audio session. You should now hear music on hold if there is only one user in the session.
Add a phone number to the conference bridge
The built-in WebRTC-based audio in BigBlueButton is very high quality audio. Still, there may be cases where you want users to be able to dial into the conference bridge using a telephone number.
Before you can configure FreeSWITCH to route the call to the right conference, you need to first obtain a phone number from a Internet Telephone Service Providers and configure FreeSWITCH accordingly to receive incoming calls via session initiation protocol (SIP) from that provider. Ensure that the context is public and that the file is called /opt/freeswitch/conf/sip_profiles/external/YOUR-PROVIDER.xml. Here is an example; of course, hostname and ALL-CAPS values need to be changed:
<include>
<gateway name="ANY-NAME-FOR-YOUR-PROVIDER">
<param name="proxy" value="sip.example.net"/>
<param name="username" value="PROVIDER-ACCOUNT"/>
<param name="password" value="PROVIDER-PASSWORD"/>
<param name="extension" value="EXTERNALDID"/>
<param name="register" value="true"/>
<param name="context" value="public"/>
</gateway>
</include>
To route the incoming call to the correct BigBlueButton audio conference, you need to create a dialplan which, for FreeSWITCH, is a set of instructions that it runs when receiving an incoming call. When a user calls the phone number, the dialplan will prompt the user to enter a five digit number associated with the conference.
To create the dialplan, use the XML below and save it to /opt/freeswitch/conf/dialplan/public/my_provider.xml. Replace EXTERNALDID with the value specified as the extension in the SIP profile (such as 6135551234, but see above).
<extension name="from_my_provider">
<condition field="destination_number" expression="^EXTERNALDID">
<action application="start_dtmf" />
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="play_and_get_digits" data="5 9 3 30000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/>
<!-- Uncomment the following block if you want to mask the phone number in the list of participants. -->
<!-- Instead of `01711233121` it will then show `xxx-xxx-3121`. -->
<!--
<action application="set_profile_var" data="caller_id_name=${regex(${caller_id_name}|^.*(.{4})$|xxx-xxx-%1)}"/>
-->
<action application="transfer" data="SEND_TO_CONFERENCE XML public"/>
</condition>
</extension>
<extension name="check_if_conference_active">
<condition field="${conference ${pin} list}" expression="/sofia/g" />
<condition field="destination_number" expression="^SEND_TO_CONFERENCE$">
<action application="set" data="bbb_authorized=true"/>
<action application="transfer" data="${pin} XML default"/>
</condition>
</extension>
<extension name="conf_bad_pin">
<condition field="${pin}" expression="^\d{5}$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="play_and_get_digits" data="5 9 3 30000 # conference/conf-bad-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/>
<action application="transfer" data="SEND_TO_CONFERENCE XML public"/>
</condition>
</extension>
Change ownership of this file to freeswitch:daemon
$ chown freeswitch:daemon /opt/freeswitch/conf/dialplan/public/my_provider.xml
and then restart FreeSWITCH:
$ sudo systemctl restart freeswitch
Try calling the phone number. It should connect to FreeSWITCH and you should hear a voice prompting you to enter the five digit PIN number for the conference. Please note, that dialin will currently only work if at least one web participant has joined with their microphone.
To always show users the phone number along with the 5-digit PIN number within BigBlueButton, not only while selecting the microphone participation, edit /etc/bigbluebutton/bbb-web.properties and set the phone number provided by your Internet Telephone Service Provider
#----------------------------------------------------
# Default dial access number
defaultDialAccessNumber=613-555-1234
and set defaultWelcomeMessageFooter to
defaultWelcomeMessageFooter=<br><br>To join this meeting by phone, dial:<br> %%DIALNUM%%<br>Then enter %%CONFNUM%%# as the conference PIN number.
Save /etc/bigbluebutton/bbb-web.properties and restart BigBlueButton again. Each user that joins a session will see a message in the chat similar to.
To join this meeting by phone, dial:
613-555-1234
and enter 12345 as the conference PIN number.
Finally, setup the firewall rules so you are only accepting incoming calls from the IP address of your SIP provider. For example, if your SIP provider forwards incoming calls from 64.2.142.33, then setup the following firewall rules on your server.
iptables -A INPUT -i eth0 -p tcp --dport 5060 -s 0.0.0.0/0 -j REJECT
iptables -A INPUT -i eth0 -p udp --dport 5060 -s 0.0.0.0/0 -j REJECT
iptables -A INPUT -i eth0 -p tcp --dport 5080 -s 0.0.0.0/0 -j REJECT
iptables -A INPUT -i eth0 -p udp --dport 5080 -s 0.0.0.0/0 -j REJECT
iptables -I INPUT -p udp --dport 5060 -s 64.2.142.33 -j ACCEPT
With these rules, you won't get spammed by bots scanning for SIP endpoints and trying to connect.
It's also important to note that, alongside the PIN requirement, there are basic dialplan-level checks in place to prevent anonymous dial-in callers from joining BigBlueButton audio conferences.
- Those checks offer minimal protection regarding blocking anonymous SIP participants and should not be considered a comprehensive solution. For production environments requiring stronger security controls, administrators are responsible for implementing additional measures that match the sensitivity of their deployments.
- If you want to allow anonymous SIP UAs, you need to remove the
reject_anonymousextension in/opt/freeswitch/conf/dialplan/default/bbb_conference.xml, then restart FreeSWITCH.
Turn on the "comfort noise" when no one is speaking
FreeSWITCH has the ability to add a "comfort noise" that is a slight background hiss to let users know they are still in a voice conference even when no one is talking (otherwise, they may forget they are connected to the conference bridge and say something unintended for others).
If you want to enable, edit /opt/freeswitch/conf/autoload_configs/conference.conf.xml, look for the block <profile name="cdquality">, and change the value for comfort-noise. You can specify a level of noise, such as 0 (no noise), 350, 1400, etc. Try different values to get the level you desire.
<param name="comfort-noise" value="1400"/>
You need to restart BigBlueButton between each change. For more information, see comfort-noise in FreeSWITCH documentation.
$ sudo bbb-conf --restart
Presentation
Change the default presentation
When a new meeting starts, BigBlueButton displays a default presentation. The file for the default presentation is located in /var/www/bigbluebutton-default/assets/default.pdf. You can replace the contents of this file with your presentation. Whenever a meeting is created, BigBlueButton will automatically load, convert, and display this presentation for all users.
Alternatively, you can change the global default by adding an overwriting rule in /etc/bigbluebutton/bbb-web.properties specifying the URL for beans.presentationService.defaultUploadedPresentation.
# Default Uploaded presentation file
beans.presentationService.defaultUploadedPresentation=${bigbluebutton.web.serverURL}/default.pdf
You'll need to restart BigBlueButton after the change with sudo bbb-conf --restart.
If you want to specify the default presentation for a given meeting, you can also pass a URL to the presentation as part of the create meeting API call.