Update frigate-install.sh

This commit is contained in:
CanbiZ 2025-08-18 08:46:17 +02:00
parent c831e7e9f9
commit 82d9d6235b

View File

@ -18,80 +18,10 @@ $STD apt-get install -y {git,ca-certificates,automake,build-essential,xz-utils,l
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setup Python3" msg_info "Setup Python3"
$STD apt-get install -y \ $STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils,python3-pip}
python3 python3-dev python3-setuptools python3-distutils python3-pip python3-venv $STD pip install --upgrade pip
$STD pip install --upgrade pip --break-system-packages
msg_ok "Setup Python3" msg_ok "Setup Python3"
msg_info "Setup NGINX"
apt-get update
apt-get -y build-dep nginx
apt-get -y install wget build-essential ccache patch ca-certificates
update-ca-certificates -f
export PATH="/usr/lib/ccache:$PATH"
cd /tmp
wget -nv https://nginx.org/download/nginx-1.29.0.tar.gz
tar -xf nginx-1.29.0.tar.gz
cd nginx-1.29.0
mkdir /tmp/nginx-vod
wget -nv https://github.com/kaltura/nginx-vod-module/archive/refs/tags/1.31.tar.gz
tar -xf 1.31.tar.gz -C /tmp/nginx-vod --strip-components=1
sed -i 's/MAX_CLIPS (128)/MAX_CLIPS (1080)/g' /tmp/nginx-vod/vod/media_set.h
patch -d /tmp/nginx-vod -p1 <<'EOF'
--- a/vod/avc_hevc_parser.c
+++ b/vod/avc_hevc_parser.c
@@ -3,6 +3,9 @@
bool_t
avc_hevc_parser_rbsp_trailing_bits(bit_reader_state_t* reader)
{
+ // https://github.com/blakeblackshear/frigate/issues/4572
+ return TRUE;
+
uint32_t one_bit;
if (reader->stream.eof_reached)
EOF
# secure-token module
mkdir /tmp/nginx-secure-token
wget -nv https://github.com/kaltura/nginx-secure-token-module/archive/refs/tags/1.5.tar.gz
tar -xf 1.5.tar.gz -C /tmp/nginx-secure-token --strip-components=1
# ngx-devel-kit
mkdir /tmp/ngx-devel-kit
wget -nv https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v0.3.3.tar.gz
tar -xf v0.3.3.tar.gz -C /tmp/ngx-devel-kit --strip-components=1
# set-misc module
mkdir /tmp/nginx-set-misc
wget -nv https://github.com/openresty/set-misc-nginx-module/archive/refs/tags/v0.33.tar.gz
tar -xf v0.33.tar.gz -C /tmp/nginx-set-misc --strip-components=1
# configure & build
cd /tmp/nginx-1.29.0
./configure --prefix=/usr/local/nginx \
--with-file-aio \
--with-http_sub_module \
--with-http_ssl_module \
--with-http_auth_request_module \
--with-http_realip_module \
--with-threads \
--add-module=/tmp/ngx-devel-kit \
--add-module=/tmp/nginx-set-misc \
--add-module=/tmp/nginx-vod \
--add-module=/tmp/nginx-secure-token \
--with-cc-opt="-O3 -Wno-error=implicit-fallthrough"
make CC="ccache gcc" -j"$(nproc)"
make install
ln -sf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx
# cleanup
rm -rf /tmp/nginx-1.29.0* /tmp/nginx-vod /tmp/nginx-secure-token /tmp/ngx-devel-kit /tmp/nginx-set-misc
msg_ok "NGINX with Custom Modules Built"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
fetch_and_deploy_gh_release "go2rtc" "AlexxIT/go2rtc" "singlefile" "latest" "/usr/local/go2rtc/bin" "go2rtc_linux_amd64" fetch_and_deploy_gh_release "go2rtc" "AlexxIT/go2rtc" "singlefile" "latest" "/usr/local/go2rtc/bin" "go2rtc_linux_amd64"
fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "latest" "/opt/frigate" fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "latest" "/opt/frigate"