SDP (Session Description Protocol)
SDP的描述网络上一大堆中文的,可以看看RFC2327
SDP 信息是文本信息,采用 UTF-8 编 码中的 ISO 10646 字符集。SDP 会话描述如下:(标注 * 符号的表示可选字段):
v = (协议版本)
o = (所有者/创建者和会话标识符)
s = (会话名称)
i = * (会话信息)
u = * (URI 描述)
e = * (Email 地址)
p = * (电话号码)
c = * (连接信息 ― 如果包含在所有媒体中,则不需要该字段)
b = * (带宽信息)
v=0 //SDP version
// o field定义的源的一些信息。其格式为: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的信息
c=IN IP4 0.0.0.0 //connect 的信息,分别描述了:网络协议,地址的类型,连接地址。
c=IN IP4 0.0.0.0
t=0 0 //时间信息,分别表示开始的时间和结束的时间,一般在流媒体的直播的时移中见的比较多。
a=SdpplinVersion:1610641560 //描述性的信息
a=StreamCount:integer;2 //用来描述媒体流的信息,表示有两个媒体流。integer表示信息的格式为整数。
a=control:*
a=DefaultLicenseValue:integer;0 //License信息
a=FileType:string;"MPEG4" ////用来描述媒体流的信息说明当前协商的文件是mpeg4格式的文件
a=LicenseKey:string;"license.Summary.Datatypes.RealMPEG4.Enabled"
a=range:npt=0-72.080000 //用来表示媒体流的长度
m=audio 0 RTP/AVP 96 //做为媒体描述信息的重要组成部分描述了媒体信息的详细内容:表示session的audio是通过RTP来格式传送
的,其payload值为96传送的端口还没有定。
b=as:24 //audio 的bitrate
b=RR:1800
b=RS:600
a=control:streamid=1 //通过媒体流1来发送音频
a=range:npt=0-72.080000 //说明媒体流的长度。
a=length:npt=72.080000
a=rtpmap:96 MPEG4-GENERIC/32000/2 //rtpmap的信息,表示音频为AAC的其sample为32000
a=fmtp:96 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1210 //config为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"
以下是几个工作中抓的实例信息:
MPEG4 Multicast SDP
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Mon, 06 Jan 1990 00:00:01 GMT
Content-Length: 548
Content-Type: application/sdp v=0
o=- 00012800008802600200 1150370773 IN IP4 192.168.1.5
s=RTSP Server(MPEG4) - 008000581A02
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 2240 RTP/AVP 96
c=IN IP4 224.2.0.1/16
b=AS:1536
a=rtpmap:96 MP4V-ES/30000
a=control:trackID=1
a=fmtp:96 profile-level-id=1; config=000001B001000001B509000001000000012000845D4C28A021E0A31F;decode_buf=76800
a=x-framerate:30
a=framerate:30.0
m=audio 2242 RTP/AVP 97
c=IN IP4 224.2.0.1/16
b=AS:32
a=rtpmap:97 G726-32/8000/1
a=control:trackID=2
a=ptime:125
MJPEG Multicast SDP
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Mon, 06 Jan 1990 00:00:01 GMT
Content-Length: 433
Content-Type: application/sdp v=0
o=- 00012800008802600201 1150370773 IN IP4 192.168.1.5
s=RTSP Server(MJPG) - 008000581A02
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 2240 RTP/AVP 26
c=IN IP4 224.2.0.1/16
b=AS:10240
a=rtpmap:26 JPEG/90000
a=control:trackID=1
a=x-framerate:20
a=framerate:20.0
m=audio 2242 RTP/AVP 97
c=IN IP4 224.2.0.1/16
b=AS:32
a=rtpmap:97 G726-32/8000/1
a=control:trackID=2
a=ptime:125
H264 Multicast SDP
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Mon, 06 Jan 1990 00:00:01 GMT
Content-Length: 531
Content-Type: application/sdp v=0
o=- 00012800008802600202 1150370773 IN IP4 192.168.1.5
s=RTSP Server(H264) - 008000581A02
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 2240 RTP/AVP 96
c=IN IP4 224.2.0.1/16
b=AS:1536
a=rtpmap:96 H264/90000
a=control:trackID=1
a=fmtp:96 packetization-mode=1;profile-level-id=42001e;sprop-parameter-sets=Z0IAHqaAoD0Q,aM48gA==
a=x-framerate:30
a=framerate:30.0
m=audio 2242 RTP/AVP 97
c=IN IP4 224.2.0.1/16
b=AS:32
a=rtpmap:97 G726-32/8000/1
a=control:trackID=2
a=ptime:125
http://www.cnblogs.com/qingquan/archive/2011/08/02/2125585.html
http://baike.soso.com/v4548325.htm?ch=ch.bk.innerlink
SDP (Session Description Protocol)的更多相关文章
- SIP (Session Initiation Protocol) 协议
Session Initiation Protocol 介绍 SIP是VoIP技术最常使用的协议,它是一种应用程序层协议,可与其他应用程序层协议配合使用,以控制Internet上的多媒体通信会话. V ...
- SIP(Session Initiation Protocol,会话初始协议)
SIP(Session Initiation Protocol,会话初始协议)的开发目的是用来帮助提供跨越因特网的高级电话业务.因特网电话(IP电话)正在向一种正式的商业电话模式演进,SIP就是用来确 ...
- WebRTC:会话描述协议SDP
什么是SDP SDP(Session Description Protocol)是一种通用的会话描述协议,主要用来描述多媒体会话,用途包括会话声明.会话邀请.会话初始化等. WebRTC主要在连接建立 ...
- SDP协议介绍
一.SDP协议介绍 SDP 完全是一种会话描述格式 ― 它不属于传输协议 ― 它只使用不同的适当的传输协议,包括会话通知协议(SAP).会话初始协议(SIP).实时流协议(RTSP).MIME 扩展协 ...
- webrtc进阶-信令篇-之三:信令、stun、turn、ice
webRTC支持点对点通讯,但是webRTC仍然需要服务端: . 协调通讯过程中客户端之间需要交换元数据, 如一个客户端找到另一个客户端以及通知另一个客户端开始通讯. . 需要处理NAT(网 ...
- PeerConnection
Example(摘) /*When two peers decide they are going to set up a connection to each other, they both go ...
- NAT穿透解决方案介绍
最近公司要实现在各种网络环境下面的多屏互动(机顶盒.android phone.iphone及PC端)的需求:由于IP地址资源有限的原因,目前我们使用的各种终端设备都位于局域网后面也就是多台设备共享同 ...
- A Study of WebRTC Security
转自:http://webrtc-security.github.io/ A Study of WebRTC Security Abstract Web Real-Time Communication ...
- Offer_answer_with_SDP_rfc3264
Network Working Group J. RosenbergRequest for Comments: 3264 dynamicsoftObsoletes: 2543 H. Schulzrin ...
随机推荐
- phpize 编译安装memcached
下面是Memcached的安装过程: #wget http://memcached.googlecode.com/files/memcached-1.4.9.tar.gz # tar zvxf mem ...
- python 多层装饰器
25.多层装饰器: 1.原理:执行顺序从上往下,#2和#3组成一个函数假设为nf1,#1和nf1组成一个函数nnf1 f1成为ck_ty_of_us的inner函数即nf ...
- cocos2d-js 入门之碰撞
本文由qinning199原创,转载请注明:http://www.cocos2dx.net/post/223 1.cc.rectIntersectsRect(ra,rb) 判断两个矩形是否相交,若相交 ...
- Effective Go -> Interface
1.接口实现及类型转换 type Sequence []int // Methods required by sort.Interface. func (s Sequence) Len() int { ...
- 转:Linux 内核中的 cdev_alloc和cdev_add
内核中每个字符设备都对应一个 cdev 结构的变量,下面是它的定义:linux-2.6.22/include/linux/cdev.hstruct cdev {struct kobject kobj; ...
- Android使用百度地图定位
下面事例是使用Android平台的部分代码.对于这个平台百度的开放人员已经写了完整的demo,把工程导入到eclipse中之后一般没有错误,如果报错的话,eclipse也会给出提示.一般可以通过将pr ...
- ural 1494 Monobilliards
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; ],b ...
- Ruby on Rails Tutorial读书笔记-1
只是怕忘了命令,全部撸一次,记个大概.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 安装Ruby之前,先要安装RVM: curl -L https://get.rvm.io | bas ...
- vijos国庆节模拟赛之繁星春水
A.闪烁的繁星 题目:https://vijos.org/p/1881 题解:貌似做过小白逛公园或者序列操作都可以秒出吧,就是pushup函数比较麻烦,不过仔细想一想就知道了. 代码: #includ ...
- HDOJ 1302(UVa 573) The Snail(蜗牛爬井)
Problem Description A snail is at the bottom of a 6-foot well and wants to climb to the top. The sna ...