There have been a few topics on how to customize the UI/UIX for the Jibri living streaming of Jitsi. Namely these two topics here:
I don’t think neither give a clear how. To start, using Jitsi Low Level API and assuming you have Jibri setup right, you can start a live stream like this:
room.startRecording({
broadcastId: [some_id],
mode: JitsiRecordingConstants.mode.STREAM,
streamId: [an_rtmp_url_you_want_to_send_the_stream_to]
}).then(function (res) {
//If Successful, you get a stream id
restreamingSessionID = res._sessionID;
}).catch(function (err) {
//If it didn't work, you get an error
console.log(err)
})
That will start a stream. Now the stream will show users where there is a main video and other video will be smaller on the site.
One very weird thing is in the Jitsi Config at /usr/share/jitsi-meet/interface_config.js
, if I modify the SHOW_JITSI_WATERMARK: false
, the watermark will no longer show. It is weird because I have a custom build app with no watermark, so the Watermaterk is being placed in the video by the Jitsi code and is not a direct X11 Screen Grab by Chrome. To there is a layout being created somewhere.
Looking through some of Jibri’s code, I see that its doing an X11Grab here: jibri/Commands.kt at master · jitsi/jibri · GitHub
fun getFfmpegCommandLinux(ffmpegExecutorParams: FfmpegExecutorParams, sink: Sink): List<String> {
return listOf(
"ffmpeg", "-y", "-v", "info",
"-f", "x11grab",
"-draw_mouse", "0",
"-r", ffmpegExecutorParams.framerate.toString(),
"-s", ffmpegExecutorParams.resolution,
"-thread_queue_size", ffmpegExecutorParams.queueSize.toString(),
"-i", ":0.0+0,0",
"-f", ffmpegExecutorParams.audioSource,
"-thread_queue_size", ffmpegExecutorParams.queueSize.toString(),
"-i", ffmpegExecutorParams.audioDevice,
"-acodec", "aac", "-strict", "-2", "-ar", "44100", "-b:a", "128k",
"-af", "aresample=async=1",
"-c:v", "libx264", "-preset", ffmpegExecutorParams.videoEncodePreset,
*sink.options, "-pix_fmt", "yuv420p", "-r", ffmpegExecutorParams.framerate.toString(),
"-crf", ffmpegExecutorParams.h264ConstantRateFactor.toString(),
"-g", ffmpegExecutorParams.gopSize.toString(), "-tune", "zerolatency",
"-f", sink.format, sink.path
)
}
Where in either Jibri or Jitsi can I modify what is being grabbed and outputted to the user for live streams for a custom live streaming experience or layout?