SDP protocol Introduction

Source: Internet
Author: User

SDP is completely a session description format-it is not a Transport Protocol-it only uses different appropriate transport protocols, including session notification protocol (SAP) and Session Initiation Protocol (SIP), real-time stream protocol (RTSP), mime
Extended protocol email and Hypertext Transfer Protocol (HTTP ). The SDP protocol is also a text-based protocol. This ensures that the Protocol is highly scalable and has a wide range of applications. SDP does not support negotiation of session content or Media Encoding, so it is only used to describe media information in streaming media. Media negotiation must be implemented using RTSP.

Ii. SDP protocol format

The SDP description consists of multiple text lines. The text line format is <type >=< value>, <type> is a letter, and <value> is a structured text string, the format depends on <type>.

<Type >=< value> [CRLF]

Common fields include:

Iii. SDP protocol example:

Below is the SDP protocol in the RTSP protocol of a helix Streaming Media Server:

V = 0 // SDP version

// Some information about the source defined by O field. Format: O = <username> <sess-ID> <sess-version> <nettype> <addrtype> <unicast-address>

O =-1271659412 1271659412 in ip4 10.56.136.37 S = <no title>

I = <no author> <no copyright> // session information

C = in ip4 0.0.0.0 // connect information, which respectively describes the network protocol, address type, and connection address.

C = in ip4 0.0.0.0

T = 0 0 // time information, indicating the start time and end time, which are usually seen in the streaming media live streaming time shifting.

A = sdpplinversion: 1610641560 // descriptive information

A = streamcount: integer; 2 // used to describe the information of a media stream, indicating that there are two media streams. Integer indicates that the information format is an integer.

A = control :*

A = defaultlicensevalue: integer; 0 // license information

A = filetype: string; "MPEG4" // the information used to describe the media stream. The file currently being negotiated is in MPEG4 format.

A = licensekey: string; "license. Summary. datatypes. realmpeg4.enabled"

A = range: Treaty = 0-72.080000 // used to indicate the length of a media stream

M = audio 0 RTP/AVP
96 // describes the details of media information as an important part of media description information: indicates that the audio of the session is transmitted in RTP format, the payload value is 96.

B = as: 24 // audio bitrate

B = RR: 1800

B = RS: 600

A = control: streamid = 1 // send audio through media stream 1

A = range: Treaty = 0-72.080000 // specifies the length of the media stream.

A = Length: Treaty = 72.080000

A = rtpmap: 96 MPEG4-GENERIC/32000/2 // rtpmap information, indicating the audio for AAC its sample is 32000

A = fmtp: 96 profile-level-id = 15; mode = AAC-HBr; sizelength = 13; indexlength = 3; indexdeltalength = 3; config = 1210 // detailed format information in which config is AAC

A = mimetype: string; "audio/MPEG4-GENERIC"

A = helix-adaptation-support: 1

A = avgbitrate: integer; 48000

A = hasoutoforderts: integer; 1

A = maxbitrate: integer; 48000

A = preroll: integer; 1000

A = opaquedata: buffer; "a4cagciaaaaegicafeavabgaaac7gaaau4afgicaahkibocagaec"

A = streamname: string; "audio track"

The following is the relative name of video information and Audio Information.

M = video 0 RTP/AVP
97

B: As: 150

B = RR: 11250

B = RS: 3750

A = control: streamid = 2

A = range: Treaty = 0-72.080000

A = Length: Treaty = 72.080000

A = rtpmap: 97 MP4V-ES/2500

A = fmtp: 97 profile-level-id = 1;

A = mimetype: string; "Video/MP4V-ES"

A = helix-adaptation-support: 1

A = avgbitrate: integer; 300000

A = hasoutoforderts: integer; 1

A = height: integer; 240 // The length of the video

A = maxbitrate: integer; 300000

A = maxpacketsize: integer; 1400

A = preroll: integer; 1000

A = width: integer; 320 // The width of the video

A = opaquedata: buffer; "azcaab8elyarabd0aast4aaek + afiaaaabdzaaabtq7gqmdpaaabaaasaahed6kfag8kifbgec"

A = streamname: string; "video track"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.