What Is RTMP Real-Time Messaging Protocol Explained

What Is RTMP? Real-Time Messaging Protocol Explained

What is RTMP? Short for Real-Time Messaging Protocol, it carries live audio and video from an encoder to a server over one TCP connection. Macromedia built it for Flash in the early 2000s. Even so, it is still a standard way to send video from an encoder such as OBS to a platform such as YouTube.

This guide answers the question behind the search: what is RTMP, and how does the RTMP protocol work? It also covers what a stream carries and why a protocol from the Flash era still matters. Finally, it explains Enhanced RTMP, the update that added HEVC and AV1, with numbers from YouTube’s own settings.

๐Ÿ“– Want to run an ingest server yourself?

Read Nginx RTMP Server: How to Set It Up and What to Run It On for a working configuration, the security gaps and the hardware it needs.


What Does RTMP Stand For?

RTMP stands for Real-Time Messaging Protocol, and some sources write it without the hyphen as Real Time Messaging Protocol. Macromedia created it to stream between Flash Player and its media server. Adobe then acquired Macromedia and published a public specification, version 1.0, in December 2012. Wikipedia describes that version as incomplete, because it leaves out Adobe’s secure RTMP measures.

Adobe ended support for Flash Player on December 31, 2020, but the protocol stayed. The specification of its update says RTMP and the FLV file format date from 2002, and that both remain vital, especially in live broadcasting. Encoders and platforms already spoke it, so nobody had a reason to drop it. In one line, what is RTMP? It is a one-way pipe for live video, where the encoder pushes and the server receives.

The protocol in five dates

2002The protocol and the FLV format are introduced, for Flash
Dec 2012Adobe publishes specification 1.0, which Wikipedia calls incomplete
31 Dec 2020Adobe ends support for Flash Player, and the protocol stays
Jan 2024Twitch opens its Enhanced Broadcasting beta, with several encodes from the streamer’s GPU
Jan 2026Latest revision of the Enhanced specification (v2), with HEVC, AV1 and multitrack

Timeline table of five dates in the history of RTMP: introduced in 2002 for Flash, specification 1.0 published by Adobe in December 2012, Flash Player support ended on 31 December 2020, Twitch’s Enhanced Broadcasting beta in January 2024, and the latest Enhanced RTMP v2 specification revision in January 2026.


How Does the RTMP Protocol Work?

The RTMP protocol opens one TCP connection, shakes hands, and then sends audio and video as small chunks. The server reassembles them. By default, it uses TCP port 1935.

How an RTMP publish starts, in five steps

1. TCP
port 1935
โ†’
2. Handshake
C0-C2, S0-S2
โ†’
3. connect
names the app
โ†’
4. publish
picks the stream
โ†’
5. Media
audio and video chunks

The connection stays open for the whole broadcast.

Flow diagram of how an RTMP publish starts in five steps: a TCP connection on port 1935, a handshake exchanging three packets each way, a connect command that names the application, a publish command that picks the stream, and then audio and video chunks.

The handshake exchanges three packets in each direction. According to Wikipedia’s account of the specification, the client’s first packet is one version byte, and its second is 1,536 bytes long. Then the encoder sends a connect command that names the application. After that, it creates a stream and publishes to it.

The media itself travels in chunks. Audio uses message type 8 and video uses type 9, as the Enhanced RTMP specification notes. Meanwhile, the two sides negotiate the chunk size. The Nginx module defaults to 4,096 bytes, and its wiki says bigger chunks lower the CPU overhead.

So what is RTMP, technically? It is a protocol that does not read the payload. FLV is the container that defines the codecs, which is why the two had separate specifications.


What Is an RTMP Stream?

An RTMP stream is the live audio and video that one encoder publishes to a named stream on a server. Its address has three parts: the server, the application and the stream key.

The parts of an RTMP address

Part Example What it does
Scheme and serverrtmp://live.example.comWhere to connect, on port 1935 unless stated
Application/liveA named route on the server, with its own rules
Stream key/abc123Identifies the stream, and works like a password

Table of the three parts of an RTMP address with an example and purpose for each: the scheme and server such as rtmp://live.example.com, the application such as /live, and the stream key such as /abc123, which identifies the stream and works like a password.

Platforms usually give you the server and the key separately, and your encoder joins them. Anyone who has the key can publish to that stream, so treat it as a secret.

What Is RTMP in OBS?

In OBS, you choose the custom service type, then paste the server address and the stream key. OBS builds the full address and publishes to it. The same two fields work in most encoders, which is why the protocol travels so well.


Which Codecs Can the Protocol Carry?

Classic RTMP carries H.264 video and AAC or MP3 audio in practice, while Enhanced RTMP adds HEVC, AV1, VP9 and Opus. The older list exists because Flash wrote it.

What classic RTMP and Enhanced RTMP can carry

Classic RTMP and FLV Enhanced RTMP adds
VideoSorenson H.263, Screen video, On2 VP6, AVC (H.264)HEVC, VP8, VP9, AV1, VVC
AudioMP3, AAC, Nellymoser, Speex, G.711, PCMOpus, FLAC, AC-3, E-AC-3

Table comparing the codecs classic RTMP and FLV can carry with those added by Enhanced RTMP: classic video is Sorenson H.263, Screen video, On2 VP6 and H.264, and Enhanced RTMP adds HEVC, VP8, VP9, AV1 and VVC; classic audio is MP3, AAC, Nellymoser, Speex, G.711 and PCM, and Enhanced RTMP adds Opus, FLAC, AC-3 and E-AC-3.

The gain is real, and YouTube’s own numbers show it. Its live encoder settings accept H.264, H.265 and AV1 over RTMP and RTMPS. In addition, for every resolution it recommends 25% to 30% less bitrate for AV1 and H.265 than for H.264.

The same stream needs about 29% less bitrate with AV1 or H.265

YouTube’s recommended bitrate in Mbps, by resolution and frame rate.

1080p at 30 fps

H.264: 14 Mbps
AV1 / H.265: 10 Mbps

1080p at 60 fps

H.264: 17 Mbps
AV1 / H.265: 12 Mbps

4K at 30 fps

H.264: 42 Mbps
AV1 / H.265: 30 Mbps

4K at 60 fps

H.264: 50 Mbps
AV1 / H.265: 35 Mbps

Source: YouTube Help, live encoder settings. The saving is 25% at 720p and 29% to 30% at the other resolutions.

Horizontal bar chart of YouTube’s recommended live bitrate in megabits per second for H.264 compared with AV1 or H.265: 14 against 10 at 1080p30, 17 against 12 at 1080p60, 42 against 30 at 4K30, and 50 against 35 at 4K60, about 29 percent less for AV1 and H.265.


What Is RTMP Used for Today?

RTMP is used today to push live video into a platform, because it is simple and almost every encoder supports it. YouTube’s settings page lists RTMP and RTMPS as the protocol. It also asks for a 2-second keyframe interval, constant bitrate and AAC or MP3 audio.

The viewer sees something else. YouTube transcodes the live stream into many formats, so every device and connection can watch. That is where the transcoding happens, and RTMP only gets the stream in.

YouTube also accepts HLS as an input, for encoders that cannot send HDR or newer codecs over RTMP. However, it warns that HLS adds delay, because it sends segments instead of a continuous stream. That delay is the price of the format, and the reason RTMP kept the ingest job.

From encoder to viewer: where the protocol stops

Encoder
OBS or FFmpeg
โ†’
RTMP or RTMPS
Platform
transcodes many versions
โ†’
HLS over HTTP
Viewers
any device

The first arrow is all the protocol covers. Everything after it is transcoding and HTTP delivery.

Flow diagram from encoder to viewer: an encoder such as OBS or FFmpeg sends the stream over RTMP or RTMPS to a platform, which transcodes it into many versions, and delivers it to viewers on any device over HTTP using HLS.

๐Ÿ“– What does the platform do after RTMP?

Read What Is Video Transcoding? A Complete Beginner’s Guide for how one stream becomes many versions.


What Is Enhanced RTMP?

Enhanced RTMP, or E-RTMP, is an open update to RTMP and FLV that adds modern codecs while staying compatible with existing servers. The Veovera specification adds HEVC, AV1, VP9 and Opus, HDR, multiple tracks per stream and a request that lets a server ask a client to reconnect. That request helps when a server updates or needs to rebalance its load. So what is RTMP missing without it? Modern codecs, HDR and several tracks per stream.

Adobe, Google, Twitch, FFmpeg, OBS and Intel are among its contributors. Besides, FFmpeg and OBS Studio already support it, according to Wikipedia.

Twitch shows why it matters. Its Enhanced Broadcasting beta lets the streamer’s GPU create several encodes of one stream. Twitch explained that it transcodes in the cloud on older processors, so it cannot always guarantee transcodes for every streamer. With multiple tracks, however, part of that work moves to the streamer’s hardware.

๐Ÿ“– Which chip does that encoding?

Read Hardware Transcoder: GPU, ASIC or CPU? How to Compare Them for streams per card, quality and cost.


How Do You Encrypt the Stream?

Plain RTMP is not encrypted, so use RTMPS, which wraps the same protocol in TLS. YouTube recommends RTMPS and says the data stays encrypted all the way into Google’s servers. YouTube’s developer guide says RTMPS connections must use port 443.

Six names for RTMP, and what each one means

Variant What it is
RTMPThe plain protocol, over TCP, on port 1935 by default
RTMPSRTMP inside a TLS connection
RTMPERTMP with Adobe’s own lighter encryption
RTMPTRTMP wrapped in HTTP requests, to pass firewalls
RTMFPRTMP over UDP, for direct peer-to-peer links
E-RTMPThe Enhanced update, with new codecs and multitrack

Table of six RTMP variants: plain RTMP over TCP on port 1935, RTMPS inside a TLS connection, RTMPE with Adobe’s lighter encryption, RTMPT wrapped in HTTP requests to pass firewalls, RTMFP over UDP for peer-to-peer links, and E-RTMP with new codecs and multitrack.

Your own server needs the same care. However, the Nginx RTMP module speaks plain RTMP only. TLS therefore needs a proxy, such as HAProxy or stunnel, in front of it.


How Much Bandwidth Does a Server Need?

An RTMP server is bandwidth-bound, because one stream comes in and every destination you push it to multiplies the upload. A 1080p30 H.264 stream at YouTube’s recommended 14 Mbps already needs 14 Mbps of upload.

Upload needed for one 14 Mbps stream

Destinations Upload
1 platform14 Mbps
2 platforms28 Mbps
3 platforms42 Mbps
5 platforms70 Mbps

Table of the upload bandwidth needed to send one 14 megabit per second stream to one, two, three or five platforms: 14, 28, 42 and 70 megabits per second.

That is why relaying from a server can beat relaying from home. The server receives one stream, then sends the copies on a datacentre port. Nginx RTMP Server shows how, and the sizing maths sits in the streaming guide below.

๐Ÿ“– How many viewers can one port serve?

Read Dedicated Server for Streaming for the bandwidth maths behind concurrent viewers.


What Is RTMP? The Short Version

What is RTMP, in the end? It is the protocol that carries a live stream from your encoder into a platform or server. It is old, but it stays because nothing simpler replaced it for ingest. Meanwhile, Enhanced RTMP now lets it carry HEVC and AV1.

  • Use RTMPS, not plain RTMP, whenever the destination offers it.
  • Treat the stream key as a password.
  • Count the upload: every destination repeats the bitrate.

Run Your Own RTMP Ingest on a Datacentre Port

Swify dedicated servers start at โ‚ฌ120 a month, with 1 Gbps unmetered bandwidth, full root access and up to 40 physical cores for FFmpeg. Hosted in the Netherlands on AMS-IX, with monthly billing and no long contracts.

โ†’ Explore Swify Dedicated Servers


Frequently Asked Questions

What is RTMP?

RTMP stands for Real-Time Messaging Protocol. Macromedia created it for streaming between Flash Player and a media server, and Adobe published a public specification in December 2012. Today it mostly sends live video from an encoder to a server.

Read our guide to running Nginx as an ingest server to see it on a server.


Is RTMP still used in 2026?

Yes, mainly for ingest. YouTube’s live settings list RTMP and RTMPS as the protocol, and the enhanced update now carries HEVC and AV1. However, viewers rarely watch it directly, because the platform converts the stream to formats such as HLS.

Read Streaming Server Architecture: From Single Server to Cluster for where RTMP fits in a platform.


What port does RTMP use?

RTMP uses TCP port 1935 by default. YouTube requires RTMPS connections on port 443, inside a TLS connection. In either case, open the port only to the encoder addresses you trust.


What is the difference between RTMP and RTMPS?

RTMPS is the same protocol inside a TLS connection, so the stream and the stream key are encrypted in transit. The plain version sends them in the clear. YouTube recommends RTMPS for that reason.

Read Best Security Practices for Dedicated Server Environments for a checklist before going live.


What is a stream key?

A stream key is the secret part of an RTMP address that identifies one stream. Anyone who has it can publish to that stream, so treat it like a password. A server can check keys with a callback before it accepts a publisher.


Can browsers play these streams directly?

Not directly. Browsers stopped playing RTMP streams when Flash ended, so platforms convert them to HLS or a similar format. As a result, RTMP stays on the way in, and HTTP-based formats carry the stream to viewers.

Read What Is Video Transcoding? A Complete Beginner’s Guide for how one stream becomes many versions.


How much bandwidth does an RTMP stream need?

A 1080p30 H.264 stream at YouTube’s recommended settings needs about 14 Mbps, and AV1 or H.265 needs about 10 Mbps. Every extra destination repeats that upload, so three platforms need 42 Mbps.

Read Dedicated Server for Streaming for how many viewers one port can serve.