Streaming custom layout to Youtube/Facebook

Hey! I found the issue. The api call request params were incorrect. I’m still not sure why i did not get any error logs on server even after getting 500. But after fixing the request body it returns 200!

Thanks a lot @bbaldino for your time :slight_smile:

I just ran with the body you pasted earlier and got a 500, but I also saw an exception in the jibri logs, so not sure why you didn’t see that.

Strangely the streaming does not start on YouTube even after getting a 200 response from the api.
Log:

2021-05-05 18:06:08.552 FINE: [128] org.jitsi.jibri.api.http. HttpApi .invokeSuspend() Got health request

2021-05-05 18:06:08.552 FINE: [128] org.jitsi.jibri.api.http. HttpApi .invokeSuspend() Returning health JibriHealth(status=JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), environmentContext=null)

2021-05-05 18:06:17.066 FImyserver.comNE: [97] org.jitsi.jibri.api.http. HttpApi .invokeSuspend() Got a start service request with params StartServiceParams(sessionId=streamTest, callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=AlivePaymentsPhoneSoftly, urlParams=)), callLoginParams=XmppCredentials(domain=recorder.jitsi.myserver.com, username=recorder, password=HW8gv#5Hv7), sinkType=STREAM, youTubeStreamKey=2fz0-c73g-eaz5-gvqb-7qvh, sipClientParams=null)

Can you please share your /etc/jitsi/jibri/logging.properties file?

Ok, so it looks like the issue was that the json was ill-formatted (due to the comments) and the json parsing happens at a lower layer (inside jackson) so it wasn’t even making it to the route handler in http api. The exception log makes that pretty clear, though, so not sure why that wasn’t showing up for you.

1 Like

Besides the handler config, I just have:

.level = WARNING
org.jitsi.jibri.level = FINE

Adding to this here is the complete log after calling the startService api which returned 200. I see ffmpeg permission errors:

2021-05-05 18:00:49.035 FINE: [128] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Got a start service request with params StartServiceParams(sessionId=streamTest, callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=daily_standup, urlParams=)), callLoginParams=null, sinkType=STREAM, youTubeStreamKey=null, sipClientParams=null)

2021-05-05 18:01:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:01:22.054 FINE: [45] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Got a start service request with params StartServiceParams(sessionId=streamTest, callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=daily_standup, urlParams=)), callLoginParams=null, sinkType=STREAM, youTubeStreamKey=2fz0-c73g-eaz5-gvqb-7qvh, sipClientParams=null)

2021-05-05 18:02:01.540 FINE: [97] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Got a start service request with params StartServiceParams(sessionId=streamTest, callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=daily_standup, urlParams=)), callLoginParams=XmppCredentials(domain=recorder.jitsi.myserver.com, username=recorder, password=HW8gv#5Hv7), sinkType=STREAM, youTubeStreamKey=2fz0-c73g-eaz5-gvqb-7qvh, sipClientParams=null)

2021-05-05 18:02:01.541 INFO: [97] org.jitsi.jibri.JibriManager.startStreaming() Starting a stream with params: ServiceParams(usageTimeoutMinutes=0, appData=null) StreamingParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=daily_standup, urlParams=)), sessionId=streamTest, callLoginParams=XmppCredentials(domain=recorder.jitsi.myserver.com, username=recorder, password=HW8gv#5Hv7), rtmpUrl=2fz0-c73g-eaz5-gvqb-7qvh, viewingUrl=null)

2021-05-05 18:02:01.566 FINE: [97] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.() Detected os as OS: LINUX

2021-05-05 18:02:03.671 INFO: [97] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS

2021-05-05 18:02:03.690 FINE: [97] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:live_stream

2021-05-05 18:02:03.691 INFO: [97] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE → BUSY

2021-05-05 18:02:03.692 FINE: [97] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:02:03.693 INFO: [97] 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

2021-05-05 18:02:05.328 FINE: [171] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://jitsi.myserver.com/daily_standup#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

2021-05-05 18:02:05.779 FINE: [171] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property ‘isJoined’ of undefined

2021-05-05 18:02:06.288 FINE: [171] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property ‘isJoined’ of undefined

2021-05-05 18:02:06.800 INFO: [171] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Waited 1050 milliseconds for call page to load

2021-05-05 18:02:06.800 INFO: [171] org.jitsi.jibri.selenium.JibriSelenium.() Starting empty call check with a timeout of PT30S

2021-05-05 18:02:06.816 INFO: [171] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running

2021-05-05 18:02:06.817 INFO: [171] org.jitsi.jibri.service.impl.StreamingJibriService.invoke() Selenium joined the call, starting capturer

2021-05-05 18:02:06.840 INFO: [171] 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 2fz0-c73g-eaz5-gvqb-7qvh ([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, 2fz0-c73g-eaz5-gvqb-7qvh])

2021-05-05 18:02:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:02:11.848 FINE: [17] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn’t written in 2 seconds, publishing periodic update

2021-05-05 18:02:11.849 INFO: [174] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly. Last output line: 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:02:11.850 INFO: [174] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:02:11.851 INFO: [174] org.jitsi.jibri.service.impl.StreamingJibriService.onServiceStateChange() Streaming service transitioning from state Starting up to Error: QuitUnexpectedly SESSION 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:02:11.852 FINE: [174] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: stop:live_stream

2021-05-05 18:02:11.852 INFO: [174] org.jitsi.jibri.JibriManager.stopService() Stopping the current service

2021-05-05 18:02:11.852 INFO: [174] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopping capturer

2021-05-05 18:02:11.853 INFO: [174] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process

2021-05-05 18:02:11.855 INFO: [174] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 1

2021-05-05 18:02:11.855 INFO: [174] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopped capturer

2021-05-05 18:02:11.856 INFO: [174] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quitting selenium

2021-05-05 18:02:11.856 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving call and quitting browser

2021-05-05 18:02:11.856 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Recurring call status checks cancelled

2021-05-05 18:02:11.871 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 24 log entries for type browser

2021-05-05 18:02:11.916 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 540 log entries for type driver

2021-05-05 18:02:12.015 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 0 log entries for type client

2021-05-05 18:02:12.015 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving web call

2021-05-05 18:02:12.089 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Quitting chrome driver

2021-05-05 18:02:12.160 INFO: [174] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Chrome driver quit

2021-05-05 18:02:12.160 INFO: [174] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quit selenium

2021-05-05 18:02:12.161 INFO: [174] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY → IDLE

2021-05-05 18:02:12.161 FINE: [174] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:02:12.162 INFO: [174] 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

2021-05-05 18:03:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:04:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:05:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:06:08.552 FINE: [128] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Got health request

2021-05-05 18:06:08.552 FINE: [128] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Returning health JibriHealth(status=JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), environmentContext=null)

2021-05-05 18:06:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:06:17.066 FINE: [97] org.jitsi.jibri.api.http.HttpApi.invokeSuspend() Got a start service request with params StartServiceParams(sessionId=streamTest, callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=AlivePaymentsPhoneSoftly, urlParams=)), callLoginParams=XmppCredentials(domain=recorder.jitsi.myserver.com, username=recorder, password=HW8gv#5Hv7), sinkType=STREAM, youTubeStreamKey=2fz0-c73g-eaz5-gvqb-7qvh, sipClientParams=null)

2021-05-05 18:06:17.066 INFO: [97] org.jitsi.jibri.JibriManager.startStreaming() Starting a stream with params: ServiceParams(usageTimeoutMinutes=0, appData=null) StreamingParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://jitsi.myserver.com, callName=AlivePaymentsPhoneSoftly, urlParams=)), sessionId=streamTest, callLoginParams=XmppCredentials(domain=recorder.jitsi.myserver.com, username=recorder, password=HW8gv#5Hv7), rtmpUrl=2fz0-c73g-eaz5-gvqb-7qvh, viewingUrl=null)

2021-05-05 18:06:17.066 FINE: [97] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.() Detected os as OS: LINUX

2021-05-05 18:06:17.359 INFO: [97] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS

2021-05-05 18:06:17.363 FINE: [97] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:live_stream

2021-05-05 18:06:17.364 INFO: [97] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE → BUSY

2021-05-05 18:06:17.364 FINE: [97] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:06:17.364 INFO: [97] 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

2021-05-05 18:06:18.757 FINE: [193] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Visiting url https://jitsi.myserver.com/AlivePaymentsPhoneSoftly#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

2021-05-05 18:06:19.193 FINE: [193] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property ‘isJoined’ of undefined

2021-05-05 18:06:19.700 FINE: [193] org.jitsi.jibri.selenium.pageobjects.CallPage.apply() Not joined yet: Cannot read property ‘isJoined’ of undefined

2021-05-05 18:06:20.215 INFO: [193] org.jitsi.jibri.selenium.pageobjects.CallPage.visit() Waited 1036 milliseconds for call page to load

2021-05-05 18:06:20.215 INFO: [193] org.jitsi.jibri.selenium.JibriSelenium.() Starting empty call check with a timeout of PT30S

2021-05-05 18:06:20.224 INFO: [193] org.jitsi.jibri.selenium.JibriSelenium.onSeleniumStateChange() Transitioning from state Starting up to Running

2021-05-05 18:06:20.224 INFO: [193] org.jitsi.jibri.service.impl.StreamingJibriService.invoke() Selenium joined the call, starting capturer

2021-05-05 18:06:20.242 INFO: [193] 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 2fz0-c73g-eaz5-gvqb-7qvh ([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, 2fz0-c73g-eaz5-gvqb-7qvh])

2021-05-05 18:06:25.244 FINE: [17] org.jitsi.jibri.util.ProcessStatePublisher.ffmpeg.invoke() Process ffmpeg hasn’t written in 2 seconds, publishing periodic update

2021-05-05 18:06:25.244 INFO: [198] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly. Last output line: 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:06:25.244 INFO: [198] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegStateMachineStateChange() Ffmpeg capturer transitioning from state Starting up to Error: QuitUnexpectedly SESSION 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:06:25.245 INFO: [198] org.jitsi.jibri.service.impl.StreamingJibriService.onServiceStateChange() Streaming service transitioning from state Starting up to Error: QuitUnexpectedly SESSION 2fz0-c73g-eaz5-gvqb-7qvh: Permission denied

2021-05-05 18:06:25.245 FINE: [198] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: stop:live_stream

2021-05-05 18:06:25.245 INFO: [198] org.jitsi.jibri.JibriManager.stopService() Stopping the current service

2021-05-05 18:06:25.245 INFO: [198] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopping capturer

2021-05-05 18:06:25.245 INFO: [198] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() Stopping ffmpeg process

2021-05-05 18:06:25.246 INFO: [198] org.jitsi.jibri.util.JibriSubprocess.ffmpeg.stop() ffmpeg exited with value 1

2021-05-05 18:06:25.246 INFO: [198] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Stopped capturer

2021-05-05 18:06:25.246 INFO: [198] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quitting selenium

2021-05-05 18:06:25.247 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving call and quitting browser

2021-05-05 18:06:25.247 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Recurring call status checks cancelled

2021-05-05 18:06:25.265 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 25 log entries for type browser

2021-05-05 18:06:25.308 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 749 log entries for type driver

2021-05-05 18:06:25.439 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Got 0 log entries for type client

2021-05-05 18:06:25.439 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Leaving web call

2021-05-05 18:06:25.551 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Quitting chrome driver

2021-05-05 18:06:25.628 INFO: [198] org.jitsi.jibri.selenium.JibriSelenium.leaveCallAndQuitBrowser() Chrome driver quit

2021-05-05 18:06:25.628 INFO: [198] org.jitsi.jibri.service.impl.StreamingJibriService.stop() Quit selenium

2021-05-05 18:06:25.628 INFO: [198] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY → IDLE

2021-05-05 18:06:25.629 FINE: [198] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:06:25.629 INFO: [198] 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

2021-05-05 18:07:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:08:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:09:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:10:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of status

2021-05-05 18:11:10.878 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.invokeSuspend() Updating 0 subscribers of statusmyserver.com

I just verified starting the live stream from the jitsi meet UI normally and that works perfectly fine. The api however has the above error log.