RTP - Real-Time Transport Protocol =================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container :column: col-lg-12 p-2 :card: shadow **What is RTP?** RTP, Real-Time Transport Protocol, is a network protocol standardized by the IETF (RFC 3550) for delivering audio and video over IP networks. It is widely used in streaming media systems, video conferencing, and VoIP (Voice over IP). .. panels:: :container: container :column: col-lg-12 p-2 :card: shadow **Why RTP is Useful?** * Supports real-time transmission of multimedia data. * Works with RTCP for quality monitoring and synchronization. * Payload type identification allows dynamic codec switching. * Timestamping and sequence numbers enable jitter compensation and packet reordering. * Widely used in VoIP, WebRTC, and conferencing systems. .. panels:: :container: container :column: col-lg-12 p-2 :card: shadow **How it works?** * Media is encoded – Audio/video is compressed using codecs (e.g., Opus, H.264). * Packets are created – RTP adds headers with sequence numbers and timestamps. * Data is transmitted – Packets are sent over UDP (usually) to minimize latency. * Receiver reorders and plays – The client uses timestamps and sequence numbers to reconstruct the stream. * RTCP feedback – RTCP provides stats like packet loss, jitter, and round-trip time. .. panels:: :container: container :column: col-lg-12 p-2 :card: shadow **Where is RTP used?** * VoIP systems – SIP-based voice calls (e.g., Skype, Zoom, WhatsApp). * Video conferencing – Google Meet, Microsoft Teams, WebRTC-based apps. * Streaming media – Used in conjunction with RTSP for IP camera feeds. .. panels:: :container: container :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * RTP is considered an application-layer protocol because it provides end-to-end delivery services for real-time data. * It relies on lower-layer protocols like UDP for transport. * RTP handles timing, sequencing, and payload identification, which are application-level concerns. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTP Windows specific?** * No, RTP is not Windows-specific. * RTP is a platform-independent protocol and is widely implemented on Windows, macOS, Linux, and embedded systems. * It is used in VoIP applications, video conferencing, and media streaming on all major platforms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTP Linux Specific?** * No, RTP is not Linux-specific. * It is supported across multiple operating systems, including Linux, Windows, and mobile platforms like Android and iOS. * Many open-source tools and media frameworks on Linux support RTP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by RTP?** * RTP typically uses **UDP** as its transport protocol for faster, low-latency transmission. * It can also be used over other protocols like **TCP** or **DCCP** in special cases, but UDP is standard. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by RTP?** * RTP does not use a fixed port but commonly operates on **even-numbered UDP ports** (e.g., 5004). * RTCP (its control counterpart) typically uses the next **odd-numbered port** (e.g., 5005). * Actual port numbers are usually negotiated through signaling protocols like SIP or SDP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is RTP using Client server model?** * No, RTP does **not** use a strict client-server model. * It is generally used in **peer-to-peer or session-based** communications, where both endpoints send and receive media streams. * Common in VoIP calls, video conferencing, and real-time media transmission. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`RTP Version&RFC Details ` * :ref:`RTP Basic Setup on Ubuntu using IPv4 ` * :ref:`RTP Basic Setup on Ubuntu using IPv6 ` * :ref:`RTP Protocol Packet Details ` * :ref:`RTP Usecases ` * :ref:`RTP Basic Features ` * :ref:`RTP Feature : Real-Time Delivery ` * :ref:`RTP Feature : Timestamping ` * :ref:`RTP Feature : Sequence Numbering ` * :ref:`RTP Feature : Payload Type Identification ` * :ref:`RTP Feature : Source Identification ` * :ref:`RTP Feature : Contributing Source list ` * :ref:`RTP Feature : Header Extensions ` * :ref:`RTP Feature : Support for Multicast nad Unicast ` * :ref:`RTP Feature : Works with RTCP ` * :ref:`RTP Feature : Codec Agnostic ` * :ref:`RTP Feature : Transport Flexibility ` * :ref:`RTP Feature : Extensibility ` * :ref:`RTP Feature : Interoperability ` * :ref:`RTP Feature : Security via SRTP ` * :ref:`RTP Feature : Jitter Compensation ` * :ref:`Reference links ` .. _RTP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _RTP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _RTP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _RTP_step5: .. tab-set:: .. tab-item:: RTP Version&RFC Details .. csv-table:: :file: ./RTP/RTP_RFC_Details.csv :widths: 10,10,10,30,40 :header-rows: 1 .. _RTP_step24: .. tab-set:: .. tab-item:: RTP Basic Setup on Ubuntu using IPv4 * Setup .. _RTP_step25: .. tab-set:: .. tab-item:: RTP Basic Setup on Ubuntu using IPv6 * Setup .. _RTP_step6: .. tab-set:: .. tab-item:: RTP Protocol Packet Details **RTP Header Packet** .. csv-table:: :file: ./RTP/RTP_Protocol_Packet_1.csv :widths: 10,20,30,10 :header-rows: 1 **CSRC List Packet** .. csv-table:: :file: ./RTP/RTP_Protocol_Packet_2.csv :widths: 10,20,30,10 :header-rows: 1 **Extension Header Packet** .. csv-table:: :file: ./RTP/RTP_Protocol_Packet_3.csv :widths: 10,20,30,10 :header-rows: 1 **Payload Packet** .. csv-table:: :file: ./RTP/RTP_Protocol_Packet_4.csv :widths: 10,20,30,10 :header-rows: 1 **Padding Packet** .. csv-table:: :file: ./RTP/RTP_Protocol_Packet_5.csv :widths: 10,20,30,10 :header-rows: 1 .. _RTP_step7: .. tab-set:: .. tab-item:: RTP Usecases .. csv-table:: :file: ./RTP/RTP_Usecases.csv :widths: 10,20,30 :header-rows: 1 .. _RTP_step8: .. tab-set:: .. tab-item:: RTP Basic Features .. csv-table:: :file: ./RTP/RTP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _RTP_step9: .. tab-set:: .. tab-item:: RTP Feature : Real-Time Delivery **Real-Time Delivery - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-1_Real-Time_Delivery_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step10: .. tab-set:: .. tab-item:: RTP Feature : Timestamping **Timestamping - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-2_Timestamping_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step11: .. tab-set:: .. tab-item:: RTP Feature : Sequence Numbering **Sequence Numbering - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-3_Sequence_Numbering_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step12: .. tab-set:: .. tab-item:: RTP Feature : Payload Type Identification **Payload Type Identification - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-4_Payload_Type_Identification_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step13: .. tab-set:: .. tab-item:: RTP Feature : Source Identification **Source Identification - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-5_Source_Identification_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step14: .. tab-set:: .. tab-item:: RTP Feature : Contribution Source List **Contribution Sourcr List - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-6_Contribution_Source_List_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step15: .. tab-set:: .. tab-item:: RTP Feature : Header Extension **Header Extension - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-7_Header_Extension_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step16: .. tab-set:: .. tab-item:: RTP Feature : Support for Multicast and Unicast **Support for Multicast and Unicast - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-8_Support_for_Multicast_and_Unicast_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step17: .. tab-set:: .. tab-item:: RTP Feature : Works with RTCP **Works with RTCP - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-9_Works_with_RTCP_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step18: .. tab-set:: .. tab-item:: RTP Feature : Codec Agnostic **Codec Agnostic - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-10_Codec_Agnostic_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step19: .. tab-set:: .. tab-item:: RTP Feature : Transport Flexibility **Transport Flexibility - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-11_Transport_Flexibility_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step20: .. tab-set:: .. tab-item:: RTP Feature : Extensibility **Extensibility - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-12_Extensibility_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step21: .. tab-set:: .. tab-item:: RTP Feature : Interoperability **Interoperability - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-13_Interoperability_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step22: .. tab-set:: .. tab-item:: RTP Feature : Security via SRTP **Security via SRTP - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-14_Security_Via_SRTP_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step23: .. tab-set:: .. tab-item:: RTP Feature : Jitter Compansation **Jitter Compensation - Testcases** .. csv-table:: :file: ./RTP/RTP_Feature-15_Jitter_Compensation_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTP_step26: .. tab-set:: .. tab-item:: Reference links * Reference links