Jibri quits after pressing "Start recording"


I am installing jibri on docker on the same server where I have built Jitsi-Meet and Jigasi from sources. I have been able to start jibri and connect it succesfully with jicofo. However, as soon as I start recording, this error pops up:

2019-09-23 07:35:36.871 FINE: [63] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2019-09-23 07:35:36.874 INFO: [66] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly.  Last output line: :0.0+0,0: Input/output error

One thing that I think might cause this issue is that I have not been able to install correctly snd_aloop module. Any ideas? Thank you very much!

In the logs of ffmpeg I can see that this is the exact problem:

2019-09-23 15:26:59.371 INFO: [52] ffmpeg.call() [alsa @ 0x6b74e0] cannot open audio device plug:cloop (No such file or directory)
2019-09-23 15:26:59.371 INFO: [52] ffmpeg.call() plug:cloop: Input/output error

I tried installing Jibri on AWS and it works fine. Then, I tried installing it in docker in the same AWS and it shows this error. I mount the /dev/sda to the docker container when I run it, aplay -l shows the devices correctly. Also, /home/jibri/.asoundrc is configured same as in the host AWS…?!

I got the same error, tried to install some virtual cards/drivers but nothing worked, did you got any progress?

No, no progress, I will post the solution if I find one. Please do the same @gui-vieira.

I managed to fix it by installing the package linux-modules-extra-{linux kernel version}, to identify your kernel version, use the command: uname -r

I did this on a google cloud virtual machine, I’m not sure if this is the same case, but it worked in my case.

So, you also installed Jibri on docker, right?

No, google cloud offers virtual machines with fully operational system, I used an instance with Ubuntu 19.04 for example

Ah, okay, thank you but for my problem it did not work. However, I managed to get around to it somehow, I think it was a permissions problem. I just started every service as Jibri user and it seems to work. Still there are some issues, sometimes it records and some times it does not, so I am still looking to find a final solution for the docker image…

I got this error when I started recording class with Jibri on Docker.
Do not know you have a fix yet.

Is ffmpeg installed on the system?

I installed FFMPEG on Jibri Docker and System.
Do you have any way to fix it? I have used Jibri’s Dockerfile.

I have installed FFmpeg on the system.

Ffmpeg failed due to plug:cloop input/output error looks like

So is there any way to fix this problem?

Hi @Jitsi_developer,

I am currently trying out Jibri on docker. First, where did you get this Jibri dockerfile? Second, I had this problem also. There are several things that might cause this. First, when you run the docker container you need to mount the sound devices and the shared memory like this:
docker run -it --mount type=bind,source=/dev/shm,target=/dev/shm --device /dev/snd jibri_dockerfile
Second, you need to run Jibri as jibri user (so that HOME environment variable is set to /home/jibri). Also, you probably know that to run jibri correctly you need to run the two processes related to it, before you run jibri:
jibri-xorg and jibri-icewm (jibri-icewm needs environment variable DISPLAY set to “:0”). And last, when I run Jibri on docker with the default installation it did not work, so I built it from the sources and added these two chrome options:

  1. --no-sandbox
  2. --disable-dev-shm-usage

in file "/src/main/kotlin/org/jitsi/jibri/selenium/JibriSelenium.kt.

I have come this far, there are still some issues related to it, for example sometimes it records well and sometimes it does not. I believe what might cause this is the small 1 GB of RAM that I have on the AWS machine, but it could be other things too…

Hi @filani_jitsi.
I used the Dockerfile below to build the image.
Link DockerFile

  1. Do not know if you have successfully recorded on Docker yet. Can I share the image with me if I can?
  2. Do you need to install linux-image-extra-virtual on docker?

First to answer the questions:

  1. I have had some succesful recordings with this configuration. However it does not always work. But this problem I believe has to do with the little amount of RAM.
  2. Yes you need to install linux-image-extra-virtual on docker, howerver the following dockerfile does it automatically. However, before you do any of the below, you need to first load the module “snd-aloop” into the running kernel on the host of docker. See “ALSA and Loopback Device” section here https://github.com/jitsi/jibri

I cannot share the image, but here is a Dockerfile I created with the needed extra files:

Dockerfile.txt (2.1 KB)
config.txt (3.0 KB)
scripts.txt (213 Bytes)

First rename these files (since this website does not let you upload JSON or SH files)
Rename Dockerfile.txt to Dockerfile
Rename config.txt to config.json
Rename scripts.txt to scripts.sh

Create a folder of this hierarchy:

|--- Dockerfile
|--- config
|    |--- config.json
|    |--- scripts.sh
|--- git_rep
|    |--- jibri

where “jibri” is the git repository cloned from official github rep and modified as I told you above (adding --no-sandbox and --disable-dev-shm-usage to JibriSelenium.kt).

Also, modify config.json file according to your server data.

After you build the image don’t forget to run the docker container using the command I gave above.

P.S. I apologize since I am a beginner to Docker and probably have not used the best practices to creating a Dockerfile.

Dear @filani_jitsi

  1. Have you ever run Jitsi’s Dockerfile Jibri.
  2. Can you send me the complete command?
    Thank you!

No, I have never run the Dockerfile you mentioned. I did not know it existed actually until I finished my Dockerfile… can it be run individually though? I thought that it can only be run as part of the whole docker compose architecture?!