RTP 1
Real-Time Transport Protocol (RTP)
August 12, 2001
Real-Time Transport Protocol (RTP) August 12, 2001 RTP 2 RTP - - PowerPoint PPT Presentation
RTP 1 Real-Time Transport Protocol (RTP) August 12, 2001 RTP 2 RTP protocol goals mixers and translators control: awareness, QOS feedback media adaptation August 12, 2001 RTP 3 RTP the big picture application media
RTP 1
August 12, 2001
RTP 2
RTP
August 12, 2001
RTP 3
RTP – the big picture
UDP ST-II IPv4/6 Ethernet AAL5 ATM media application control data
RTCP RTP
encapsulation
August 12, 2001
RTP 4
RTP = Real-time transport protocol
August 12, 2001
RTP 5
RTP goals
lightweight: specification and implementation flexible: provide mechanism, don’t dictate algorithms protocol-neutral: UDP/IP, ST-II, IPX, ATM-AALx, . . . scalable: unicast, multicast from 2 to O(107) separate control/data: some functions may be taken over by conference control protocol secure: support for encryption, possibly authentication
August 12, 2001
RTP 6
Data transport – RTP
Real-Time Transport Protocol (RTP) = data + control data: timing, loss detection, content labeling, talkspurts, encryption control: (RTCP) ➠ periodic with T ∼ population
August 12, 2001
RTP 7
RTP functions
August 12, 2001
RTP 8
RTP mixers, translators, . . .
mixer:
translator:
August 12, 2001
RTP 9
RTP mixers, translators, . . .
SSRC=39 SSRC=17 192.35.149.52 128.119.40.186 192.26.8.84 192.20.225.101 SSRC=5 DVI4 L16 GSM GSM SSRC=5 translator end system end system mixer CSRC=17 39
August 12, 2001
RTP 10
RTP packet header
timestamp sequence number synchronization source identifier (SSRC) M V(2) 0x00 header extension X P
bytes
count CSRC
contributing source identifiers (CSRC) UDP packet 8 16 24 32 bit payload (audio,video,...) payload type
August 12, 2001
RTP 11
RTP packet header
Payload type: audio/video encoding method; may change during session SSRC: sychronization source ➠ sources pick at random ➠ may change after collision! sequence number: +1 each packet ➠ gaps ≡ loss P: padding (for encryption) ➠ last byte has padding count M: marker bit; frame, start of talkspurt ➠ delay adjustment CC: content source count (for mixers) CSRC: identifiers of those contributing to (mixed into) packet
August 12, 2001
RTP 12
RTP timestamp
August 12, 2001
RTP 13
RTP in a network
August 12, 2001
RTP 14
RTP control protocol – types
stackable packets, similar to data packets sender report (SR): bytes send ➠ estimate rate; timestamp ➠ synchronization reception reports (RR): number of packets sent and expected ➠ loss, interarrival jitter, round-trip delay source description (SDES): name, email, location, . . . CNAME (canonical name = user@host) identifies user across media explicit leave (BYE): in addition to time-out extensions (APP): application-specific (none yet)
August 12, 2001
RTP 15
RTCP packet structure
BYE SR SDES
SSRC
CNAME PHONE LOC item item item
chunk chunk
item
packet packet if encrypted: random 32-bit integer packet
SSRC SSRC
reason
SSRC
CNAME
sender report SSRC SSRC
receiver reports
SSRC site 2 site 1
compound packet UDP packet
August 12, 2001
RTP 16
RTCP announcement interval computation
Goals:
➠ randomized response with rate ↓ as members ↑
August 12, 2001
RTP 17
RTCP bandwidth scaling
– single audio stream – of concurrently active video streams
August 12, 2001
RTP 18
RTCP bandwidth scaling
T = # of senders 0.25 · 0.05 · session bw · avg. RTCP packet size
T = # of receivers 0.75 · 0.05 · session bw · avg. RTCP packet size
August 12, 2001
RTP 19
RTCP sender reports (SR)
SSRC of sender: identifies source of data NTP timestamp: when report was sent RTP timestamp: corresponding “RTP time” ➠ lip sync sender’s packet count: total number sent sender’s octet count: total number sent followed by zero or more receiver report
August 12, 2001
RTP 20
RTCP receiver reports (RR)
SSRC of source: identifies who’s being reported on fraction lost: binary fraction cumulative number of packets lost: long-term loss highest sequence number received: compare losses, disconnect interarrival jitter: smoothed interpacket distortion LSR: time last SR heard DLSR: delay since last SR
August 12, 2001
RTP 21
Intermedia synchronization
= sync different streams (audio, video, slides, . . . )
audio 160 320 480 640 800 960 560 = 8:45:17.23 1120 RTP video 9000 RTCP SR RTCP SR RTP timestamp 1800 = 8:45:17.18
August 12, 2001
RTP 22
Round-trip delay estimation
compute round-trip delay between data sender and receiver
A=0xb710:8000 (46864.500 s) r n SR(n) RR(n) lsr =0xb705:2000 (46853.125 s) dlsr=0x0005.4000 ( 5.250 s) (5.25 s) DLSR A 0xb710:8000 (46864.500 s) DLSR −0x0005:4000 ( 5.250 s) LSR −0xb705:2000 (46853.125 s) delay 0x 6:2000 ( 6.125 s) ntp_sec =0xb44db705 ntp_frac=0x20000000 (3024992016.125 s) [10 Nov 2001 11:33:25.125] [10 Nov 2001 11:33:36.5]
August 12, 2001
RTP 23
RTP: Large groups
How do manage large groups?
➠ reconsideration: pause and recompute interval
August 12, 2001
RTP 24
BYE floods
More general:
August 12, 2001
RTP 25
Reconsideration: learning curve
1 10 100 1000 10000 100000 1 10 100 1000 10000 100000 Number Time (s) Learning Curve L(t) Current L(t) Conditional Reconsideration L(t) Unconditional Reconsideration Ideal August 12, 2001
RTP 26
Reconsideration: influence of delay
500 1000 1500 2000 2500 3000 100 200 300 400 500 600 700 800 900 1000 Number Time (s) Cumulative Packets Sent Uniform Fixed Exponential August 12, 2001
RTP 27
RTP: Aggregation
+ RTP headers
August 12, 2001
RTP 28
RTP: Aggregation
length of block call ID M sequence number PT SSRC timestamp M PT
third audio block second audio block first audio block
PT call ID M call ID 1 PT M
August 12, 2001
RTP 29
Collision detection and resolution
Collision:
everyone joins at the same time
August 12, 2001
RTP 30
Loop detection
August 12, 2001
RTP 31
RTP for the masses
– who cares? (Nielsen!) – useless for QOS feedback – control rate too high
value; if <, lucky winner ➠ needs to be adaptive
August 12, 2001
RTP 32
August 12, 2001
RTP 33
Adaptive applications
Multimedia applications can adjust their data rates: Audio: encoding parameters (MPEG L3), encoding, sampling rate, mono/stereo encoding sampling rate bit rate LPC 8,000 5,600 GSM 8,000 13,200 DVI4 8,000 32,000 µ-law 8,000 64,000 DVI4 16,000 64,000 a range of DVI4 and MPEG L3 L16 stereo 44,100 1,411,200
August 12, 2001
RTP 34
Adaptive applications
Video: frame rate, quantization, image resolution, encoding
5000 10000 15000 20000 25000 30000 50 100 150 200 250 300 Size [Bytes] Q-Factor Noise Face 1 Face 2 White Picture Black Picture
August 12, 2001
RTP 35
Application control
– QoS at call set-up, guaranteed – long call durations ➠ network load may change – “wrong” guess ➠ rejected calls or low quality
– adapt application to available bandwidth – share bandwidth fairly with TCP? – lowest common demoninator ➠ mixers, translators
August 12, 2001
RTP 36
TCP-friendly applications
August 12, 2001
RTP 37
TCP-friendly adaptation
– use additive-increase, multiplicative-decrease – use loss/RTT equation: throughput = 1.22
R√p, where R is the round-trip time and
p ≈ loss fraction
– TCP ACKs, without retransmission − → overhead, no multicast – RTCP RR − → delay, metric?
August 12, 2001
RTP 38
RTP: Status and Issues
Compression: differential compression for low-speed point-to-point links ➠ compress IP, UDP, RTP into 1–2 bytes Aggregation: trunking of packet streams or Internet telephony gateways Large groups: RTCP feedback for O(10,000); sampling RTP (RFC 1889, RFC 1890) − → draft standard
August 12, 2001
RTP 39
RTP Header Compression
(low-speed) point-to-point links
→ not good for high BER, delay
August 12, 2001
RTP 40
RTP Header Compression
CONTEXT_STATE (no IP header)
C0 00 00
C0 3F 7F
80 00
80 7F 00 127 7F 128 80 80 16383 BF FF 16384 C0 40 00 4194303 FF FF FF
August 12, 2001
RTP 41
CRTP Packet Header
if MSTI = 1111
S T M I
(marker)
1 2 3 4 5 6 7 (CSRC count)
M’ S’ T’ I’ RTP data RTP header extension CSRC list delta RTP timestamp delta RTP sequence delta IPv4 ID CC random fields UDP checksum link sequence lsb of session context ID msb of session context ID
(if X bit set in context) (if MSTI = 1111 and CC != 0) (if T or T’ = 1) (if S or S’ = 1) (if I or I’ = 1) (if non−zero in context) [used when IP−in−IP header] (if non−zero in context) (if 16−bit CID)
August 12, 2001
RTP 42
Some RTP Implementations
tool who media RSVP adaptive NeVoT GMD Fokus audio yes not yet vic LBNL video no no vat LBNL audio no no rat UCL audio no no Rendezvous INRIA A/V no yes NetMeeting Microsoft A/V no no IP/TV Cisco A/V no no RM G2 Real A/V no yes
http://www.cs.columbia.edu/˜hgs/rtp/
August 12, 2001