It seems that most people find Jibri implementation to be the most challenging of the suite of solutions. I am by no measure an expert on this, but I’ve done several installs of Jibri, purged it a number of times and reinstalled, so I thought I should share some of what I’ve gained with anyone who may find it useful. I’ll try to explain this in layman terms, so the information is not overwhelming. This is a long read, but it will save you a lot of time and a lot of headache trying to figure out what’s wrong or waiting for help in the forum. If you like, you can just jump to the Troubleshooting and Tips section.
1. What is Jibri?
Jibri is the recording and streaming instrument for Jitsi Meet conferences. Its capabilities include:
- Record a Jitsi meeting, capturing both audio and video
- Livestream a Jitsi meeting (through any RTMP)
- Do a local (audio) recording of a Jitsi meeting
2. How does it work?
Understanding how Jibri works will help you to know what to look for when you run into problems with it.
Jibri operates just like any other participant in a meeting. It enters the meeting as a hidden user (not sending audio or video of its own) and it records the meeting (screencasting), pretty much the same way as you would use a screen recorder to record events on your screen. In fact, you can confirm the presence of Jibri if you activate “Local Recording” and then look in the speaker stats - you will see a ‘name’ (mix of characters) that shows an extra participant in your meeting. For instance, in the example below, the Participant with the name “8ae9f547” is Jibri.
Jibri does screencasting by joining the meeting just like any other participant, spinning its own ‘monitor’ (which you don’t see), and then recording the meeting from its own screen ('monitor). This is important to note, because, amongst other things, it means that just like one participant can have problems in a meeting while everyone else is fine, Jibri can also have problems, yet a Jitsi Meet conference will run successfully and other participants will not be affected.
One important thing to note: Jibri can only record one meeting at a time. This means you need an instance of Jibri for every meeting you need to record.
Now, this is the main purpose of this tutorial and probably the reason why you clicked this link. There are two messages you’re likely to get when your recording does not start as expected:
- All recorders are currently busy - This happens when all available Jibris are being used. Remember, Jibri can only record one meeting at a time, so if your available pool of Jibris is used up (in use), you will not be able to record until one becomes available. And that’s when you get this message.
- Recording unavailable - This is an error message. It is the generic message you get when something is actually wrong with Jibri - usually telling you Jibri is not properly installed or configured. It’s important to note that you will get this same error message on your screen when Jibri doesn’t work for any reason other than that the available recorders are busy. So the error message itself is not very specific. However, the timing of the error message could be very instructive.
Jibri errors (“Recording Unavailable”)
There are a few things that could go wrong, but as complicated as Jibri seems, the beautiful thing is, there are just a handful of places where those things could go wrong. This makes troubleshooting relatively not as painful.
Recording fails immediately
Remember that Jibri is a meeting participant as well, right? So that means, the first problem Jibri could have could be with getting into the meeting room. In fact, one BIG clue that suggests this is the cause of your Jibri problem is that when you click the “Start recording” command, you INSTANTLY get that error message. If recording fails immediately, check the following:
- Take a careful look at your Jibri.conf file (/etc/jitsi/jibri/jibri.conf). This is your main configuration file for Jibri and the area where most mistakes happen. This file will pretty much be empty when you first install Jibri, so you have to populate it. If it’s not populated, Jibri will fail instantly.
- Use the sample/reference file to populateyour jibri.conf. Make sure you complete the xmpp section using the example from example_xmpp.
- In the xmpp section, make sure you enter the names and passwords you chose when creating the relevant accounts for Jibri in Prosody (“jibri” and “recorder”) accurately. Verify and re-verify that you actually entered the usernames and passwords correctly! To verify:
Check the registered recorder name and password
grep password /var/lib/prosody/recorder*/accounts/recorder.dat
sed -n ‘/call.login/, /}/p’ /etc/jitsi/jibri/config.json | grep password
sed -n ‘/call.login/, /}/p’ /etc/jitsi/jibri/jibri.conf | grep password
Check the registered jibri username and password
grep password /var/lib/prosody/auth*/accounts/jibri.dat
sed -n ‘/control.login/, /}/p’ /etc/jitsi/jibri/config.json | grep password
sed -n ‘/control.login/, /}/p’ /etc/jitsi/jibri/jibri.conf | grep password
- If you previously created a config.json file (previous version of Jibri), don’t just copy and paste the contents of that file into your jibri.conf; you need to extract the actual values as the field names are slightly - but significantly - different. [Note that config.json is being deprecated, so it’s best to move your configurations to jibri.conf, if you haven’t done so already. Once you do, delete the config.json file].
Jibri log folder
This is an unusual one, but it’s worth noting. I’ve only seen it happen when I uninstalled and then re-installed Jibri, but who knows? Anyway, if you’ve confirmed that everything is fine with your jibri.conf, go to “/var/log/jitsi” and confirm that you have a directory named “jibri” there. If you don’t, create one and make sure Jibri can write to it (just make jibri the owner). If this directory is missing or if it’s present but Jibri does not have permissions to access it, Jibri will fail instantly. Also. make sure that jibri is part of all the necessary groups:
usermod -aG adm,audio,video,plugdev jibri
Recording fails after a few seconds
This differs significantly from an instant error message. In this case, you get a pop-up message advising that Jibri is “preparing to record the meeting”
But then a few seconds or several seconds later, that pop-up is replaced by the error pop-up.
In this case, it often suggests that Jibri may have been able to enter the meeting, but it wasn’t configured properly, so it’s unable to start recording. In instances like this, it’s not even unusual to have a folder created in the recording directory, but the folder will only contain a metadata.json without an actual mp4 file. When this happens, check the following:
- Yes, again, jibri.conf. If you in fact populated your jibri.conf file, but have the wrong values or made a mistake, this could be the reason. What happens is that the configuration is being read (hence the pause) and when it’s discovered that the credentials are wrong, then the error message gets kicked out. Again, do all the checks listed above under Jibri.conf and correct any errors discovered.
Sip Communicator Properties (Jicofo)
- Check your Jicofo configurations for jibri to make sure you’ve entered them correctly:
sudo nano /etc/jitsi/jicofo/sip-communicator.properties
- Confirm that you’ve added the following lines:
- BE SURE TO CHANGE “my.domain.com” TO YOUR JITSI SUBDOMAIN NAME!!!
cfg.lua file (Prosody)
- Check your prosody (lua) configuration
Make sure you’ve added this block at the end of the file:
- Again, be sure to remember to edit it to reflect your Jitsi subdomain.
Recording is successful but mp4 is corrupt (cannot be opened)
This is usually due to a java version error. Jibri requires Java 8 to work properly.
- Check to make sure you’ve installed Java 8 on your system.
- If you have another (more current) version of Java installed, that’s what will be listed when you check your java version.
- To check for multiple versions of java on your system:
update-alternatives --config java
- This should list all the versions. Make sure you see the following line as one of the options:
- Now, make sure you set it as the correct java home environment variable. Open launch.sh
replace “java” with the full path “/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java”
Finally, ALWAYS restart Jibri when you make any configuration change. This is more often the cause of errors than one would believe.
Hopefully one of these tips has helped you to solve your Jibri problem. Please, feel free to add anything else you may have discovered that could prove helpful to others. I will try to add more information as I run across them.