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).
This commit is contained in:
hoelee committed 2026-10-24 08:53:39 +08:00
1 parent f088ae78e3
commit 68a2265026
1 file changed
+10 -2
+10 -2
View File
@@ -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.