Jitsi Streaming Setup
I have spent the last week getting Jitsi setup for streaming to RTMP endpoints. While the directions in the Jibri docs are fairly straight forward, I found it very difficult to troubleshoot when things went wrong.
Jitsi has multiple moving parts, and the streaming/recording section is no different. It is done through a separate app, Jibri, which launches a Chrome instance, controlled through Selenium, captures the output and streams/records it with FFmpeg.
If there are issues with the recorder authenticating against the Prosody XMPP server while Jibri is connecting to the call, it will timeout and the error
SEVERE: [117] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Timed out waiting for call page
and the prosody log will show an incoming connection, but no corresponding authentication success.
This issue is fixed by running the following on the Jitsi server:
prosodyctl register recorder recorder.domain.org $password
The other issue I encountered is that Jibri will start streaming and stop with
timeout: no media received
if there are any NAT issues trying to negotiate the WebRTC connection. I found no other errors in the logs, only that it timed out after 30s. The 30s is defined in the Jibri code. I even saw the live stream correctly determine the number of people in the call and show their avatars, but it failed to show video, even when it was enabled. I fixed this by moving the Jibri service to run on the same server as Jitsi, with no NAT between it and the Internet.
One final note is that Jibri, Chrome and FFmpeg require a fair amount of memory and CPU. So small VPS setups with 1 vCPU and under 4GB of memory will fail to work, again with nothing in the logs. top
is your friend in diagnosing this issue.