Improve jibri recording resolution

Hi, did any one get 1920x1080 working with FFMPEG? I can get all of the changes above to work using a custom compiled FFMPEG up to 1280x720, but when I compile ffmpeg for 1920x1080 ffmpeg quits and I see an error

[x11grab @ 0x6cff780] Capture area 1920x1080 at position 0.0 outside the screen size 1280x720
:0.0+0,0: Invalid argument

I suspect I have to increase the x11grab screen size, but not sure where this would be done…

Nevermind… I see it in xorg-video-dummy.conf…

can you please share the values and setting you did to get it working?

@masteryoda - still working on it. I can compile a custom Jibri with 1920x1080 with xorg set at 1080p but streaming out to Vimeo live stream stutters and has a lot of buffering problems - this might be because I messed with the maxbitrate settings and a few other settings. I’ll try just changing the resolution and leave the other settings as is. There is a really annoying (bug?) in that the source that is in Github uses a sound driver setting in /home/jibri/.asoundrc that is different from the released binary in Jibri, so if you don’t make the change to enable the bsnoop in that file, ffmpeg craps out and doesn’t really tell you a lot - spent a lot of time figuring that out and changing the .asoundrc file to include both so the stock jibri.jar and the compiled one work without having to swap versions of that file around.
That could be the source of why your version didn’t work. If you see the capture working and the screen cropped, then the xorg setting is different from your jibri setting… Will update this when I have more info. I have to say, Jibri is very finicky - sometimes it works, other times it doesn’t and I’ve had to reboot the Jitsi-Meet instance at times to get the Jibri to work.

1 Like

thank, pretty much sums up my experience. so i resorted to the default jar…

1 Like

@masteryoda - Finally got a version compiled and working at 29fps and no stuttering at 1080p…

Basically, changed the following and recompiled Jibri:

  1. Changed to 1080p in xorg-video-dummy.conf
  2. in FfmpegCapturer.kt - changed videoEncodePreset to “ultrafast”, queueSize to “8192”, streamingMaxBitrate to “9000” and h264ConstantRateFactor to “20”
  3. In StreamingJibriService.kt, changed STREAMING_MAX_BITRATE to 9000
  4. I tested both the nginx proxy method for streaming to non-You-Tube rtmp and then compiled a specific version to direct rtmp to Vimeo instead of YouTube and both methods worked with the above settings

Note that this is running on a 4CPU, 16GB RAM GCP custom N1 instance with Ubuntu 18.04LTS, so mileage may vary with other machines/images. It is also using a static compile of FFMPEG from 20200504 version N-52628-g79e3c4dd74-static and Chrome fixed at v 75.

I’ve tested it and it’s relatively stable, but had some hiccups until I rebooted the machine. Will let you know if I run into other issues as we start testing more fully this config.

Hope this helps you and others.

3 Likes

One more thing - .asoundrc in the /home/jibri folder needs to be edited to include bsnoop - or change the code in Jibri to use cloop when calling ffmpeg. There are other posts in the forums about this issue - for some reason the code in the github repo doesn’t match the binary version. I’d link to them here but don’t have the posts at hand.

Can you share this, please? I’m getting really terrible resolution in. my Jibri recording. I’m fine with a 1280x720 resolution.

Where are these files (FfmpegCapturer.kt and StreamingJibriService.kt)?

Source code, you would have to recompile

I downloaded the source code (zip file) from github and I’m looking through - don’t see these files there. Am I doing something wrong?

Better yet, can you please direct me to where you made the changes to resolve your issue? I’m having the exact same problem - file metadata says 1280x720 but on viewing, the actual resolution is so poor, can’t be anything near that.

I’d really appreciate the help.

There are multiple factors playing here,

  • network speed/quality
  • camera quality
  • browser (chrome/firefox)/ client

lastly

  • code
    self hosted > stable | unstable | git

The changes recommended here are somewhat advance changes, so you might take your time to understand/test/feedback the instructions and comments posted by the author.

On the help part, you might wanna wait for the author to reply since he might have more details on the matter.

Actually, none of those factors are at issue here. Network speed - 300MBS upload and download. Camera - capable of 1080p. Browser - Chrome. Self-hosted, stable. The actual meeting was crystal clear, that’s why this Jibri recording is so particularly disappointing.

I was asking for how you fixed it in your case since you had the same issue.

My suggestion,
Try another browsers and see the behavior they have.

I wrote what I did, so other could follow the steps if they wanted.
Sorry if I’m not to verbose on the help part, right now I can’t.

Yeah, never mind. I noticed you’ve been quite hesitant to lend the same helping hand that was lent to you. Someone helped you but when it came to extending the same courtesy to others, you became obtuse. Enjoy! :v:

1 Like

Hello over there.
We are looking for a service sh code that installs a stable version of jibri with reasonable recording quality. If you are interested in a paid service can you please send me an email?