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 Fixes // StreamRelay Lab

Caddy & Nginx Reverse Proxy Headers for LL-HLS & WHEP

Web players (hls.js, Video.js, Shaka) fail silently on cross-origin manifests unless your reverse proxy strips stale .m3u8 caches and sets clean CORS headers.

Measured MediaMTX & FFmpeg Telemetry

Never cache .m3u8 playlists at the proxy or CDN layer; meanwhile, immutable .m4s/.ts segments can carry short 10-second Cache-Control headers so micro-bursts hit edge memory.

Subsystem / SignalMeasured TargetOperational Impact
Playlist (.m3u8) Cacheno-cache, no-storePrevents players looping stale 3 segments
Segment (.m4s/.ts) Cachepublic, max-age=10Safe for live edge micro-caching
CORS HeaderAccess-Control-Allow-Origin *Required for embedded hls.js players

Step-by-Step Triage & Config Remediation

  1. Proxy :443 to MediaMTX :8888: Route /live/* HLS paths over HTTP/2 TLS to 127.0.0.1:8888.
  2. Set strict no-cache on manifests: Ensure .m3u8 responses never cache, especially for 200ms LL-HLS part requests.
  3. Expose WHEP POST endpoint: Route /whep/* to 127.0.0.1:8889 while keeping UDP :8189 open directly.
# Caddyfile snippet for MediaMTX LL-HLS + WHEP signaling
stream.example.com {
  handle /live/*/whep* {
    reverse_proxy 127.0.0.1:8889
  }
  handle {
    reverse_proxy 127.0.0.1:8888
  }
}

Diagnostic FAQ

Does MediaMTX already send CORS headers?

MediaMTX includes configurable hlsAllowOrigins and webrtcAllowOrigins; keep proxy CORS rules aligned so headers are never duplicated.

Can Nginx handle 3,000 concurrent LL-HLS connections?

Yes, with worker_rlimit_nofile 65535 and keepalive_requests 10000, Nginx or Caddy handles 3,000+ TLS streams easily.

Related Broadcast Fixes Guides

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