[Go] SDP protocol
http://blog.csdn.net/dxpqxb/article/details/18706471
1.SDP Protocol Overview
SDP(session Description Protocol) is an application-layer control protocol used to describe multimedia sessions for session notifications, session invitations, and other forms of Multimedia session initialization . The multimedia session description is provided, it is a text-based protocol, so it can ensure the scalability of the protocol is relatively strong, so that it has a wide range of applications; The SDP is a fully conversational description format -It is not a transport protocol-it only uses different appropriate transport protocols. Includes session Notification Protocol (SAP), Session Initiation Protocol (SIP), Live Stream Protocol (RTSP), e-mail for MIME Extension protocol, and Hypertext Transfer Protocol (HTTP). The SDP does not support negotiation of session content or media encoding, so it is used only to describe media information in streaming media. Media consultation this piece is to be implemented with RTSP.
The Session Directory is used to assist in the notification of multimedia conferencing and to transmit relevant setup information for session participants. The SDP is used to transmit this information to the receiving end. In the Internet multicast Backbone (Mbone), the Session Directory tool is used to advertise multimedia conferencing and to transfer meeting-specific tool information for participants to conference addresses and participants, which is done by the SDP. After the SDP connects to the session, it transmits enough information to the session participants. SDP information is sent using the Session Notification Protocol (SAP), which periodically multicast notification packets to known multicast addresses and ports. This information is a UDP packet that contains the SAP protocol header and text payload (textbox payload). Here the text payload refers to the SDP session description. Information can also be sent via email or WWW (World Wide Web).
SDP text information includes: Session name and intent, session duration, media that constitutes a session, information about receiving media (address, and so on).
2.SDP Protocol Architecture
The information for the SDP protocol is textual information, using the ISO 10646 character set in UTF-8 encoding.
The SDP description consists of a number of lines of text, the format of the text line is < type >=< value >,< type > is a letter,< value > is a structured text string whose format depends on the < type >. =<value>[crlf]
The SDP session is described as follows: (indicates an optional field for the callout * symbol):
One or more time descriptions (see below):
Time description
T = (session activity time) r = * (0 or more repetitions)
Media description
Iii. Examples of SDP protocols:
Message body Format:
V=0// The line indicates the version of the agreement
O=mhandley 2890844526 2890842807 in IP4 126.16.64.4//o Row contains parameters related to session owner
The first parameter indicates the name of the session initiator, which is not filled in, such as filling in and SIP messages, the contents of the From message header are identical.
L The second parameter is the session identifier of the calling party.
L The third parameter is the version of the calling party session, and the version number is incremented when the session data is changed.
The fourth parameter defines the network type, in represents an Internet network type, and is currently defined only for that network type.
The fifth parameter is the address type, currently supports IPV4 and IPV6 two types of address.
The sixth parameter is address: Indicates the IP address of the initiator of the session , which is the IP address of the signaling surface, which is assigned to the cell phone when the signaling PDP is activated.
S=SDP Seminar// indicates the title of this session, or the name of the session
I=a Seminar on the Session Description Protocol// description of Session
The URI of the u=http://www.cs.ucl.ac.uk/staff/m.handley/sdp.03.ps// session , through which you can view more content to the conversation
[Email protected] (Mark Handley)//Emial address of the session responsible person
C=in IP4 224.2.17.12/127//c Row contains information about the connection established for a multimedia session, which indicates the IP address used by the true media stream
L The first parameter is a network type and currently only defines the Internet Network type. denoted by "in".
The second parameter is an address type and currently supports two types of addresses:IPV4 and IPV6.
The third parameter is an address, which is the IP address used by the multimedia stream .
t=2873397496 2873404696// indicates the start time and end time of the session
The first parameter indicates the start time of the session, and the number indicates the number of seconds elapsed since 1900 year 1 month 1.
The second parameter indicates the end time of the session, and the number indicates the number of seconds since 1900 year 1 month 1.
M=audio 3458 RTP/AVP 0 mm//M line also known as Media line, describes the type of media supported by the sender, and other information
L The first parameter is the media name: Indicates the supported audio type.
The second parameter is the port number, indicating that the UE sends an audio stream on the local port to 3458.
The third parameter is the transport protocol, typically the RTP/AVP protocol.
L Four - seven parameter is the supported four types of payload type number
a=rtpmap:0 Pcmu the property row of the//a behavior media, expressed as the name of the property: The value of the property.
Format:a=rtpmap:< net charge type >< encoded name >
L NET charge type 0 fixed assigned to PCMU,
L Payload Type 96 The corresponding coding scheme is g.726, which is dynamically allocated.
L Payload Type 97 the corresponding encoding method is adaptive multi-rate wideband encoding (AMR-WB), which is dynamically allocated.
a=rtpmap:96 g726-32/8000
a=rtpmap:97 AMR-WB
M=video 3400 RTP/AVP 98//m Line, also known as Media line, describes the type of media supported by the sender, and other information
l First parameter is media name: Indicates the supported video type.
l The second parameter is the port number, indicating On the local port is 3400 send the video stream.
l The third parameter is a transport protocol, typically rtp/ Avp agreement. The
l four or five parameter gives two types of net load type number
format: a=rtpmap:< net charge type >< encoded name >
&NBSP;A=RTPMAP:98&NBSP;&NBSP;MPV
a=rtpmap:99 h.261
l payload Type 98 corresponding coding scheme for MPV, for dynamic allocation.
l The payload Type 97 corresponds to the encoding method for H.261, which is dynamically allocated.
A=rtpmap:98 MPV
A=rtpmap:99 h.261
The following is an SDP protocol in the RTSP protocol for a Helix streaming server:
V=0//SDP Version
o field defines some information for the source. The format is: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, respectively, describes: network protocol, the type of address, the connection address.
C=in IP4 0.0.0.0
T=0 0//time information, respectively, indicates the start time and the end time, generally in the streaming media live time to see more.
a=sdpplinversion:1610641560//Descriptive information
A=STREAMCOUNT:INTEGER;2//is used to describe the media stream, which indicates that there are two media streams. The integer represents the format of the information as an integer.
a=control:*
A=defaultlicensevalue:integer;0//license Information
a=filetype:string; " MPEG4 "////describes the media stream to indicate that the currently negotiated file is a MPEG4 formatted file
a=licensekey:string; " License. Summary.Datatypes.RealMPEG4.Enabled "
a=range:npt=0-72.080000//To indicate the length of the media stream
M=audio 0 RTP/AVP 96//As an important part of the media description information, the details of the media information are described: The audio of the session is transmitted through RTP format, and the port with the payload value of 96 is not determined.
B=as:24//audio's bitrate
b=rr:1800
b=rs:600
A=control:streamid=1//Send audio via media streaming
a=range:npt=0-72.080000//Describes the length of the media stream.
a=length:npt=72.080000
a=rtpmap:96 MPEG4-GENERIC/32000/2//rtpmap, which indicates that the audio is AAC with a sample of 32000
a=fmtp:96 profile-level-id=15;mode=aac-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1210// Config is the detailed format information for 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 a video of the basic and audio information is relatively said, here is no longer said.
M=video 0 RTP/AVP 97
b=as:150
b=rr:11250
b=rs:3750
a=control:streamid=2
a=range:npt=0-72.080000
a=length:npt=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//Length of the film
a=maxbitrate:integer;300000
a=maxpacketsize:integer;1400
a=preroll:integer;1000
a=width:integer;320//width of the film
A=opaquedata:buffer; " Azcaab8elyarabd0aast4aaek+afiaaaabdzaaabtq7gqmdpaaabaaaaasaahed6kfag8kifbgec "
a=streamname:string; " Video track "
[Go] SDP protocol