目录
RTSP 协议学习笔记.............................................................................................................................................................1
第一部分:RTSP 协议...................................................................................................................................................3
一、 RTSP 协议概述...........................................................................................................................................3
二、 RTSP 协议与 HTTP 协议区别...................................................................................................................3
三、 RTSP 重要术语...........................................................................................................................................4
1. 集合控制(Aggregate control ):.........................................................................................................................4
2. 实体(Entity):..................................................................................................................................................4
3. 容器文件(Container file): ......................................................................................................................4
4. RTSP 会话(RTSP session ):...........................................................................................................................4
四、 RTSP 请求消息...........................................................................................................................................4
1. 消息格式:.......................................................................................................................................................4
五、 RTSP 回应消息...........................................................................................................................................5
1. 消息格式:.......................................................................................................................................................5
六、 RTSP 重要方法...........................................................................................................................................5
1. OPTIONS:.........................................................................................................................................................5
2. DESCRIBE:...................................................................................................................................................6
3. SETUP:..........................................................................................................................................................7
4. PLAY:.............................................................................................................................................................7
5. PAUSE:..........................................................................................................................................................8
6. TEARDOWN:................................................................................................................................................9
七、 RTSP 重要头字段参数...............................................................................................................................9
1. Accept:...............................................................................................................................................................9
2. Bandwidth:........................................................................................................................................................9
3. CSeq:..............................................................................................................................................................9
4. Rang:..............................................................................................................................................................9
5. Session:...........................................................................................................................................................10
6. Transport:........................................................................................................................................................10
八、 简单的 RTSP 消息交互过程....................................................................................................................10
1. 第一步:查询服务器端可用方法................................................................................................................10
2. 第二步:得到媒体描述信息........................................................................................................................10
3. 第三步:建立 RTSP 会话.............................................................................................................................10
4. 第四步:请求开始传送数据........................................................................................................................10
5. 第五步: 数据传送播放中...........................................................................................................................11
6. 第六步:关闭会话,退出.............................................................................................................................11
第二部分:SDP 协议....................................................................................................................................................11
一、 SDP 协议概述...........................................................................................................................................11
二、 SDP 格式...................................................................................................................................................11
三、 SDP 示例...................................................................................................................................................12
第三部分:MMS 协议.................................................................................................................................................13
一、 MMS 协议概述.........................................................................................................................................13