Squashed commit of the following:

commit 3aed8610af1d540864005b75e15dd731b4e17517
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 12:49:15 2025 -0400

    docs: update comment

commit a23ffe62c6c89fe0fae6c2660589c87ea0355b81
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 12:47:00 2025 -0400

    chore: remove test file

commit 1f589e64d04eb816cd1e2d472f4ba92cc2649da7
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 12:46:28 2025 -0400

    chore: remove perm fixes

commit c4421b80e81e8608cc2d1020e79e3649a0402d0b
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 11:20:18 2025 -0400

    fix: read input correctly

commit 2b5e083c6070e6617c08dbf6d2b832be246b5d59
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 10:48:05 2025 -0400

    test: do not change user groups for HW

commit 9edc87de747b3b16a91ac5420d5aacb8276b795d
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 10:46:23 2025 -0400

    chore: more nits

commit 8dcf55fc28023666a664b5abbd3f3024bf3d9797
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sun Mar 16 10:37:40 2025 -0400

    chore: ln ffmpeg

commit e21430cee818cc5d7c0cc6f1b5421de6cca89688
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:49:16 2025 -0400

    test: video file

commit b32605fd3cfd5d07e0c5e30d8091753f024bb99e
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:42:42 2025 -0400

    test: video file

commit 02b5743ceeb91656f9d7f088325e999d5bf69e88
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:41:13 2025 -0400

    Revert "test: remove non-free driver"

    This reverts commit 8b8e70211b75ce4b2e7a4300a074925a3795ed16.

commit 8b8e70211b75ce4b2e7a4300a074925a3795ed16
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:33:23 2025 -0400

    test: remove non-free driver

commit 5d2e1ad7b41b81e0a2030382a054e0de83ffb818
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:23:04 2025 -0400

    test: update my repo url

commit 8564a495af796c5d456aeba0d504f2ccd426adc8
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:08:34 2025 -0400

    test: Remove ffmpeg custom install

commit 9641bd85b2294f0ab97e2c153a781079d1638ec2
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:04:57 2025 -0400

    test: use my repo for testing script

commit 4dd1c10c6a9385bf67c22c460e57bae4dd8a4300
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:04:03 2025 -0400

    Reapply "chore: test my branch"

    This reverts commit 7e7c0c157cc308ae0f8c637f7f198728275ae73e.

commit bdc08c48245447fa7d77df66d8cabd172e2e8ab7
Author: Kyle Kroboth <kroboth.k@gmail.com>
Date:   Sat Mar 15 11:04:03 2025 -0400

    Reapply "Reapply "chore: change update url to my repo""

    This reverts commit f05ba8a8105efff09c368cc7b700f435d23f3fed.
This commit is contained in:
Kyle Kroboth 2025-03-16 13:05:03 -04:00
parent cb6d92b7e0
commit 5866673dd1
2 changed files with 12 additions and 74 deletions

View File

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

View File

@ -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 <<EOF >/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)? <y/N> " prompt
read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Hardware Acceleration (non-free)"
cat <<EOF >/etc/apt/sources.list.d/non-free.list
cat <<EOF >/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