RTSP - Real-Time Streaming Protocol ==================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is RTSP?** RTSP (Real-Time Streaming Protocol) is a network control protocol used to establish and control media sessions between endpoints. It is designed for controlling streaming media servers, allowing operations like play, pause, and stop on audio/video streams. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is RTSP useful?** * Enables real-time control over multimedia streams. * Allows clients to play, pause, record, and seek media content. * Useful for live and on-demand video streaming. * Supports stream negotiation and session management. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * The client sends RTSP commands (e.g., DESCRIBE, SETUP, PLAY) to the media server. * The server responds and streams media, typically over RTP. * RTSP uses TCP (for control) and RTP/RTCP (for media transport). * Sessions are maintained with session IDs and client-server state tracking. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is RTSP used?** * IP cameras and CCTV systems. * Media servers (e.g., Wowza, Live555, VLC). * Streaming applications for video-on-demand and live broadcasting. * Surveillance systems and video analytics platforms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * RTSP operates at the **Application Layer (Layer 7)** of the OSI model. * It controls media delivery but does not carry media itself. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTSP Windows specific?** * No, RTSP is not Windows-specific. * It is a platform-independent protocol supported across Windows, Linux, macOS, and embedded systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTSP Linux Specific?** * No, RTSP is not Linux-specific. * Widely supported on Linux, but also available on various operating systems and devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by RTSP?** * RTSP typically uses **TCP** for control messages. * RTP and RTCP (using UDP or TCP) are used for actual media transport. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by RTSP?** * RTSP typically uses **TCP port 554**. * Alternative ports (like 8554) may be used depending on server configuration. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is RTSP using Client server model?** * Yes, RTSP uses the **client-server model**. * The **client** sends control requests to the **server**, which streams the requested media. .. 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:`RTSP Version&RFC Details ` * :ref:`RTSP Basic Setup on Ubuntu using IPv4 ` * :ref:`RTSP Basic Setup on Ubuntu using IPv6 ` * :ref:`RTSP Protocol Packet Details ` * :ref:`RTSP Usecases ` * :ref:`RTSP Basic Features ` * :ref:`RTSP Feature : Session Control ` * :ref:`RTSP Feature : Out-of-Band Transport ` * :ref:`RTSP Feature : Bi-Directional Communication ` * :ref:`RTSP Feature : Support for Live and On-Demand Streaming ` * :ref:`RTSP Feature : Media Negotiation ` * :ref:`RTSP Feature : Low Latency ` * :ref:`RTSP Feature : Multimedia Synchronization ` * :ref:`RTSP Feature : Stateless or Stateful Operation ` * :ref:`RTSP Feature : Support for SDP ` * :ref:`RTSP Feature : Scalability ` * :ref:`RTSP Feature : Interoperability ` * :ref:`RTSP Feature : Authentication and Access Control ` * :ref:`RTSP Feature : Pipelining Support ` * :ref:`RTSP Feature : Persistent Connections ` * :ref:`RTSP Feature : Extensibility ` * :ref:`Reference links ` .. _RTSP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _RTSP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _RTSP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _RTSP_step5: .. tab-set:: .. tab-item:: RTSP Version&RFC Details .. csv-table:: :file: ./RTSP/RTSP_RFC_Details.csv :widths: 10,10,10,30,40 :header-rows: 1 .. _RTSP_step24: .. tab-set:: .. tab-item:: RTSP Basic Setup on Ubuntu using IPv4 * Setup .. _RTSP_step25: .. tab-set:: .. tab-item:: RTSP Basic Setup on Ubuntu using IPv6 * Setup .. _RTSP_step6: .. tab-set:: .. tab-item:: RTSP Protocol Packet Details **Request Packet** .. csv-table:: :file: ./RTSP/RTSP_Protocol_Packet_1.csv :widths: 10,20,30,10 :header-rows: 1 **Response Packet** .. csv-table:: :file: ./RTSP/RTSP_Protocol_Packet_2.csv :widths: 10,20,30,10 :header-rows: 1 **Header Fields Packet** .. csv-table:: :file: ./RTSP/RTSP_Protocol_Packet_3.csv :widths: 10,20,30,10 :header-rows: 1 **Entity Body Packet** .. csv-table:: :file: ./RTSP/RTSP_Protocol_Packet_4.csv :widths: 10,20,30,10 :header-rows: 1 .. _RTSP_step7: .. tab-set:: .. tab-item:: RTSP Usecases .. csv-table:: :file: ./RTSP/RTSP_Usecases.csv :widths: 10,20,30 :header-rows: 1 .. _RTSP_step8: .. tab-set:: .. tab-item:: RTSP Basic Features .. csv-table:: :file: ./RTSP/RTSP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _RTSP_step9: .. tab-set:: .. tab-item:: RTSP Feature : Session Control **Session Control - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-1_Session_Control_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step10: .. tab-set:: .. tab-item:: RTSP Feature : Out-of-Band Transport **Out-of-Band Transport - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-2_Out-of-Band_Transport_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step11: .. tab-set:: .. tab-item:: RTSP Feature : Bi-Directional Communication **Bi-Directional Communication - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-3_Bi-Directional_Communication_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step12: .. tab-set:: .. tab-item:: RTSP Feature : Support for Live and On-Demand Streaming **Support for Live and On-Demand Streaming - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-4_Support_for_Live_and_On-Demand_Streaming_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step13: .. tab-set:: .. tab-item:: RTSP Feature : Media Negotiation **Media Negotiation - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-5_Media_Negotiation_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step14: .. tab-set:: .. tab-item:: RTSP Feature : Low Latency **Low Latency - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-6_Low_Latency_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step15: .. tab-set:: .. tab-item:: RTSP Feature : Multimedia Synchronization **Multimedia Synchronization - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-7_Multimedia_Synchronization_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step16: .. tab-set:: .. tab-item:: RTSP Feature : Stateless or Stateful Operation **Stateless or Stateful Operation - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-8_Stateless_or_Stateful_Operation_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step17: .. tab-set:: .. tab-item:: RTSP Feature : Support for SDP **Support for SDP - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-9_Support_for_SDP_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step18: .. tab-set:: .. tab-item:: RTSP Feature : Scalability **Scalability - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-10_Scalability_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step19: .. tab-set:: .. tab-item:: RTSP Feature : Interoperability **Interoperability - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-11_Interoperability_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step20: .. tab-set:: .. tab-item:: RTSP Feature : Authentication and Access Control **Authentication and Access Control - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-12_Authentication_and_Access_Control_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step21: .. tab-set:: .. tab-item:: RTSP Feature : Pipelining Support **Pipelining Support - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-13_Pipelining_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step22: .. tab-set:: .. tab-item:: RTSP Feature : Persistent Connections **Persistent Connections - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-14_Persistent_Connections_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step23: .. tab-set:: .. tab-item:: RTSP Feature : Extensibility **Extensibility - Testcases** .. csv-table:: :file: ./RTSP/RTSP_Feature-15_Extensibility_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTSP_step26: .. tab-set:: .. tab-item:: Reference links * Reference links