logging audio selection
Build and Push Docker Images / build-and-push (push) Successful in 21s

This commit is contained in:
2026-02-11 22:55:14 +01:00
parent 4c91cfd6e0
commit bfc3f22c29
+7 -2
View File
@@ -60,7 +60,8 @@ def get_preferred_audio_stream_index(path: Path) -> int | None:
"ffprobe", "ffprobe",
"-v", "quiet", "-v", "quiet",
"-print_format", "json", "-print_format", "json",
"-show_entries", "stream=index,codec_type:stream_tags=language", "-select_streams", "a",
"-show_entries", "stream=index:stream_tags=language",
str(path), str(path),
], ],
capture_output=True, capture_output=True,
@@ -88,11 +89,15 @@ def get_preferred_audio_stream_index(path: Path) -> int | None:
flemish = ("vls", "nl-be", "nlb") flemish = ("vls", "nl-be", "nlb")
for idx, lang, raw in audio_streams: for idx, lang, raw in audio_streams:
if lang in dutch or raw in dutch: if lang in dutch or raw in dutch:
logger.debug("Audio: selected stream %s (lang=%s)", idx, raw or "(none)")
return idx return idx
for idx, lang, raw in audio_streams: for idx, lang, raw in audio_streams:
if lang in flemish or raw in flemish: if lang in flemish or raw in flemish:
logger.debug("Audio: selected stream %s (Flemish, lang=%s)", idx, raw or "(none)")
return idx return idx
return audio_streams[0][0] idx = audio_streams[0][0]
logger.debug("Audio: no Dutch/Flemish found, using first stream %s (lang=%s)", idx, audio_streams[0][2] or "(none)")
return idx
except ( except (
subprocess.TimeoutExpired, subprocess.TimeoutExpired,
ValueError, ValueError,