SDP protocol analysis

Source: Internet
Author: User
I. Introduction to SDP protocol

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 extension 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 component of the 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.