The Real-time Transport Protocol is a network protocol that transmits audio and video. RTP is mainly operated with a signal protocol, for example, SIP. With the help of the RTP protocol, audio and video data are transported in packets. Processing, which is at the receiver, is the second process, and it is used to play the audio and video at the right time. The initial publication of Real-Time Transfer Protocol (RTP) was named RFC 1889, and it was originally released in 1996. Then, under the name RFC 3550, it was released in 2003.
RTP with UDP is required. It does not incorporate port numbers or multicasting. MJPEG and MPEG represent some of the file formats that RTP can support. It is less sensitive to lost packets and more sensitive to packet delays.
Functions Of RTP
- RTP applications can widely use the User Datagram Protocol (UDP).
- RTP fails to guarantee quality-of-service (QoS) for real-time services and it does not offer any method to assure timely data delivery.
Introduction To RTP Header Format
The diagram of the header format of the RTP packet is shown below:
The header format of RTP is very simple to understand and has covered all real-time applications. The explanation of each field of header format is given below:
- Version:This 2-bit field defines the version number. The current version is 2.
- P: This field has a length of 1 bit. A value of 1 shows the padding at the end of the packet; a value of 0 indicates that there is none.
- X: This field also has a 1-bit length. There is an additional extension header between the data and the basic header if the value of this field is 1 and none if the value is assigned 0.
- Contributor count: The number of contributors consists of a 4-bit value. Although a 4-bit field can only hold numbers between 0 and 15, the maximum number of contributors is 15.
- M – This field has a length of 1 bit and is utilized by the application as an end marker to denote the end of its data.
- Payload types: The 7-bit parameter identifies the type of payload.
- Sequence Number: This field has a length of 16 bits. This was used to assign RTP packets a serial number. Every second packet’s sequence number is increased by one right after the initial packet’s random sequence number. This field is primarily helpful for detecting order mismatches and dropped packets.
- Time Stamp: This field has a length of 32 bits. It is used to determine the correlation between various RTP packet timings. The timestamp for the initial packet is picked randomly, and subsequent packet timestamps are acquired by adding the timestamps from subsequent packets and the amount of time required to generate the packet’s initial byte. One clock tick has a different value for every application.
- Synchronisation Source Identifier: It is defined as a field of 32 bits. It primarily helps resolve conflicts that occur when two sources have the same sequencing number at the beginning.
- Contributor Identifier:This 32-bit helps identify the multiple sources that participated in a session. Hence, it prevents confusion between audio and video streams. RTP has the power to accommodate numerous samples from various sources.
RTP Protocol Structure
The Real-Time Transport Protocol (RTP) plays a crucial role in transmitting audio and video data over IP networks. RTP has worked tremendously to operate within the broader scope of various protocols, including UDP in the TCP/IP architecture. RTP packets issued certain limitations on using UDP.
Components Of RTP Architecture
1. Sequence Number
To generate serial numbers for its packets, RTP has given a 16-bit sequence number field. The sequence number helps identify the packet order, allowing the receiver to reorder in real time. It makes sure that packet sequences are appropriately restored.
2. Synchronization Source Identifier (SSRC)
The SSRC has a length of 32-bit field. It is used to avoid conflicts when numerous sources start with the precise same sequencing digits. For preventing allocation conflicts, each RTP stream has a separate SSRC. SSRC assists in inter-media synchronization, ensuring audio and video alignment, and intra-media synchronization, defining the duration between successive “played-out” packets.
3. Payload Identification
It is a 7-bit payload identification field. This is used to specify the data format in each packet, and, allowing for dynamic encoding changes concerning bandwidth fluctuations. Different payload types signify various audio/video media encodings, aiding in codec specification.
4. Frame Indication
The frame indicator is present in the RTP system, it shows the starting and ending point of each frame, essential for coordinating delivery to higher layers. The marker bit, with a profile-specific function, serves as a frame indicator, allowing applications to identify specific events like the beginning of speaking spurts in voice applications.
5. Timestamp
This is a 32-bit field. It correlates timings between multiple RTP packets. Timestamps help calculate arrival timings and manage jitter, the difference in arrival times.
6. Contributor Identifier
This 32-bit helps in identifying the multiple sources that participated in a session. Hence preventing confusion between audio and video streams. RTP has the power to accommodate numerous samples from various sources.
Applications Of RT-
1. Conferencing Using Audio And Video
Using timestamp data, RTP allows audio and video to send independent RTP sessions with synchronized playback within the same conference. SIP (Session Initiation Protocol) often pairs with RTP, initiating data streaming when a session is established.
2. Translation And Media Mixing
In scenarios with varied network speeds, RTP allows for media mixing and translation to accommodate users with different bandwidths.
3. Voice Over Internet Protocol (VoIP)
VoIP apps use real-time transport protocol (RTP) to convey multimedia data in real-time, saving money and delivering dependable voice communication. SIP initiates and manages calls, while Secure Real-Time Transport Protocol (SRTP) provides encryption.
4. Real-Time Streaming
The Real-Time Streaming Protocol (RTSP) is based on RTP, and it has enabled users to operate streaming media servers in real-time without transferring data. RTSP has taken over the services like Video LAN and security cameras for real-time streaming.