The Full Wiki

Real-time Transport Protocol: Wikis

Advertisements
  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

The Real-time Transport Protocol (RTP) defines a standardized packet format for delivering audio and video over the Internet. It was developed by the Audio-Video Transport Working Group of the IETF and first published in 1996 as RFC 1889, and superseded by RFC 3550 in 2003.

RTP is used extensively in communication and entertainment systems that involve streaming media, such as telephony, video teleconference applications and web-based push to talk features. For these it carries media streams controlled by H.323, MGCP, Megaco, SCCP, or Session Initiation Protocol (SIP) signaling protocols, making it one of the technical foundations of the Voice over IP industry.

RTP is usually used in conjunction with the RTP Control Protocol (RTCP). While RTP carries the media streams (e.g., audio and video) or out-of-band events signaling (DTMF in separate payload type), RTCP is used to monitor transmission statistics and quality of service (QoS) information. When both protocols are used in conjunction, RTP is usually originated and received on even port numbers, whereas RTCP uses the next higher odd port number.

The Internet Protocol Suite
Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP · IMAP · IRC · Megaco · MGCP · NNTP · NTP · POP · RIP · RPC · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · Telnet · TLS/SSL · XMPP · (more)
Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more)
Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more)
Link Layer
ARP/InARP · NDP · OSPF · Tunnels (L2TP) · PPP · Media Access Control (Ethernet, DSL, ISDN, FDDI) · (more)

Contents

Overview

RTP was developed by the Audio/Video Transport working group of the IETF standards organization. RTP is used in conjunction with other protocols such as H.323 and RTSP.[1] The RTP standard defines a pair of protocols, RTP and the Real-time Transport Control Protocol (RTCP). RTP is used for transfer of multimedia data, and the RTCP is used to periodically send control information and QoS parameters.[2]

RTP is designed for end-to-end, real-time, transfer of multimedia data. The protocol provides facility for jitter compensation and detection of out of sequence arrival in data, that are common during transmissions on an IP network. RTP supports data transfer to multiple destinations through multicast.[3] RTP is regarded as the primary standard for audio/video transport in IP networks and is used with an associated profile and payload format.[1]

Real-time multimedia streaming applications require timely delivery of information and can tolerate some packet loss to achieve this goal. For example, loss of a packet in audio application may result in loss of a fraction of a second of audio data, which can be made unnoticeable with suitable error concealment algorithms.[4] The Transmission Control Protocol (TCP), although standardized for RTP use (RFC 4571), is not often used by RTP because of inherent latency introduced by connection establishment and error correction, instead the majority of the RTP implementations are built on the User Datagram Protocol (UDP).[4] Other transport protocols specifically designed for multimedia sessions are SCTP and DCCP, although they are not in widespread use yet.[5][6]

Advertisements

Protocol components

The RTP specification describes two sub-protocols:

  • The data transfer protocol, which deals with the transfer of real-time multimedia data. Information provided by this protocol include timestamps (for synchronization), sequence numbers (for packet loss detection) and the payload format which indicates the encoded format of the data.[7]
  • The Real Time Control Protocol (RTCP) is used to specify Quality of Service (QOS) feedback and synchronization between the media streams. The bandwidth of RTCP traffic compared to RTP is small, typically around 5%.[7][8]

Sessions

An RTP Session is established for each multimedia stream. A session consists of an IP address with a pair of ports for RTP and RTCP. For example, audio and video streams will have separate RTP sessions, enabling a receiver to deselect a particular stream.[9] The ports which form a session are negotiated using other protocols such as RTSP (using SDP in the setup method)[10] and SIP. According to the specification, an RTP port should be even and the RTCP port is the next higher odd port number. RTP and RTCP typically use unprivileged UDP ports (1024 to 65535),[11] but may use other transport protocols (most notably, SCTP and DCCP) as well, as the protocol design is transport independent.

Profiles and Payload formats

One of the design considerations of the RTP was to support a range of multimedia formats ( such as H.264, MPEG-4, MJPEG, MPEG, etc., ) and allow new formats to be added without revising the RTP standard. The design of RTP is based the architectural principle known as Application Level Framing (ALF). The information required by a specific application needs are not present in the generic RTP header and are specified by RTP Profiles and Payload formats.[2] For each class of application (e.g., audio, video), RTP defines a profile and one or more associated payload formats.[2]

The Profile defines the codecs used to encode the payload data and their mapping to payload format codes in the "Payload Type" field of the header( See below ). Each profile is accompanied by several payload format specifications, each of which describes the transport of a particular encoded data.[1] Some of the audio payload formats include: G.711, G.723, G.726, G.729, GSM, QCELP, MP3, DTMF etc., and some of the video payload formats include: H.261, H.263, H.264, MPEG etc.[12][13]

Examples of RTP Profiles include:

A complete specification of RTP for a particular application usage will require a profile and/or payload format specification(s).[15]

Packet header

bit offset 0-1 2 3 4-7 8 9-15 16-31
0 Ver. P X CC M PT Sequence Number
32 Timestamp
64 SSRC identifier
96 CSRC identifiers (optional)
...

The RTP header has a minimum size of 12 bytes. After the header, optional header extensions may be present. This is followed by the RTP payload, the format of which is determined by the particular class of application.[16] The fields in the header are as follows:

  • Ver.: (2 bits) Indicates the version of the protocol. Current version is 2.[17]
  • P (Padding): (1 bit) Used to indicate if there are extra padding bytes at the end of the RTP packet. A padding might be used to fill up the a block of certain size, for example as required by an encryption algorithm.[17]
  • X (Extension): (1 bit) Indicates presence of an Extension header between standard header and payload data. This is application or profile specific.[17]
  • CC (CSRC Count): (4 bits) Contains the number of CSRC identifiers (defined below) that follow the fixed header.[18]
  • M (Marker): (1 bit) Used at the application level and defined by a profile. If it is set, it means that the current data has some special relevance for the application.[18]
  • PT (Payload Type): (7 bits) Indicates the format of the payload and determines its interpretation by the application. This is specified by an RTP profile. For example, see RTP Profile for audio and video conferences with minimal control (RFC 3551).[19]
  • Sequence Number : (16 bits) The sequence number is incremented by one for each RTP data packet sent and is to be used by the receiver to detect packet loss and to restore packet sequence. The RTP does not take any action when it sees a packet loss, but it is left to the application to take the desired action. For example, video applications may play the last known frame in place of the missing frame.[20] According to RFC 3550, the initial value of the sequence number should be random to make known-plaintext attacks on encryption more difficult.[18] RTP provides no guarantee of delivery, but the presence of sequence numbers makes it possible to detect missing packets.[3]
  • Timestamp: (32 bits) Used to enable the receiver to play back the received samples at appropriate intervals. When several media streams are present, the timestamps are independent in each stream, and may not be relied upon for media synchronization. The granularity of the timing is application specific. For example, an audio application that samples data once every 125 µs (8 kHz, a common sample rate in digital telephony) could use that value as its clock resolution. The clock granularity is one of the details that is specified in the RTP profile or payload format for an application.[20]
  • SSRC : (32 bits) Synchronization source identifier uniquely identifies the source of a stream. The synchronization sources within the same RTP session will be unique.[18]
  • CSRC: Contributing source IDs enumerate contributing sources to a stream which has been generated from multiple sources.[18]
  • Extension header: (optional) The first 32-bit word contains a profile-specific identifier (16 bits) and a length specifier (16 bits) that indicates the length of the extension (EHL=extension header length) in 32-bit units, excluding the 32 bits of the extension header.[18]

RTP-based systems

A complete network based system will include other protocols and standards in conjunction with RTP. Protocols like SIP, RTSP, H.225 and H.245 are used for session initiation, control and termination. Other standards like H.264, MPEG, H.263 etc., are used to encode the payload data (specified via RTP Profile).[21]

An RTP sender captures the multimedia data, which are then encoded as frames and transmitted as RTP packets, with appropriate timestamps and increasing sequence numbers. Depending on the RTP Profile in use, the Payload Type field is set. The RTP receiver, captures the RTP packets, and may perform reordering of packets, which may have resulted because of the underlying IP network and the frames are decoded depending on the payload format and presented to the end user.[21]

RFC references

  • RFC 4103, RTP Payload Format for Text Conversation
  • RFC 3984, RTP Payload Format for H.264 Video
  • RFC 3640, RTP Payload Format for Transport of MPEG-4 Elementary Streams
  • RFC 3016, RTP Payload Format for MPEG-4 Audio/Visual Streams
  • RFC 3551, Standard 65, RTP Profile for Audio and Video Conferences with Minimal Control
  • RFC 3550, Standard 64, RTP: A Transport Protocol for Real-Time Applications
  • RFC 2250, Proposed Standard, RTP Payload Format for MPEG1/MPEG2 Video

See also

External links

Notes

  1. ^ a b c Colin Perkins, p.55
  2. ^ a b c Larry L. Peterson (2007). Computer Networks. Morgan Kaufmann. p. 430. 
  3. ^ a b Daniel Hardy (2002). Network. De Boeck Université. p. 298. 
  4. ^ a b Colin Perkins, p.46
  5. ^ Farrel, Adrian (2004). The Internet and its protocols. Morgan Kaufmann. p. 363. http://books.google.com/books?id=LtBegQowqFsC&pg=PA363&dq=rtp+sctp. 
  6. ^ Ozaktas, Haldun M.; Levent Onural (2007). THREE-DIMENSIONAL TELEVISION. Springer. p. 366. http://books.google.com/books?id=kQvCHpuXji8C&pg=PA366&dq=rtp+dccp. 
  7. ^ a b Colin Perkins, p.56
  8. ^ Peterson, p.435
  9. ^ Zurawski, Richard (2004). "RTP, RTCP and RTSP protocols". The industrial information technology handbook. CRC Press. pp. 28-7. http://books.google.com/books?id=MwMDUBKZ3wwC. 
  10. ^ RFC 4566: SDP: Session Description Protocol, M. Handley, V. Jacobson, C. Perkins, IETF (July 2006)
  11. ^ Collins, Daniel (2002). "Transporting Voice by using IP". Carrier grade voice over IP. McGraw-Hill Professional. pp. 47. 
  12. ^ Perkins, p.60
  13. ^ For examples of H.263, MPEG-4 packet formats see, Chou, Philip A.; Mihaela van der Schaar (2007). Multimedia over IP and wireless networks. Academic Press. pp. 514. 
  14. ^ Collin Perkins, p.367
  15. ^ RFC 3550, p.71
  16. ^ Peterson, p. 430
  17. ^ a b c Peterson, p.431
  18. ^ a b c d e f "RTP Data Transfer Protocol". RFC-Ref. http://rfc-ref.org/RFC-TEXTS/3550/chapter4.html. Retrieved 2009-03-18. 
  19. ^ Colin Perkins, p.59
  20. ^ a b Peterson, p.432
  21. ^ a b Perkins, pp.11-13

References


Advertisements






Got something to say? Make a comment.
Your name
Your email address
Message