RTMP - Real-Time Messaging 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 RTMP?** RTMP (Real-Time Messaging Protocol) is a proprietary protocol developed by Adobe for streaming audio, video, and data over the Internet, primarily used for live and on-demand media streaming. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is RTMP useful?** * Enables low-latency live streaming. * Supports adaptive bitrate streaming. * Widely supported by media servers and streaming platforms. * Supports multiplexing of audio, video, and data. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * The client establishes a persistent TCP connection to the RTMP server. * Media streams are sent in chunks with metadata, allowing synchronization. * RTMP supports commands for stream control like play, pause, and seek. * It can tunnel through firewalls via HTTP tunneling. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is RTMP used?** * Live streaming platforms (e.g., Twitch, YouTube Live). * Media servers like Adobe Media Server, Wowza, and Red5. * Used for ingesting live streams before transcoding to other protocols (e.g., HLS, DASH). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * RTMP operates at the **Application Layer (Layer 7)** of the OSI model. * It relies on TCP for transport. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTMP windows specific?** * No, RTMP is not Windows-specific. * It is platform-independent and supported across Windows, Linux, macOS, and embedded devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS RTMP Linux Specific?** * No, RTMP is not Linux-specific. * Commonly implemented on Linux servers as well as other platforms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by RTMP?** * RTMP uses **TCP** as its transport protocol. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by RTMP?** * RTMP typically uses **TCP port 1935**. * It can also run over other ports using HTTP tunneling (e.g., port 80). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is RTMP using Client server model?** * Yes, RTMP uses the **client-server model**. * Clients connect to a streaming server to send or receive media streams. .. 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:`RTMP Version&RFC Details ` * :ref:`RTMP Basic Setup on Ubuntu using IPv4 ` * :ref:`RTMP Basic Setup on Ubuntu using IPv6 ` * :ref:`RTMP Protocol Packet Details ` * :ref:`RTMP Usecases ` * :ref:`RTMP Basic Features ` * :ref:`RTMP Feature : Low Latency ` * :ref:`RTMP Feature : Persistent TCP Connection ` * :ref:`RTMP Feature : Multiplexing ` * :ref:`RTMP Feature : Chunking Mechanism ` * :ref:`RTMP Feature : Stream Control Messages ` * :ref:`RTMP Feature : Support for Live and On-Demand Streaming ` * :ref:`RTMP Feature : Flexible Media Types ` * :ref:`RTMP Feature : Adaptive Bitrate ` * :ref:`RTMP Feature : Encryption Support ` * :ref:`RTMP Feature : Metadata Transmission ` * :ref:`RTMP Feature : Command Messaging ` * :ref:`RTMP Feature : Cross-Platform Compatibility ` * :ref:`RTMP Feature : Firewall Traversal ` * :ref:`RTMP Feature : Stream Publishing and Playback ` * :ref:`RTMP Feature : Extensibility ` * :ref:`Reference links ` .. _RTMP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _RTMP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _RTMP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _RTMP_step5: .. tab-set:: .. tab-item:: RTMP Version&RFC Details .. csv-table:: :file: ./RTMP/RTMP_RFC_Details.csv :widths: 10,10,10,30,40 :header-rows: 1 .. _RTMP_step24: .. tab-set:: .. tab-item:: RTMP Basic Setup on Ubuntu using IPv4 * Setup .. _RTMP_step25: .. tab-set:: .. tab-item:: RTMP Basic Setup on Ubuntu using IPv6 * Setup .. _RTMP_step6: .. tab-set:: .. tab-item:: RTMP Protocol Packet Details **Basic Header Packet** .. csv-table:: :file: ./RTMP/RTMP_Protocol_Packet_1.csv :widths: 10,20,30,10 :header-rows: 1 **Message Header Packet** .. csv-table:: :file: ./RTMP/RTMP_Protocol_Packet_2.csv :widths: 10,20,30,10 :header-rows: 1 **Extended Timestamp Packet** .. csv-table:: :file: ./RTMP/RTMP_Protocol_Packet_3.csv :widths: 10,20,30,10 :header-rows: 1 **Payload Packet** .. csv-table:: :file: ./RTMP/RTMP_Protocol_Packet_4.csv :widths: 10,20,30,10 :header-rows: 1 .. _RTMP_step7: .. tab-set:: .. tab-item:: RTMP Usecases .. csv-table:: :file: ./RTMP/RTMP_Usecases.csv :widths: 10,20,30 :header-rows: 1 .. _RTMP_step8: .. tab-set:: .. tab-item:: RTMP Basic Features .. csv-table:: :file: ./RTMP/RTMP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _RTMP_step9: .. tab-set:: .. tab-item:: RTMP Feature : Low Latency **Low Latency - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-1_Low_Latency_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step10: .. tab-set:: .. tab-item:: RTMP Feature : Persistent TCP Connection **Persistent TCP Connection - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-2_Persistent_TCP_Connection_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step11: .. tab-set:: .. tab-item:: RTMP Feature : Multiplexing **Multiplexing - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-3_Multiplexing_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step12: .. tab-set:: .. tab-item:: RTMP Feature : Chunking Mechanism **Chunking Mechanism - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-4_Chunking_Mechanism_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step13: .. tab-set:: .. tab-item:: RTMP Feature : Stream Control Messages **Stream Control Messages - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-5_Stream_Control_Messages_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step14: .. tab-set:: .. tab-item:: RTMP Feature : Support for Live and On-Demand Streaming **Support for Live and On-Demand Streaming - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-6_Support_For_Live_And_On-Demand_Streaming_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step15: .. tab-set:: .. tab-item:: RTMP Feature : Flexible Media Types **Flexible Media Types - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-7_Flexible_Media_Types_Testcases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step16: .. tab-set:: .. tab-item:: RTMP Feature : Adaptive Bitrate **Adaptive Bitrate - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-8_Adaptive_Bitrate_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step17: .. tab-set:: .. tab-item:: RTMP Feature : Encryption Support **Encryption Support - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-9_Encryption_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step18: .. tab-set:: .. tab-item:: RTMP Feature : Metadata Transmission **Metadata Transmission - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-10_Metadata_Transmission_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step19: .. tab-set:: .. tab-item:: RTMP Feature : Command Messaging **Command Messaging - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-11_Command_Messaging_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step20: .. tab-set:: .. tab-item:: RTMP Feature : Cross-Platform Compatibility **Cross-Platform Compatibility - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-12_Cross-Platform_Compatibility_Testcases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step21: .. tab-set:: .. tab-item:: RTMP Feature : Firewall Traversal **Firewall Traversal - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-13_Firewall_Traversal_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step22: .. tab-set:: .. tab-item:: RTMP Feature : Stream Publishing and Playback **Stream Publishing and Playback - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-14_Stream_Publishing_And_Playback_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step23: .. tab-set:: .. tab-item:: RTMP Feature : Extensibility **Extensibility - Testcases** .. csv-table:: :file: ./RTMP/RTMP_Feature-15_Extensibility_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _RTMP_step26: .. tab-set:: .. tab-item:: Reference links * Reference links