fix ffmpeg path

This commit is contained in:
CanbiZ (MickLesk)
2026-04-24 14:21:16 +02:00
parent 2c22e03774
commit bb7b612d5f
2 changed files with 21 additions and 2 deletions

View File

@@ -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"

View File

@@ -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)"