diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 45d9c51..697d1cf 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kkroboth # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 40c805b..a9756b1 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,28 +19,14 @@ $STD apt-get install -y \ curl \ sudo \ mc \ - jq + jq \ + ffmpeg msg_ok "Installed Dependencies" -msg_info "Installing FFmpeg" -wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb -$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb -cat </etc/apt/sources.list.d/backports.list -deb https://www.deb-multimedia.org bookworm main non-free -deb https://www.deb-multimedia.org bookworm-backports main -EOF -$STD apt update -DEBIAN_FRONTEND=noninteractive -$STD apt-get install -t bookworm-backports ffmpeg -y -rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb -msg_ok "Installed FFmpeg" - -msg_info "Setting Up Hardware Acceleration" - -read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt +read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Hardware Acceleration (non-free)" -cat </etc/apt/sources.list.d/non-free.list + cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware @@ -51,21 +37,14 @@ deb-src http://deb.debian.org/debian-security bookworm-security non-free non-fre deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware EOF -$STD apt-get update -$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + $STD apt-get update + $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} else - msg_info "Installing Hardware Acceleration" -$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + msg_info "Installing Intel Hardware Acceleration" + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} fi -if [[ "$CTTYPE" == "0" ]]; then - chgrp video /dev/dri - chmod 755 /dev/dri - chmod 660 /dev/dri/* - $STD adduser $(id -u -n) video - $STD adduser $(id -u -n) render -fi -msg_ok "Installed and Set Up Hardware Acceleration" +msg_ok "Installed and Set Up Intel Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb @@ -76,6 +55,8 @@ $STD apt-get install -y aspnetcore-runtime-8.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Setup ${APPLICATION}" +$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg +$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file @@ -83,49 +64,6 @@ unzip -q -d /opt/fileflows $temp_file systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" -msg_info "Setting ffmpeg variables in fileflows" -msg_info "Waiting for API to become available..." -while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") - if [ "$HTTP_STATUS" -eq 200 ]; then - msg_ok "API is now available!" - break - fi - msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." - sleep 5 -done - -ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') -ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') - -response=$(curl -s -X 'DELETE' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{ - \"Uids\": [ - \"$ffmpeg_uid\", - \"$ffprobe_uid\" - ] -}") - -ffmpeg_path=$(which ffmpeg) -ffprobe_path=$(which ffprobe) - -response=$(curl -s -X 'POST' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}") - -response=$(curl -s -X 'POST' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}") - -msg_ok "ffmpeg and ffprobe variables have been updated successfully." - motd_ssh customize