打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
RTSP 协议分析 (一)

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协议的实例分析>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
rtsp和sdp协议简介
RTSP协议
RTSP消息详解
RTSP
一个摄像机怎么添加到两台网络硬盘录像机?
RTSP协议解析
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服