Recording to local file on selfhosting server with Jibri

Hello the community,

I have read on some forum that Jibri is available to record jitsi meeting to local file, but only the audio part , not the video. It is right or Jibri can also record audio and video both ?

Thanks by advance
Vincent

Jibri can record both audio and video. They may talk about recording in the participant’s local which is not related with jibri

Thanks emrah for your reply,

“Jibri can record both audio and video.” << ok thanks

"They may talk about recording in the participant’s local which is not related with jibri" << I didn’t understand your sentence ? what do you mean “by participant’s local” and “they may talk” ?

My need is to record video session (with audio) to a file on the server side where is hosting my jitsi instance.
Is it possible ?

Thanks

emrah meant that the forum post you read about “recording audio file locally” refers to the local recording feature, not Jibri:

This is probably not want you want and is for a specific use case where high definition audio is required. The caveat of this feature is that each client record its own audio locally, and you will still need to gather and mix it manually after. It is for a very specific use case (e.g. podcast producers) which is why it is not enabled in the toolbar by default.

Yes. You need to deploy Jibri to do that. Recording is done server side with audio and video.

Note that each jibri instance can only record one conference at a time, so if you need to record many concurrent meetings you will need a pool of jibri instances.

1 Like

Indeed, as @shawn explained, this is not done by Jibri. I mistakenly stated that in one of my earlier write-ups and have since learned better and wanted to correct it, but forum rules do not permit going back to edit old posts.

@damencho I’d been thinking about asking you this: would it be possible to get edit permission for a few days to correct/update some old information on the board? People don’t necessarily fish through the comments to see corrections and updates.

Thanks shawn for your reply,

I followes the tutorial TUTORIAL - How to Install the NEW JIBRI step by step, but on my ubuntu 21.04 I was unable to install the package xserver-xorg-input-void (step 5)
After doing all step I was able to start recording, but it stop after aroung 6 seconds and dmesg log are :

[1222900.080983] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/jibri-xorg.service,task=Xorg,pid=253388,uid=995
[1222900.081016] Out of memory: Killed process 253388 (Xorg) total-vm:3426484kB, anon-rss:31532kB, file-rss:3300kB, shmem-rss:2405660kB, UID:995 pgtables:5128kB oom_score_adj:0

The VPS I use is 2 core CPU Intel Core Processor (Haswell, no TSX) with 4GB or RAM.
Is the reason of the issue (hardware too low) ?

When you said “Note that each jibri instance can only record one conference at a time, so if you need to record many concurrent meetings you will need a pool of jibri instances.” : Yes it will be my needs, how can I do “a pool” of Jibri instance ?

Thanks by advance,
Vincent

This won’t work for the default resolution (1080p). You can reduce the resolution to 720p and those specs should be ok to record for longer.

HOWEVER, I wouldn’t recommend that you trust it to be stable. You need at least 4CPUs for stable, reliable recording.

You will need to create as many instances of Jibri as you need. The config for all of them is exactly the same, you would just need to make sure their nicknames are unique.

Thanks Freddy for your reply

I tried to reduce resolution to 1280x720 (720p) as explain here : Jibri recording resolution - to record a full window at 720p without cropping

I change it in /etc/jitsi/jibri/xorg-video-dummy.conf (Virtual 1280 720) and in the /etc/jitsi/jibri/jibri.conf ( ffmpeg { resolution = “1280x720” } ) .
Now the record dosen’t stop anymore but the mp4 file geenated seems to be always corrupted : When I try to display on my computer :
vlc team_2022-02-25-14-36-13.mp4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd228c71040] moov atom not found
[00007fd1f0c04fe0] avformat demux error: Could not open /tmp/team_2022-02-25-14-36-13.mp4: Unknown error 1094995529

Impossible to read the file…
When I come back to 1920x1080 record stop after few seconds (with out of memory crash of Xorg) but the few seconds are correctly recorded and I can play the mp4 file on my computer.

Any idea ?
Thanks

Now the recording doesn’t stop anymore

Did you restart Jibri and xorg after making the changes?

Yes
I did :
systemctl stop jibri-icewm.service ; systemctl start jibri.service ; systemctl restart jitsi-videobridge2 prosody jicofo jibri

In that post Jibri recording resolution - to record a full window at 720p without cropping - #9 by paltrydrought seems to be a problem with some (new) versions…

You didn’t restart xorg service:

systemctl restart xorg-service

No, not accurate. The problem you’re having is resource-related.
Btw, do you have anything else running on that server other than Jibri?

I have this error :
systemctl restart xorg-service
Failed to restart xorg-service.service: Unit xorg-service.service not found.

Same think when I use “killall Xorg”, new instance of Xorg automatically restart but still issue mp4 file corrupted

Jisti and Jibri on the same VPS

That’s a problem. 2vCPUs/4GB RAM won’t cut it for Jitsi and Jibri.

systemctl stop jibri-xorg
systemctl start jibri

Dont forget to check the java version

I will try to upgrade to 4CPU and 8GB of RAM

java -version
openjdk version “17.0.1” 2021-10-19

Better. But you’ll still need to downscale Jibri to 720p at best (and won’t be reliable to lengthy recording).

Is this the only java version you have on your system? If so, I doubt you followed the tutorial “step by step”. The tutorial advises to install Java 8.

dpkg -l | grep openjdk
ii openjdk-11-jre:amd64 11.0.13+8-0ubuntu1~21.04 amd64 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-11-jre-headless:amd64 11.0.13+8-0ubuntu1~21.04 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-17-jre-headless:amd64 17.0.1+12-1~21.04 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)

The tutorial didn’t indicate openjdk 8 or 11 ?