# =========================================================================== # # Jibri - Streamin / Recording with Jitsi Meet # # see: # - https://jitsi.org/blog/learn-how-to-live-stream-and-record-on-your-jitsi-meet-install/ # # - https://nerdonthestreet.com/episode/tech/jibri-recording # https://nerdonthestreet.com/wiki?find=Set+Up+Jibri+for+Jitsi+Recording%3Aslash%3AStreaming&keep_has_js=0 # # - https://community.jitsi.org/t/how-to-to-setup-integrated-jitsi-and-jibri-for-dummies-my-comprehensive-tutorial-for-the-beginner/35718 # # ============================================================================= RECORDING_USER="recorder" RECORDING_PASSWORD="MyP@ssw0rd4Rec0rder" XMPP_USER="jibri1" XMPP_PASSWORD="MyP@ssw0rd4Jibr1" RECORDING_DIR="/recordings" JITSI_HOST="video.faire-mobilitaet.de" required_debian_packages_jibri_server="linux-image-amd64 ffmpeg curl unzip software-properties-common" # =============== # On Jitsi Server # =============== # --- # Configure Prosody # --- # - Edit /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_HOST}" "muc" # - --- Store MUC messages in an archive and allow users to access it # - modules_enabled = { "muc_mam" } # - vim /etc/prosody/prosody.cfg.lua # Edit /etc/prosody/conf.d/${JITSI_HOST}.cfg.lua # # Add an internal MUC component entry: # # --- internal muc component, meant to enable pools of jibri and jigasi clients # Component "internal.auth.${JITSI_HOST}" "muc" # modules_enabled = { # "ping"; # } # storage = "internal" # muc_room_cache_size = 1000 # vim /etc/prosody/conf.d/${JITSI_HOST}.cfg.lua # Edit /etc/prosody/conf.d/${JITSI_HOST}.cfg.lua # # Add a new VirtualHost entry to hold Jibri's user account: # # VirtualHost "recorder.${JITSI_HOST}" # modules_enabled = { # "ping"; # } # authentication = "internal_plain" # vim /etc/prosody/conf.d/${JITSI_HOST}.cfg.lua # Create two new accounts for Jibri to use (one for control purposes, # one for recording purposes): # # prosodyctl register ${XMPP_USER} auth.${JITSI_HOST} ${XMPP_PASSWORD} # prosodyctl register ${RECORDING_USER} recorder.${JITSI_HOST} ${RECORDING_PASSWORD} # prosodyctl register ${XMPP_USER} auth.${JITSI_HOST} ${XMPP_PASSWORD} prosodyctl register ${RECORDING_USER} recorder.${JITSI_HOST} ${RECORDING_PASSWORD} # --- # Configure Jicofo # --- # Edit /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_HOST} # org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90 # vim /etc/jitsi/jicofo/sip-communicator.properties # --- # Configure Jitsi Meet # --- # Edit /etc/jitsi/meet/${JITSI_HOST}-config.js # # fileRecordingsEnabled: true, # ... # liveStreamingEnabled: true, # ... # hiddenDomain: 'recorder.${JITSI_HOST}', # vim /etc/jitsi/meet/${JITSI_HOST}-config.js # !! Note !! # # Ccheck also the interface config .js file '/usr/share/jitsi-meet/interface_config.js' # to be sure, that the buttons 'recording' and 'livestreaming' are not disabled. # # see section TOOLBAR_BUTTONS and take care buttons 'recording' and 'livestreaming' # are part of that array. # view /usr/share/jitsi-meet/interface_config.js # --- # Restart Services # --- systemctl restart prosody systemctl restart jicofo systemctl restart jitsi-videobridge2 # --------------------------------- # Allow Port 5222 from Jibri Server # --------------------------------- # =============== # On Jibri Server # =============== # - Install required that are available from Debian 10's default repositories: # - echononl "Install the required debian packages from repository.." for _deb in $required_debian_packages_jibri_server ; do DEBIAN_FRONTEND=noninteractive apt-get install -y $_deb done # - REBOOT system if needed !! # - Enable the ALSA loopback module to start on boot, and also start it for the current boot: # - cat <> /etc/modules # Enable ALSA loopback module snd_aloop EOF # - Start ALSA loopback module for the current boot: # - modprobe snd_aloop # --- # - Install Google Chrome: # --- # - Add apt key # - curl -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add # - Add Repository.. # - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list # - Update repository adn Install google chrome # - apt-get update apt install google-chrome-stable # --- # Install ChromeDriver: # --- # - Get Driver Version # - CHROME_DRIVER_VERSION="$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)" # - Download Driver (zip archive) # - wget -N http://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip -P /tmp # - Unzip archive to usr/local/bin # - unzip /tmp/chromedriver_linux64.zip -d /usr/local/bin # - 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 # --- # Install libri- # --- # - Add apt key for jitsi repository # - wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - # - Add Repository.. # - echo "deb https://download.jitsi.org stable/" > /etc/apt/sources.list.d/jitsi-stable.list # - Update repository and install jibri # - apt-get update apt install jibri # - Add Jibri's user account to the necessary groups: # - usermod -aG adm,audio,video,plugdev jibri # --- # Create Recording Directors # - Make a directory to store recordings and set its permissions appropriately: # - mkdir -p "${RECORDING_DIR}" # - Change ownerchip of recording directory .. # - chown jibri:jitsi "${RECORDING_DIR}" # --- # Configure jibri # --- # Edit /etc/jitsi/jibri/config.json # # Set the following options: # # "recording_directory": "${RECORDING_DIR}", # "finalize_recording_script_path": "", # ... # "xmpp_server_hosts": [ # "${JITSI_HOST}" # ], # ... # "xmpp_domain": "${JITSI_HOST}", # ... # "control_login": { # "domain": "auth.${JITSI_HOST}", # "username": "${XMPP_USER}", # "password": "${XMPP_PASSWORD}" # }, # ... # "control_muc": { # "domain": "internal.auth.${JITSI_HOST}", # "room_name": "JibriBrewery", # "nickname": "jibri" # }, # ... # "call_login": { # "domain": "recorder.${JITSI_HOST}", # "username": "${RECORDING_USER}", # "password": "${RECORDING_PASSWORD}" # }, vim /etc/jitsi/jibri/config.json # --- # Install Java 8: # --- # - Add apt key # - wget -O - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - # - Add Repository.. # - add-apt-repository https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ # - Update repository and install java 8 (adoptopenjdk-8-hotspot) # - apt-get 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): # if $(grep -q -E "^\s*exec\s+java\s+.*" /opt/jitsi/jibri/launch.sh 2> /dev/null) ; then perl -i -n -p -e "s#^\s*exec\s+java\s+(.*)#exec /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java \1#" \ /opt/jitsi/jibri/launch.sh fi vim /opt/jitsi/jibri/launch.sh # --- # Enable and start Jibri: # --- systemctl enable --now jibri