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, or Real-Time Messaging Protocol, is a streaming protocol originally developed by Macromedia (now Adobe) for high-performance transmission of audio, video, and data between a server and a Flash player. It is widely used for live streaming and low-latency communication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why RTMP is Useful?** * Low latency – Ideal for real-time applications like live broadcasts and video conferencing. * Persistent connection – Maintains a constant TCP connection for smooth streaming. * Supports live and on-demand streaming. * Widely supported by streaming software (e.g., OBS, vMix). * Can be used as an ingest protocol for re-streaming via HLS or DASH. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * Client connects to RTMP server – A persistent TCP connection is established. * Stream is published – The broadcaster sends audio/video data to the server. * Server distributes stream – The server relays the stream to connected viewers. * Playback – Viewers receive the stream with minimal delay. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is RTMP used?** * Live streaming platforms – Twitch, Facebook Live (as ingest protocol). * Broadcast software – OBS Studio, Wirecast, XSplit. * Video conferencing – Low-latency internal communication tools. * Media servers – Wowza, Red5, Adobe Media Server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * RTMP operates over TCP, using port 1935 by default. * It defines its own messaging format and session control at the application level. * Handles stream control, metadata, and media data at the top layer. .. 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