YouTube stream fails, and warnings about bitrate

Hello,

I’m trying to get Jitsi to work for me and in the process I encountered issues with streaming.

I tried streaming to YouTube but what I got was:


And a warning about bitrate:

The stream's current bitrate (958.91 Kbps) is lower than the recommended bitrate. We recommend that you use a stream bitrate of 2500 Kbps.

And then after ~90 seconds it jibri fails with:

SEVERE: [44] org.jitsi.jibri.selenium.JibriSelenium.invoke() Error while running call status checks: org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash
 from unknown error: cannot determine loading status
 from tab crashed
   (Session info: chrome=81.0.4044.113)
   (Driver info: chromedriver=81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044@{#776}),platform=Linux 4.15.0-96-generic x86_64)
  (WARNING: The server did not provide any stacktrace information)

Afterwards I can’t start streaming again unless I restart jibri:
livestream_currently_busy
Not sure what I’m supposed to do with that.

Full stack trace:

Session ID: 1d6eb535a9e963b6cc9316367ac06bb8 with stack:
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:480)
org.jitsi.jibri.selenium.pageobjects.CallPage.getNumParticipants(CallPage.kt:71)
org.jitsi.jibri.selenium.status_checks.EmptyCallStatusCheck.isCallEmpty(EmptyCallStatusCheck.kt:44)
org.jitsi.jibri.selenium.status_checks.EmptyCallStatusCheck.run(EmptyCallStatusCheck.kt:29)
org.jitsi.jibri.selenium.JibriSelenium$startRecurringCallStatusChecks$1$event$1.invoke(JibriSelenium.kt:201)
org.jitsi.jibri.selenium.JibriSelenium$startRecurringCallStatusChecks$1$event$1.invoke(JibriSelenium.kt:112)
kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
org.jitsi.jibri.selenium.JibriSelenium$startRecurringCallStatusChecks$1.invoke(JibriSelenium.kt:301)
org.jitsi.jibri.selenium.JibriSelenium$startRecurringCallStatusChecks$1.invoke(JibriSelenium.kt:112)
org.jitsi.jibri.util.extensions.SchedulerExecutorServiceExtsKt$sam$java_lang_Runnable$0.run(SchedulerExecutorServiceExts.kt)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

After some investigation I found that the host was running out of memory. I had to increase the instance size to include at least 8 GB of memory so the streaming wouldn’t crash because of that.

Jibri is quite processor-intensive, if you see your memory fill up then I’s expect you will see high processor load (leading to off-load/buffer to memory). If so, you may want to increase your processor power instead.