A stable RTMP encoder configuration comes down to four settings. Use constant bitrate (CBR) sized to about 75 percent of your sustained upload. Set a fixed 2-second keyframe interval with scene-cut keyframes disabled. Send AAC-LC audio at 48 kHz and 128 to 160 kbps. Split the ingest URL into server and stream key exactly as the receiving server expects. Get those right and the packager downstream can cut clean HLS segments, the player never stalls on a missing IDR frame, and your encoder stops dropping frames under load. Budget about 20 minutes with OBS Studio or ffmpeg and a working ingest endpoint.
For H.264 over RTMP in 2026, a stable 1080p60 ingest profile uses constant bitrate at 6,000 kbps, a keyframe every 2 seconds (120 frames at 60 fps), and AAC-LC audio at 160 kbps and 48 kHz. That combination lets any HLS or DASH packager cut clean 2-, 4- or 6-second segments without re-encoding the video track.
| Output | Video bitrate (H.264, CBR) | GOP at 2 s | Audio | Min sustained upload |
|---|---|---|---|---|
| 720p30 | 3,000 kbps | 60 frames | AAC-LC 128 kbps, 48 kHz | ~4.4 Mbps |
| 720p60 | 4,500 kbps | 120 frames | AAC-LC 160 kbps, 48 kHz | ~6.5 Mbps |
| 1080p30 | 4,500 kbps | 60 frames | AAC-LC 160 kbps, 48 kHz | ~6.5 Mbps |
| 1080p60 | 6,000 kbps | 120 frames | AAC-LC 160 kbps, 48 kHz | ~8.6 Mbps |
| 1440p60 | 9,000 to 12,000 kbps | 120 frames | AAC-LC 160 kbps, 48 kHz | ~13 to 17 Mbps |
Upload headroom, not resolution, is what decides which row you can actually run: a 1080p60 stream at 6,000 kbps needs roughly 8.6 Mbps of sustained upload, not 6.
Use this rule of thumb, which is our own planning heuristic: required upload equals (video bitrate plus audio bitrate) times 1.05 for FLV and TCP overhead, divided by 0.75 for headroom. For 1080p60, that is (6,000 + 160) × 1.05 ÷ 0.75, or about 8,624 kbps. The 25 percent headroom absorbs TCP congestion-window collapses and competing traffic. RTMP runs over TCP, so any sustained shortfall turns straight into encoder-side buffering and dropped frames.
Constant bitrate keeps the ingest flow predictable for the network and for the server-side transcoder. VBR spikes on high-motion scenes are exactly when your uplink is least able to absorb them. The OBS settings below map to Settings, Output, Output Mode: Advanced, Streaming tab.
| OBS Studio field | Value | Why |
|---|---|---|
| Encoder | x264 or NVIDIA NVENC H.264 | H.264 is universally accepted over classic RTMP |
| Rate Control | CBR | Flat ingest rate, predictable uplink use |
| Bitrate | 6000 Kbps | From the budget in step 1 |
| Keyframe Interval | 2 s (never 0) | 0 means auto, which produces irregular GOPs |
| CPU Usage Preset | veryfast (x264) or P5 (NVENC) | Leaves CPU headroom and avoids skipped frames |
| Profile / B-frames | high / 2 | Better quality per bit, broadly decodable |
| Audio (Settings, Audio) | 48 kHz, stereo, 160 kbps | Matches broadcast and packager defaults |
The single most damaging OBS default is Keyframe Interval 0, so set it explicitly to 2 before anything else.
The keyframe interval must divide evenly into your HLS segment duration. Packagers can only cut at IDR frames. A 2-second GOP works with 2, 4 or 6 second segments, but a 4-second GOP forces a 6-second target into uneven 4 and 8 second segments. Published guidance from major live platforms in 2026 converges on 2 seconds, with 4 seconds as the common ceiling.
GOP length in frames equals fps times seconds: 60 at 30 fps, 120 at 60 fps. Disable scene-cut detection too, because extra I-frames inserted on cuts break alignment across transcoded renditions. Aligned segments also cache better. Segment N covers the same time range in every rendition, so a CDN such as BlazingCDN can serve ABR switches from cache instead of going back to the packager.
Use AAC-LC, 48 kHz, stereo, 128 to 160 kbps. The failure to avoid is a 44.1 kHz source feeding a 48 kHz encoder, or the reverse. Resampling in the wrong place produces slow A/V drift that shows up 30 to 60 minutes into an event, long after your smoke test passed. Classic RTMP in FLV carries H.264 and AAC only. The Enhanced RTMP specification adds HEVC, AV1 and VP9, but only use those if your ingest server explicitly supports them.
Most ingest endpoints split into a server field and a key field. The server is the rtmp scheme, the host, port 1935 (optional, since it is the default) and the application path, for example rtmp://INGEST_HOST:1935/APP_NAME. Replace INGEST_HOST with your server's hostname and APP_NAME with the application, commonly "live". The stream key goes only in the key field. Pasting it into the server field as well produces a doubled path that the server rejects as an unknown stream.
If port 1935 is blocked on a corporate or venue network, switch to RTMPS on port 443, which wraps the same protocol in TLS. Treat the stream key as a credential and rotate it if it appears on screen or in a shared config.
The table lists the libx264 parameters that reproduce the OBS profile above, in the order you would pass them after your input.
| Parameter | Value | Effect |
|---|---|---|
| -c:v / -preset / -profile:v | libx264 / veryfast / high | Codec, speed and profile |
| -b:v / -maxrate / -bufsize | 6000k / 6000k / 6000k | CBR with a 1-second VBV buffer |
| -x264-params | nal-hrd=cbr | Strict HRD-compliant CBR with filler |
| -g / -keyint_min / -sc_threshold | 120 / 120 / 0 | Fixed 2 s GOP at 60 fps, no scene-cut IDRs |
| -bf / -pix_fmt | 2 / yuv420p | B-frames and a universally decodable chroma format |
| -c:a / -b:a / -ar / -ac | aac / 160k / 48000 / 2 | AAC-LC stereo at 48 kHz |
| -f and destination | flv, then the full server URL with /STREAM_KEY appended | RTMP requires an FLV container |
Setting -sc_threshold 0 is the parameter most ffmpeg recipes omit, and it is the one that keeps GOPs exactly 2 seconds long.
Add -re before the input only when streaming from a file, so ffmpeg sends at real-time speed rather than as fast as it can read.
Before changing anything, export your current OBS profile (Profile, Export) or copy your working ffmpeg invocation into version control. If the new settings misbehave mid-event, stop the stream, import the old profile and restart. The ingest server treats it as a reconnect, and most players recover within one or two segment durations.
A 1-second keyframe interval cuts join time and supports 1-second low-latency segments. The cost is roughly 10 to 20 percent more bits for the same visual quality at a fixed bitrate, so only take it if latency matters more than sharpness. Tune zerolatency removes B-frames and lookahead, which saves a few hundred milliseconds but costs quality per bit. Hardware encoders free the CPU but, at equal bitrate, typically trail x264 medium on quality.
For events that cannot fail, run a second RTMP encoder to the platform's backup ingest with identical GOP and audio settings. The failover is only seamless if both streams are frame-compatible. If you control delivery, review the CDN features that matter for live HLS segment delivery once ingest is stable.
Use a fixed 2-second keyframe interval with scene-cut detection disabled. Two seconds divides evenly into 2, 4 and 6 second HLS segments, which keeps renditions aligned for adaptive bitrate switching. Intervals above 4 seconds are rejected or flagged by many ingest servers and slow down viewer join time.
CBR is better for RTMP ingest. RTMP runs over TCP, so VBR bitrate spikes on high-motion scenes can exceed available upload and cause dropped frames. VBR suits file-based encoding, where the encoder has no real-time uplink constraint. The server-side transcoder produces the adaptive ladder anyway.
RTMP uses TCP port 1935 by default, and RTMPS uses TCP port 443 over TLS. If an encoder cannot connect from a restricted network, switching to RTMPS on 443 usually works because that port is rarely blocked. The encoder settings stay the same; only the server URL scheme and port change.
Pull 60 seconds of your current production stream and run the ffprobe keyframe check from the validation section. Then open one packaged HLS media playlist and scan the EXTINF values. If keyframes land anywhere other than exact 2-second steps, or segment durations vary, you have found the source of your ABR stalls. Your encoder is on auto or inserting scene-cut IDRs, and the fix takes two fields. Instrument network dropped frames and encoder-skipped frames as separate metrics on your next event. They fail for different reasons, and aggregating them hides which one you actually need to fix.