How to build jibri docker image from unstable build like 5207

Jitsi team recently released a new build 5207 which allows to stream to any server. It is not available in jitsi-docker as of now because it is unstable. So the only solution is to build your own docker image using unstable build. I have few questions regarding building the docker image using unstable build.

  1. What are the parameters that I have to set to use unstable build?
  2. Do I have a create unstable base image then unstable base-java and finally jibri image? OR
    Do I have to create docker image from unstable build for base, base-java, web and jibri?

This is not the answer of your question but related with your goal. Just use a fake ffmpeg script to stream to any server.

Option to stream to an alternative RTMP server without breaking the YouTube support

copy it as /usr/local/bin/ffmpeg and set the execute permission

1 Like

Thanks @emrah

We’ve been running jibri_8.0-61-g99288dc for a bit now, just promoted it to stable.

1 Like

@bbaldino Thanks for promoting it to stable. Any idea when it will be pushed to docker-jitsi.

@bbaldino I tried to stream to Facebook on meet.jit.si but it failed.

  1. I clicked on Start live stream
  2. Provided the Facebook key but it failed to start streaming.

If we are not using Youtube then where to change the URL?

There is a special case for Facebook. Needed stunnel or RTMPS push support

ok. I think rtmps support is present. @bbaldino Is it available on current meet.jit.si setup?

I also tried with the docker image that I build using unstable build.
STEPS:

  1. I created unstable docker image for base
  2. then for base-java.
  3. created jibri image using unstable base-java image

Jibri logs

2020-11-05 13:38:24.573 FINE: [229] org.jitsi.xmpp.mucclient.MucClient.log() Received an IQ with type set: IQ Stanza (jibri http://jitsi.org/protocol/jibri) [to=jibri@auth.meet.example.in/XSbdO13X,from=jibribrewery@internal-muc.meet.example.in/focus,id=amlicmlAYXV0aC5tZWV0Lm5leHRtZWV0LmluL1hTYmRPMTNYADd5bE5LLTQyMzI2NQBnQ7t0cHXkoM37oSXDIpb2,type=set,]
2020-11-05 13:38:24.573 INFO: [229] org.jitsi.jibri.api.xmpp.XmppApi.handleJibriIq() Received JibriIq <iq to='jibri@auth.meet.example.in/XSbdO13X' from='jibribrewery@internal-muc.meet.example.in/focus' id='amlicmlAYXV0aC5tZWV0Lm5leHRtZWV0LmluL1hTYmRPMTNYADd5bE5LLTQyMzI2NQBnQ7t0cHXkoM37oSXDIpb2' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' action='start' recording_mode='stream' room='73880775@muc.myroom.meet.example.in' streamid='rtmps://live-api-s.facebook.com:443/rtmp/' session_id='snlclykzmluevulg'/></iq> from environment [MucClient id=xmpp.meet.example.in hostname=xmpp.meet.example.in]
2020-11-05 13:38:24.574 INFO: [229] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Received start request, starting service
2020-11-05 13:38:24.574 INFO: [229] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Parsed call url info: CallUrlInfo(baseUrl=https://meet.example.in/myroom, callName=73880775, urlParams=[])
2020-11-05 13:38:24.574 INFO: [229] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Using RTMP URL rtmps://live-api-s.facebook.com:443/rtmp/ and viewing URL null
2020-11-05 13:38:24.574 INFO: [229] org.jitsi.jibri.JibriManager.startStreaming() Starting a stream with params: ServiceParams(usageTimeoutMinutes=0, appData=null) StreamingParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://meet.example.in/myroom, callName=73880775, urlParams=[])), sessionId=snlclykzmluevulg, callLoginParams=XmppCredentials(domain=recorder.meet.example.in, username=recorder, password=46ea1b0e6252479eb6cc647bed7cfc18), rtmpUrl=rtmps://live-api-s.facebook.com:443/rtmp/, viewingUrl=null)
2020-11-05 13:38:24.576 FINE: [229] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.<init>() Detected os as OS: LINUX
2020-11-05 13:38:24.578 FINE: [229] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Trying to retrieve key 'jibri.chrome.flags' from source 'config' as type kotlin.collections.List<kotlin.String>
2020-11-05 13:38:24.581 FINE: [229] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Successfully retrieved key 'jibri.chrome.flags' from source 'config' as type kotlin.collections.List<kotlin.String>
Starting ChromeDriver 78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}) on port 27360
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
2020-11-05 13:38:25.610 INFO: [229] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS
2020-11-05 13:38:25.617 FINE: [229] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:live_stream
2020-11-05 13:38:25.617 INFO: [229] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
2020-11-05 13:38:25.618 FINE: [229] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status
2020-11-05 13:38:25.618 INFO: [229] 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-11-05 13:38:25.619 FINE: [229] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@5a5072be
2020-11-05 13:38:25.619 FINE: [229] org.jitsi.xmpp.mucclient.MucClientManager.log() Replacing presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@5e6f916d
2020-11-05 13:38:25.620 INFO: [229] org.jitsi.jibri.api.xmpp.XmppApi.handleStartJibriIq() Sending 'pending' response to start IQ
2020-11-05 13:38:25.621 FINE: [238] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Trying to retrieve key 'jibri.streaming.rtmp-allow-list' from source 'config' as type kotlin.collections.List<kotlin.String>
2020-11-05 13:38:25.623 FINE: [238] org.jitsi.jibri.config.debug() ConfigSourceSupplier: Successfully retrieved key 'jibri.streaming.rtmp-allow-list' from source 'config' as type kotlin.collections.List<kotlin.String>
2020-11-05 13:38:25.623 FINE: [238] org.jitsi.jibri.config.debug() TypeConvertingSupplier: Converted value type from ConfigSourceSupplier: key: 'jibri.streaming.rtmp-allow-list', type: 'kotlin.collections.List<kotlin.String>', source: 'config'
2020-11-05 13:38:25.623 FINE: [66] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element busy-status from namespace http://jitsi.org/protocol/jibri
2020-11-05 13:38:25.624 FINE: [66] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element health-status from namespace http://jitsi.org/protocol/health
2020-11-05 13:38:27.245 FINE: [239] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://meet.example.in/myroom/73880775#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&config.requireDisplayName=false
2020-11-05 13:38:27.791 FINE: [239] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property 'isJoined' of undefined
2020-11-05 13:38:28.338 INFO: [239] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Waited 567 milliseconds for call page to load
2020-11-05 13:38:28.339 INFO: [239] org.jitsi.jibri.selenium.JibriSelenium.<init>() Starting empty call check with a timeout of PT30S
2020-11-05 13:38:28.351 INFO: [239] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running
2020-11-05 13:38:28.352 INFO: [239] org.jitsi.jibri.service.impl.StreamingJibriService.invoke() Selenium joined the call, starting capturer
2020-11-05 13:38:28.387 INFO: [239] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.launch() Starting ffmpeg with command ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720 -thread_queue_size 4096 -i :0.0+0,0 -f alsa -thread_queue_size 4096 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx264 -preset veryfast -maxrate 2976k -bufsize 5952k -pix_fmt yuv420p -r 30 -crf 25 -g 60 -tune zerolatency -f flv rtmps://live-api-s.facebook.com:443/rtmp/ ([ffmpeg, -y, -v, info, -f, x11grab, -draw_mouse, 0, -r, 30, -s, 1280x720, -thread_queue_size, 4096, -i, :0.0+0,0, -f, alsa, -thread_queue_size, 4096, -i, plug:bsnoop, -acodec, aac, -strict, -2, -ar, 44100, -b:a, 128k, -af, aresample=async=1, -c:v, libx264, -preset, veryfast, -maxrate, 2976k, -bufsize, 5952k, -pix_fmt, yuv420p, -r, 30, -crf, 25, -g, 60, -tune, zerolatency, -f, flv, rtmps://live-api-s.facebook.com:443/rtmp/])
2020-11-05 13:38:33.390 FINE: [29] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn't written in 2 seconds, publishing periodic update
2020-11-05 13:38:33.391 INFO: [242] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly.  Last output line: rtmps://live-api-s.facebook.com:443/rtmp/: Input/output error
2020-11-05 13:38:33.391 INFO: [242] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION rtmps://live-api-s.facebook.com:443/rtmp/: Input/output error
2020-11-05 13:38:33.392 INFO: [242] org.jitsi.jibri.service.impl.StreamingJibriService.onServiceStateChange() Streaming service transitioning from state Starting up to Error: QuitUnexpectedly SESSION rtmps://live-api-s.facebook.com:443/rtmp/: Input/output error
2020-11-05 13:38:33.393 INFO: [242] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Current service had an error Error: QuitUnexpectedly SESSION rtmps://live-api-s.facebook.com:443/rtmp/: Input/output error, sending error iq <iq to='jibribrewery@internal-muc.meet.example.in/focus' id='39szk-264' type='set'><jibri xmlns='http://jitsi.org/protocol/jibri' status='off' failure_reason='error' should_retry='true'/></iq>
2020-11-05 13:38:33.394 FINE: [242] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: stop:live_stream
2020-11-05 13:38:33.395 INFO: [242] org.jitsi.jibri.JibriManager.stopService() Stopping the current service
2020-11-05 13:38:33.395 INFO: [242] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopping capturer
2020-11-05 13:38:33.396 INFO: [242] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process
2020-11-05 13:38:33.397 INFO: [242] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 1
2020-11-05 13:38:33.398 INFO: [242] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopped capturer
2020-11-05 13:38:33.398 INFO: [242] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quitting selenium
2020-11-05 13:38:33.399 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving call and quitting browser
2020-11-05 13:38:33.399 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Recurring call status checks cancelled
2020-11-05 13:38:33.449 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 21 log entries for type browser
2020-11-05 13:38:33.510 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 630 log entries for type driver
2020-11-05 13:38:33.570 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 0 log entries for type client
2020-11-05 13:38:33.570 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving web call
2020-11-05 13:38:33.689 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Quitting chrome driver
2020-11-05 13:38:33.815 INFO: [242] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Chrome driver quit
2020-11-05 13:38:33.816 INFO: [242] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quit selenium
2020-11-05 13:38:33.816 INFO: [242] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY -> IDLE
2020-11-05 13:38:33.817 FINE: [242] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status
2020-11-05 13:38:33.818 INFO: [242] org.jitsi.jibri.api.xmpp.XmppApi.updatePresence() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2020-11-05 13:38:33.819 FINE: [242] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@568ab809
2020-11-05 13:38:33.819 FINE: [242] org.jitsi.xmpp.mucclient.MucClientManager.log() Replacing presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@5a5072be
2020-11-05 13:38:33.825 FINE: [66] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element busy-status from namespace http://jitsi.org/protocol/jibri
2020-11-05 13:38:33.825 FINE: [66] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element health-status from namespace http://jitsi.org/protocol/health

This is only the support to use rtmps as a protocol on the link, not the rtmps itself. You need ffmpeg compiled with openssl or stunnel

1 Like

ok. if possible ,Please share any link which I can refer too for setting up this.

There are some topics in this forum. Search for stunnel, rtmps etc

1 Like

I also tried youtube streaming URL but it didn’t work either on meet.jit.si and it’s not rtmps
@bbaldino

Please attach logs

@bbaldino Here the log from my unstable docker image

Is it possible to get the logs from meet.jit.si ? I’m not sure.

Sorry, I thought it was a different scenario. Jibri lists the ffmpeg command it uses, so you can try that manually on the command line to see if it will work. It appears that the URL you pasted is being passed through correctly.

I have one more query. If we are using URL then Isn’t it suppose to ask for secret key also in order to authenticate. If yes then it is not doing so.

I’m a newbie in streaming world. Please don’t mind.

There’s no separate UI for that right now…you’d have to pass it in the url you paste in

Can you please share How can I pass URL and key both at the same time? I think this is the issue.
Like how to separate URL and key
Like this rtmp://q.rtmp.youtube.com/live2/KEY

If the service expects rtmp://q.rtmp.youtube.com/live2/KEY, then just paste in rtmp://q.rtmp.youtube.com/live2/KEY with the correct key in place of KEY

1 Like