Jitsi Youtube 1080p

is this correct?

i have put the jar file in /etc/jitsi/jibri where i have installed jibri.

jibri

Rename it to replace original file named jibri.jar.

there is no such existing file called jibri.jar in the jibri installation directory in the server.

/etc/jitsi/jibri

please see screenshot above.

where do i find jibri.rar in the server where jibri is installed?

Jibri is installed in /opt, /etc is for the config.

there are two jar files. which one should i replace?

what should i edit there?

you should use the with-dependencies one.

Make it 1080p resolution. comment 720 and uncomment 1080.

which line?

Have you looked at the file at all? Please take a look and try to understand before asking questions. I’m not the one who should do your job, I’m trying to it is help you. So help me to be able to help you. There is already such commented line in the file, also there are ton of documents over Internet how to change resolution for X server.

2 Likes

thanks it worked. i just wanted it to be sure before making any changes without knowing it properly.

all steps finished jar replaced machine rebooted and receiving streamer busy and nothing happens

I cloned the repo and replace the jibri.jar in appropriate folder, also setup xorg config for 1080p,

I restarted jibri service after replacing jibri.jar, but after replacing the jar, steaming functionality stop working.

I tried with master branch as well as with tag v8.0, but no luck in both case.

I tried modifying the resolution & built the jar.

i copied it over & tried recording, it errors out

2020-05-09 18:24:22.951 INFO: [34] org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq() Received JibriIq <iq to='jibri@auth.meet.mydomain.com/82b09d08-30de-479f-bf0c-64bea5b3c195' from='jibribrewery2@internal.auth.meet.mydomain.com/focus' id='amlicmlAYXV0aC5tZWV0LnByYWtyaXRoaS5jb20vODJiMDlkMDgtMzBkZS00NzlmLWJmMGMtNjRiZWE1YjNjMTk1AHlDR2M2LTM1Nzc3AKA1ZiJdAG7to6V2wGwEhaQ=' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' action='start' recording_mode='file' room='test@conference.meet.mydomain.com' session_id='essdfezknrmpiwjs' app_data='{"file_recording_metadata":{"share":true}}'/></iq> from environment [MucClient id=meet.mydomain.com hostname=meet.mydomain.com]
2020-05-09 18:24:22.952 INFO: [34] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Received start request
2020-05-09 18:24:22.955 INFO: [34] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Sending 'pending' response to start IQ
2020-05-09 18:24:22.955 INFO: [36] org.jitsi.jibri.api.xmpp.XmppApi.run() Starting service
2020-05-09 18:24:23.001 INFO: [36] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Parsed call url info: CallUrlInfo(baseUrl=https://meet.mydomain.com, callName=test, urlParams=[])
2020-05-09 18:24:23.002 INFO: [36] org.jitsi.jibri.JibriManager.startFileRecording() Starting a file recording with params: FileRecordingRequestParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://meet.mydomain.com, callName=test, urlParams=[])), sessionId=essdfezknrmpiwjs, callLoginParams=XmppCredentials(domain=recorder.meet.mydomain.com, username=recorder, password=recorderuser2020)) finalize script path: /media/recordings/finalize_recording.sh and recordings directory: /media/recordings
2020-05-09 18:24:23.909 INFO: [36] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS
2020-05-09 18:24:23.936 INFO: [36] org.jitsi.jibri.selenium.JibriSelenium.<init>() Starting empty call check with a timeout of PT30S
2020-05-09 18:24:23.952 FINE: [36] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.<init>() Detected os as OS: LINUX
2020-05-09 18:24:23.959 INFO: [36] org.jitsi.jibri.service.impl.FileRecordingJibriService.<init>() Writing recording to /media/recordings/essdfezknrmpiwjs
2020-05-09 18:24:23.963 FINE: [36] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:recording
2020-05-09 18:24:23.964 INFO: [36] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
2020-05-09 18:24:23.964 INFO: [36] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2020-05-09 18:24:25.047 FINE: [45] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://meet.mydomain.com/test#config.iAmRecorder=true&config.externalConnectUrl=null&config.startWithAudioMuted=true&config.startWithVideoMuted=true&interfaceConfig.APP_NAME="Jibri"&config.analytics.disabled=true&config.p2p.enabled=false&config.prejoinPageEnabled=false
2020-05-09 18:24:25.766 FINE: [45] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property 'isJoined' of undefined
2020-05-09 18:24:26.277 FINE: [45] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property 'isJoined' of undefined
2020-05-09 18:24:26.795 INFO: [45] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Waited 1062 milliseconds for call page to load
2020-05-09 18:24:26.811 INFO: [45] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running
2020-05-09 18:24:26.812 INFO: [45] org.jitsi.jibri.service.impl.FileRecordingJibriService.invoke() Selenium joined the call, starting the capturer
2020-05-09 18:24:26.859 INFO: [45] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.launch() Starting ffmpeg with command ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1920x1080 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -c:v libx264 -preset medium -profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 18 -g 60 -tune zerolatency -f mp4 /media/recordings/essdfezknrmpiwjs/test_2020-05-09-18-24-23.mp4 ([ffmpeg, -y, -v, info, -f, x11grab, -draw_mouse, 0, -r, 30, -s, 1920x1080, -thread_queue_size, 4096, -i, :0.0+0,0, -f, alsa, -thread_queue_size, 4096, -i, plug:bsnoop, -acodec, aac, -strict, -2, -ar, 44100, -c:v, libx264, -preset, medium, -profile:v, main, -level, 3.1, -pix_fmt, yuv420p, -r, 30, -crf, 18, -g, 60, -tune, zerolatency, -f, mp4, /media/recordings/essdfezknrmpiwjs/test_2020-05-09-18-24-23.mp4])
2020-05-09 18:24:31.868 FINE: [46] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2020-05-09 18:24:31.869 INFO: [49] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly.  Last output line: :0.0+0,0: Invalid argument
2020-05-09 18:24:31.870 INFO: [49] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION :0.0+0,0: Invalid argument
2020-05-09 18:24:31.871 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.onServiceStateChange() File recording service transitioning from state Starting up to Error: QuitUnexpectedly SESSION :0.0+0,0: Invalid argument
2020-05-09 18:24:31.872 INFO: [49] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service had an error Error: QuitUnexpectedly SESSION :0.0+0,0: Invalid argument, sending error iq <iq to='jibribrewery2@internal.auth.meet.mydomain.com/focus' id='bWAZo-22' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>
2020-05-09 18:24:31.872 FINE: [49] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: stop:recording
2020-05-09 18:24:31.872 INFO: [49] org.jitsi.jibri.JibriManager.stopService() Stopping the current service
2020-05-09 18:24:31.873 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Stopping capturer
2020-05-09 18:24:31.873 INFO: [49] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process
2020-05-09 18:24:31.875 INFO: [49] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 1
2020-05-09 18:24:31.876 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Quitting selenium
2020-05-09 18:24:31.902 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Participants in this recording: []
2020-05-09 18:24:31.966 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving call and quitting browser
2020-05-09 18:24:31.967 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Recurring call status checks cancelled
2020-05-09 18:24:31.982 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 17 log entries for type browser
2020-05-09 18:24:32.054 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 597 log entries for type driver
2020-05-09 18:24:32.211 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 0 log entries for type client
2020-05-09 18:24:32.212 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving web call
2020-05-09 18:24:32.353 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Quitting chrome driver
2020-05-09 18:24:32.425 INFO: [49] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Chrome driver quit
2020-05-09 18:24:32.425 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Finalizing the recording
2020-05-09 18:24:32.429 INFO: [49] org.jitsi.jibri.service.impl.FileRecordingJibriService.finalize() Recording finalize script finished with exit value 0
2020-05-09 18:24:32.430 INFO: [49] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY -> IDLE

all i did was change these lines and compiled

val resolution: String = “1920x1080”,
val framerate: Int = 30,
val videoEncodePreset: String = “medium”,
val queueSize: Int = 4096,
val streamingMaxBitrate: Int = 6000,
val streamingBufSize: Int = streamingMaxBitrate * 2,
// The range of the CRF scale is 0–51, where 0 is lossless,
// 23 is the default, and 51 is worst quality possible. A lower value
// generally leads to higher quality, and a subjectively sane range is
// 17–28. Consider 17 or 18 to be visually lossless or nearly so;
// it should look the same or nearly the same as the input but it
// isn’t technically lossless.
// https://trac.ffmpeg.org/wiki/Encode/H.264#crf
val h264ConstantRateFactor: Int = 18,
val gopSize: Int = framerate * 2

I also modified the xorg file to support 1080

If i replace the original jar back, it works

I changed the value back to 1280x720p compiled it & it started working again.

Hi,

At the beginning I used the standard jibri settings and started recording a conference. Everything works fine. The resolution of the stored videos are 720p. I was able to start and stop recording several times. Afterwards I tested the settings with live streaming to YouTube. It worked, but the aspect ratio was not correct. Only have of the YouTube screen was used. See screen below

I adopted the FfmpegCapture.kt file (resolution: 1920x1080, streamingMAxBitrate: 1000, h264ConstantRateFactor=18), compiled the java code.

Jibri stored the file with 1080p. But when I stop the recording I receive the following messages:

2020-06-08 14:44:03.471 INFO: [48] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Stopping capturer

2020-06-08 14:44:03.471 INFO: [48] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process

2020-06-08 14:44:03.472 INFO: [48] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 255

2020-06-08 14:44:03.472 INFO: [48] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Quitting selenium

2020-06-08 14:44:03.479 INFO: [48] org.jitsi.jibri.service.impl.FileRecordingJibriService.stop() Participants in this recording: […]

And after this message nothing happens any more. The jibri instance is still busy and I am not able to start a new recording (I only have one jibri instance).

After restarting the jibri server I am able to record again. If I start streaming to YouTube it seems to work. But after several minutes YouTube does not receive any date. Jibri still prints the following message every 15 seconds:

2020-06-08 13:53:18.932 INFO: [46] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {download=1670, upload=22, audio={download=77, upload=22}, video={download=1593, upload=0}}

At the ffmpeg log I receive the following messages:

2020-06-08 13:45:57.246 INFO: [50] ffmpeg.call() frame= 8942 fps= 30 q=21.0 size= 31984kB time=00:04:58.07 bitrate= 879.0kbits/s
2020-06-08 13:45:57.755 INFO: [50] ffmpeg.call() frame= 8958 fps= 30 q=23.0 size= 32104kB time=00:04:58.60 bitrate= 880.7kbits/s
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [flv @ 0x1f06a40] Failed to update header with correct duration.
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [flv @ 0x1f06a40] Failed to update header with correct filesize.
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() frame= 8966 fps= 30 q=23.0 Lsize= 32156kB time=00:04:58.88 bitrate= 881.3kbits/s
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() video:26787kB audio:4954kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.309076%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] frame I:152 Avg QP:12.04 size: 34786
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] frame P:8814 Avg QP:16.17 size: 2512
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] mb I I16…4: 53.2% 21.9% 24.9%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] mb P I16…4: 0.9% 0.4% 0.0% P16…4: 8.3% 2.7% 1.1% 0.0% 0.0% skip:86.6%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] 8x8 transform intra:24.3% inter:32.4%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] coded y,uvDC,uvAC intra: 36.3% 33.3% 13.9% inter: 2.9% 2.9% 0.1%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] i16 v,h,dc,p: 51% 33% 12% 4%
2020-06-08 13:45:57.756 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 34% 23% 3% 3% 3% 3% 3% 4%
2020-06-08 13:45:57.771 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 29% 13% 5% 6% 5% 6% 5% 6%
2020-06-08 13:45:57.773 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] i8c dc,h,v,p: 70% 15% 13% 3%
2020-06-08 13:45:57.773 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] Weighted P-Frames: Y:0.0% UV:0.0%
2020-06-08 13:45:57.773 INFO: [50] ffmpeg.call() [libx264 @ 0x1f077e0] kb/s:734.21
2020-06-08 13:45:57.773 INFO: [50] ffmpeg.call() Exiting normally, received signal 2.

Does anyone have an idea?
My problems are:

  1. jibri seams not to stop the recording successfully
  2. Streaming to YouTube does stop after several minutes
  3. only the have screen will be used with 720p on YouTube.

Thanks

I think 1000 bitrate for youtube 1080p is too low.
Try start at 3000, see this https://support.google.com/youtube/answer/2853702?hl=en

Looks like ffmpeg didn’t like something about the arguments. The jibri logs include the exact command we run for ffmpeg: I’d copy and paste it and play with that manually until you get it working the way you want/need, then you’ll know how to tweak the Jibri code.

Thanks bbaldino, that’s a great idea. I’ll give it a try.

Do you know some settings to start?
at the moment the following command will be used:

ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1920x1080 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i hw:0,1,0 -acodec aac -strict -2 -ar 44100 -c:v libx264 -preset veryfast -maxrate 6000k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f flv rtmp://a.rtmp.youtube.com/live2/…

I will post my tested settings after I finished testing.

It seams, that in the function leaveCallAndQuitBrowser in file JibriSelenium.kt is a problem.
After stopping streaming or recording this functions blocks.

If I remove the lines following lines, jibri seams to work. Jibri changes the state and sends the message to jitsi.

chromeDriver.manage().logs().availableLogTypes.forEach { logType ->

        val logEntries = chromeDriver.manage().logs().get(logType)
        logger.info("Got ${logEntries.all.size} log entries for type $logType")

        browserOutputLogger.info("========= TYPE=$logType ===========")

        logEntries.all.forEach {
            browserOutputLogger.info(it.toString())
        }
    }

I have no clue what the problem is. The browser log file contains no useful information.