forked from jitsi/jibri
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jibri-spec.xml
172 lines (172 loc) · 6.56 KB
/
jibri-spec.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Jitsi Broadcasting Infrastructure Subprotocol for MUC</title>
<abstract>
This specification documents the Jitsi Broadcasting Infrastructure (Jibri)
Multi-User Chat subprotocol for controlling the broadcasting and recording
infrastructure.
</abstract>
&LEGALNOTICE;
<number>jibri</number>
<status>ProtoXEP</status>
<type>Informational</type>
<sig>Private</sig>
<approver/>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>XEP-0045</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>jibri</shortname>
&sam;
<revision>
<version>0.0.1</version>
<date>2016-09-20</date>
<initials>ssw</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>
The Jitsi Broadcasting Infrastructure (Jibri) is used by Jitsi to record and
broadcast A/V streams from conferences. Each Jibri instance creates an XMPP
client-to-server connection as defined in &rfc6120;, joins a pre-configured
&xep0045; room, and then accepts commands from a Jitsi Conference Focus
(Jicofo) using a custom subprotocol documented herein.
</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>
The following requirements should be met by a future version of this
protocol:
</p>
<ul>
<li>
Ability to discover and select multiple recording methods supported by a
Jibri.
</li>
<li>
Jibris should support servicing multiple clusters, deployments, or
servers.
</li>
</ul>
</section1>
<section1 topic='Glossary' anchor='glossary'>
<dl>
<dt>Conference Focus</dt>
<dd>
The moderator, admin, or other controling agent in the conference that
determines who has the ability to speak
</dd>
</dl>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic='Setting Jibri Status' anchor='usecases-status'>
<p>
When a Jibri joins a MUC, or any other time its status changes (eg. it
becomes available for recording or is selected and becomes in use and
unavailable for recording), it needs to signal its availability to begin
recording or its current status. To do so all presences sent by a Jibri
MUST contain a jibri-status payload qualified by the
http://jitsi.org/protocol/jibri namespace with a status attribute
set to the current status of the Jibri.
</p>
<p>
The status attribute MUST be one of:
</p>
<ul>
<li>idle (the Jibri is available to begin recording or streaming)</li>
<li>busy (the Jibri is in use and another Jibri should be selected)</li>
</ul>
<example caption="Jibri advertises that it is available for use"><![CDATA[
<presence xmlns='jabber:client'
xml:lang='en'
to='[email protected]/jicofo'
from='[email protected]/jibri-09919948929524391'>
<jibri-status status='idle' xmlns='http://jitsi.org/protocol/jibri'/>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='[email protected]/1cd7a5ea-2b60-4301-901e-010b3f4c2da2' affiliation='owner' role='moderator'/>
</x>
</presence>
]]></example>
</section2>
<section2 topic='Start Recording' anchor='usecases-start-recording'>
<p>
When a user wishes to begin recording using a Jibri they send an IQ to the
conference focus (or another admin from which Jibri will accept commands)
containing a jibri payload qualified by the
http://jitsi.org/protocol/jibri namespace and containing an action to
perform (start, stop) and (if the action is 'start') a YouTube stream ID.
</p>
<example caption="User instructs the focus to select a Jibri"><![CDATA[
<iq to='[email protected]/focus'
type='set'
xmlns='jabber:client'
id='c5c8a24e-4054-4e73-ac05-fe8c92ba1d77'>
<jibri xmlns='http://jitsi.org/protocol/jibri'
action='start'
streamid='1111-1111-1111-1111'/>
</iq>
]]></example>
<p>
If the user is allowed to begin recording, the focus selects a Jibri and
sends a similar IQ to the selected Jibri. This IQ should also contain the
YouTube stream ID as an attribute, but should also have a room attribute
indicating what room the Jibri should join to begin recording. The focus
SHOULD only send the start IQ to an available Jibri (one that is advertising
its status as "idle"). If the Jibri is not available (eg. because it is
shared between deployments and was just selected for use by another focus
but has not sent a presence update yet, or because it cannot join the given
MUC room or no room was specified) it SHOULD return a stanza error with
condition service-unavailable and error code 503 as defined in
<cite>RFC6120</cite>. If the Jibri can begin recording it should immediately
broadcast a presence to the MUC indicating that it is now busy.
</p>
<example caption="Focus instructs a Jibri to start recording"><![CDATA[
<iq from='[email protected]/focus'
to='[email protected]/jibri1'
room='[email protected]'
type='set'
xmlns='jabber:client'
id='c5c8a24e-4054-4e73-ac05-fe8c92ba1d77'>
<jibri xmlns='http://jitsi.org/protocol/jibri'
action='start'
streamid='1111-1111-1111-1111'/>
</iq>
]]></example>
<example caption="Jibri replies with an error"><![CDATA[
<iq type="error"
to="[email protected]/059ccbcf-857a-439d-8090-e0d52b1f7a20"
from="[email protected]/focus"
id="8c2eb3d7-af05-4c38-98fe-e820e7706624:sendIQ"
xmlns="jabber:client">
<iq>
]]></example>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>
The YouTube stream ID that is sometimes sent to a Jibri and the conference
focus can be used to record arbitrary video streams to the account of the
user that generated the stream ID. It should only ever be sent over TLS and
should be handled with care on the Focus and Jibri.
</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>This document requires no interaction with the ®ISTRAR;.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<p>TODO</p>
</section1>
</xep>