jitsi / jibri

Jitsi BRoadcasting Infrastructure
Apache License 2.0
600 stars 314 forks source link

Control Jibri via API #492

Open nelson777 opened 1 year ago

nelson777 commented 1 year ago

We have a corporative Jitsi server and a 20 instances Jibri server running ok and in production for around 2 years now. It has served us well. But from time to time some jibri instance locks and we need to restart the server. This was all installed and maintained by a coleague of mine. Now I was entitled to create some sort of monitoring and auto-restart tool in order to increase server resilence. So I'm in the process of installing and configuring a local jitsi/jibri installation in order to study how to use it's API to check Jibri's instance help. In this process I searched for Jibri's API documentation as part of the studies and found only these 2 pages:

https://github.com/jitsi/jibri/blob/master/doc/http_api.md https://github.com/jitsi/jibri/blob/master/doc/xmpp_api.md

Which have some broken links inside. I found this very strange. A 3 command only API ? Chech health, start and stop service ? with broken links ? is this the real documentation or there is any more complete version ? I expected to find some way of listing jibri instances, start a recording in one to see if it's working, stop and restart a specific instance. Things like that.

This got me worried... is it me that doesn't know much of jitsi infrastructure or I didn't find the right documentation ? is what I'm trying to do even possible ? Sorry but I see I have plenty of work ahead and I thought in asking first, than discovering that what I'm trying to do isn't possible after I spent many days trying,

If anyone can point me in the right direction, like full documentation, complete description of communications between jitsi components and jibri, anything that can help, it would be great. Thanks.

damencho commented 1 year ago

Something about architecture: https://jitsi.github.io/handbook/docs/architecture To list jibris you can do that by querying jicofo curl http://localhost:8888/debug The 3 commands are all that is needed. You can use start to push a recording to a meeting. You can restart the jibri service and about the VM instance its in your control not in jibri.

The xmpp API is how jicofo is controlling jibri.

damencho commented 1 year ago

Please, when you have questions or problems use the community forum before opening new issues, thank you.

bbaldino commented 1 year ago

Just to add on to what @damencho said, the XMPP API is the primary way of controlling Jibri, the HTTP API was always just more experimental (I only added it at all to make local testing a bit easier so I didn't have to spin up an XMPP server); it's never been an 'officially supported' way of controlling Jibri, though I do think some people are using it in production.

nelson777 commented 1 year ago

@damencho sorry, I'm new to Jitsi and really missed the community forum. I will post there from now on. Will studi Jicofo and XMPP API. Thanks.

damencho commented 1 year ago

But from time to time some jibri instance locks and we need to restart the server.

What does that mean? How are you identifying this?

nelson777 commented 1 year ago

I asked my coleague to answer you but he prefered not to because it was a past situation and he doesn't have the logs anymore or remembers exactly how he did it at the time. Anyway thanks for caring.