From bb7b612d5f2d0aa3dca7e322cbf63a166e7af18c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:21:16 +0200 Subject: [PATCH] fix ffmpeg path --- misc/tools.func | 5 +++++ tools/pve/post-pbs-install.sh | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 81621a8f3..752302557 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -4014,6 +4014,11 @@ function setup_ffmpeg() { libdav1d-dev libsvtav1-dev zlib1g-dev libnuma-dev libva-dev libdrm-dev ) + if apt-cache show libsvtav1enc-dev &>/dev/null; then + DEPS+=(libsvtav1enc-dev) + elif apt-cache show libsvtav1-dev &>/dev/null; then + DEPS+=(libsvtav1-dev) + fi ;; *) msg_error "Invalid FFMPEG_TYPE: $TYPE" diff --git a/tools/pve/post-pbs-install.sh b/tools/pve/post-pbs-install.sh index 47100948e..80b3cc838 100644 --- a/tools/pve/post-pbs-install.sh +++ b/tools/pve/post-pbs-install.sh @@ -65,6 +65,14 @@ component_exists_in_sources() { grep -h -E "^[^#]*Components:[^#]*\b${component}\b" /etc/apt/sources.list.d/*.sources 2>/dev/null | grep -q . } +require_whiptail() { + if ! command -v whiptail >/dev/null 2>&1; then + msg_error "Missing dependency: whiptail" + echo -e "Install it first (e.g. apt update && apt install -y whiptail), then re-run this script." + exit 127 + fi +} + # ---- main ---- main() { header_info @@ -90,8 +98,14 @@ main() { CODENAME="$(get_pbs_codename)" case "$CODENAME" in - bookworm) start_routines_3 ;; - trixie) start_routines_4 ;; + bookworm) + require_whiptail + start_routines_3 + ;; + trixie) + require_whiptail + start_routines_4 + ;; *) msg_error "Unsupported Debian codename: $CODENAME" echo -e "Supported: bookworm (PBS 3.x) and trixie (PBS 4.x)"