Files
podsteadr/mediamtx/mediamtx.yml
T
ssmithxandClaude Sonnet 5 eb20e88f58 fix: switch HLS output from low-latency to standard mode
lowLatency's small per-part buffering window has very little tolerance
for B-frame reordering (common in typical OBS encoder presets) — a real
test stream crashed the muxer twice in ~2 minutes with "too many
reordered frames" / "unable to extract DTS", tearing down and rebuilding
HLS output each time (visible to viewers as buffering/stalls).

Standard HLS buffers a full segment before finalizing instead of
near-real-time parts, absorbing that jitter. Confirmed via a live test
stream afterward: zero muxer crashes over several minutes, vs. two in
the first two minutes before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 11:08:20 +00:00

56 lines
1.7 KiB
YAML

# MediaMTX configuration for podsteadr.
# Ingest: RTMP (OBS) + WebRTC/WHIP (browser). Output: HLS. Publish auth is
# delegated to podsteadr via HTTP; stream status is polled from the API.
logLevel: info
api: yes
apiAddress: :9997
# ---- authentication ------------------------------------------------------
authMethod: http
authHTTPAddress: http://podsteadr-app:8095/api/mediamtx/auth
authHTTPExclude:
- action: api
- action: metrics
- action: pprof
# ---- protocols -----------------------------------------------------------
rtsp: no
srt: no
moq: no
rtmp: yes
rtmpAddress: :1935
hls: yes
hlsAddress: :8888
# Standard HLS, not lowLatency: LL-HLS's small per-part buffering window has very little
# tolerance for B-frame reordering (common in most OBS encoder presets), and a real test
# stream crashed the muxer twice in ~2 minutes with "too many reordered frames" / "unable to
# extract DTS" once frame timing got even slightly irregular. Standard HLS buffers a full
# segment before finalizing, which absorbs that jitter — a few extra seconds of latency
# instead of intermittent muxer crashes / viewer buffering.
hlsVariant: mpegts
hlsAlwaysRemux: yes
hlsAllowOrigins: ["*"]
webrtc: yes
webrtcAddress: :8889
webrtcLocalUDPAddress: :8189
webrtcAllowOrigins: ["*"]
# ---- recording -----------------------------------------------------------
pathDefaults:
record: yes
recordPath: /recordings/%path/%Y-%m-%d_%H-%M-%S-%f
recordFormat: fmp4
recordPartDuration: 1s
recordSegmentDuration: 1h
recordDeleteAfter: 168h
paths:
# Streams live at live/<streamId>; publish requires the stream secret,
# which podsteadr checks in the auth webhook.
"~^live/[A-Za-z0-9]+$": {}