RTSP & RTCP & RTP

RTSP流控分离

RTSP & RTCP & RTP_第1张图片
RTSP流控分离

请注意RTP的TTransport;
而RTSP的TReal Time中的T.

简单总结:
RTSP: 控制状态.
RTP : 发送数据.
RTCP: 控制质量.

协作示意图

RTSP & RTCP & RTP_第2张图片
RTSP & RTP & RTCP 协作示意图

图中的HTTP GET实际就是DESCRIBE.
请注意RTP数据和RTCP的方向.

  • RTP: RTSP Server -> Client.
  • RTCP:
    Client -> RTSP Server 如Receiver Report
    RTSP Server->Client 如Sender Report
RTSP & RTCP & RTP_第3张图片
交互示意图

Real Time Streaming Protocol (RTSP)

The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers.
The protocol is used for establishing and controlling media sessions between end points.
Clients of media servers issue VCR-style commands, such as play, record and pause, to facilitate real-time control of the media streaming from the server to a client (Video On Demand) or from a client to the server (Voice Recording).

用于实时控制流的状态, 比如让流Play/Pause/Record.
有点像我们使用的复读机的状态控制,我们可以通过按键控制复读机进行播放或者暂停或者录制某段音频.

小霸王复读机

只不过RTSP是通过发送命令的形式来控制,所以可理解其为一个 远程遥控器.

Real-time Transport Protocol (RTP)

The Real-time Transport Protocol (RTP) is a network protocol for delivering audio and video over IP networks.
RTP typically runs over User Datagram Protocol (UDP).
RTP is used in conjunction with the RTP Control Protocol(RTCP).
While RTP carries the media streams (e.g., audio and video), RTCP is used to monitor transmission statistics and quality of service (QoS) and aids synchronization of multiple streams.

  • RTP用于在IP网络上传输音频和视频数据.
  • 一般基于UDP传输.
  • 和RTCP同时使用.

RTP Control Protocol (RTCP)

The RTP Control Protocol (RTCP) is a sister protocol of the Real-time Transport Protocol (RTP).
Its basic functionality and packet structure is defined in RFC 3550.

  • RTCP和RTP是姐妹协议.
  • RFC 3550中定义了RTCP.

RTCP provides out-of-band statistics and control information for an RTP session.
It partners with RTP in the delivery and packaging of multimedia data, but does not transport any media data itself.
The primary function of RTCP is to provide feedback on the quality of service (QoS) in media distribution by periodically sending statistics information to participants in a streaming multimedia session.

从客户端发送统计信息到Server端的多媒体Session.

RTCP transports statistics for a media connection and information such as transmitted octet and packet counts, packet loss, packet delay variation, andround-trip delay time. An application may use this information to control quality of service parameters, perhaps by limiting flow, or using a differentcodec.

References:
https://en.wikipedia.org/wiki/Real-time_Transport_Protocol
https://en.wikipedia.org/wiki/RTP_Control_Protocol
https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol
http://bnrg.cs.berkeley.edu/~randy/Courses/CS294.S02/05InternetMultimedia.ppt
百度图片

你可能感兴趣的:(RTSP & RTCP & RTP)