Abstract: | This specification defines a Jingle application type for negotiating a video chat or other video session. The application type uses the Real-time Transport Protocol (RTP) for the underlying media exchange and provides a straightforward mapping to Session Description Protocol (SDP) for interworking with SIP media endpoints. Note: This specification has been retracted in favor of XEP-0167, which now consolidates both audio and video chat via RTP and therefore contains the content originally published in this specification. |
Authors: | Peter Saint-Andre, Milton Chen |
Copyright: | © 1999 - 2010 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Retracted |
Type: | Standards Track |
Version: | 0.13 |
Last Updated: | 2008-06-04 |
WARNING: This document has been retracted by the author(s). Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (if any).
1. Introduction
2. Requirements
3. Jingle Conformance
4. Application Format
5. Negotiating a Jingle Video Session
6. Mapping to Session Description Protocol
7. Error Handling
8. Determining Support
9. Informational Messages
10. Implementation Notes
10.1. Codecs
11. Security Considerations
12. IANA Considerations
13. XMPP Registrar Considerations
13.1. Protocol Namespaces
13.2. Jingle Application Formats
14. XML Schemas
14.1. Application Format
14.2. Errors
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Note: This specification has been retracted in favor of Jingle RTP Sessions [1], which now consolidates both audio and video chat via RTP and therefore contains the content originally published in this specification.
Jingle [2] can be used to initiate and negotiate a wide range of peer-to-peer sessions. One session type of interest is video chat. This document specifies a format for describing Jingle video sessions, where the media exchange occurs using the Real-time Transport Protocol (see RFC 3550 [3]).
The Jingle application format defined herein is designed to meet the following requirements:
In accordance with Section 8 of XEP-0166, this document specifies the following information related to the Jingle Video via RTP application type:
The application format negotiation process is defined in the Negotiating a Jingle Video Session section of this document.
The semantics of the <description/> element are defined in the Application Format section of this document.
A mapping of Jingle semantics to the Session Description Protocol is provided in the Mapping to Session Description Protocol section of this document.
A Jingle video session SHOULD use a lossy transport method such as Jingle Raw UDP Transport Method [5] or the "ice-udp" method specified in Jingle ICE-UDP Transport Method [6].
Content is to be sent and received as follows:
Outbound video content shall be encoded into RTP packets and each packet shall be sent individually over the transport. Each inbound packet received over the transport is an RTP packet.
A Jingle video session is described by a content type that contains one application format and one transport method. The application format consists of one or more encodings contained within a wrapper <description/> element qualified by the 'urn:xmpp:tmp:jingle:apps:video-rtp' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces). In the language of RFC 4566 each encoding is a payload-type; therefore, each <payload-type/> element specifies an encoding that can be used for the audio stream, as illustrated in the following example.
<description xmlns='urn:xmpp:tmp:jingle:apps:video-rtp'> <payload-type id='96' name='theora' clockrate='90000'> <parameter name='height' value='720'/> <parameter name='width' value='1280'/> <parameter name='delivery-method' value='inline'/> <parameter name='configuration' value='somebase16string'/> <parameter name='sampling' value='YCbCr-4:2:2'/> </payload-type> <payload-type id='28' name='nv' clockrate='90000'/> <payload-type id='25' name='CelB' clockrate='90000'/> <payload-type id='32' name='MPV' clockrate='90000'/> </description>
The <description/> element is intended to be a child of a <content/> element as specified in XEP-0166.
The <description/> element SHOULD possess a 'profile' attribute that specifies the profile of RTP in use as would be encapsulated in SDP (e.g., "RTP/AVP" or "UDP/TLS/RTP/SAVP"). If not included, the default value of "RTP/AVP" MUST be assumed.
The encodings SHOULD be provided in order of preference by placing the most-preferred <payload-type/> element as the first child of the <description/> element (etc.).
The allowable attributes of the <payload-type/> element are as follows:
Attribute | Description | Datatype/Units | Inclusion |
---|---|---|---|
channels | The number of channels (e.g., 2 for stereoscopic video) | positiveInteger (defaults to 1) | OPTIONAL |
clockrate | The sampling frequency in Hertz | positiveInteger | RECOMMENDED |
id | A unique identifier for the payload type | positiveInteger | REQUIRED |
name | A name for the payload type | string | RECOMMENDED for static payload types, REQUIRED for dynamic payload types |
In Jingle Video, the encodings are used in the context of RTP. The most common encodings for the Audio/Video Profile (AVP) of RTP are listed in RFC 3551 [7] (these "static" types are reserved from payload ID 0 through payload ID 95), although other encodings are allowed (these "dynamic" types use payload IDs 96 to 127) in accordance with the dynamic assignment rules described in Section 3 of RFC 3551. The payload IDs are represented in the 'id' attribute.
Each <payload-type/> element MAY contain one or more child elements that specify particular parameters related to the payload. For example, as described in RTP Payload Format for Theora Encoded Video [8], the "configuration", "configuration-uri", "delivery-method", "height", "sampling", and "width" parameters may be specified in relation to usage of the Theora [9] codec. Where such parameters are encoded via the "fmtp" SDP attribute, they shall be represented in Jingle via the following format:
<parameter name='foo' value='bar'/>
Note: The parameter names are effectively guaranteed to be unique, since the Internet Assigned Numbers Authority (IANA) [10] maintains a registry of SDP parameters (see <http://www.iana.org/assignments/sdp-parameters>).
When the initiator sends a session-initiate stanza to the responder, the <description/> element includes all of the payload types that the initiator can send and/or receive for Jingle video, each one encapsulated in a separate <payload-type/> element (the rules specified in RFC 3264 [11] SHOULD be followed regarding inclusion of payload types).
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jinglevideo1' type='set'> <jingle xmlns='urn:xmpp:tmp:jingle'> action='session-initiate' initiator='romeo@montague.net/orchard' sid='v1d30k1ll3dth3r4d10st4r'> <content content='initiator' name='this-is-the-video-content'> <description xmlns='urn:xmpp:tmp:jingle:apps:video-rtp' profile='RTP/AVP'> <payload-type id='96' name='theora' clockrate='90000'> <parameter name='height' value='720'/> <parameter name='width' value='1280'/> <parameter name='delivery-method' value='inline'/> <parameter name='configuration' value='somebase16string'/> <parameter name='sampling' value='YCbCr-4:2:2'/> </payload-type> <payload-type id='28' name='nv' clockrate='90000'/> <payload-type id='25' name='CelB' clockrate='90000'/> <payload-type id='32' name='MPV' clockrate='90000'/> </description> <transport xmlns='urn:xmpp:tmp:jingle:transports:ice-tcp'/> </content> </jingle> </iq>
Upon receiving the session-initiate stanza, the responder determines whether it can proceed with the negotiation. The general Jingle error cases are specified in XEP-0166 and illustrated Jingle RTP Sessions [12]. In addition, the responder must determine if it supports any of the payload types advertised by the initiator; if it supports none of the offered payload types, it must reject the session by returning a <not-acceptable/> error with a Jingle-Video-specific condition of <unsupported-codecs/>:
<iq from='juliet@capulet.com/balcony' id='jingleaudio1' to='romeo@montague.net/orchard' type='error'> <error type='cancel'> <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <unsupported-codecs xmlns='urn:xmpp:tmp:jingle:apps:video:errors'/> </error> </iq>
If there is no error, the responder acknowledges the session initiation request:
<iq from='juliet@capulet.com/balcony' id='jinglevideo1' to='romeo@montague.net/orchard' type='result' />
If the responder wishes to accept the content definition, it MUST send a content-accept action to the initiator, which SHOULD include a list of the payload types that it can send and/or receive. The list that the responder sends MAY include any payload types (not a subset of the payload types sent by the initiator) but SHOULD retain the ID numbers specified by the initiator. The order of the <payload-type/> elements indicates the responder's preferences, with the most-preferred types first.
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' id='jinglevideo2' type='set'> <jingle xmlns='urn:xmpp:tmp:jingle'> action='content-accept' initiator='romeo@montague.net/orchard' sid='v1d30k1ll3dth3r4d10st4r'> <content content='initiator' name='this-is-the-video-content'> <description xmlns='urn:xmpp:tmp:jingle:apps:video-rtp' profile='RTP/AVP'> <payload-type id='96' name='theora' clockrate='90000'> <parameter name='height' value='720'/> <parameter name='width' value='1280'/> <parameter name='delivery-method' value='inline'/> <parameter name='configuration' value='somebase16string'/> <parameter name='sampling' value='YCbCr-4:2:2'/> </payload-type> <payload-type id='32' name='MPV' clockrate='90000'/> <payload-type id='33' name='MP2T' clockrate='90000'/> </description> <transport xmlns='urn:xmpp:tmp:jingle:transports:ice-tcp'/> </content> </jingle> </iq>
The initiator acknowledges the 'content-accept' with an empty IQ result:
<iq from='romeo@montegue.net/orchard' to='juliet@capulet.com/balcony' id='jinglevideo2' type='result'/>
After successful transport negotiation (for the ICE-UDP method, see XEP-0176), the responder then accepts the session:
<iq from='juliet@capulet.com/balcony' id='accept1' to='romeo@montague.net/orchard' type='set'> <jingle xmlns='urn:xmpp:tmp:jingle' action='session-accept' initiator='romeo@montague.net/orchard' responder='juliet@capulet.com/balcony' sid='v1d30k1ll3dth3r4d10st4r'> <content content='initiator' name='this-is-the-video-content'> <description xmlns='urn:xmpp:tmp:jingle:apps:video-rtp' profile='RTP/AVP'> <payload-type id='96' name='theora' clockrate='90000'> <parameter name='height' value='720'/> <parameter name='width' value='1280'/> <parameter name='delivery-method' value='inline'/> <parameter name='configuration' value='somebase16string'/> <parameter name='sampling' value='YCbCr-4:2:2'/> </payload-type> <payload-type id='32' name='MPV' clockrate='90000'/> <payload-type id='33' name='MP2T' clockrate='90000'/> </description> <transport xmlns='urn:xmpp:tmp:jingle:transports:ice-tcp'> <candidate component='1' foundation='1' generation='0' ip='192.0.2.3' network='1' port='45664' priority='1694498815' protocol='udp' pwd='asd88fgpdd777uzjYhagZg' rel-addr='10.0.1.1' rel-port='8998' rem-addr='192.0.2.1' rem-port='3478' type='srflx' ufrag='8hhy'/> </transport> </content> </jingle> </iq>
And the initiator acknowledges session acceptance:
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='accept1' type='result' />
Note: For more examples, see XEP-0167.
The SDP media type for Jingle Video via RTP is "video" (see Section 8.2.1 of RFC 4566).
If the payload type is static (payload-type IDs 0 through 95 inclusive), it MUST be mapped to a media field defined in RFC 4566. The generic format for the media field is as follows:
m=<media> <port> <transport> <fmt list>
In the context of Jingle video sessions, the <media> is "video", the <port> is the preferred port for such communications (which may be determined dynamically), the <transport> is whatever profile is negotiated via the 'profile' attribute of the <content/> element in the Jingle negotiation (e.g., "RTP/AVT"), and the <fmt list> is the payload-type ID.
For example, consider the following static payload-type:
<payload-type id="28" name="nv"/>
That Jingle-formatted information would be mapped to SDP as follows:
m=video 9000 RTP/AVP 28
If the payload type is dynamic (payload-type IDs 96 through 127 inclusive), it SHOULD be mapped to an SDP media field plus an SDP attribute field named "rtpmap".
For example, consider a VC-1 payload such as that described in RFC 4425 [13]:
<payload-type id='98' name='vc1'/>
That Jingle-formatted information would be mapped to SDP as follows:
m=video 49170 RTP/AVP 98 a=rtpmap:98 vc1/90000
As noted, if additional parameters are to be specified, they shall be represented as attributes of the <payload-type/> element or its child <parameter/> element, as in the following example.
<payload-type id='96' name='theora' clockrate='90000'> <parameter name='height' value='720'/> <parameter name='width' value='1280'/> <parameter name='delivery-method' value='inline'/> <parameter name='configuration' value='somebase16string'/> <parameter name='sampling' value='YCbCr-4:2:2'/> </payload-type>
That Jingle-formatted information would be mapped to SDP as follows:
m=video 49170 RTP/AVP 98 a=rtpmap:96 theora/90000 a=fmtp:96 sampling=YCbCr-4:2:2; width=1280; height=720; delivery-method=inline; configuration=somebase16string;
The Jingle-Video-specific error conditions are as follows:
Jingle Video Condition | XMPP Condition | Description |
---|---|---|
<unsupported-codecs/> | <not-acceptable/> | The recipient does not support any of the offered video encodings. |
If an entity supports Jingle video exchanges via RTP, it MUST advertise that fact by returning a feature of "urn:xmpp:tmp:jingle:apps:video" in response to Service Discovery [14] information requests (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
<iq from='romeo@montague.net/orchard' id='disco1' to='juliet@capulet.com/balcony' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq from='juliet@capulet.com/balcony' id='disco1' to='romeo@montague.net/orchard' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='urn:xmpp:tmp:jingle'/> <feature var='urn:xmpp:tmp:jingle:apps:video-rtp'/> ... </query> </iq>
Naturally, support may also be discovered via the dynamic, presence-based profile of service discovery defined in Entity Capabilities [15].
Informational messages may be sent by either party within the context of Jingle to communicate the status of a Jingle video session, device, or principal. The informational message MUST be an IQ-set containing a <jingle/> element of type "session-info". No informational message payload elements have yet been defined for Jingle Video via RTP, but they may be specified in a future version of this document.
Support for the Theora codec is RECOMMENDED.
In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method and media being exchanged; for example, in the case of UDP, that would include Datagram Transport Layer Security (DTLS) as specified in RFC 4347 [16]. RTP Over DTLS [17] defines such methods for the Session Description Protocol; the relevant RTP profile (e.g., "UDP/TLS/RTP/SAVP" for transporting the RTP stream over DTLS with UDP) shall be specified as the value of the <content/> element's 'profile' attribute.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [18].
Until this specification advances to a status of Draft, its associated namespaces shall be:
Upon advancement of this specification, the XMPP Registrar [19] shall issue permanent namespaces in accordance with the process defined in Section 4 of XMPP Registrar Function [20].
The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:
The XMPP Registrar shall include "video-rtp" in its registry of Jingle application formats. The registry submission is as follows:
<application> <name>video-rtp</name> <desc>Jingle sessions that support video exchange via the Real-time Transport Protocol</desc> <transport>lossy</transport> <doc>XEP-0180</doc> </application>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:tmp:jingle:apps:video-rtp' xmlns='urn:xmpp:tmp:jingle:apps:video-rtp' elementFormDefault='qualified'> <xs:element name='description'> <xs:complexType> <xs:sequence> <xs:element ref='payload-type' minOccurs='0' maxOccurs='unbounded'/> </xs:sequence> <xs:attribute name='profile' use='required' type='xs:string' default='RTP/AVP'/> </xs:complexType> </xs:element> <xs:element name='payload-type'> <xs:complexType> <xs:sequence minOccurs='0' maxOccurs='unbounded'> <xs:element ref='parameter'/> </xs:sequence> <xs:attribute name='channels' type='xs:integer' use='optional' default='1'/> <xs:attribute name='clockrate' type='xs:short' use='optional'/> <xs:attribute name='id' type='xs:unsignedByte' use='required'/> <xs:attribute name='name' type='xs:string' use='optional'/> </xs:complexType> </xs:element> <xs:element name='parameter'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='name' type='xs:string' use='required'/> <xs:attribute name='value' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:tmp:jingle:apps:video:errors' xmlns='urn:xmpp:tmp:jingle:apps:video:errors' elementFormDefault='qualified'> <xs:element name='unsupported-codecs' type='empty'/> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
Series: XEP
Number: 0180
Publisher: XMPP Standards Foundation
Status:
Retracted
Type:
Standards Track
Version: 0.13
Last Updated: 2008-06-04
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: XEP-0167
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
RSS
This document in other formats:
XML
PDF
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
Email:
Milton.Chen@vseelab.com
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0167: Jingle RTP Sessions <http://xmpp.org/extensions/xep-0167.html>.
2. XEP-0166: Jingle <http://xmpp.org/extensions/xep-0166.html>.
3. RFC 3550: RTP: A Transport Protocol for Real-Time Applications <http://tools.ietf.org/html/rfc3550>.
4. RFC 4566: SDP: Session Description Protocol <http://tools.ietf.org/html/rfc4566>.
5. XEP-0177: Jingle Raw UDP Transport Method <http://xmpp.org/extensions/xep-0177.html>.
6. XEP-0176: Jingle ICE-UDP Transport Method <http://xmpp.org/extensions/xep-0176.html>.
7. RFC 3551: RTP Profile for Audio and Video Conferences with Minimal Control <http://tools.ietf.org/html/rfc3551>.
8. RTP Payload Format for Theora Encoded Video <http://tools.ietf.org/html/draft-barbato-avt-rtp-theora>. Work in progress.
9. See <http://www.theora.org/>.
10. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
11. RFC 3264: An Offer/Answer Model with the Session Description Protocol (SDP) <http://tools.ietf.org/html/rfc3264>.
12. XEP-0167: Jingle RTP Sessions <http://xmpp.org/extensions/xep-0167.html>.
13. RFC 4425: RTP Payload Format for Video Codec 1 (VC-1) <http://tools.ietf.org/html/rfc4425>.
14. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
15. XEP-0115: Entity Capabilities <http://xmpp.org/extensions/xep-0115.html>.
16. RFC 4347: Datagram Transport Layer Security <http://tools.ietf.org/html/rfc4347>.
17. Real-Time Transport Protocol (RTP) over Datagram Transport Layer Security (DTLS) <http://tools.ietf.org/html/draft-fischl-mmusic-sdp-dtls>. Work in progress.
18. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
19. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
20. XEP-0053: XMPP Registrar Function <http://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Retracted in favor of XEP-0167, which now consolidates both audio and video chat via RTP and therefore contains the content originally published in this specification.
(psa)Specified default value for profile attribute; clarified relationship to SDP offer-answer model; moved some attributes from payload-type element to optional parameter elements.
(psa)Moved profile attribute from XEP-0166 to this specification.
(psa)Further editorial review.
(psa)Editorial review and consistency check.
(psa)Corrected examples to use video codecs; added clockrate attribute.
(psa)More completely specified how to include SDP parameters and codec-specific parameters (same approach as in XEP-0167); added and corrected Theora examples.
(psa)Specified Jingle conformance, including the need to use a lossy transport and the process of sending and receiving video content.
(psa)Added negotiation flow and SDP mapping; renamed to mention RTP as the associated transport; corrected negotiation flow to be consistent with SIP/SDP (each party specifies a list of the payload types it can receive); added profile attribute to content element in order to specify RTP profile in use.
(psa)Modified spec to use provisional namespace before advancement to Draft (per XEP-0053).
(psa)Modified namespace to track XEP-0166.
(psa)Updated to use content type instead of media type.
(psa)Initial version.
(psa/mc)First draft.
(psa/mc)END