RTP: A Transport Protocol For Real-Time Applications
RTP: A Transport Protocol For Real-Time Applications
1
Introduction – cont. RTP use scenarios
RTP implementation is expected to be Simple multicast audio conference
integrated into the application rather than as a A multicast IP address and two UDP ports (for RTP and
separate module RTCP ), assigned and distributed by mechanisms beyond
The use of RTP for a particular application the scope of RTP
needs other documents Speaker sends:
Profile specification documents defines sets of
IP header UDP header RTP header Audio data
payload type codes, and their mapping to payload
formats Receiver plays out audio data according to RTP header
Payload format specification documents define how Senders/receivers periodically multicast RTCP reports
to carry a specific encoding
Who is participating?
example: MPEG2 video or ADPCM audio
What is the audio quality?
RFC 1890: payload types; RFC 2250: MPEG
5 6
2
RTP payload types (few
examples); RFC 1890 SSRC and CSRC
All packets from a given synchronizing source (with a
Payload Encoding name Audio/Video Clock rate given SSRC identifier) will use the same timing and
type (A/V)
sequence number space to allow receivers to
0 PCMU (mu-law G.711) A 8000 recreate the packet sequence
8 PCMA (A-law G.711) A 8000 A mixer receives RTP packets from multiple sources,
26 JPEG V 90000 combines packets, makes timing adjustments, and
32 MPV (MPEG-I and MPEG V 90000 forwards new RTP packets with a new timing
II) sequence
33 MP2T (MPEG-II transport AV 90000 All packets in the new sequence will have mixer SSRC as
streams) their synchronization source
The mixer inserts in each RTP packet header a CSRC list of
the sources that contributed to this combined stream
3
Relative timestamping scheme Delay vs. loss
Receivers compute delay and jitter To ensure 0 jitter in playout, choose
experienced by packet maximum delay as the total delay in selecting
This allows them to adaptively size their playout delay value
reconstruction buffers Other option:
D1 = 75ms
Use 95% of transmission delay to select playout
D2 = 50ms delay value
Packets received Packets that take longer transmission delay than
25ms 50ms this 95% value will be dropped because they did
Packets played out not arrive in time
D1 = 100ms Telephony requirements: 150ms one-way
D2 = 100ms Goal: keep jitter low (0 in this case) delay with echo cancellers; loss: 5%
13 14
4
RTCP - types RTCP – compound packet
Sender report (SR): statistics from active sender – RTCP packets have a length field in header;
includes RR blocks also aligned to 32 bits --- stackable
Receiver report (RR): statistics from participants that Sent in a compound packet of at least 2 RTCP
are not active senders
RR RTCP packet sent if a node is only a receiver, i.e., it does
packets; example:
not send data
Source description report (SDES): includes CNAME,
email, name, phone number, location, application
tool/version
BYE: indicates end of participation
APP: application-specific functions
17 18
5
Interarrival jitter computation RTCP – round trip time calculation
Interarrival jitter J defined as: t1 t4
sender
mean deviation (smoothed absolute value) of the
difference D in packet spacing at the receiver SR RR
compared to the sender for a pair of packets receiver
D(i,j) = (Rj - Ri) - (Sj - Si) = (Rj - Sj) - (Ri - Si) t2 DLSR t3
Ji = Ji-1 + (|D(i-1,i)| - Ji-1)/16 SR packet contains: NTP (=t1)
Algorithm: optimal first-order estimator; the gain RR packet contains: Last SR timestamp (LSR=t1),
parameter 1/16 gives a good noise reduction ratio Delay Since Last SR (DLSR=t3-t2)
while maintaining a reasonable rate of Roundtrip time = t4 - t3 + t2 - t1 = t4 – (t3-t2) –t1
convergence [Cadzow] = t4 – DLSR - LSR
21 22
Analyzing sender
RTCP – RR & SDES and receiver reports
Receiver Report (RR): Similar to SR but Sender may modify its transmissions based on the
feedback
without sender information block
Receivers can determine whether problems are
RTCP Source Description packet (SDES) local, regional or global
Containing CNAME, mandatory Network managers may use profile-independent
Constant for a user, unique among all users monitors that receive only the RTCP packets and
Provides binding across multiple medias sent by not the corresponding RTP data packets to
a user evaluate the performance of their networks for
Example: [email protected] multicast distribution.
23 24
6
RTCP – transmission interval Other issues
Designed to scale from a few to thousands of Collision detection and resolution
users Two sources use the same SSRC
Problem: RTCP traffic is not self-limiting; grows linearly with
number of usesr if sent at a constant rate Loop detection
Solution: limit control traffic to a small and known fraction of
total session traffic, 5% suggested Inter-media synchronization
Characteristics of transmission interval calc. algorithm Security
Sender occupies 25% of total control traffic bandwidth for that
session to allow receivers to quickly know who is sending Header compression – RFC 2508
Calculated interval should be greater than 5 seconds IP+UDP+RTP = 40 bytes, large overhead when
Trans. interval randomly varied between a range to avoid voice packets need to be small for delay reasons
synchronization of RTCP packets from many end points
Dynamic estimate the average RTCP packet size is made to
adapt to changes in amount of control packets sent
25 26
References
RFC 1889, “RTP: A Transport Protocol for Real-
Time Applications”
RFC 1890, "RTP Profile for Audio and Video
Conferences with Minimal Control"
RFC 2250, "RTP Payload Format for
MPEG1/MPEG2 Video"
J. A. Cadzow, "Foundations of Digital Signal
Processing and Data Analysis," New York, New
York: Macmillan, 1987.
27