Upload
anastasia-conley
View
226
Download
2
Embed Size (px)
Citation preview
BAI513 - PROTOCOLS
RTP - RTCP
BAIST – Network Management
Real-Time Transport Protocols RTP
– End-to-end network transport functions for real-time data
– Suitable framework for any encoding• Complete Protocol : RTP framework +
payload format– Used with RTCP optionally
RTCP– Monitoring of data delivery– Minimal control and identification
functionality
Introduction Services
– Payload type identification– Sequence numbering– Timestamping– Delivery monitoring
RTP over UDP/IP– Multiplexing– Checksum– Multicasting
RTP does not provide– Timely delivery– Guaranteed QoS delivery– Out-of-order delivery prevention
RTP – A Transport Protocol
Real-Time Traffic Not all multimedia data is real time
Stored Video Server Video Client
Entire video transferred to client
After receivingcomplete video,client beginsplayback
Video ClientVideo Conference Server
Individual videoframes transferredto client as they occur
Client playsback each video frameas it arrives
There are tight constraints
There are no tight constraints
Definitions RTP Payload
– data transported by RTP in a packet RTP Packet
– fixed RTP header + (list of contributing sources) + payload data
Transport address– (network address, port)
• e.g) IP address + UDP port
– need not to have a well-known port(default is 5004) RTP session
– association among a set of participants communicating with RTP
– defined by a pair of transport address
Definitions(cont’d)
Synchronization Source(SSRC)– source of a stream of RTP packets– identified by a 32-bit ID(SSRC) in RTP header– globally unique in a RTP session– SSRC ID is randomly chosen– all packets from a SSRC form a part of the same
timing & seq. # space– receiver groups packets by SSRC to playback
Contributing Source(CCRC)– a source of a stream of RTP packets that has
contributed to the combined stream produced by RTP mixer
– Mixer inserts a list of the SSRC ids (CSRC list)
Mixer & Translator A Mixer is an intermediate system
• receives RTP packets from one or more sources• possibly changes the data format• combines the packets in some manner• forwards a new RTP packet• timing adjustment among several streams and
generate its own timing– mixer becomes SSRC for the new combined packet
Each sourcegenerates64Kbit/s of Audio traffic
SSRC : A
SSRC : B SSRC : C Mixer E
SSRC : ECSRC : A, B, C
combines all three into a single 64Kbit/s stream
Translator A Translator is an intermediate system
• forwards RTP packets with their SSRC id intact• e.g)
– convert encoding without mixing– replicator from multicast to unicast– application-level filters in firewalls
Frame RelayEach sourcegenerates1Mbit/s of Video traffic
converts each to a lower quality,256Kbit/s stream
SSRC : A
SSRC : B SSRC : C
SSRC : A
SSRC : BSSRC : C
Example of Translator & Mixer
E1
E2
M1 T1 T2
E6
E7
M3
M2E3
E5
E4
E1 : 17
E2 : 1
M1 : 48 (1, 17)
E4 : 47
M1 : 48 (1, 17)
E4 : 47
E6 : 15
E3 : 64 E5 : 45
M2 : 12 (64)
M3 : 89 (64, 45)
M1 : 48 (1, 17)E6 : 15
E4 : 47M3 : 89 (64, 45)
E : End system
M : Mixer
T : Translator
source : SSRC (CSRCs)
Timing is Everything
Jj i tt tt er
Jitter
Jitter is introduced in real-time data by the delay between packets
It is the differing propagation delays of different packets
A major issue in real time and streaming To prevent jitter, we can timestamp the
packets and separate the arrival time from the playback time
Timestamping
Buffering
Creates a queue of pending packets All delayed by some amount in order
to compensate for maximum jitter Basically required for audio and
video streams
Buffer Picture
Sequencing
A sequence number on each packet is required for real-time traffic– Because packets may arrive out of
order If subsequent packet already
displayed, drop
Multicasting
Real-time traffic needs the support of multicasting
In order to scale to multiple senders and receivers
Can’t use TCP, must use UDP– Also: TCP heavier weight– Also: can’t have retransmissions
Translation
Translation means changing the encoding of a payload to a lower quality to match the bandwidth of the receiving network
RTP Header
Fields
Version (2 bits) 2 P (1 bit) if there is padding at the end X (1 bit) if there is an extension
header Contributor Count (4 bits) how many M (1 bit) generic marker Payload Type (7 bits) audio, video,
etc. Sequence number 16 bits
RTP Payload Types
PT Payload PT Payload
0123456789
101112131415
PCMU audio1016 audioG721 audioGSM audio
Unassigned audioDV14 audio(8Khz)
DV14 audio(16Khz)LPC audio
PCMA audioG722 audio
L16 audio(stereo)L16 audio(mono)
TPS0 audioVSC audioMPA audioG728 audio
16-222324252627282930313233
34-7172-7677-95
96-127
unassigned audioRGB8 videoHDCC videoCelB videoJPEG video
CUSM videonv video
PicW videoCPV videoH261 videoMPV videoMP2T video
unassigned videoreserved
unassigneddynamic
Fields Continued
Timestamp time differences between this and prior packet
Synchronization Source sender who synchronizes all other sources (mixer)
Contributor Identifier(s) others who are contributing source
RTP Data Transfer Protocol
Multiplexing RTP sessions– by the destination transport address– In a teleconference
• The audio and video are transported in each separate session
Profile specific modifications to the RTP header– The marker bit and payload type field has profile-
specific info.– If particular application needs additional
functionality independent of payload format• define additional fixed fields to follow immediately after
the SSRC field of header
RTP Header Extension if X bit is set
– variable-length header extension is appended to the RTP header
first 16-bits of header extension are left open for distinguishing ID or parameters for profile
length counts the # of 32-bit words in the extension
defined by profile length
Header extension
0 15 31
RTCP
Periodically transmitted to all participants of the session.
Uses same distribution mechanism as RTP– such as multicasted UDP– RTP port # must be even number – RTCP port # must be odd (RTP + 1)
Stackable RTCP messages
RTCP
Feedback on the quality of the data distribution.
Carries a persistent identifier (CNAME). Can count the number of session
members. Provides minimum session control.
RTCP Message Types SR : Sender Report RR : Receiver Report SDES : Source DEScription BYE : End of participation APP : Application specific functions
SR length
SSRC of packet sender
RTP timestamp
Sender’s packet count
NTP timestamp
NTP timestamp
V P RC PT=SR=200
Sender’s octet count
SSRC_1
Cumulative number of packet lost
Extend highest sequence number received
Interarrival jitter
Last SR (LSR)
Delay since last SR(DLSR)
Fraction lost
SSRC_2
...
Profile-specific extensions
RR
length
SSRC of sender
V P RC PT=RR=201
SSRC_1
Cumulative number of packet lost
Extend highest sequence number received
Interarrival jitter
Last SR (LSR)
Delay since last SR(DLSR)
Fraction lost
SSRC_2
...
Profile-specific extensions
SDES
lengthV P SC PT=RR=202
SSRC/CSRC_1
SDES items
SSRC/CSRC_2
SDES items
SDES Items
CNAME : Canonical NAME– “user@host” or– “host”
NAME : User name EMAIL : Email address PHONE : Phone number LOC : Geographical location
BYE
length
SSRC/CSRC
V P SC PT=BYE=203
...
Reason for leavinglength
APP
length
SSRC/CSRC
V P subtype PT=APP=204
Name(ASCII)
Application-dependent data
RTCP Transmission Interval
For scalability, the interval must be increased as the group grows.
Suggested control traffic fraction is 5%. Minimum interval is 5 seconds. (for the
case of small group) The instant intervals are varied randomly
to avoid synch. The more important, the more often.
RTCP Processing in Translators and Mixers
If RTP data is modified, RTCP must be modified.– Aggregation of SDES– Modification of SR, RR
It is advisable to combine RTCP packets from many sources to reduce overhead.
In Translators
Without modification of data, without modification of RTCP
With any transformation, it should reflect the characteristic & receiving quality.
SR sender info in Translators
If data encoding is changed, sender’s byte count must be changed.
If data packets are combined, sender’s packet count must be changed.
If timestamp frequency is changed, RTP timestamp field must be changed.
TRTP
RTCP
SR/RR reception report in Translators
Because of combination of several data packets, several fields must be changed.
This may be complex. It can filter all reception reports, and
generate new ones originating from itself.
TRTP
RTCP
SDES, BYE, APP in Translators
SDES : Filters non-CNAME info if bandwidth is limited
BYE, APP : Forwarded unchanged.
SR sender info in Mixer
Does not forward at all. Generate new one of its own for both
sides.
MRTCP
RTCP
RTCP
SR/RR reception report info in Mixer
Does not forward at all. Generate new one of its own for sender.
MRTCP
RTCP
Security Support in RTP
Support confidentiality through encryption– use profile to specify security services and
algorithms– DES in CBC mode as the default encryption
algorithm May define additional payload types for
encrypted encodings. Expect support for authentication and
message integrity from lower layers.