Technical Guides

RTMP Bitrate Guide: How RTMP Streaming Works and What Bitrate to Use

RTMP is still how most encoders send video to a server. Getting it right comes down to a bitrate your upload can really sustain, a keyframe every two seconds and knowing where the delay actually comes from.

What RTMP streaming is

RTMP (Real-Time Messaging Protocol) is the protocol most encoders use to send a live stream to a server. Macromedia created it for Flash in 2002, Adobe bought Macromedia in 2005, and Flash itself reached end of life at the end of 2020. RTMP outlived it because it solved the first mile well: OBS, vMix, Wirecast, Streamlabs and nearly every hardware encoder speak it, and it is the default way to go live on YouTube, Facebook and Twitch (Facebook over RTMPS, its encrypted variant).

What changed is its job. Nobody watches RTMP anymore, since browsers stopped playing it along with Flash. Today RTMP carries your stream from the encoder to the server, and the server turns it into HLS for viewers. A recent extension called Enhanced RTMP adds HEVC and AV1, which YouTube accepts; for most servers, ours included, the standard is still H.264 video with AAC audio.

How RTMP streaming works

  1. The encoder opens a TCP connection to the server, on port 1935 by default.
  2. Both sides exchange a short handshake, and the encoder connects to an application on the server: the part of the URL after the host name, often "live".
  3. The encoder publishes under a stream name, which is your stream key.
  4. Audio and video travel as small chunks interleaved over that single connection.
  5. The server repackages the stream into HLS segments and a playlist, and can also create lower qualities, record it or relay it to other platforms.

In OBS, that translates into two fields under Settings, Stream:

Server:      rtmp://ingest.example.com/live
Stream key:  the-key-from-your-panel

Because RTMP runs over TCP, lost packets are resent in order. On a clean line you never notice. On a lossy one, TCP slows down to protect the network, the encoder's output queue fills up and OBS starts dropping frames. That behavior is the main reason to move to SRT on unstable links, which we cover further down.

What bitrate to use for RTMP

Two limits decide your bitrate: what the destination accepts and what your upload can sustain. For your own player, these are the ranges we recommend with H.264:

ResolutionVideo bitrateAudio (AAC)
1080p, 60 fps6 to 8 Mbps160 kbps
1080p, 30 fps4.5 to 6 Mbps128 to 160 kbps
720p, 30 fps2.5 to 4 Mbps128 kbps
480p, 30 fps1 to 1.5 Mbps96 to 128 kbps

Platforms set their own numbers. YouTube's encoder table for H.264 asks for at least 5 Mbps at 1080p30 and recommends 14; at 1080p60, 6 and 17; at 720p, 3 and 8. Facebook documents up to 9 Mbps at 1080p. So if the same stream feeds your site and YouTube through Restream, stay at 6 Mbps or more at 1080p30. Every extra megabit also costs you in delivery, because each viewer of your own player downloads it: that is why bitrate is the first lever in our guide to CDN cost for video streaming.

The upload rule

Send no more than 60 percent of your sustained upload, video and audio together, measured at the hour you will stream. A line that tests at 20 Mbps on a weekday morning can deliver a third of that on Sunday at 11, when the whole neighborhood is online, and live video has no patience for that kind of drop: the encoder's buffer fills and frames go.

Sustained uploadWhat to sendTotal bitrate
20 Mbps or more1080p60, or 1080p30 with room to spareUp to 8 Mbps
10 to 20 Mbps1080p304.5 to 6 Mbps
6 to 10 Mbps720p302.5 to 3.5 Mbps
3 to 6 Mbps480p, or 720p at the top of the band1.5 to 3 Mbps
Under 3 Mbps480p at most, and a better connection before the next event1 to 1.5 Mbps

Run the speed test from the encoder's computer, on a cable, and look at upload, not download. On 4G or 5G, measure on site and expect less while moving; anything mobile is better served by SRT, and by bonding with SRTLA when the stakes are high.

Keyframes, CBR and OBS settings that hold up

Set a keyframe every 2 seconds. YouTube and Facebook ask for 2 and never more than 4, and on any HLS server the keyframe interval decides where segments can be cut and where a player can switch quality. Use CBR rate control: the peaks of variable bitrate are exactly what a tight upload cannot absorb. Then, in OBS:

  • Encoder. NVENC on a recent NVIDIA card (RTX series), or the Apple VT H264 hardware encoder on a Mac, takes the work off the CPU. Without a good hardware encoder, use x264 with the veryfast preset, or faster and fast if the CPU has room. Older GTX 10-series cards also have NVENC, with visibly softer quality at the same bitrate.
  • Profile and tune. Profile high. Leave tune empty: zerolatency costs quality and saves almost nothing when viewers watch over HLS.
  • Audio. AAC at 48 kHz, stereo, 128 to 160 kbps.
  • Network. In Settings, Advanced, the dynamic bitrate option lowers the bitrate under congestion instead of dropping frames (it works with RTMP output). On Windows, also enable network optimizations. If the computer has several network interfaces, use Bind to IP to pick the right one.
  • Reconnect. Automatic reconnect on, with enough retries to cover a minute or two.

The XtreamCast panel shows what actually arrives, refreshed every 10 seconds: protocol, codecs, keyframe interval, frame rate and bitrate. If you set 2-second keyframes and the panel says otherwise, believe the panel. For dropped frames and connection errors on the OBS side, OBS's connection troubleshooting guide is the best reference.

RTMP and adaptive bitrate

RTMP carries one quality per connection, so RTMP adaptive bitrate does not exist on its own. Adaptive bitrate (ABR) happens after ingest: a transcoder creates lighter versions of your stream, the server lists them in the HLS playlist, and each viewer's player moves between them as their connection changes.

There are two ways to get there. Some encoders send several RTMP streams, one per quality, to servers that group them, which multiplies your upload. The usual way is to send one high-quality stream and transcode on the server. On XtreamCast that is XtreamTranscoder (USD 20/month): it keeps your original and adds 720p, 480p and 240p, so a 1080p source becomes four qualities with aligned keyframes. Radio Hoy, a Chilean station whose signal also reaches cable operators, runs it on our Chile origin and sends SRT output to those operators.

Do not confuse ABR with OBS's dynamic bitrate. Dynamic bitrate lowers what your encoder sends when your upload struggles, which lowers quality for every viewer at once. ABR keeps the source intact and lets each viewer's player choose.

Where RTMP latency really comes from

RTMP itself is quick: on a decent connection your stream reaches the server within a second or two. The delay viewers notice comes afterwards, from how the stream is delivered: HLS cuts video into segments, and players hold a buffer to ride out network drops.

DeliveryDelayBest for
Standard HLSThe highest; on XtreamCast the player keeps about 30 s of margin on purposeLarge audiences, stability first
LL-HLSAbout 3 sLive chat, Q and A, sports with commentary
WebRTC playbackUp to 0.3 s, a ceiling rather than a guaranteeSmall interactive groups, auctions

LL-HLS is a paid add-on per channel (USD 20/month) that our team enables without any change to your encoder; see low-latency streaming. To measure your own delay, put a clock on screen, film it, and compare with what a phone on mobile data shows. Keep network round-trip time and glass-to-glass delay apart: they measure different things.

When to switch from RTMP to SRT

Consider SRT when you see packet loss, unstable round-trip times or reconnections during ingest: typical of mobile links, shared venue networks and long international routes. SRT runs over UDP, recovers lost packets by retransmission within a latency buffer you choose, and does not stall the way TCP does on a lossy line. It does not create upload capacity, though: if the line cannot carry 6 Mbps, no protocol will.

Test it properly: same source, same bitrate, same route, one rehearsal with RTMP and one with SRT, writing down drops, recovery time and delay. Keep the network in mind too: RTMP uses TCP port 1935, which most networks let out, while SRT uses UDP, which some corporate and campus firewalls block. XtreamCast ingests both, and SRT authenticates with a token in the stream ID; Telecanal, a Chilean TV channel, sends its three signals to our North America origin over SRT. Our comparison of SRT vs RTMP goes deeper into the protocol differences.

Your own RTMP server or a managed one

Nginx-RTMP, MediaMTX and SRS are good open-source servers, and running one teaches you a lot. Budget what comes with it: hosting, security updates, monitoring, HLS packaging, delivery to your viewers and someone who answers when it breaks in the middle of an event. A managed RTMP server takes that part off your hands: you send RTMP or SRT, and the platform packages, delivers, records and relays, with 24/7 human support over WhatsApp, email and tickets. You can test the whole chain on the free plan before choosing.

Mistakes we see on new setups

  1. Bitrate at the edge of the upload. "I have 10 Mbps, so I will stream at 10." When the line dips to 8, and it will, the stream chokes. Stay at 60 percent.
  2. A hardware encoder nobody checked. NVENC on a recent card is excellent; on an old one it can look worse than x264. Check the generation before choosing it.
  3. Measuring upload at the wrong time. A speed test at 10 a.m. says nothing about Sunday at 11. Measure at the real time of the stream, on several days.
  4. Trusting Wi-Fi. Wi-Fi adds variable delay and random packet loss. Use a cable; if you need mobility, use SRT over cellular, ideally bonded.
  5. No plan B for the network. One internet line is a single point of failure. Our guide to live stream failover and redundancy covers backup lines and encoders.
  6. A stream key that walked out the door. Keys leave with former volunteers and contractors more often than you would think. Rotate them, and in XtreamCast give each person their own collaborator access with only the permissions they need, plus two-factor authentication.
  7. Port 1935 blocked. Corporate and campus networks often block it. Ask IT to allow outbound TCP 1935 to your server, or bring your own connection, such as a 4G/5G router. Some platforms offer RTMPS on port 443 for this case; on XtreamCast, RTMPS uses port 1937, which those networks may block as well.
  8. No full rehearsal. Run a complete test stream 24 to 48 hours before, at full length, and watch it from a phone on mobile data, not from the studio network.
We have run managed streaming servers since 2011, and every month someone discovers one of these points live on air. It is how everyone learns. The difference is finding it in a rehearsal, with support that answers at any hour.

Send RTMP or SRT, and we handle the rest

RTMP and SRT ingest with diagnostics every 10 seconds, HLS delivery to your player and XtreamTranscoder for adaptive bitrate. Test your settings on the free plan first.