RTP Real-Time Transport Protocol Speaker: Hsiao-Ting Wang Advisor: Quincy Wu Date: July 2 nd 2009.
-
date post
22-Dec-2015 -
Category
Documents
-
view
220 -
download
0
Transcript of RTP Real-Time Transport Protocol Speaker: Hsiao-Ting Wang Advisor: Quincy Wu Date: July 2 nd 2009.
RTPReal-Time Transport Protocol
Speaker: Hsiao-Ting WangAdvisor: Quincy Wu
Date: July 2nd 2009
Outline
Introduction RTP session RTP header
表頭欄位 Conclusion
Introduction
UDP 缺點 封包的先後順序問題 如何知道封包有沒有遺失
RTP RTP: A Transport Protocol
for Real-Time Applications It was first published in 1996 as
RFC1889 which was made obsolete in 2003 by RFC 3550
想一想: RTP 比較適合跑在哪個通訊協定上頭?
TCP or UDP?連結層實體層
網路層 (IP)
傳輸層 (TCP/UDP)
應用層 (HTTP 、 RTP)
Introduction (Cont.)
RTCP(RTP Control Protocol) RTCP provides out-of-band
control information for an RTP flow RTCP 作用是提供 QoS (Quality of Service) 相
關的回饋 (feedback) RTCP gathers statistics on a media connection
and information such as bytes sent, packets sent, lost packets, jitter, feedback and round trip delay
RTP Session (RTP 會期 )
Consists of a number of applications communicating with RTP
Identified by a network address and two ports One port is used for media data The other for RTCP (real time transfer control
protocol) control data. 想一想:因此,打網路電話時,會佔去幾個
ports?
RTP Session (Cont.)
Session participants can send, receive, or do both.
Each media type is transmitted in a separate session, enabling participants to choose which media types they want to receive. For example, a user may just want the audio portion of a streaming music video.
想一想:那影像網路電話又會佔去幾個 ports?
RTP header
表頭大小為 12 bytes.
IP header UDP header RTP header RTP payload
表頭欄位
Version (V) 2-bit. 目前的版本為 2.
Padding (P) 1-bit. Payload 後面是否有 Padding.
Extension (X) 1-bit. 有設的話,就會多加下面的延伸表頭 .
表頭欄位 (cont.)
CSRC Count (CC) 4-bit. 0~15 在表頭裡包含 CSRC( Contributing source identifiers ) 的個
數 . Marker (M)
1-bit. 在 RFC1890 裡描述,在應用程式開始傳送封包時,第一個封包應設定這個位元 .
Payload Type (PT) 7-bit. Defined by RFC 1990.
Sequence Number 16-bit. 每次送出一個封包就加 1. 初始值為亂數值 . 讓接收者用來偵測封包遺失與封包順序正確性 .
表頭欄位 (cont.)
Timestamp 32-bit. Payload 裡的第一個 sample 產生時的時戳 . 可用來做 jitter 的計算 . 初使值由傳送端指定一亂數值 .
Synchronization Source (SSRC) 32-bit. The identifier is chosen randomly by the sender Globally unique within an RTP session.
Contributing Source (CSRC) 32-bit. 包含一個傳送端的 SSRC 值 . 此欄位只有在來源從混音器 (mixer) 來時,才會使用 .
Conclusion
RTP 作用是傳送 multimedia data
Reference
RTP, http://en.wikipedia.org/wiki/Real-time_Transport_Protocol
RTCP, http://en.wikipedia.org/wiki/Real-time_Transport_Control_Protocol