RTSP 协议分析 (一)

简介: RTSP 协议分析1.概述: RTSP(Real Time Streaming Protocol),实时流传输协议,是TCP/IP协议体系中的一个应用层协议,由哥伦比亚大学、网景和RealNetworks公司提交的IETF RFC标准。

RTSP 协议分析
1.概述:
 RTSP(Real Time Streaming Protocol),实时流传输协议,是TCP/IP协议体系中的一个应用层协议,由哥伦比亚大学、网景和RealNetworks公司提交的IETF RFC标准。该协议定义了一对多应用程序如何有效地通过IP网络传送多媒体数据。类似HTTP协议的流控制协议。它们都使用纯文本来发送信息,而且rtsp协议的语法也和HTTP类似,和HTTP协议相比RTSP协议所不同的地方是,RTSP协议是有状态的协议,而HTTP是无状态的协议。RTSP通过维护一个session来维护其状态的转换。RTSP协议的默认端口是554,默认的承载协议为TCP。

2.RTSP的特性:
(1).流控分离:从控制逻辑上来说RTSP和FTP相似,控制流和数据流是分开的。
(2).可扩展性:因为RTSP协议是基于文本的协议所以其具有较强的可扩展性。
(3).安全:RTSP 使用网页安全机制。

3.RTSP 协议格式:
请求命令的格式为:
METHOD URL CR LF
Field1:value CR LF
Field2:value CR LF
......
Fieldn:value CR LF
CR LF

应答的格式为:
RTSP/major_version.minor_version status CR LF
Field1:value CR LF
Field2:value CR LF
......
Fieldn:value CR LF
CR LF

4.RTSP的主要命令:

5.RTSP命令的状态转换表

6.RTSP状态码

Status-Code = "100" ; Continue
| "200" ; OK
| "201" ; Created
| "250" ; Low on Storage Space
| "300" ; Multiple Choices
| "301" ; Moved Permanently
| "302" ; Moved Temporarily
| "303" ; See Other
| "304" ; Not Modified
| "305" ; Use Proxy
| "400" ; Bad Request
| "401" ; Unauthorized
| "402" ; Payment Required
| "403" ; Forbidden
| "404" ; Not Found
| "405" ; Method Not Allowed
| "406" ; Not Acceptable
| "407" ; Proxy Authentication Required
| "408" ; Request Time-out
| "410" ; Gone
| "411" ; Length Required
| "412" ; Precondition Failed
| "413" ; Request Entity Too Large
| "414" ; Request-URI Too Large
| "415" ; Unsupported Media Type
| "451" ; Parameter Not Understood
| "452" ; Conference Not Found
| "453" ; Not Enough Bandwidth
| "454" ; Session Not Found
| "455" ; Method Not Valid in This State
| "456" ; Header Field Not Valid for Resource
| "457" ; Invalid Range
| "458" ; Parameter Is Read-Only
| "459" ; Aggregate operation not allowed
| "460" ; Only aggregate operation allowed
| "461" ; Unsupported transport
| "462" ; Destination unreachable
| "500" ; Internal Server Error
| "501" ; Not Implemented
| "502" ; Bad Gateway
| "503" ; Service Unavailable
| "504" ; Gateway Time-out
| "505" ; RTSP Version not supported
| "551" ; Option not supported
| extension-code
extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF

<下一篇将给出RTSP协议的实例分析>

目录
相关文章
|
18天前
|
存储 网络协议 网络安全
RTSP协议抓包及讲解(三)
RTSP协议抓包及讲解
17 1
|
18天前
|
存储 编解码 移动开发
RTSP协议抓包及讲解(一)
RTSP协议抓包及讲解
26 0
|
18天前
|
移动开发 网络协议 Windows
RTSP协议抓包及讲解(二)
RTSP协议抓包及讲解
27 1
|
3月前
|
Linux C语言
RTSP协议的实现
RTSP协议的实现
30 0
|
3月前
|
编解码 网络协议 流计算
RTSP协议介绍
RTSP协议介绍
79 0
|
4月前
|
存储 网络协议 视频直播
音视频学习之rtsp学习rtp协议的理解(rtp)
音视频学习之rtsp学习rtp协议的理解(rtp)
48 0
|
8月前
|
编解码 网络协议 计算机视觉
ffmpeg推流rtmp指定udp传输
ffmpeg推流rtmp指定udp传输
368 0
|
9月前
|
编解码 应用服务中间件 nginx
RTSP协议转换RTMP直播协议
RTSP协议转换RTMP直播协议
436 1
|
12月前
|
存储 XML 编解码
深入理解rtmp(四)之协议实现分析
接下来要实现connect,createStream,play,..,为了效率和篇幅,我们直接分析srs-librtmp的实现.srs-librtmp是从srs作者为srs服务实现的客户端库(The client library srs-librtmp of SRS),其实不止客户端,也实现了一个简单的server功能.
207 0
|
缓存 网络协议 算法