To configuring the jibri recording server from below easy steps
Note: Please put the more focus on highlighted line and words :
Pre-requisite for jibri recording server :
OS-VM: Ubuntu 16.04 VMs on your cloud server (Azure,GC,AWS,Vultr, digitalOcean).
CPU: 2.0
RAM: 4 GB
SSD or HDD :20 GB
Update the Ubuntu package
- sudo -s
- apt update
Allow to require ports
- ufw status
- => “Active or inactive does not matter”
- ufw allow ssh
- ufw allow 80/tcp
- ufw allow 443/tcp
- ufw allow 10000:60000/tcp
- ufw allow 10000:60000/udp
- ufw allow 5222
- ufw allow 5347
- netstat -tunlp // list out the all open ports
Installing kernel modules
- apt -y install linux-image-extra-virtual
- uname -a
Note : After uname -a command there are two possibilities A and B .
A. if you get below output, it mean kernal module has configured as generic .
Linux <username> 4.4.0-157-generic# 185-Ubuntu SMP Tue Jul 23 09:17:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
B. if you get below output it means Kernal has not configured as generic , so need check modprobe command
Linux <username> 4.4.0-157-Azure or Linux <username> 4.4.0-157-AWS
modprobe command
- modprobe snd-aloop
Note : After above command if you get below errors, it means version is miss match then need follow Kernal version configuration steps .
modprobe: FATAL: Module snd-aloop not found in directory /lib/modules/4.4.0-1052-aws or azure
Kernal version configuration
- open the grub file from below command
- vim /etc/default/grub // open the grub file and edit the below line save it .
edit the line number 6 (change from GRUB_DEFAULT=0 to GRUB_DEFAULT="1>2")
- update-grub // this is a upgrade command which update the grub file
- reboot // reboot command is a mandatory because often does not update the system file without reboot .
After reboot the jibri VMs need to check that VM has been change as generic kernal or not
- uname -a // it will show as generic ( Linux rtc-v1-jibri 4.4.0-157-generic) instead of azure or aws
- modprobe snd-aloop //(now, there is no error )
- lsmod | grep snd_aloop // Search that snd_aloop if it is configured then it shows some output as bellow is depicted
snd_aloop 24576 0
snd_pcm 106496 1 snd_aloop
snd 86016 3 snd_aloop,snd_timer,snd_pcm
4. echo "snd-aloop" >> /etc/modules // move snd_aloop into /etc/modules
Note : Now kernel module has been configured so now install the jibri from steps
Install the required dependencies from below commands
- curl -sS -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-get -y update
- apt-get -y install google-chrome-stable
Install the Chromedriver from below commands
- 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 chown root:root /usr/local/bin/chromedriver
- sudo chmod 0755 /usr/local/bin/chromedriver
Install the required dependencies from below command
- install default-jre-headless ffmpeg curl alsa-utils icewm xdotool xserver-xorg-input-void xserver-xorg-video-dummy
Install Jibri debain Repo from below commands
- wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
- sudo sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
- sudo apt-get update
- sudo apt-get install jibri
Jibri config file
- mkdir /srv/recordings. // create a recordings directory where you want to save all recorded files (i usually keep /home/raj/recordings)
- chown jibri:jitsi /srv/recordings. // change the owner and group of directory
- sudo vi /etc/jitsi/jibri/config.json // open config file and change the below line
Note : Please make changes very carefully otherwise it will throw errors .
// Where recording files should be temporarily stored
"recording_directory":"/srv/recordings",
….
// The hosts of the XMPP servers to connect to as part of
// this environment
"xmpp_server_hosts": [
“jitsi-conf.abc.com"
],
// The xmpp domain we'll connect to on the XMPP server
"xmpp_domain": "jitsi-conf.abc.com",
// Jibri will login to the xmpp server as a privileged user
"control_login": {
// The domain to use for logging in
"domain": "auth.jitsi-conf.abc.com",
// The credentials for logging in
"username": "jibri",
"password": "jibriauthpass"
},
// Using the control_login information above, Jibri will join
// a control muc as a means of announcing its availability
// to provide services for a given environment
"control_muc": {
"domain": "internal.auth.jitsi-conf.abc.com",
"room_name": "JibriBrewery",
"nickname": "jibri-raj"
},
// All participants in a call join a muc so they can exchange
// information. Jibri can be instructed to join a special muc
// with credentials to give it special abilities (e.g. not being
// displayed to other users like a normal participant)
"call_login": {
"domain": "recorder.jitsi-conf.abc.com",
"username": "recorder",
"password": "jibrirecorderpass"
},
Once done the all above configurations need to restart jibri server
- systemctl restart jibri
- systemctl status jibri
Go to on main server configuration : (Where jitsi-meet , jicofo and JVB component are running )
Prosody server configurations
- vi /etc/prosody/conf.d/jitsi-conf.abc.com.cfg.lua // open prosody config file
--Jibri configurations -------
Component "internal.auth.jitsi-conf.abc.com" "muc"
modules_enabled = {
"ping";
}
storage = "null"
muc_room_cache_size = 1000
VirtualHost "recorder.jitsi-conf.abc.com"
modules_enabled = {
"ping";
}
authentication = "internal_plain"
Setup the two accounts jibri fro below commands .
1. prosodyctl register jibri auth.jitsi-conf.abc.com jibriauthpass
2. prosodyctl register recorder recorder.jitsi-conf.abc.com jibrirecorderpass
Jicofo server configurations
- vi /etc/jitsi/jicofo/sip-communicator.properties. // open file and add below line
org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.jitsi-conf.abc.com
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90
Jitsi-meet server configurations
- vi /etc/jitsi/meet/jitsi-conf.abc.com-config.js. // Need to edit below line
fileRecordingsEnabled: true, // If you want to enable file recording
liveStreamingEnabled: true, // If you want to enable live streaming
hiddenDomain: 'recorder.jitsi-conf.abc.com',
Check require buttons enable or not in "TOOLBAR"
- sudo vi /usr/share/jitsi-meet/interface_config.js // Need to check toolbar button enable or not ('recording' , 'livestreaming',)
TOOLBAR_BUTTONS: [
'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
'fodeviceselection', 'hangup', 'profile', 'info', 'chat', 'recording',
'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts',
'tileview'
],
Open Jibri server VM
13 . Use username 'jibri' and group name 'jibri', should be allow
- sudo usermod -aG adm,audio,video,plugdev jibri //There are two possible errors A and B If you get below message after run the above command
A. If there is no any output after the above command then it seems good .
B. If there are some output seems like the below then need to remove unscd package
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
- sudo apt remove unscd // remove unscd package (if there are errors , please follow How to remove unscd in below of this page)
Note : after removing the package need to check snd_aloop is avaible or not by below command .
- smod | grep snd_aloop //if there are any output then neetd follow Ffmeg test command steps
Ffmeg test command
1. sudo arecord -L // After this command there are two possible output A and B
A. If you get long listing from above command it means .it means working fine & need to restart jibri
B. If you get null Discard all samples (playback) or generate zero samples (capture)
- if discard errors come then need to do below steps
- systemctl stop jibri
- echo "snd-aloop" >> /etc/modules
- modprobe snd-aloop
How to remove unscd (You can get more info from this reference like )
Uninstall unscd
To remove just unscd package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:
- sudo apt-get remove unscd
Uninstall unscd and it's dependent packages
To remove the unscd package and any other dependant package which are no longer needed from Ubuntu Xenial.
- sudo apt-get remove --auto-remove unscd
Purging unscd
If you also want to delete configuration and/or data files of unscd from Ubuntu Xenial then this will work:
- sudo apt-get purge unscd
To delete configuration and/or data files of unscd and it's dependencies from Ubuntu Xenial then execute:
- sudo apt-get purge --auto-remove unscd
Note: Before start the conference call and recording need restart all server from below commands
- restart again (systemctl restart nginx.service )
- systemctl restart jitsi-videobridge2.service
- systemctl restart jicofo.service
- systemctl restart prosody.service
- systemctl restart jibri.service
for me aws kernal related settings not worked, mabe becuase of another/latest version of aws, maybe this will help someone which i get:
ReplyDeleteaws ubuntu 16
###################################
apt install linux-generic
vi /etc/default/grub >> add below lines in place of GRUB_DEFAULT=0
# Make the latest generic kernel the default
release=$(linux-version list | grep -e '-generic$' | sort -V | tail -n1)
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux $release"
update-grub
reboot
uname -a
###################################
Tanks for data and procedures.
ReplyDeleteI need Help: installed JISTI meet on server_vps_A.com and JIBRI on server_vps_B.com,
Jisti meet works well with 2 or more than 20 users on server_vps_A.com:
JIBRi was installed following the steps of https://github.com/jitsi/jibri#manually-testing-jibri, but the question is whether Configuring a Jitsi Meet environment for Jibri was done correctly:
When trying to transmit on YouTube or record the videoconference, an orange sign appears on the right that says:
RECORDING NOT AVAILABLE
Oops! The recording Service is currently unavaliable. We’re working on solving the issue. Please tray again later.
Perhaps some parameter has been misconfigured:
Changes are made on server_vps_A.com are: (changes are made on JISTI server?)
Prosody :
/etc/prosody/prosody.cfg.lua
internal muc component, meant to enable pools of jibri and jigasi clients
Component “internal.auth.servidor_vps_B.com” “muc”
modules_enabled = {
“ping”;
}
storage = “null”
muc_room_cache_size = 1000
VirtualHost “recorder.servidor_vps_B.com”
modules_enabled = {
“ping”;
}
authentication = “internal_plain”
the configuration of the 2 accounts so that you can use them JIBRI run on the server_vps_A.com pointing to the domain server_vps_B.com?
prosodyctl register jibri auth.servidor_vps_B.com jibriauthpass
prosodyctl register recorder recorder.servidor_vps_B.com jibrirecorderpass
Jicofo :
/etc/jitsi/jicofo/sip-communicator.properties
emphasized text org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth. vps_B.com_server
org.jitsi.jicofo.jibri.PENDING_TIMEOUT = 90
Jisti Meet:
/etc/jitsi/meet/yourdomain-config.js
fileRecordingsEnabled: true, // If you want to enable file recording
liveStreamingEnabled: true, // If you want to enable live streaming
hiddenDomain: 'recorder. vps_B_server ',
Interface Config:
/usr/share/jitsi-meet/interface_config.js
Active on TOOLBAR_BUTTONS array recordingvalue button and button livestreamingvalue
Thank you
Are you able to do recording in normal mode("srv/recordings" directory) ?
ReplyDeleteThanks a lot bro... its really helpful...
ReplyDeleteinstall default-jre-headless ffmpeg curl alsa-utils icewm xdotool xserver-xorg-input-void xserver-xorg-video-dummy
ReplyDeleteinstall: target 'xserver-xorg-video-dummy' is not a directory
Please check your command properly might be typo
ReplyDeleteHi Raj,
ReplyDeletecan u help me ? i've tried so many times install jibri on ubuntu 16.04 and always failed.
last time i follow your tutorial here, the jibri is running like below :
root@jibri:~# systemctl status jibri
● jibri.service - Jibri Process
Loaded: loaded (/etc/systemd/system/jibri.service; disabled; vendor preset: enabled)
Active: active (running) since Sen 2020-07-27 16:34:43 WIB; 5s ago
Process: 2139 ExecStop=/opt/jitsi/jibri/graceful_shutdown.sh (code=exited, status=7)
Main PID: 2146 (java)
CGroup: /system.slice/jibri.service
└─2146 java -Djava.util.logging.config.file=/etc/jitsi/jibri/logging.properties -jar /opt/jitsi/jibri/jibri.jar --config /etc/jitsi/jibri/config.json
Jul 27 16:34:43 jibri systemd[1]: Started Jibri Process.
Jul 27 16:34:44 jibri launch.sh[2146]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Jul 27 16:34:44 jibri launch.sh[2146]: SLF4J: Defaulting to no-operation (NOP) logger implementation
Jul 27 16:34:44 jibri launch.sh[2146]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
root@jibri:~#
but when i try to start recording, it's failed , then the log below :
root@jibri:~# grep -i "error\|warning\|severe" /var/log/jitsi/jibri/log.0.txt
2020-07-27 16:34:44.757 WARNING: [1] org.glassfish.jersey.internal.inject.Providers.checkProviderRuntime() A provider org.jitsi.jibri.api.http.internal.InternalHttpApi registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.jitsi.jibri.api.http.internal.InternalHttpApi will be ignored.
2020-07-27 16:34:44.997 WARNING: [20] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification!
2020-07-27 16:34:45.041 WARNING: [1] org.glassfish.jersey.internal.inject.Providers.checkProviderRuntime() A provider org.jitsi.jibri.api.http.HttpApi registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.jitsi.jibri.api.http.HttpApi will be ignored.
root@jibri:~#
what is output of the "modprobe snd-aloop" command
ReplyDeleteplease wait Raj, i try to reinstalling again from your tutorial ,
ReplyDeletei'll post the result ,
o ya, for the beggining this is my situation :
1. installed ubuntu 16.04 with kernel 4.1.5 ( did i have to boot using kernel 4.4 ? ) i never succeed to change kernel boot to 4.4
2. did jibri have to install using public IP ? or it can installing using ip LAN behind router ?
3. if have to use public ip, i have one , it will be 1 subnet with my jitsi server
jitsi : 115.84.32.aa
jibri : 115.84.32.bb ( if have to install using public ip )
please advice.
I think, you should have to install with public in same subnet
ReplyDeletehi Raj,
ReplyDeleteI've just finished installing with your tutorial, i see there's different between yours and
https://github.com/jitsi/jibri
here :
i've no seen here :
Add chrome managed policies file and set CommandLineFlagSecurityWarningsEnabled to false. It will hide warnings in Chrome. You can set it like so:
mkdir -p /etc/opt/chrome/policies/managed
echo '{ "CommandLineFlagSecurityWarningsEnabled": false }'
>>/etc/opt/chrome/policies/managed/managed_policies.json
my linux ubuntu kernel is :
ReplyDeleteroot@jibri:~# hostnamectl
Static hostname: jibri
Icon name: computer-server
Chassis: server
Machine ID: 567ac96b1e664393b9fa3fdb6878a00a
Boot ID: 1536d605331342229e43da1577ca8d49
Operating System: Ubuntu 16.04.6 LTS
Kernel: Linux 4.15.0-45-generic
Architecture: x86-64
root@jibri:~#
and i add that command , here the result
root@jibri:~# nano /etc/hosts
root@jibri:~# service jibri status
● jibri.service - Jibri Process
Loaded: loaded (/etc/systemd/system/jibri.service; disabled; vendor preset: enabled)
Active: active (running) since Rab 2020-07-29 17:07:44 WIB; 1min 6s ago
Process: 1711 ExecStop=/opt/jitsi/jibri/graceful_shutdown.sh (code=exited, status=7)
Main PID: 1717 (java)
CGroup: /system.slice/jibri.service
├─1717 java -Djava.util.logging.config.file=/etc/jitsi/jibri/logging.properties -jar /opt/jitsi/jibri/jibri.jar --config /etc/jitsi/jibri/config.json
└─1759 /usr/local/bin/chromedriver --port=29828 --log-path=/tmp/chromedriver.log
Jul 29 17:07:44 jibri systemd[1]: Started Jibri Process.
Jul 29 17:07:45 jibri launch.sh[1717]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Jul 29 17:07:45 jibri launch.sh[1717]: SLF4J: Defaulting to no-operation (NOP) logger implementation
Jul 29 17:07:45 jibri launch.sh[1717]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jul 29 17:08:10 jibri launch.sh[1717]: Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 29828
Jul 29 17:08:10 jibri launch.sh[1717]: Only local connections are allowed.
Jul 29 17:08:10 jibri launch.sh[1717]: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
Jul 29 17:08:10 jibri launch.sh[1717]: ChromeDriver was started successfully.
root@jibri:~#
ReplyDeletebut the recording is failed
here's another log :
root@jibri:~# grep -i "error\|warning\|severe" /var/log/jitsi/jibri/log.0.txt
2020-07-29 17:07:45.979 WARNING: [1] org.glassfish.jersey.internal.inject.Providers.checkProviderRuntime() A provider org.jitsi.jibri.api.http.internal.InternalHttpApi registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.jitsi.jibri.api.http.internal.InternalHttpApi will be ignored.
2020-07-29 17:07:46.220 WARNING: [20] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification!
2020-07-29 17:07:46.269 WARNING: [1] org.glassfish.jersey.internal.inject.Providers.checkProviderRuntime() A provider org.jitsi.jibri.api.http.HttpApi registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.jitsi.jibri.api.http.HttpApi will be ignored.
2020-07-29 17:08:14.222 SEVERE: [35] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Error starting Jibri service : org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(Driver info: chromedriver=84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
2020-07-29 17:11:52.148 SEVERE: [51] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Error starting Jibri service : org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(Driver info: chromedriver=84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}),platform=Linux 4.15.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
root@jibri:~#
please advice
How to configure multiple jibri server recording and streaming, can you pls share the configuration here
ReplyDeleteHello
ReplyDeleteI followed the instructions but the
/etc/jitsi/jibri/config.json file is missing
Can you please help?
me too
Deletesame problem here
did you manage to solve it ??
Hi.
ReplyDeleteI have a jitsi installed in a own server (Ubuntu 18.04 LTS).
I followed this tutorial but the problem is that the record is empty. Generates mp4 file, but duration is 00:00:00 (no image or sound). So, the problem is that when you do a sudo arecord -L for test, always appears "null discard all samples (playback) or generate zero samples (capture)"
Any ideas?