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:
- S. Casner (Packet Design)
- V. Jacobson (Packet Design)
- H. Schulzrinne (Columbia University)
- 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 :
- RTP mainly helps in media mixing, sequencing and time-stamping.
- Voice over Internet Protocol (VoIP)
- Video Teleconferencing over Internet.
- 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.
- 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.
- 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.
- 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.
- M –
The length of this field is 1-bit and it is used as end marker by application to indicate end of its data.
- Payload types –
This field is of length 7-bit to indicate type of payload. We list applications of some common types of payload.
Payload Type Encoding name 0 PCM micro Audio 1 1016 2 G721 audio 3 GSM audio 5-6 DV14 audio 7 LPC Audio 8 PCMA Audio 9 G722 Audio 10-11 L16 Audio 14 MPEG Audio 15 G728 Audio 26 Motion JPEG 31 H.216 32 MPEG1 video 33 MPEG2 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:
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.My Personal Notes arrow_drop_up
- P –