The RTP protocol allows the transfer of the application with real-time properties such as security, lost detection, content identification and timing reconstruction etcetera. While the RTCP transports statistics for a media connection and information such as the number of packets transmitted, packet loss, packet delay, delay variation, etcetera. The main difference between the RTP and RTCP is that the RTP just offers a way to transfer the real-time traffic through a network while RTCP ensures the proper delivery quality of the content transferred by the RTP protocol.
Content: RTP Vs RTCP
|Basis for comparison||RTP||RTCP|
|Basic||Used to carry media streams.||Used to monitoring transmission stats and QoS.|
|Ports||Even port number||Odd port number|
|Relation||Specifies the packet structure for real-time data.||Works in conjunction with the RTP.|
|Features provided||Interoperability||Performance controlling through feedback.|
|Packets contain||Payload type, sequence number, timestamp, etc.||Sender and receiver reports|
|Identification of source||32-bit identifier is used||Textual information (canonical names)|
Definition of RTP
The RTP (Real-Time Transport Protocol) resides in the presentation and session layers of the OSI network model. It is mostly used for real-time applications such as internet radio, video-on-demand, music-on-demand, video conferencing where the VOIP is implemented. It works on the UDP protocol instead of TCP, as a result, it does not ensure the timely delivery of the data.
Now how does this RTP protocol works? As we know that it transfers the multimedia applications such as more than one stream of audio, text, video, are inserted into RTP library present at the user space along with other application. The library then multiplexes the streams by encoding them into RTP packets, which it packs into sockets. UDP packet is then created at the operating system side of the socket to enclose the RTP packets.
The UDP packets are delivered to the IP which transmits it over the link like ethernet. This whole process takes place at the sender’s end while the inverse process occurs at the receivers end. This is how the multimedia application finally receives the multimedia data from the RTP library.
The packets sent in an RTP stream is allotted a number higher than its previous number. The numbering helps in identifying the missing packets. Even if the packet is missing the destination end application decides the action to be executed.
However, the most probable action for the packet holding video data is to avoiding the video frame and if the packet is carrying audio data the missing data can be approximated. While, retransmission is not a practically implementable idea, as the retransmitted packet would arrive too late to be useful. RTP provides no means to request retransmission and acknowledgement messages.
RTP Payload may consist of multiple samples, that can be coded in any manner that the application needs. Real-time applications also require timestamping, where the timestamp is assigned to a source with the first sample in each packet. Timestamp facilitates in nullifying the effects of the variation in network delay and also allows synchronization of the multiple streams with each other.
RTP header consists of 32 bits words and various fields such as Ver., P, X, CC, M, Payload type, Sequence Number, Timestamp, Synchronization source identifier, Contributing source identifier.
- Version field – This filed specifies the protocol version.
- Padded bits – P bit describes the padded bits used for the packet in the multiple of 4 bytes.
- Extension header – X indicates the extension header present. Here the first word of extension header provides the length.
- Contributing sources – This CC field indicates the contributing sources from 0 to 15.
- Marker bit – M in the header specifies the marker bit which is used in marking the beginning and end of the frame.
- Sequence number – The sequence number shows the number of RTP packets delivered and it increases by one value each time a packet is sent.
- Timestamp – As we have discussed timestamp above in the article, the timestamp field helps in reducing the jitter. It is generated by the stream’s source to recall when the first packet was generated.
- Synchronization source identifier – It provides the information about the packet to which stream it is associated.
- Contributing source identifiers – When the mixers are present in the studio this field is used where the mixer is the synchronizing source and streams going to be mixed are listed under this field.
Definition of RTCP
The RTCP (Real-time Transport Control Protocol) is companion protocol of the RTP protocol (also known as sister protocol) and defined along with RTP. It is an integral part of the RTP protocol which offers the required control functionality to the RTP such as feedback, synchronization and user interface.
The RTCP permits senders and receivers to transfer a sequence of reports to one another containing the supplementary information about the data being transferred and the performance of the network. RTCP messages are also encapsulated inside a UDP packet for the transmission and are sent according to protocol number which is greater than the port number of the RTP stream to which they are associated.
The provision of the feedback in the RTCP facilitates in the encoding process to increase the data rate when the network is operating well and to reduce the data rate during the trouble in the network. The Payload field supplies the information to the destination about the employed encoding algorithm.
RTCP Packet Types
The five types of information carried by the RTCP protocol are RR, SR, SDES, BYE, and APP.
- RR (Receiver Report) – The non-active senders are responsible for generating receiver reports which include the reception quality feedback about data delivery. It holds the information such as highest packet number received, interarrival jitter, lost number of packets, round-trip delay between sender and receiver by calculating the timestamps.
- SR (Sender Report) – Active sender creates sender reports which contain a sender information part including the information about inter-media synchronization, numbers of bytes delivered and cumulative packet counters.
- SDES (Source Description Items) – To identify the sources SDES is used where the textual information in the form canonical names are stored for the session participants. For example, user’s name, e-mail address, telephone number, and other information.
- BYE – Signifies the end of the connection.
- APP (Application specific functions) – This is reserved for the new developing functions, features and experimental use.
Key Differences Between RTP and RTCP
- RTP protocol is the standard for transferring the real-time application data. On the other hand, RTCP is used along with RTP to track the transmission statistics and Quality of service for the guaranteed transmission.
- RTP uses even port number while RTCP makes use of the odd port number.
- The RTP helps in achieving interoperable environment. In contrast, RTCP controls the performance of the data exchange by generating feedbacks.
- RTCP generally contains sender and receiver reports whereas RTP holds the fields like payload type, timestamp, sequence number etcetera.
- The source identification in RTP is done through 32-bit random identifier. As against, in RTCP globally unique identifiers are used which can also be understood by a human.
The RTP is utilized for exchanging the multimedia data. Conversely, RTCP is the control part and is used to regularly obtain feedback control information concerning the quality of transmission associated with the data flows.
adam strick says
Thanks for this valuable and well-written article.
Nice article, loved it