From 3a649887c53777d682dc32fc922321ee59ec3702 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 6 May 2021 15:11:21 -0500 Subject: [PATCH 01/12] Detect IP on CNAME records --- jra_nextcloud.sh | 2 +- quick_jibri_installer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index 0fa958f..c729fc5 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -78,7 +78,7 @@ do fi done #Simple DNS test -if [ "$PUBLIC_IP" = "$(dig -4 +short $NC_DOMAIN)" ]; then +if [ "$PUBLIC_IP" = "$(dig -4 +short $NC_DOMAIN|awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then echo "Server public IP & DNS record for $NC_DOMAIN seems to match, continuing... " else diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 28b27e0..2f9ee0c 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -284,7 +284,7 @@ if [ "$LE_SSL" = "yes" ]; then fi done #Simple DNS test - if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN)" ]; then + if [ "$PUBLIC_IP" = "$(dig -4 +short $JITSI_DOMAIN||awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then echo "Server public IP & DNS record for $JITSI_DOMAIN seems to match, continuing... " else From ef408c0764a76010afab5c37a594c76ddf6e47be Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 6 May 2021 15:17:11 -0500 Subject: [PATCH 02/12] Make sure connection loop patch is applied. --- quick_jibri_installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 2f9ee0c..ac44e8e 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -1225,8 +1225,8 @@ if [ "$ENABLE_DOCKERPAD" = "yes" ]; then bash $PWD/etherpad.sh fi fi -#Prevent Jibri conecction issue -if [ -z "$(grep -n $DOMAIN /etc/hosts)" ];then +#Prevent JMS conecction issue +if [ -z "$(awk "/127.0.0.1/&&/$DOMAIN/{print\$1}" /etc/hosts)" ];then sed -i "/127.0.0.1/a \\ 127.0.0.1 $DOMAIN" /etc/hosts else From 434c224e0e373649b89f53e7a175a97244af42dd Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 6 May 2021 15:19:12 -0500 Subject: [PATCH 03/12] Stop jibri related services --- tools/start-over.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/start-over.sh b/tools/start-over.sh index d784006..4e88c1a 100644 --- a/tools/start-over.sh +++ b/tools/start-over.sh @@ -96,7 +96,9 @@ apt-get -y purge jibri \ prosody #Services stop -remove_services jibri* +remove_services jibri +remove_services jibri-icewm +remove_services jibri-xorg #Cleaning packages apt-get -y autoremove From f709d9281972eaec2c0ab3fd327ace6b06a95c56 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Mon, 10 May 2021 17:22:55 -0500 Subject: [PATCH 04/12] Back to 17, 15 is way too much "resolution" --- tools/jibri-resolution-enhancer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jibri-resolution-enhancer.sh b/tools/jibri-resolution-enhancer.sh index 0211749..d38ded7 100644 --- a/tools/jibri-resolution-enhancer.sh +++ b/tools/jibri-resolution-enhancer.sh @@ -74,7 +74,7 @@ cd $JIBRI_ENH_PATH # Recomemended values based on: https://trac.ffmpeg.org/wiki/Encode/H.264#crf ## videoEncodePreset - "medium" || h264ConstantRateFactor - 15 sed -i "/videoEncodePreset/s|String =.*|String = \"medium\",|" src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt -sed -i "/h264ConstantRateFactor/s|Int =.*|Int = 15,|" src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt +sed -i "/h264ConstantRateFactor/s|Int =.*|Int = 17,|" src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt mvn package JIBRI_JAR="$(ls -Sh $JIBRI_ENH_PATH/target|awk '/dependencies/&&/.jar/{print}'|awk 'NR==1{print}')" From 952004157952791ce3204501583d3d45892b861f Mon Sep 17 00:00:00 2001 From: Ark74 Date: Mon, 10 May 2021 17:24:11 -0500 Subject: [PATCH 05/12] Back to 17, 15 is way too much "resolution" comment --- tools/jibri-resolution-enhancer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jibri-resolution-enhancer.sh b/tools/jibri-resolution-enhancer.sh index d38ded7..e32180b 100644 --- a/tools/jibri-resolution-enhancer.sh +++ b/tools/jibri-resolution-enhancer.sh @@ -72,7 +72,7 @@ cd $JIBRI_ENH_PATH # Default values ## videoEncodePreset - "veryfast" || h264ConstantRateFactor - 25 # Recomemended values based on: https://trac.ffmpeg.org/wiki/Encode/H.264#crf -## videoEncodePreset - "medium" || h264ConstantRateFactor - 15 +## videoEncodePreset - "medium" || h264ConstantRateFactor - 17 sed -i "/videoEncodePreset/s|String =.*|String = \"medium\",|" src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt sed -i "/h264ConstantRateFactor/s|Int =.*|Int = 17,|" src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/FfmpegCapturer.kt mvn package From 9615503e03b7ecc9d128fbc5fd5f6253bef8538c Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 12 May 2021 11:12:10 -0500 Subject: [PATCH 06/12] Add kernel tools to enable perf analysis --- quick_jibri_installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index ac44e8e..4531737 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -327,7 +327,8 @@ echo "# Check and Install HWE kernel if possible..." HWE_VIR_MOD=$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr) 2>/dev/null|head -n1|grep -c "hwe-$(lsb_release -sr)") if [ "$HWE_VIR_MOD" = "1" ]; then apt-get -y install \ - linux-image-generic-hwe-$(lsb_release -sr) + linux-image-generic-hwe-$(lsb_release -sr) \ + linux-tools-generic-hwe-$(lsb_release -sr) else apt-get -y install \ linux-image-generic \ From ad31cc97932ded7d3b79ce6d4e5d98684a2318aa Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 13 May 2021 20:21:18 -0500 Subject: [PATCH 07/12] Include high performance system tuning as default --- mode/chp-mode.sh | 35 +++------------- mode/jms-stu.sh | 86 ++++++++++++++++++++++++++++++++++++++++ quick_jibri_installer.sh | 7 ++++ 3 files changed, 99 insertions(+), 29 deletions(-) create mode 100644 mode/jms-stu.sh diff --git a/mode/chp-mode.sh b/mode/chp-mode.sh index 8e0f7e9..7c4b760 100644 --- a/mode/chp-mode.sh +++ b/mode/chp-mode.sh @@ -160,35 +160,12 @@ elif [ "$CHAT_DISABLED" = "yes" ] || [ -z "$CHAT_DISABLED" ]; then fi done -#SYSTEM -##Disable swap -swapoff -a -sed -ir '/\sswap\s/s/^#?/#/' $FSTAB - -##Kernel -#https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-adjusting_network_settings-changing_network_kernel_settings -sysctl -w net.core.rmem_default=262144 -sysctl -w net.core.wmem_default=262144 -sysctl -w net.core.rmem_max=262144 -sysctl -w net.core.wmem_max=262144 -set_once "net.core.rmem_default=262144" "/etc/sysctl.conf" -set_once "net.core.wmem_default=262144" "/etc/sysctl.conf" -set_once "net.core.rmem_max=262144" "/etc/sysctl.conf" -set_once "net.core.wmem_max=262144" "/etc/sysctl.conf" - -#https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/reduce_tcp_performance_spikes -sysctl -w net.ipv4.tcp_timestamps=0 -set_once "net.ipv4.tcp_timestamps=0" "/etc/sysctl.conf" - -#https://bugzilla.redhat.com/show_bug.cgi?id=1283676 -sysctl -w net.core.netdev_max_backlog=100000 -set_once "net.core.netdev_max_backlog=100000" "/etc/sysctl.conf" - -##nginx -sed -i "s|worker_connections.*|worker_connections 2000;|" /etc/nginx/nginx.conf - -#Missing docs -#sysctl -w net.ipv4.tcp_low_latency=1 +## JMS system tune up +if [ "$MODE" = "debug" ]; then + bash $PWD/jms-stu.sh -m debug +else + bash $PWD/jms-stu.sh +fi #JVB2 ##Loose up logging diff --git a/mode/jms-stu.sh b/mode/jms-stu.sh new file mode 100644 index 0000000..9041b15 --- /dev/null +++ b/mode/jms-stu.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# System-tune-up to remove system restrictions on a huge load of connections. +# SwITNet Ltd © - 2021, https://switnet.net/ +# GPLv3 or later. + +#Check if user is root +if ! [ $(id -u) = 0 ]; then + echo "You need to be root or have privileges!" + exit 0 +fi + +while getopts m: option +do + case "${option}" + in + m) MODE=${OPTARG};; + \?) echo "Usage: sudo ./jms-stu.sh [-m debug]" && exit;; + esac +done + +echo ' +#-------------------------------------------------- +# Starting system tune up configuration +# for high performance +#-------------------------------------------------- +' + +#DEBUG +if [ "$MODE" = "debug" ]; then +set -x +fi + +set_once() { +if [ -z "$(awk '!/^ *#/ && NF {print}' "$2"|grep $(echo $1|awk -F '=' '{print$1}'))" ]; then + echo "Setting "$1" on "$2"..." + echo "$1" | tee -a "$2" +else + echo " \"$(echo $1|awk -F '=' '{print$1}')\" seems present, skipping setting this variable" +fi +} + +##Disable swap +swapoff -a +sed -r '/\sswap\s/s/^#?/#/' -i $FSTAB + +##Alternative swap tuning (need more documentation). +#vm.swappiness=10 +#vm.vfs_cache_pressure=50 + +##Kernel +#https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-adjusting_network_settings-changing_network_kernel_settings +sysctl -w net.core.rmem_default=262144 +sysctl -w net.core.wmem_default=262144 +sysctl -w net.core.rmem_max=262144 +sysctl -w net.core.wmem_max=262144 +set_once "net.core.rmem_default=262144" "/etc/sysctl.conf" +set_once "net.core.wmem_default=262144" "/etc/sysctl.conf" +set_once "net.core.rmem_max=262144" "/etc/sysctl.conf" +set_once "net.core.wmem_max=262144" "/etc/sysctl.conf" + +#system +#https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-quickstart +sysctl -w DefaultLimitNOFILE=65000 +sysctl -w DefaultLimitNPROC=65000 +sysctl -w DefaultTasksMax=65000 +set_once "DefaultLimitNOFILE=65000" "/etc/sysctl.conf" +set_once "DefaultLimitNPROC=65000" "/etc/sysctl.conf" +set_once "DefaultTasksMax=65000" "/etc/sysctl.conf" + +#https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/reduce_tcp_performance_spikes +sysctl -w net.ipv4.tcp_timestamps=0 +set_once "net.ipv4.tcp_timestamps=0" "/etc/sysctl.conf" + +#https://bugzilla.redhat.com/show_bug.cgi?id=1283676 +sysctl -w net.core.netdev_max_backlog=100000 +set_once "net.core.netdev_max_backlog=100000" "/etc/sysctl.conf" + +##nginx +sed -i "s|worker_connections.*|worker_connections 2000;|" /etc/nginx/nginx.conf +nginx -t + +#Missing docs +#sysctl -w net.ipv4.tcp_low_latency=1 + +echo "System tune up... + Done!" diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 4531737..bd9d43e 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -415,6 +415,13 @@ Remove Chrome warning... mkdir -p /etc/opt/chrome/policies/managed echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' > $GCMP_JSON +## JMS system tune up +if [ "$MODE" = "debug" ]; then + bash $PWD/mode/jms-stu.sh -m debug +else + bash $PWD/mode/jms-stu.sh +fi + echo ' ######################################################################## Please Setup Your Installation From 5660b7c976729cc2beb64461d27e4c6844811bf2 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 13 May 2021 20:26:29 -0500 Subject: [PATCH 08/12] Remove deprecated local recording tool --- jitsi-updater.sh | 6 ------ quick_jibri_installer.sh | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/jitsi-updater.sh b/jitsi-updater.sh index df2be6c..241ad31 100644 --- a/jitsi-updater.sh +++ b/jitsi-updater.sh @@ -21,7 +21,6 @@ if [ ! -f jm-bm.sh ]; then fi support="https://switnet.net/support" apt_repo="/etc/apt/sources.list.d" -LOC_REC="TBD" ENABLE_BLESSM="TBD" CHD_LTST="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" CHD_LTST_2D="$(echo $CHD_LTST|cut -d "." -f 1,2)" @@ -160,11 +159,6 @@ else echo "Setting Support custom link" sed -i "s|https://jitsi.org/live|$support|g" $INT_CONF fi - printf "${Purple}========== Disable Localrecording ==========${Color_Off}\n" - if [ "$LOC_REC" != "on" ]; then - echo "Removing localrecording..." - sed -i "s|'localrecording',||" $INT_CONF - fi printf "${Purple}========== Disable Blur my background ==========${Color_Off}\n" sed -i "s|'videobackgroundblur', ||" $INT_CONF fi diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index bd9d43e..fc1f8a4 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -554,16 +554,6 @@ do echo "Static avatar will be enabled" fi done -# #Enable local audio recording - disabling -#while [[ "$ENABLE_LAR" != "yes" && "$ENABLE_LAR" != "no" ]] -#do -#read -p "> Do you want to enable local audio recording option?: (yes or no)"$'\n' -r ENABLE_LAR -#if [ "$ENABLE_LAR" = "no" ]; then -# echo "Local audio recording option won't be enabled" -#elif [ "$ENABLE_LAR" = "yes" ]; then -# echo "Local audio recording option will be enabled" -#fi -#done #Secure room initial user #while [[ "$ENABLE_SC" != "yes" && "$ENABLE_SC" != "no" ]] From cd6ac5f03839b5eb4627389aedd12326a013d55a Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 13 May 2021 20:29:45 -0500 Subject: [PATCH 09/12] Dropping local recording --- quick_jibri_installer.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index fc1f8a4..8a2d03b 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -791,19 +791,6 @@ sed -i "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\ #sed -i "$DB_STR,$DB_END{s|// },|},|}" $MEET_CONF #fi -#LocalAudioRecording -if [ "$ENABLE_LAR" = "yes" ]; then - echo "# Enabling local recording (audio only)." - LR_STR=$(grep -n "// Local Recording" $MEET_CONF | cut -d ":" -f1) - LR_END=$((LR_STR + 18)) - sed -i "$LR_STR,$LR_END{s|// localRecording: {|localRecording: {|}" $MEET_CONF - sed -i "$LR_STR,$LR_END{s|// enabled: true,|enabled: true,|}" $MEET_CONF - sed -i "$LR_STR,$LR_END{s|// format: 'flac'|format: 'flac'|}" $MEET_CONF - sed -i "$LR_STR,$LR_END{s|// }|}|}" $MEET_CONF - sed -i "s|'tileview'|'tileview', 'localrecording'|" $INT_CONF - sed -i "s|LOC_REC=.*|LOC_REC=\"on\"|" jitsi-updater.sh -fi - #Setup main language if [ -z $JB_LANG ] || [ "$JB_LANG" = "en" ]; then echo "Leaving English (en) as default language..." From 4447de7daf8db5fe412c1fca3964c1c0d1dba154 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 13 May 2021 20:30:55 -0500 Subject: [PATCH 10/12] Remove old authenticator selector. --- quick_jibri_installer.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 8a2d03b..9b28477 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -555,18 +555,6 @@ do fi done -#Secure room initial user -#while [[ "$ENABLE_SC" != "yes" && "$ENABLE_SC" != "no" ]] -#do -#read -p "> Do you want to enable secure rooms?: (yes or no)"$'\n' -r ENABLE_SC -#if [ "$ENABLE_SC" = "no" ]; then -# echo "-- Secure rooms won't be enabled." -#elif [ "$ENABLE_SC" = "yes" ]; then -# echo "-- Secure rooms will be enabled." -# read -p "Set username for secure room moderator: "$'\n' -r SEC_ROOM_USER -# read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS -#fi -#done echo " > Jitsi Meet Auth Method selection. " From 0023b3a54e527ab2655eb00458ea9c0b09d9cc5a Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 13 May 2021 20:36:10 -0500 Subject: [PATCH 11/12] Remove xenial conditions as no longer supported nor recommended --- jra_nextcloud.sh | 2 +- quick_jibri_installer.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index c729fc5..f4009da 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -409,7 +409,7 @@ if [ "$ENABLE_HSTS" = "yes" ]; then sed -i "s|# add_header Strict-Transport-Security|add_header Strict-Transport-Security|g" $NC_NGINX_CONF fi -if [ "$DISTRO_RELEASE" != "xenial" ] && [ ! -z "$PREAD_PROXY" ]; then +if [ ! -z "$PREAD_PROXY" ]; then echo " Setting up Nextcloud domain on Jitsi Meet turn proxy " diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 9b28477..410c9a4 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -990,11 +990,11 @@ if [ "$ENABLE_SA" = "yes" ] && [ -f $WS_CONF ]; then sed -i "/RANDOM_AVATAR_URL_SUFFIX/ s|false|\'.png\'|" $INT_CONF fi #nginx -tlsv1/1.1 -if [ "$DROP_TLS1" = "yes" ] && [ "$DIST" != "xenial" ];then +if [ "$DROP_TLS1" = "yes" ];then echo -e "\nDropping TLSv1/1.1 in favor of v1.3\n" sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" /etc/nginx/nginx.conf #sed -i "s|TLSv1 TLSv1.1|TLSv1.3|" $WS_CONF -elif [ "$DROP_TLS1" = "yes" ] && [ "$DIST" = "xenial" ];then +elif [ "$DROP_TLS1" = "yes" ];then echo -e "\nOnly dropping TLSv1/1.1\n" sed -i "s|TLSv1 TLSv1.1||" /etc/nginx/nginx.conf sed -i "s| TLSv1.3||" $WS_CONF From 901f80c37de223272342eae11e0084f025f3e1eb Mon Sep 17 00:00:00 2001 From: Ark74 Date: Sat, 15 May 2021 17:07:41 -0500 Subject: [PATCH 12/12] Add new config options to jibri.conf --- add-jibri-node.sh | 30 ++++++++++++++++++++++++++++++ quick_jibri_installer.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/add-jibri-node.sh b/add-jibri-node.sh index 43d9c4f..442f393 100644 --- a/add-jibri-node.sh +++ b/add-jibri-node.sh @@ -348,6 +348,18 @@ mv $JIBRI_CONF ${JIBRI_CONF}-dpkg-file cat << NEW_CONF > $JIBRI_CONF // New XMPP environment config. jibri { + streaming { + // A list of regex patterns for allowed RTMP URLs. The RTMP URL used + // when starting a stream must match at least one of the patterns in + // this list. + rtmp-allow-list = [ + // By default, all services are allowed + ".*" + ] + } + ffmpeg { + resolution = "1920x1080" + } chrome { // The flags which will be passed to chromium when launching flags = [ @@ -361,6 +373,24 @@ jibri { "--disable-dev-shm-usage" ] } + stats { + enable-stats-d = true + } + call-status-checks { + // If all clients have their audio and video muted and if Jibri does not + // detect any data stream (audio or video) comming in, it will stop + // recording after NO_MEDIA_TIMEOUT expires. + no-media-timeout = 30 seconds + + // If all clients have their audio and video muted, Jibri consideres this + // as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires. + all-muted-timeout = 10 minutes + + // When detecting if a call is empty, Jibri takes into consideration for how + // long the call has been empty already. If it has been empty for more than + // DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording. + default-call-empty-timeout = 30 seconds + } recording { recordings-directory = $DIR_RECORD finalize-script = $REC_DIR diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 410c9a4..5806551 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -821,6 +821,18 @@ mv $JIBRI_CONF ${JIBRI_CONF}-dpkg-file cat << NEW_CONF > $JIBRI_CONF // New XMPP environment config. jibri { + streaming { + // A list of regex patterns for allowed RTMP URLs. The RTMP URL used + // when starting a stream must match at least one of the patterns in + // this list. + rtmp-allow-list = [ + // By default, all services are allowed + ".*" + ] + } + ffmpeg { + resolution = "1920x1080" + } chrome { // The flags which will be passed to chromium when launching flags = [ @@ -834,6 +846,24 @@ jibri { "--disable-dev-shm-usage" ] } + stats { + enable-stats-d = true + } + call-status-checks { + // If all clients have their audio and video muted and if Jibri does not + // detect any data stream (audio or video) comming in, it will stop + // recording after NO_MEDIA_TIMEOUT expires. + no-media-timeout = 30 seconds + + // If all clients have their audio and video muted, Jibri consideres this + // as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires. + all-muted-timeout = 10 minutes + + // When detecting if a call is empty, Jibri takes into consideration for how + // long the call has been empty already. If it has been empty for more than + // DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording. + default-call-empty-timeout = 30 seconds + } recording { recordings-directory = $DIR_RECORD finalize-script = $REC_DIR