Fix HLS validation for multi-resolution output
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions

MultiResolutionHLSOutput creates files in subdirectories:
- original/playlist.m3u8 instead of stream.m3u8
- original/segment_*.ts instead of segment_*.ts

The validation now checks both paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-04 21:16:58 +00:00
parent 2f56ffc472
commit 0534081e44

View File

@@ -411,14 +411,22 @@ def run_stream(
logger.error(f"Failed to update pending run with playlist CID: {e}")
raise # Fail fast - database errors should not be silently ignored
# HLS output creates stream.m3u8 and segment_*.ts files in stream_dir
# HLS output creates playlist and segments
# - Single-res: stream_dir/stream.m3u8 and stream_dir/segment_*.ts
# - Multi-res: stream_dir/original/playlist.m3u8 and stream_dir/original/segment_*.ts
hls_playlist = stream_dir / "stream.m3u8"
if not hls_playlist.exists():
# Try multi-res output path
hls_playlist = stream_dir / "original" / "playlist.m3u8"
# Validate HLS output (must have playlist and at least one segment)
if not hls_playlist.exists():
raise RuntimeError("HLS playlist not created - rendering likely failed")
segments = list(stream_dir.glob("segment_*.ts"))
if not segments:
# Try multi-res output path
segments = list(stream_dir.glob("original/segment_*.ts"))
if not segments:
raise RuntimeError("No HLS segments created - rendering likely failed")