Skip to content
Related Articles

Related Articles

Real Time Transport Protocol (RTP)

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 24 Jun, 2020
Improve Article
Save Article

A protocol is designed to handle real-time traffic (like audio and video) of the Internet, is known as Real Time Transport Protocol (RTP). RTP must be used with UDP. It does not have any delivery mechanism like multicasting or port numbers. RTP supports different formats of files like MPEG and MJPEG. It is very sensitive to packet delays and less sensitive to packet loss.

History of RTP :
This protocol is developed by Internet Engineering Task Force (IETF) of four members:

  1. S. Casner (Packet Design)
  2. V. Jacobson (Packet Design)
  3. H. Schulzrinne (Columbia University)
  4. R. Frederick (Blue Coat Systems Inc.)

RTP is first time published in 1996 and known as RFC 1889. And next it published in 2003 with name of RFC 3550.

Applications of RTP :

  1. RTP mainly helps in media mixing, sequencing and time-stamping.
  2. Voice over Internet Protocol (VoIP)
  3. Video Teleconferencing over Internet.
  4. Internet Audio and video streaming.

RTP Header Format :
The diagram of header format of RTP packet is shown below:

The header format of RTP is very simple and it covers all real-time applications. The explanation of each field of header format is given below:

  • Version :
    This 2-bit field defines version number. The current version is 2.

    1. P –
      The length of this field is 1-bit. If value is 1, then it denotes presence of padding at end of packet and if value is 0, then there is no padding.
    2. X –
      The length of this field is also 1-bit. If value of this field is set to 1, then its indicates an extra extension header between data and basic header and if value is 0 then, there is no extra extension.
    3. Contributor count –
      This 4-bit field indicates number of contributors. Here maximum possible number of contributor is 15 as a 4-bit field can allows number form 0 to 15.
    4. M –
      The length of this field is 1-bit and it is used as end marker by application to indicate end of its data.
    5. Payload types –
      This field is of length 7-bit to indicate type of payload. We list applications of some common types of payload.

    Payload TypeEncoding name
    0PCM micro Audio
    2G721 audio
    3GSM audio
    5-6DV14 audio
    7LPC Audio
    8PCMA Audio
    9G722 Audio
    10-11L16 Audio
    14MPEG Audio
    15G728 Audio
    26Motion JPEG
    32MPEG1 video
    33MPEG2 video

    Payload Type is a unique number represented in 7 bits in RTP header format. Every payload type indicates a specific Encoding of audio/video media. RTP source is allowed to send a single payload type at a given time. This field mainly specifies type of codec used in media stream.
    For example, if we use ‘1’ as a payload type whose encoding name is 1016, it means it will use FS-1016 speech encoding for stream of media.

    If we use ’31’ payload type whose encoding name is H.261, it means it will use ITU-T video compression standard. Similarly, every number of payload type indicates a specific type of encoding which used for audio/video stream.

    • Sequence Number –
      The length of this field is 16 bits. It is used to give serial numbers to RTP packets. It helps in sequencing. The sequence number for first packet is given a random number and then every next packet’s sequence number is incremented by 1. This field mainly helps in checking lost packets and order mismatch.
    • Time Stamp –
      The length of this field is 32-bit. It is used to find relationship between times of different RTP packets. The timestamp for first packet is given randomly and then time stamp for next packets given by sum of previous timestamp and time taken to produce first byte of current packet. The value of 1 clock tick is varying from application to application.
    • Synchronization Source Identifier –
      This is a 32-bit field used to identify and define the source. The value for this source identifier is a random number that is chosen by source itself. This mainly helps in solving conflict arises when two sources started with the same sequencing number.
    • Contributor Identifier –
      This is also a 32-bit field used for source identification where there is more than one source present in session. The mixer source use Synchronization source identifier and other remaining sources (maximum 15) use Contributor identifier.

    The data transmission over RTP Protocol is shown below:

    My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!