
A TCP-based application layer protocol designed for the high-performance transmission of streaming audio, video, and data. Originally a proprietary technology developed by Macromedia (now Adobe) for the Flash ecosystem, it has transitioned into the industry-standard protocol for First-Mile ingest, the process of pushing a live feed from an encoder to a streaming platform.
Technical Architecture
RTMP operates by establishing a persistent connection between a client (encoder) and a server (ingest node), typically over TCP Port 1935. Packet Streaming: To ensure smooth delivery, RTMP fragments the multimedia stream into small chunks. The default sizes are 128 bytes for video and 64 bytes for audio, though these are negotiated dynamically to balance latency against overhead. Multiplexing: Multiple virtual channels (audio, video, and control data) are interleaved over a single TCP connection. This allows for synchronized timing and prevents one data type from blocking the others. AMF (Action Message Format): RTMP uses this binary format to serialize object graphs, enabling remote procedure calls (RPC) for commands like connect, createStream, and publish.
The Connection Lifecycle
An RTMP session follows a strict three-step sequence to ensure both endpoints are synchronized: Handshake: A series of three packets (C0/S0, C1/S1, C2/S2) is exchanged. This exchange verifies the protocol version, synchronizes timestamps, and establishes the initial echo of random data to confirm link stability. Connection: The client sends a connect command containing metadata (app name, flash version, audio/video codec support). The server responds with _result a window acknowledgment parameters. Streaming: The client issues createStream, followed by publish. Once the server acknowledges, the actual media chunks begin to flow.
Protocol Variants
- RTMP (Plain): Standard unencrypted transmission over TCP.
- RTMPS: RTMP wrapped in a TLS/SSL layer. In 2026, this is the mandatory standard for social platforms (Facebook, YouTube) to prevent stream hijacking.
- RTMPE: Uses Adobe’s proprietary encryption; largely deprecated in favor of RTMPS.
- RTMPT: Tunneled through HTTP/HTTPS to bypass restrictive firewalls that block non-standard ports.
- RTMFP: A UDP-based variant (Real-Time Media Flow Protocol) used for peer-to-peer delivery; rarely used for standard ingest.
Modern Context: Enhanced RTMP (E-RTMP)
As of 2026, the legacy limitations of RTMP (originally capped at H.264 and AAC) have been addressed by Enhanced RTMP. Codec Support: E-RTMP adds support for HEVC (H.265) and AV1 using FourCC (Four Character Code) signaling. HDR Support: Allows for high-dynamic-range video metadata to be passed within the stream. Multi-track Audio: Enables the transmission of multiple language tracks within a single ingest session.
Comparative Performance
- RTMP vs. SRT: While RTMP is more 1 mobile data) due to its superior UDP-based error correction.
- RTMP vs. WebRTC: RTMP typically incurs 2-5 seconds of latency. WebRTC is used when "sub-second" (under 500ms) interactivity is required, such as in live gambling or remote surgery.
The Ingest-Only Reality
In 2026, RTMP is rarely used for the "Last Mile" (delivery to the viewer). Instead, servers ingest RTMP and immediately transcode it into HLS or DASH for scalable delivery to browsers and mobile apps.