Skip to content

Commit 1af6cc6

Browse files
authored
ErsatzTV: use project prebuild ffmpeg version (#6067)
1 parent 0113c7e commit 1af6cc6

2 files changed

Lines changed: 56 additions & 4 deletions

File tree

ct/ersatztv.sh

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ function update_script() {
2626
msg_error "No ${APP} Installation Found!"
2727
exit
2828
fi
29-
RELEASE=$(curl -fsSL https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
29+
RELEASE=$(curl -fsSL https://api.github.com/repos/ErsatzTV/ErsatzTV/releases | grep -oP '"tag_name": "\Kv\K[^"]+' | head -n1)
30+
RELEASE_FFMPEG=$(curl -fsSL https://api.github.com/repos/ErsatzTV/ErsatzTV-ffmpeg/releases | grep -oP '"tag_name": "\K[^"]+' | head -n 1)
31+
3032
if [[ "${RELEASE}" != "$(cat ~/.ersatztv 2>/dev/null)" ]] || [[ ! -f ~/.ersatztv ]]; then
3133
msg_info "Stopping ErsatzTV"
3234
systemctl stop ersatzTV
3335
msg_ok "Stopped ErsatzTV"
3436

35-
FFMPEG_VERSION="latest" FFMPEG_TYPE="medium" setup_ffmpeg
3637
fetch_and_deploy_gh_release "ersatztv" "ErsatzTV/ErsatzTV" "prebuild" "latest" "/opt/ErsatzTV" "*linux-x64.tar.gz"
3738

3839
msg_info "Starting ErsatzTV"
@@ -43,6 +44,29 @@ function update_script() {
4344
else
4445
msg_ok "No update required. ${APP} is already at ${RELEASE}"
4546
fi
47+
48+
if [[ "${RELEASE_FFMPEG}" != "$(cat ~/.ersatztv-ffmpeg 2>/dev/null)" ]] || [[ ! -f ~/.ersatztv-ffmpeg ]]; then
49+
msg_info "Stopping ErsatzTV"
50+
systemctl stop ersatzTV
51+
msg_ok "Stopped ErsatzTV"
52+
53+
fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
54+
55+
msg_info "Set ErsatzTV-ffmpeg links"
56+
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
57+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
58+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/local/bin/ffplay
59+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe
60+
msg_ok "ffmpeg links set"
61+
62+
msg_info "Starting ErsatzTV"
63+
systemctl start ersatzTV
64+
msg_ok "Started ErsatzTV"
65+
66+
msg_ok "Updated Successfully"
67+
else
68+
msg_ok "No update required. ErsatzTV-ffmpeg is already at ${RELEASE_FFMPEG}"
69+
fi
4670
exit
4771
}
4872

install/ersatztv-install.sh

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ setting_up_container
1313
network_check
1414
update_os
1515

16-
FFMPEG_VERSION="latest" FFMPEG_TYPE="full" setup_ffmpeg
17-
1816
msg_info "Setting Up Hardware Acceleration"
1917
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
2018
if [[ "$CTTYPE" == "0" ]]; then
@@ -26,7 +24,37 @@ if [[ "$CTTYPE" == "0" ]]; then
2624
fi
2725
msg_ok "Set Up Hardware Acceleration"
2826

27+
read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
28+
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
29+
msg_info "Installing Intel Hardware Acceleration (non-free)"
30+
cat <<EOF >/etc/apt/sources.list.d/non-free.list
31+
32+
deb http://deb.debian.org/debian bookworm non-free non-free-firmware
33+
deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware
34+
35+
deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware
36+
deb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware
37+
38+
deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
39+
deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
40+
EOF
41+
$STD apt-get update
42+
$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
43+
else
44+
msg_info "Installing Intel Hardware Acceleration"
45+
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
46+
fi
47+
msg_ok "Installed and Set Up Intel Hardware Acceleration"
48+
2949
fetch_and_deploy_gh_release "ersatztv" "ErsatzTV/ErsatzTV" "prebuild" "latest" "/opt/ErsatzTV" "*linux-x64.tar.gz"
50+
fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
51+
52+
msg_info "Set ErsatzTV-ffmpeg links"
53+
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
54+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
55+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/local/bin/ffplay
56+
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe
57+
msg_ok "ffmpeg links set"
3058

3159
msg_info "Creating Service"
3260
cat <<EOF >/etc/systemd/system/ersatzTV.service

0 commit comments

Comments
 (0)