Gate player on HLS master playlist, surface ffmpeg errors, bound respawn #1

Merged
killerx merged 1 commit from fix-hls-playlist-readiness into master 2026-06-28 23:23:22 +02:00
Owner

The watch player loaded /hls//master.m3u8 the instant a stream's status
flipped to "live", but ffmpeg only flips status when it launches — before any
playlist exists. When ffmpeg then crash-looped (e.g. an audio-track count
mismatch), the master playlist was never written and the player 404'd, while
ffmpeg respawned forever with its actual error swallowed.

  • Pipeline: keep a bounded tail of ffmpeg stdout/stderr and Logger.error it on
    a non-zero exit, so the real failure is diagnosable instead of discarded.
  • Transcoder.Supervisor: bound restarts to 10-in-120s (the 3-in-5s default
    never tripped, since a failing ffmpeg lived ~8-12s per round) so a broken
    stream stops looping instead of respawning indefinitely.
  • PlayerLive: add Pipeline.master_playlist_ready?/1 and only mount the player
    once master.m3u8 exists on disk; until then show a "Stream starting"
    placeholder and poll every 5s, swapping in the player without a reload.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

The watch player loaded /hls/<id>/master.m3u8 the instant a stream's status flipped to "live", but ffmpeg only flips status when it launches — before any playlist exists. When ffmpeg then crash-looped (e.g. an audio-track count mismatch), the master playlist was never written and the player 404'd, while ffmpeg respawned forever with its actual error swallowed. - Pipeline: keep a bounded tail of ffmpeg stdout/stderr and Logger.error it on a non-zero exit, so the real failure is diagnosable instead of discarded. - Transcoder.Supervisor: bound restarts to 10-in-120s (the 3-in-5s default never tripped, since a failing ffmpeg lived ~8-12s per round) so a broken stream stops looping instead of respawning indefinitely. - PlayerLive: add Pipeline.master_playlist_ready?/1 and only mount the player once master.m3u8 exists on disk; until then show a "Stream starting" placeholder and poll every 5s, swapping in the player without a reload. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gate player on HLS master playlist, surface ffmpeg errors, bound respawn
Some checks failed
CI / build-and-push (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
5b36c5791a
The watch player loaded /hls/<id>/master.m3u8 the instant a stream's status
flipped to "live", but ffmpeg only flips status when it launches — before any
playlist exists. When ffmpeg then crash-looped (e.g. an audio-track count
mismatch), the master playlist was never written and the player 404'd, while
ffmpeg respawned forever with its actual error swallowed.

- Pipeline: keep a bounded tail of ffmpeg stdout/stderr and Logger.error it on
  a non-zero exit, so the real failure is diagnosable instead of discarded.
- Transcoder.Supervisor: bound restarts to 10-in-120s (the 3-in-5s default
  never tripped, since a failing ffmpeg lived ~8-12s per round) so a broken
  stream stops looping instead of respawning indefinitely.
- PlayerLive: add Pipeline.master_playlist_ready?/1 and only mount the player
  once master.m3u8 exists on disk; until then show a "Stream starting"
  placeholder and poll every 5s, swapping in the player without a reload.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
killerx merged commit f4bb5adf34 into master 2026-06-28 23:23:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Magehand/streamer!1
No description provided.