Professional Documents
Culture Documents
Real-Time Transport Protocol (RTP) : Tung Dao Manh
Real-Time Transport Protocol (RTP) : Tung Dao Manh
Agenda
Introduction Motivation RTP outline Fundamental design philosophies of RTP Application-level framing The end-to-end principle Flexibility Standard elements of RTP RTP Specification RTP Profile RTP Payload Format RTP Packet Format Potential further development of RTP Related Protocol RTCP Conclusion
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
Requirements for delivery of media stream
Examples of real-time applications:
Videoconferencing VoIP, IP telephone system Game online
Motivation
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
Requirements drive the choice of transport protocols
TCP/IP
Motivation
It favors reliability over timeliness, but these applications require timely delivery. Retransmissions can lead to high delay and cause delay jitter Does not support multicast Congestion control mechanism not suitable for audio-video (AV) media
UDP/IP
A UDP/IP-based should be suitable, provided that the variation in transit time of the network can be characterized and loss rates are acceptable. But it is:
No defined technique for synchronizing Streams from different servers may collide A feedback channel must be defined for quality control
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
Motivation
The standard real-time transport protocol was developed by the Audio-Video Transport Working Group of the IETF and first published in 1996 as RFC 1889 A solution to these described problems.
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
RTP Outline
RTP: Defines a standardized packet format for delivering audio and video over the internet. Internet standard for real-time data
Interactive and streamed audio and video Designed for multi-user multimedia conferencing
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
Application-Level Framing
A transport protocol should accept data in application-meaningful units (ADUs) A transport protocol should expose the details of the data delivery as much as possible
Achieving flexibility
Provides a unifying framework for real-time audio/video transport, satisfying most application directly.
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
RTP specifications RTP profiles RTP payload formats Optional elements
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
A session consists of an RTP/RTCP pair of channels, containing two closely linked parts: Data + Control.
RTP to transport real-time data RTCP: RTP control protocol
QoS monitoring and feedback Session control
RTP Outline
Introduction
RTP Outline
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
Introduction
RTP Issues: The protocol itself does not
provide mechanisms to ensure timely delivery
Relies on lower-layer protocols
RTP Outline
prevent out-of-order delivery of packets give any Quality of Service (QoS) Guarantee.
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
Multicasting Payload type identification Time stamping
Enable timing recovery
RTP Features
Sequencing
Loss detection
Delivery monitoring
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | contributing source (CSRC) identifiers | | (0~15 items).... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Header extension (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload (real time data) | Padding (size Padding size | | X 8 bits) (8 bits) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version (V): Payload Type (PT) Padding (P) Sequence Number Extension (X) Timestamp CSRC Count (CC) Synchronization Source (SSRC) Contributing Source (CSRC) POSTECH Marker (M)
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
RTP header
Version (V, 2 bits): indicate the version of the protocol (Current version is 2) Padding (P, 1 bit): if set, last byte of payload is padding size Extension (X, 1 bit): if set, variable-size header extension exists CSRC Count (CC, 4 bit): number of SCRC identifiers Marker (M, 1 bit): defined in profile, mark significant event Payload type (7 bits): audio/video encoding scheme Sequence number: random initial value, increase by one for each RTP packet; for loss detection and sequence restoration SSRC: identify source; chosen randomly and locally; collision needs to be resolved CSRC list: identifiers of contributing sources, inserted by mixer
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
All packets from a given synchronizing source (with a given SSRC identifier) will use the same timing and sequence number space to allow receivers to recreate the packet sequence A mixer receives RTP packets from multiple sources, combines packets, makes timing adjustments, and forwards new RTP packets with a new timing sequence All packets in the new sequence will have mixer SSRC as their synchronization source The mixer inserts in each RTP packet header a CSRC list of the sources that contributed to this combined stream
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
Reflects sampling instance of the first byte in payload Clock frequency depends on data type; specified in profile Random initial value Example: CBR audio, clock increment by 1 for each sample Consecutive RTP packets may have same timestamp (logically generate at same instant): video packets that belong to the same frame Timestamps of consecutive RTP packets may not increase monotonically if the data is not transmitted in the order in which it was sampled: MPEG interpolated video frames
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
Some examples (RFC 1890)
Payload type 0 8 26 32 33 Encoding name PCMU (mu-law G.711) PCMA (A-law G. 711) JPEG MPV (MPEG-I a nd MPEG II)
Audio/Video (A/V) A A V V
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
RTP implementation is expected to be integrated into the application rather than as a separate module. The use of RTP for a particular application requires other documents
Profile specification documents defines sets of payload type codes, and their mapping to payload formats Payload format specification documents define how to carry a specific encoding
Example: MPEG2 video or ADPCM audio RFC 1890: payload types; RFC 2250: MPEG
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
RTP is part of the application and lies above the UDP socket
Application RTP
Socket UDP
IP
Data Link
Physical
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP
Application RTP
UDP
IP
Transport
Data Link
Physical
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Scenario
Receivers send reports Report contains number of packets lost at receiver, inter-arrival jitter, etc. This allows senders to adjust date rate Jitter is an early indicator of congestion Senders also send reports
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Introduction - Goals
The control protocol, RTCP, provides for periodic reporting of reception quality, participant identification and other source description information, notification on changes in session membership, and the information needed synchronize media streams.
Canonical Name QoS feedback Identify and keep track of participant
RTCP
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Bye: End of session APP: Application specifics SDES: Source Description RR: Receive report SR: Sender report
Packet Types
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Multiple receiver report blocks, one for each source from which this host receives packets
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Intermedia synchronization
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Source description (SDES): provide participant identification and supplementary details, such as location, emai address, etc. The standard items are: CNAME, NAME, EMAIL, PHONE, LOC, TOOL, NOTE, and PRIV.
Constant for a user, unique among all users Providing binding across multiple medias sent by a user Example: user@postech.ac.kr
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTCP
Sender may modify its transmissions based on the feedback Receivers can determine whether problems are local, regional or global Network managers may use profile-independent monitors that receive only the RTCP packets and not the corresponding RTP data packets to evaluate the performance od their networks for multicast distribution.
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP/RTCP
Collision detection and resolution
Two sources use the same SSRC
Other issues
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP/RTCP
Program AOL instance messenger iSoftPhone Capability
Video, file transfer, PC to phone, phone to PC Address Book Integration, Daylite CRM Integration, Call Recording, IM, Conferencing, Mulitple Providers, Simple Setup, Call transfer, 5 lines Video, voice, chat, text messaging, PC to Phone Video, file transfer, PC to phone, phone to PC
SightSpeed
video, voicemail, phone in, phone out, multiparty calling, conference recording, text messaging, NAT t raversal, video mail
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea
RTP/RTCP
Questions
& Question?
POSTECH
Copyright 2007 SE Lab. Dept. of CSE POSTECH, R.O. Korea