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, or Real-Time Streaming Protocol, is a network control protocol developed by the IETF (RFC 2326) for controlling streaming media servers. It is used to establish and control media sessions between endpoints allowing clients to play, pause, and stop media streams in real time. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why RTSP is Useful?** * Controls media playback (play, pause, seek, record) remotely. * Works with RTP to deliver real-time audio and video. * Supports both live and on-demand streaming. * Low latency – suitable for IP cameras and surveillance systems. * Session-based control – allows multiple streams to be managed independently. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * Client sends SETUP request – Establishes a session and transport method (usually RTP over UDP or TCP). * Client sends PLAY request – Starts media streaming from the server. * Media is streamed via RTP – RTSP controls the session, RTP carries the media. * Client can PAUSE or TEARDOWN – RTSP allows session control like pause, stop, or teardown. * RTCP provides feedback – RTCP monitors quality and synchronization. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is RTSP used?** * IP cameras and CCTV systems – For real-time video surveillance. * Media servers – Like Wowza, Helix, and VLC for live/on-demand streaming. * Video conferencing systems – For session control and stream management. * Streaming apps and players – VLC, QuickTime, and others support RTSP streams. * Remote monitoring and broadcasting – For live events, classrooms, and security. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI Layer Does RTSP Belong To?** RTSP operates at the **Application Layer (Layer 7)** of the OSI model because: * It defines commands and responses for controlling streaming media sessions (play, pause, teardown), which are application-level functions. * It uses TCP (usually port 554) for connection and signaling but handles session management at a higher level. * Provides services directly to end-user applications and coordinates with lower-level protocols like RTP. * Has similarities with HTTP in structure and semantics, also an application-layer 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 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