Fix lazy audio path resolution for GPU streaming
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions

Audio playback path was being resolved during parsing when database
may not be ready, causing fallback to non-existent path. Now resolves
lazily when stream starts, matching how audio analyzer works.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-04 11:32:04 +00:00
parent ef3638d3cf
commit ed617fcdd6
9 changed files with 159 additions and 57 deletions

View File

@@ -928,7 +928,18 @@ class StreamInterpreter:
ctx = Context(fps=fps)
# Output (with optional audio sync)
# Resolve audio path lazily here if it wasn't resolved during parsing
audio = self.audio_playback
if audio and not Path(audio).exists():
# Try to resolve as friendly name (may have failed during parsing)
audio_name = Path(audio).name # Get just the name part
resolved = self._resolve_name(audio_name)
if resolved and resolved.exists():
audio = str(resolved)
print(f"Lazy resolved audio: {audio}", file=sys.stderr)
else:
print(f"WARNING: Audio file not found: {audio}", file=sys.stderr)
audio = None
if output == "pipe":
out = PipeOutput(size=(w, h), fps=fps, audio_source=audio)
elif output == "preview":