From 68a22650264978e177416b6a371fa28d0f4649c6 Mon Sep 17 00:00:00 2001 From: hoelee Date: Sat, 24 Oct 2026 08:53:39 +0800 Subject: [PATCH] fix(tracks): honour TRANSCODE_FFPROBE instead of the bare name packaged builds ship ffmpeg inside their own tree; tracks.py called `ffprobe` by bare name, which only resolved because this host has ffmpeg on PATH. The bundle acceptance strips PATH on purpose, so probe() raised FileNotFoundError [WinError 2] two seconds into the item and the queue logged it as a quality refusal. Mirror transcode.py:36-37 (TRANSCODE_*/RT_* with a bare fallback). --- scripts/tracks.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/tracks.py b/scripts/tracks.py index 54fee01..ab8e1bf 100644 --- a/scripts/tracks.py +++ b/scripts/tracks.py @@ -43,8 +43,16 @@ import json import os import subprocess -FFMPEG = "ffmpeg" -FFPROBE = "ffprobe" +# The supervisor hands every engine child its OWN resolved ffmpeg/ffprobe +# (`rt.config.engine_child_env` → TRANSCODE_FFMPEG/TRANSCODE_FFPROBE, mirroring +# `transcode.py:36-37`). Honour them here as well: this module used to call the bare +# names, which only worked because this host happens to have ffmpeg on PATH. +# Measured 2026-10-24: the packaged app ships ffmpeg inside its own tree and the +# bundle acceptance strips PATH on purpose ("so only the bundle could have served +# it") - `probe()` then died with `FileNotFoundError [WinError 2]` 2 s into the item +# and the queue filed it as a quality refusal. +FFMPEG = os.environ.get("TRANSCODE_FFMPEG") or os.environ.get("RT_FFMPEG") or "ffmpeg" +FFPROBE = os.environ.get("TRANSCODE_FFPROBE") or os.environ.get("RT_FFPROBE") or "ffprobe" # ---- codec taxonomy ------------------------------------------------------------------- # Text subtitles: transcodable to mov_text (lossy) or copyable into matroska.