Skip to main content
LIVE_HUD STREAMRELAY LAB // MEDIAMTX RTMP -> LL-HLS / WHEP / SRT AUDIT 2026-11-19 | GO RSS: 90-450 MB | EGRESS: UNMETERED VDS VS 10 GBPS
MediaMTXRTMP
MediaMTXRTMP Disclosure: Outbound /go/ links marked rel="sponsored" may earn a referral fee at zero checkout surcharge (Disclosures).
Broadcast Errors // StreamRelay Lab

RTMP Ingest TCP Window Stalls & writeQueueSize Overflows

When publisher bitrate spikes above 8-12 Mbps over long-haul TCP, small socket buffers and undersized writeQueueSize cause OBS to drop frames and reset RTMP.

Measured MediaMTX & FFmpeg Telemetry

RTMP runs over single-stream TCP port 1935. If packet loss or slow downstream readers backpressure MediaMTX’s internal ring buffer (default writeQueueSize: 512), publisher packets stall or disconnect.

Subsystem / SignalMeasured TargetOperational Impact
Default writeQueueSize512 packetsToo small for 8-12 Mbps 60fps bursts
Hardened writeQueueSize2048 - 4096 packetsAbsorbs transient RTT jitter cleanly
Required Keyframe Interval2 seconds (GOP)Mandatory for clean HLS/WHEP switching

Step-by-Step Triage & Config Remediation

  1. Raise writeQueueSize to 2048+: Increase writeQueueSize in mediamtx.yml to absorb micro-bursts from 8-12 Mbps streams.
  2. Enforce 2-second Keyframe Interval: Set OBS Keyframe Interval = 2s; irregular keyframes break LL-HLS part boundaries.
  3. Switch congested ingest to SRT :8890: If trans-Atlantic TCP RTMP drops frames, send SRT over UDP :8890 with 200 ms ARQ latency.
# mediamtx.yml RTMP ingest resilience
writeQueueSize: 2048
rtmp: yes
rtmpAddress: :1935
readTimeout: 15s
writeTimeout: 15s

Diagnostic FAQ

Does raising writeQueueSize consume much RAM?

Increasing writeQueueSize from 512 to 2048 adds only a few megabytes per active path inside Go MediaMTX.

Should I encrypt RTMP with RTMPS or use SRT?

SRT with passphrase encryption (:8890) handles packet loss and jitter far better than TCP-based RTMPS over public internet links.

Related Broadcast Errors Guides

MediaMTXRTMP: Size egress Mbps & ABR cores before go-live Deploy InterServer 10G