v2: mpegts.js + single-upstream fan-out hub (no FFmpeg/HLS)

Replaces the FFmpeg -> MediaMTX -> HLS pipeline with a raw MPEG-TS
fan-out architecture:

- Go stream.Hub holds ONE upstream connection per active channel and
  broadcasts the raw TS bytes to all connected browsers via /ts.
  The IPTV provider only ever sees one IP (the server), no matter how
  many viewers are watching (shared single-channel model).
- Frontend uses mpegts.js to play the raw TS in-browser via MSE,
  fixing HEVC/H.265 4K streams that HLS could not package.
- Dropped FFmpeg, MediaMTX, RTMP/RTSP, HLS proxy, playback/ingest
  modes, the OBS source toggle, and FFmpeg health stats.
- UI look preserved (fullscreen video, collapsible sidebar, status
  bar, upstream-down banner, hourly playlist auto-refresh).

Tradeoff: loses iOS Safari (no MSE/mpegts.js); fixes desktop/Android
playback of both H.264 and H.265.
This commit is contained in:
2026-06-12 19:33:06 -07:00
parent 88a189de34
commit 723ae1f1ac
18 changed files with 432 additions and 899 deletions

View File

@@ -2,9 +2,7 @@ services:
tuner:
build: .
ports:
- "1935:1935"
- "8080:8080"
- "8888:8888"
volumes:
# real1.m3u is mounted read-only as the local source.
# It is only used when PLAYLIST_USE_LOCAL=true.
@@ -18,10 +16,4 @@ services:
PLAYLIST_USE_LOCAL: "false"
# Set to "0" or "off" to disable automatic playlist refresh.
PLAYLIST_AUTO_REFRESH_INTERVAL: "1h"
# Playback mode: "standard" (MPEG-TS, iOS-friendly), "fmp4" (HEVC/H.265), or "llhls"
PLAYBACK_MODE: "standard"
# Ingest mode: "rtmp" (default) or "rtsp" (better for HEVC/H.265)
INGEST_MODE: "rtmp"
# RTSP ingest audio mode: "aac" (transcode audio, recommended) or "copy"
INGEST_AUDIO_MODE: "aac"
restart: unless-stopped