Set Up Jibri for Jitsi Recording/Streaming

This tutorial will demonstrate how to install Jibri to add recording and streaming functionality to a Jitsi Meet server. Watch the video version here.

Prerequisites: This tutorial assumes you already have a Jitsi Meet server set up. If you don't, follow this video and/or this wiki page to get one set up.

Example parameters: In this example, our fully-qualified domain name (FQDN) is "jitsi.example.com".

Step 1: Install the required packages that are available from Debian 10's default repositories:

apt install linux-image-amd64 ffmpeg curl unzip software-properties-common
Step 2: If you are using a hosting provider such as DigitalOcean who installs a cloud kernel by default, install a generic kernel, remove the cloud kernel, and reboot into the generic kernel:

apt list --installed | grep linux-image-
apt remove linux-image-cloud-amd64 linux-image-w.x.y-z-cloud-amd64
systemctl reboot
Step 3: Enable the ALSA loopback module to start on boot, and also start it for the current boot:

echo "snd_aloop" >>/etc/modules
modprobe snd_aloop
Step 4: Install Google Chrome:

curl -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
apt update
apt install google-chrome-stable
Step 5: Install ChromeDriver:

CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
Step 6: Turn off warnings about scripted control in Chrome:

mkdir -p /etc/opt/chrome/policies/managed
echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' >>/etc/opt/chrome/policies/managed/managed_policies.json
Step 7: Install Jibri:

apt install jibri
Choose your keyboard configuration when prompted.

Step 8: Add Jibri's user account to the necessary groups:

usermod -aG adm,audio,video,plugdev jibri
Step 9: Configure Prosody:

nano /etc/prosody/prosody.cfg.lua
Uncomment the items in the "conference" section:

---Set up a MUC (multi-user chat) room server on conference.example.com:
Component "conference.jitsi.example.com" "muc"
--- Store MUC messages in an archive and allow users to access it
modules_enabled = { "muc_mam" }
Add an internal MUC component entry:

--- internal muc component, meant to enable pools of jibri and jigasi clients
Component "internal.auth.jitsi.example.com" "muc"
modules_enabled = {
"ping";
}
storage = "internal"
muc_room_cache_size = 1000
Add a new VirtualHost entry to hold Jibri's user account:

VirtualHost "recorder.jitsi.example.com"
modules_enabled = {
"ping";
}
authentication = "internal_plain"
Step 10: Create two new accounts for Jibri to use (one for control purposes, one for recording purposes):

prosodyctl register jibri auth.jitsi.example.com Jibr1P@ssw0rd
prosodyctl register recorder recorder.jitsi.example.com Rec0rderP@ssw0rd
Step 11: Configure Jicofo:

nano /etc/jitsi/jicofo/sip-communicator.properties
Add these two lines for the Jibri control room and timeout:
org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.jitsi.example.com
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

Step 12: Configure Jitsi Meet:

nano /etc/jitsi/meet/jitsi.example.com-config.js
Locate and uncomment the following options:

fileRecordingsEnabled: true,
liveStreamingEnabled: true,
hiddenDomain: 'recorder.jitsi.example.com',
Step 13: Make a directory to store recordings and set its permissions appropriately:

mkdir /recordings
chown jibri:jibri /recordings
Step 14: Configure Jibri:

nano /etc/jitsi/jibri/config.json
Set the following options:

"recording_directory": "/recordings",
"finalize_recording_script_path": "",
"xmpp_server_hosts": [
"jitsi.example.com"
],
"xmpp_domain": "jitsi.example.com",
"control_login": {
"domain": "auth.jitsi.example.com",
"username": "jibri",
"password": "Jibr1P@ssw0rd"
},
"control_muc": {
"domain": "internal.auth.jitsi.example.com",
"room_name": "JibriBrewery",
"nickname": "jibri"
},
"call_login": {
"domain": "recorder.jitsi.example.com",
"username": "recorder",
"password": "Rec0rderP@ssw0rd"
},
Step 15: Install Java 8:

wget -O - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
add-apt-repository https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
apt update
apt install adoptopenjdk-8-hotspot
Configure Jibri to start with Java 8 instead of the default Java version (replace the word "java" with the full path to Java 8):

nano /opt/jitsi/jibri/launch.sh
/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java
Step 16: Restart all services, enable and start Jibri:

systemctl restart prosody
systemctl restart jicofo
systemctl restart jitsi-videobridge2
systemctl enable --now jibri

There are no pages beneath this page

Expand: Discussion Discussion (0 posts)