[TUTORIAL] Configuration of the New Jibri (1080p Livestreaming and Recording)

This tutorial is an addendum to the initial TUTORIAL - How to Install the NEW JIBRI

While the steps detailed in that tutorial still work flawlessly, there has been a few changes to Jibri configuration resulting in Jibri now recording/livestreaming in 1080p resolution by default and also providing the possibility to select audio source and device.

Here’s the new jibri.conf. Use this jibri.conf in place of the one referenced in the previous tutorial if you’re installing Jiibri for the first time or upgrading to the most current version.

jibri.conf

jibri {
// A unique identifier for this Jibri
// TODO: eventually this will be required with no default
id = “”
// Whether or not Jibri should return to idle state after handling
// (successfully or unsuccessfully) a request. A value of ‘true’
// here means that a Jibri will NOT return back to the IDLE state
// and will need to be restarted in order to be used again.
single-use-mode = false
api {
http {
external-api-port = 2222
internal-api-port = 3333
}
xmpp {
// See example_xmpp_envs.conf for an example of what is expected here
environments = [
{
name = “prod environment”
xmpp-server-hosts = [“your.domain.com”]
xmpp-domain = “your.domain.com

            control-muc {
                domain = "internal.auth.your.domain.com"
                room-name = "JibriBrewery"
                nickname = "jibri-nickname"
            }

            control-login {
                domain = "auth.your.domain.com"
                username = "jibri"
                password = "JPwd"
            }

            call-login {
                domain = "recorder.your.domain.com"
                username = "recorder"
                password = "RPwd"
            }

            strip-from-room-domain = "conference."
            usage-timeout = 0
            trust-all-xmpp-certs = true
        }]
}

}
recording {
recordings-directory = “/srv/recordings”
# TODO: make this an optional param and remove the default
finalize-script = “/path/to/finalize”
}
streaming {
// A list of regex patterns for allowed RTMP URLs. The RTMP URL used
// when starting a stream must match at least one of the patterns in
// this list.
rtmp-allow-list = [
// By default, all services are allowed
“.*”
]
}
ffmpeg {
resolution = “1920x1080”
// The audio source that will be used to capture audio on Linux
audio-source = “alsa”
// The audio device that will be used to capture audio on Linux
audio-device = “plug:bsnoop”
}
chrome {
// The flags which will be passed to chromium when launching
flags = [
“–use-fake-ui-for-media-stream”,
“–start-maximized”,
“–kiosk”,
“–enabled”,
“–disable-infobars”,
“–autoplay-policy=no-user-gesture-required”
]
}
stats {
enable-stats-d = true
}
webhook {
// A list of subscribers interested in receiving webhook events
subscribers =
}
jwt-info {
// The path to a .pem file which will be used to sign JWT tokens used in webhook
// requests. If not set, no JWT will be added to webhook requests.
# signing-key-path = “/path/to/key.pem”

// The kid to use as part of the JWT
# kid = "key-id"

// The issuer of the JWT
# issuer = "issuer"

// The audience of the JWT
# audience = "audience"

// The TTL of each generated JWT.  Can't be less than 10 minutes.
# ttl = 1 hour

}
call-status-checks {
// If all clients have their audio and video muted and if Jibri does not
// detect any data stream (audio or video) comming in, it will stop
// recording after NO_MEDIA_TIMEOUT expires.
no-media-timeout = 30 seconds

// If all clients have their audio and video muted, Jibri consideres this
// as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires.
all-muted-timeout = 10 minutes

// When detecting if a call is empty, Jibri takes into consideration for how
// long the call has been empty already. If it has been empty for more than
// DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording.
default-call-empty-timeout = 30 seconds

}
}

The new jibri.conf defaults to 1080p resolution. This can be easily changed to 720p if preferred.

ffmpeg {
    resolution = "1280x720"
    // The audio source that will be used to capture audio on Linux
    audio-source = "alsa"
    // The audio device that will be used to capture audio on Linux
    audio-device = "plug:bsnoop"
  }

Make sure the value in xorg-video-dummy.conf (/etc/jitsi/jibri/xorg-video-dummy.conf) is in sync with whatever resolution you opt for in jibri.conf to avoid any unnecessary scaling.

2 Likes

Excellent explanation, and I appreciate your help in posting to improve jitsi.
But I have a doubt when doing a live with YouTube, I get alerts about the buffer, and it ends up letting say that YouTube does not receive data and ends up cutting the transmission.
There is any improvement or help that you can give me. Greetings

Maybe check your bandwidth?

I have a dedicated 50 Mbs link

I would be tailing/viewing your ffmpeg.0.log file to see if it’s keeping up with what you are trying to send to youtube.