Skip to content
Search

Session Description Protocol

lastmod 2025-03-27created 2018-09-0731 edits

The Session Description Protocol (SDP) is a format for describing the initialization parameters of streaming media. The specification is defined in IETF RFC 4566.

SDP was written to describe multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation. SDP does not deliver the media content itself, but it provides a means for the two endpoints to negotiate media types and formats. This allows SDP to support newly added media types and formats, and to systematically support compatibility with future technologies.

SDP started as part of the Session Announcement Protocol (SAP), but its potential for combination with RTP, RTSP, SIP, and as a standalone format for describing multicast sessions was recognized.

Categories

Session description

The Session Description Protocol describes a session as a group of fields in a text-based format, one field per line.1 The form of each field is as follows.

<nowiki><character>=<value><CR><LF></nowiki>

Here is a single case-sensitive character and is structured text in a format that depends on the character. Values are typically UTF-8 encoded.2 Whitespace is not allowed immediately on either side of the equals sign.

A session description consists of three sections: Session, Timing, and Media descriptions.

Each description may contain multiple timing and media descriptions. Names are only unique within the associated syntactic construct.3

Optional values are specified with =* and each field must appear in the order shown below.

Session description

v=  (protocol version number, currently only 0)
o=  (originator and session identifier : username, id, version number, network address)
s=  (session name : mandatory with at least one UTF-8-encoded character)
i=* (session title or short information)
u=* (URI of description)
e=* (zero or more email address with optional name of contacts)
p=* (zero or more phone number with optional name of contacts)
c=* (connection information—not required if included in all media)
b=* (zero or more bandwidth information lines)
One or moreTime descriptions("t=" and "r=" lines; see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Zero or moreMedia descriptions(each one starting by an "m=" line; see below)

Note that #Time descriptions and #Media descriptions are included in the middle.

Time descriptions

A mandatory section.

     t=  (time the session is active)
     r=* (zero or more repeat times)

Media descriptions

An optional section.

     m=  (media name and transport address)
     i=* (media title or information field)
     c=* (connection information — optional if included at session level)
     b=* (zero or more bandwidth information lines)
     k=* (encryption key)
     a=* (zero or more media attribute lines — overriding the Session attribute lines)

Sample

Below is a sample session description from RFC 4566. This session is originated by the user "jdoe", at IPv4 address 10.47.16.5. Its name is "SDP Seminar" and extended session information ("A Seminar on the session description protocol") is included along with a link for additional information and an email address to contact the responsible party, Jane Doe. This session is specified to last for two hours using NTP timestamps, with a connection address (which indicates the address clients must connect to or — when a multicast address is provided, as it is here — subscribe to) specified as IPv4 224.2.17.12 with a TTL of 127. Recipients of this session description are instructed to only receive media. Two media descriptions are provided, both using RTP Audio Video Profile. The first is an audio stream on port 49170 using RTP/AVP payload type 0 (defined by RFC 3551 as PCMU), and the second is a video stream on port 51372 using RTP/AVP payload type 99 (defined as "dynamic"). Finally, an attribute is included which maps RTP/AVP payload type 99 to format h263-1998 with a 90kHz clock rate. RTCP ports for the audio and video streams of 49171 and 51373, respectively, are implied.

     v=0
     o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5
     s=SDP Seminar
     i=A Seminar on the session description protocol
     u=<nowiki>http://www.example.com/seminars/sdp.pdf</nowiki>
     [email protected] (Jane Doe)
     c=IN IP4 224.2.17.12/127
     t=2873397496 2873404696
     a=recvonly
     m=audio 49170 RTP/AVP 0
     m=video 51372 RTP/AVP 99
     a=rtpmap:99 h263-1998/90000

The SDP specification is purely a format for session description. It is intended to be distributed over different transport protocols as necessary, including SAP, SIP, and RTSP. SDP could even be transmitted by email or as an HTTP payload.

Documentation

RFC 4566 - SDP Session Description Protocol
https://tools.ietf.org/html/rfc4566

Troubleshooting

47700 waiting

Search on an issue where data is received only after waiting about 47720 seconds for an unknown reason: (still unresolved)

...
b=TIAS: 47720
...

See also

  • Conference: A set of two or more communicating parties, depending on the software used.
  • Session: Consists of multimedia senders, receivers, and the flow of data.
  • Session Announcement: A session announcement delivers a session description to users proactively. That is, the session description is not delivered in response to an explicit user request.
  • Session Advertisement: Same as session announcement
  • Session Description: A format defined to provide the information needed to discover and participate in a multimedia session

Favorite site

Guide

Korean translations

References


  1. Lines are terminated by a carriage return and a line feed character, but implementations may relax this by omitting the carriage return. ↩

  2. The session information and session name values are subject to the encoding specified in any charset attribute of the section. ↩

  3. An In-Depth Overview of SDP - WebArchive ↩

  4. Frozenmountain-roleofsignalinginweb.pdf ↩

  5. Wiki.pchero21_-_SIP_SDP.pdf ↩

author Zer0 sitemap