Fix HLS validation for multi-resolution output
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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user