Sie sind auf Seite 1von 11

RTP

Nguyen Thi Mai Trang LIP6/PHARE Thi-Mai-Trang.Nguyen@lip6.fr

UPMC - M2 Rseaux - UE PTEL

Plan
Introduction RTP RTCP

UPMC - M2 Rseaux - UE PTEL

Introduction
Problems with telephony over the Internet
Quality of service is not guaranteed (delay, bandwidth, data loss, jitter)

Why another transport protocol for real-time data?


TCP can introduce high delay because of retransmission UDP does not allow the application to reorder voice packets because of the lack of sequence number
UPMC - M2 Rseaux - UE PTEL 3

RTP (1)
Real-time Transport Protocol, RFC 3550 Standardized in 2003 by the IETF (Internet Engineering Task Force) Protocol for real-time data transport over the Internet
Voice-over-IP Telephony Teleconferencing Streaming video
UPMC - M2 Rseaux - UE PTEL 4

RTP (2)
Client Server

CODEC RTP UDP IP Physical IP Physical

CODEC RTP UDP IP Physical

UPMC - M2 Rseaux - UE PTEL

RTP packet generation


Application (Audio/video CODECS)

RTP

RTP

RTP

RTP UDP

RTP UDP
UPMC - M2 Rseaux - UE PTEL

RTP UDP
6

RTP sessions (1)


A session consists of a group of participants who are communicating using RTP A participant may be active in multiple RTP sessions (e.g. one for audio and one for video) For each participant, the session is identified by a network address, a port pair for sending data and a port pair for receiving data
UPMC - M2 Rseaux - UE PTEL 7

RTP sessions (2)


Each port pair comprises two adjacent ports
An even-numbered port for RTP data packets The next higher (odd-numbered) port for RTCP control packets

A session can be unicast or multicast RTP translator or mixer can be used in a session to adapt the data transmission to participants conditions

UPMC - M2 Rseaux - UE PTEL

RTP sessions (3)


RTP end point Translator/mixer Multicast group Multicast Unicast

Unicast with mixer/translator Translated, multicast to unicast


UPMC - M2 Rseaux - UE PTEL 9

RTP packet format


V P X CC M PT Timestamp Synchronization source (SSRC) identifier Contributing source (CSRC) identifiers (if mixers are used) Header extension (optional) Payload header (payload format dependent) Sequence number V = version P = Padding X = Extension CC = CSRC count M = Marker PT = Payload Type

Payload data Padding

UPMC - M2 Rseaux - UE PTEL

10

RTP header fields (1)


Version (2 bits)
RTP version (version 2 currently)

Padding (1 bit)
1: The packet contains at least one octet of padding at the end and the last octet of the RTP packet contains the size of the padding part

Extension (1 bit)
1: one experimental header extension is appended at the end of the header

UPMC - M2 Rseaux - UE PTEL

11

RTP header fields (2)


CSRC count (4 bits)
Contains the number of CSRC identifiers that follow the fixed header

Marker (1 bit)
The interpretation of the Marker bit is defined by a profile

Payload type (7 bits)


Identifies the media transported by an RTP packet

Sequence number (16 bits)


Increased by one for each RTP packet sent Used by the receiver to detect packet loss and restore packet sequence

UPMC - M2 Rseaux - UE PTEL

12

RTP header fields (3)


Timestamp (32 bits)
Reflect the sampling instant of the first byte in the RTP data packet Receiver uses timestamp to remove packet jitter and provide synchronous playout

SSRC (32 bits)


Identify the source of the RTP stream Each stream in an RTP session has a distinct SSRC which is a number that the source assigns randomly when the new stream is started

CSRC (32 bits/CSRC, up to 15 CSRCs)


Present only when inserted by a mixer using the SSRC identifiers of contributing sources allowing correct talker indication at the receiver

UPMC - M2 Rseaux - UE PTEL

13

Examples of static payload type assignments


Payload Type N 0 3 8 31 32 Payload format AUDIO/PCMU AUDIO/GSM AUDIO/PCMA VIDEO/H261 VIDEO/MPV Specification RFC 1890 RFC 1890 RFC 1890 RFC 2032 RFC 2250 Description ITU G.711 -law audio GSM full rate audio ITU G.711 A-law audio ITU H.261 video MPEG I/II video

UPMC - M2 Rseaux - UE PTEL

14

Translator and mixer


Translator
Operate on RTP data while maintaining the synchronization source and timeline of the stream (e.g. converting between media encoding formats without mixing)

Mixer
Receive RTP packets from a group of sources and combine them into a single output, possibly changing the encoding, before forwarding the result

UPMC - M2 Rseaux - UE PTEL

15

RTCP (1)
RTP Control Protocol, RFC 3550 Designed to be used with RTP and to control an RTP session RTP and RTCP packets belonging to the same session use the same multicast address but different port number
RTCP port number = RTP port number + 1
UPMC - M2 Rseaux - UE PTEL 16

RTCP (2)
Sender
RTP RTCP

Internet Internet
RT CP
P RT

CP RT

RT P

Receiver

Receiver

UPMC - M2 Rseaux - UE PTEL

17

RTCP (3)
RTCP packets are sent periodically to provide
Periodic reporting of reception quality (e.g. number of packets sent, number of packets lost, inter-arrival jitter) Participant identification Other source description information Notification on changes in session membership Information needed to synchronize media streams

UPMC - M2 Rseaux - UE PTEL

18

RTCP bandwidth scaling (1)


If the number of receiver is large, RTCP has a potential scaling problem RTCP modifies the rate at which a participant sends RTCP packets into the multicast tree as a function of the number of participants in the session

UPMC - M2 Rseaux - UE PTEL

19

RTCP bandwidth scaling (2)


RTCP limits its traffic to 5% of the session bandwidth 75% of RTCP traffic is given to receivers and 25% of RTCP traffic is given to the sender The period for transmitting RTCP packets for a sender
T= Number _ of _ senders average _ RTCP _ packet _ size 0.25 0.05 session _ bandwidth

The period for transmitting RTCP packets for a receiver


T= Number _ of _ receivers average _ RTCP _ packet _ size 0.75 0.05 session _ bandwidth

References
C. Perkins, RTP Audio and video for the Internet, Addison-Wesley 2003 J. F. Kurose, K. W. Ross, Computer networking: A top-down approach featuring the Internet, 3rd edition, Addison Wesley 2005

UPMC - M2 Rseaux - UE PTEL

21

Das könnte Ihnen auch gefallen