[RTSP][2012-06-16] RTSP DESCRIBE & SDP 部分 注释
2012-06-16 16:19
183 查看
Methods: DESCRIBE
direction: Client to Server
requirement: recommended
目的: Client 利用 DESCRIBE 這個 method, 向 Server 要求有關 requested media data (URL) 的相關資料, 另外, Client 還可配合 Accept header 來告知 Server, Client 端可以看懂哪一些格式的 description.
Example:
C -> S :
DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 312
Accept: application/sdp, application/rtsl, application/mheg
S -> C :
RTSP/1.0 200 312 OK
Date: 23 Jan 1997 15:35:06 GMT
Content-Type: application/sdp
Content-Length: 376
v=0 (协议版本)
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 (所有者/创建者和会话标识符)
s=SDP Seminar (会话名称)
i=A Seminar on the session description protocol (会话信息)
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps (URI 描述)
e=mjh@isi.edu (Mark Handley) (Email 地址)
c=IN IP4 224.2.17.12/127 (连接信息)
t=2873397496 28973404696 (会话活动时间)
a=recvonly (0 个或多个会话属性行)
m=audio 3456 RTP/AVP 0 (媒体名称和传输地址)
m=video 2232 RTP/AVP 31 (媒体名称和传输地址)
m=whiteboard 32416 UDP WB (媒体名称和传输地址)
a=orient:portrait(0 个或多个媒体属性行)
b = * (带宽信息)
z = * (时间区域调整)
k = * (加密密钥)
=========
C -> S :
DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0
CSeq: 312
Accept: application/sdp, application/rtsl, application/mheg
S -> C :
RTSP/1.0 200 OK
CSeq: 312
Date: 23 Jan 1997 15:35:06 GMT
Content-Type: application/sdp
Content-Length: 376
v=0
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
e=mjh@isi.edu (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 28973404696
a=recvonly
m=audio 3456 RTP/AVP 0
m=video 2232 RTP/AVP 31
m=whiteboard 32416 UDP WB
a=orient:portrait
ps:
sdp的格式
v=<version>
o=<username> <session id> <version> <network type> <address type> <address>
s=<session name>
i=<session description>
u=<URI>
e=<email address>
p=<phone number>
c=<network type> <address type> <connection address>
b=<modifier>:<bandwidth-value>
t=<start time> <stop time>
r=<repeat interval> <active duration> <list of offsets from start-time>
z=<adjustment time> <offset> <adjustment time> <offset> ....
k=<method>
k=<method>:<encryption key>
a=<attribute>
a=<attribute>:<value>
m=<media> <port> <transport> <fmt list>
v = (协议版本)
o = (所有者/创建者和会话标识符)
s = (会话名称)
i = * (会话信息)
u = * (URI 描述)
e = * (Email 地址)
p = * (电话号码)
c = * (连接信息)
b = * (带宽信息)
z = * (时间区域调整)
k = * (加密密钥)
a = * (0 个或多个会话属性行)
时间描述:
t = (会话活动时间)
r = * (0或多次重复次数)
媒体描述:
m = (媒体名称和传输地址)
i = * (媒体标题)
c = * (连接信息 — 如果包含在会话层则该字段可选)
b = * (带宽信息)
k = * (加密密钥)
a = * (0 个或多个媒体属性行)
带*为可选信息。
参考文章:rfc2326(rtsp);rfc2327(sdp) ;rfc3550(rtp/rtcp)
原帖地址:
http://blog.chinaunix.net/u2/77292/showart_1922940.html
direction: Client to Server
requirement: recommended
目的: Client 利用 DESCRIBE 這個 method, 向 Server 要求有關 requested media data (URL) 的相關資料, 另外, Client 還可配合 Accept header 來告知 Server, Client 端可以看懂哪一些格式的 description.
Example:
C -> S :
DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0 312
Accept: application/sdp, application/rtsl, application/mheg
S -> C :
RTSP/1.0 200 312 OK
Date: 23 Jan 1997 15:35:06 GMT
Content-Type: application/sdp
Content-Length: 376
v=0 (协议版本)
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 (所有者/创建者和会话标识符)
s=SDP Seminar (会话名称)
i=A Seminar on the session description protocol (会话信息)
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps (URI 描述)
e=mjh@isi.edu (Mark Handley) (Email 地址)
c=IN IP4 224.2.17.12/127 (连接信息)
t=2873397496 28973404696 (会话活动时间)
a=recvonly (0 个或多个会话属性行)
m=audio 3456 RTP/AVP 0 (媒体名称和传输地址)
m=video 2232 RTP/AVP 31 (媒体名称和传输地址)
m=whiteboard 32416 UDP WB (媒体名称和传输地址)
a=orient:portrait(0 个或多个媒体属性行)
b = * (带宽信息)
z = * (时间区域调整)
k = * (加密密钥)
=========
C -> S :
DESCRIBE rtsp://server.example.com/fizzle/foo RTSP/1.0
CSeq: 312
Accept: application/sdp, application/rtsl, application/mheg
S -> C :
RTSP/1.0 200 OK
CSeq: 312
Date: 23 Jan 1997 15:35:06 GMT
Content-Type: application/sdp
Content-Length: 376
v=0
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
e=mjh@isi.edu (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 28973404696
a=recvonly
m=audio 3456 RTP/AVP 0
m=video 2232 RTP/AVP 31
m=whiteboard 32416 UDP WB
a=orient:portrait
ps:
sdp的格式
v=<version>
o=<username> <session id> <version> <network type> <address type> <address>
s=<session name>
i=<session description>
u=<URI>
e=<email address>
p=<phone number>
c=<network type> <address type> <connection address>
b=<modifier>:<bandwidth-value>
t=<start time> <stop time>
r=<repeat interval> <active duration> <list of offsets from start-time>
z=<adjustment time> <offset> <adjustment time> <offset> ....
k=<method>
k=<method>:<encryption key>
a=<attribute>
a=<attribute>:<value>
m=<media> <port> <transport> <fmt list>
v = (协议版本)
o = (所有者/创建者和会话标识符)
s = (会话名称)
i = * (会话信息)
u = * (URI 描述)
e = * (Email 地址)
p = * (电话号码)
c = * (连接信息)
b = * (带宽信息)
z = * (时间区域调整)
k = * (加密密钥)
a = * (0 个或多个会话属性行)
时间描述:
t = (会话活动时间)
r = * (0或多次重复次数)
媒体描述:
m = (媒体名称和传输地址)
i = * (媒体标题)
c = * (连接信息 — 如果包含在会话层则该字段可选)
b = * (带宽信息)
k = * (加密密钥)
a = * (0 个或多个媒体属性行)
带*为可选信息。
参考文章:rfc2326(rtsp);rfc2327(sdp) ;rfc3550(rtp/rtcp)
原帖地址:
http://blog.chinaunix.net/u2/77292/showart_1922940.html
相关文章推荐
- symbian live5555 & rtsp & rtp & tcp & sdp & udp汇总
- “机器狗”病毒驱动部分逆向分析注释(C代码)
- TCP&UDP部分细节
- 输电部分&工作票 操作票
- 看代码注释_tmp &= ~(1<<14)_6410 pwm0驱动修改说明
- RTP/RTCP/RTSP/SIP/SDP 关系(直接看总结)
- 从一个文件中读取明密对照表,翻译密文(注释部分为c++primer标准答案,非注释部分自己写的)
- Does the RTSP implementation (client and/or server) support 'trick mode' operations
- C++统计代码注释行数 & 有效代码行数 & 代码注释公共行 & 函数个数
- RTSP & RTMP 抓包
- [BZOJ 1588]营业额统计 && splay部分模版
- 读书笔记:C#高级编程&amp;.net 3.0(部分一)
- java贪吃蛇源代码 带部分注释
- Thread(三) --> 优先级部分
- RTSP、HTTP、HTTPS、SDP四种协议详解
- .NET 自定义注释格式&快捷注释宏
- RTP/RTCP/RTSP/RSVP/SDP
- opencv 之 icvCreateHidHaarClassifierCascade 分类器信息初始化函数部分详细代码注释。
- Tiger 中的注释,第 2 部分: 定制注释
- 要监听服务器,要将服务器的RUN.BAT 中的监听打开。将'WELCOME'上面中的rem set JAVA.OPS=中的注释rem去掉,端口改为8787与Eclipse 中Remote JAVa application中的一致即可。