Download presentation
Presentation is loading. Please wait.
1
RTP Real-Time Transport Protocol Speaker: Hsiao-Ting Wang Advisor: Quincy Wu Date: July 2 nd 2009
2
Outline Introduction RTP session RTP header 表頭欄位 Conclusion
3
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)
4
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
5
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?
6
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?
7
RTP header 表頭大小為 12 bytes. IP headerUDP headerRTP headerRTP payload
8
表頭欄位 Version (V) 2-bit. 目前的版本為 2. Padding (P) 1-bit. Payload 後面是否有 Padding. Extension (X) 1-bit. 有設的話,就會多加下面的延伸表頭.
9
表頭欄位 (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. 初始值為亂數值. 讓接收者用來偵測封包遺失與封包順序正確性.
10
表頭欄位 (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) 來時,才會使用.
11
RTP Header profile (RFC1900) ITU-T G.711
12
Wireshark
13
Graph Analysis
14
名詞 Delay( 延遲 ) Jitter Delay 的變化量
15
Delay 和 Jitter 示意圖 接收者根據收到的封包計算 delay 和 jitter 25ms 收到封包時間 播放內容時間 D 1 =75ms D 2 =50ms 50ms D 1 =100ms D 2 =100ms 目標 : 保持 jitter 越小越好 (0 in this case)
16
Conclusion RTP 作用是傳送 multimedia data
17
Reference RTP, http://en.wikipedia.org/wiki/Real- time_Transport_Protocol RTCP, http://en.wikipedia.org/wiki/Real- time_Transport_Control_Protocol
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.