43
BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Embed Size (px)

Citation preview

Page 1: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

BAI513 - PROTOCOLS

RTP - RTCP

BAIST – Network Management

Page 2: 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

Page 3: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 4: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

RTP – A Transport Protocol

Page 5: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 6: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 7: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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)

Page 8: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 9: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 10: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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)

Page 11: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Timing is Everything

Page 12: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Jj i tt tt er

Page 13: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 14: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Timestamping

Page 15: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 16: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Buffer Picture

Page 17: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 18: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 19: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

Translation

Translation means changing the encoding of a payload to a lower quality to match the bandwidth of the receiving network

Page 20: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

RTP Header

Page 21: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 22: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 23: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 24: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 25: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 26: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 27: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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.

Page 28: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

RTCP Message Types SR : Sender Report RR : Receiver Report SDES : Source DEScription BYE : End of participation APP : Application specific functions

Page 29: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 30: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 31: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

SDES

lengthV P SC PT=RR=202

SSRC/CSRC_1

SDES items

SSRC/CSRC_2

SDES items

Page 32: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

SDES Items

CNAME : Canonical NAME– “user@host” or– “host”

NAME : User name EMAIL : Email address PHONE : Phone number LOC : Geographical location

Page 33: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

BYE

length

SSRC/CSRC

V P SC PT=BYE=203

...

Reason for leavinglength

Page 34: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

APP

length

SSRC/CSRC

V P subtype PT=APP=204

Name(ASCII)

Application-dependent data

Page 35: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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.

Page 36: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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.

Page 37: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

In Translators

Without modification of data, without modification of RTCP

With any transformation, it should reflect the characteristic & receiving quality.

Page 38: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 39: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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

Page 40: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

SDES, BYE, APP in Translators

SDES : Filters non-CNAME info if bandwidth is limited

BYE, APP : Forwarded unchanged.

Page 41: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

SR sender info in Mixer

Does not forward at all. Generate new one of its own for both

sides.

MRTCP

RTCP

RTCP

Page 42: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

SR/RR reception report info in Mixer

Does not forward at all. Generate new one of its own for sender.

MRTCP

RTCP

Page 43: BAI513 - PROTOCOLS RTP - RTCP BAIST – Network Management

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.