Fix lazy audio path resolution for GPU streaming
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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user