Jibri?Can I record multiple conference content with it at a time?

Hello! Jitsi fans!
I’m going to make a A/V conference system using jitsi and I need to record A/V for each conference room. But I’ve found, it seems like only can record a conference at a time(using jibri). So how can I record contents for all rooms at a time? Is it impossible?
Looking forward to your kind reply.

You just, need multiple jibri instances.

Thanks for you reply.
So it means that I need to add multi physical servers?

You can always use virtualization, this is how all meet.jit.si is currently deployed.

Do you have any ready-made Dockerfile or any other utility script that I can use for automatic launching & killing jibri instances (instance pool management)?

1 Like

Not yet, but there is a PR for it: https://github.com/jitsi/docker-jitsi-meet/pull/54

I’ll research it. Thanks.

Hai @LuckyLin , any updates on these?

I am deploying multiple Jibri instances on docker using https://github.com/jitsi/docker-jitsi-meet and already follow the official guide properly but still faced an issue when recording in the second instance, for the first instance is working fine. I deployed docker Jibri in google cloud with a compute engine ubuntu server 16.04.
I will explain to you what I have done besides what is in the official guide. I updated jibri.yml to make it standalone. I just removed depends_on Jicofo and networks meet.jitsi. Here is my jibri.yml :

version: '3'

        image: jitsi/jibri
        restart: ${RESTART_POLICY}
            - ${CONFIG}/jibri:/config
            - /dev/shm:/dev/shm
            - SYS_ADMIN
            - NET_BIND_SERVICE
            - /dev/snd:/dev/snd
            - XMPP_AUTH_DOMAIN
            - XMPP_SERVER
            - XMPP_DOMAIN
            - JIBRI_XMPP_USER
            - JIBRI_BREWERY_MUC
            - JIBRI_LOGS_DIR
            - DISPLAY=:0
            - TZ

I run the first instance using this command :

docker-compose -f jibri.yml up -d

After the first instance goes up, I change /home/jibri/.asoundrc to setup the second instance :

slave.pcm "hw:Loopback_1,0,0"
slave.pcm "hw:Loopback_1,0,1"
slave.pcm "hw:Loopback_1,1,1"
slave.pcm "hw:Loopback_1,1,0"

And then run the second instance using this command :

docker-compose -f jibri.yml up -d --scale jibri=2

Like I stated before, the first instance is working fine. The video has shown in ~/.jitsi-meet-cfg/jibri/recordings . but as for the second instance got this error on log.0.txt.1 :

2020-04-27 06:11:18.607 INFO: [59] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly. Last output line: plug:cloop: Input/output error
2020-04-27 06:11:18.609 INFO: [59] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: SESSION Ffmpeg failed to start
2020-04-27 06:11:18.611 INFO: [59] org.jitsi.jibri.service.impl.FileRecordingJibriService.onServiceStateChange() File recording service transitioning from state Starting up to Error: SESSION Ffmpeg failed to start
2020-04-27 06:11:18.612 INFO: [59] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service had an error, sending error iq

and here is ffmpeg.0.txt.1 error log :

2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() Input #0, x11grab, from ‘:0.0+0,0’:
2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() Duration: N/A, start: 1587960673.724562, bitrate: N/A
2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() [alsa @ 0x55f311051e80] cannot open audio device plug:cloop (Device or resource busy)
2020-04-27 06:11:13.769 INFO: [59] ffmpeg.call() plug:cloop: Input/output error

I suspect the Jibri instance doesn’t read .asoundrc file. So all instances still use the same loopback therefore the second instance got the error. I have updated with the wrong one and renamed it to .bsoundrc to make an error. But the first instance is working fine.
Any suggestions to fix this issue?
Thanks in advance.

Hi, is there a way to get from parameters the assign virtual display number on jibiri for ffmpeg ?
I think if I get up multiples virtual Xorgs displays with different numbers and icewm-session on each maybe is there a way to run multiple jibiri on single host without docker.

I notice its hardcoded in

FILE : master/src/main/kotlin/org/jitsi/jibri/capture/ffmpeg/Commands.kt
FUNCTION: getFfmpegCommandLinux
LINE “-i”, “:0.0+0,0”,

Do you think it’s possible?

Hi, I was thinking about what I said, and I notice than chromedriver needs to get the virtual display number too.
On the other hand, I was thinking that the ffmpeg could record the window instead of the screen and thus open several instances of chorme in the same virtual display.
I’m deploying a medium scale jitsi infrasctrusture with record support thats the reason what’s makes me think possible solutions.