From 186e3b87f072452923e4656904fad0c206f3fcf8 Mon Sep 17 00:00:00 2001 From: zebrapurring <> Date: Fri, 20 Dec 2024 14:50:28 +0100 Subject: [PATCH] Install ffmpeg from Jellyfin fork --- Scripts/config.env | 2 ++ Scripts/installdependencies.sh | 12 ++++++++++-- launchd/com.immich.machine.learning.plist | 2 +- launchd/com.immich.plist | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Scripts/config.env b/Scripts/config.env index 070c09c..cf032fe 100644 --- a/Scripts/config.env +++ b/Scripts/config.env @@ -1,6 +1,8 @@ IMMICH_TAG="v1.123.0" +FFMPEG_VERSION="7.0.2-7" # Taken from https://github.com/immich-app/base-images/blob/main/server/bin/build-lock.json IMMICH_INSTALL_DIR="/opt/immich" +IMMICH_BIN_DIR="$IMMICH_INSTALL_DIR/bin" IMMICH_SETTINGS_DIR="$IMMICH_INSTALL_DIR/etc" IMMICH_APP_DIR="$IMMICH_INSTALL_DIR/share" IMMICH_MEDIA_DIR="$IMMICH_INSTALL_DIR/var/db" diff --git a/Scripts/installdependencies.sh b/Scripts/installdependencies.sh index 82afd00..0950194 100755 --- a/Scripts/installdependencies.sh +++ b/Scripts/installdependencies.sh @@ -10,10 +10,11 @@ fi echo "INFO: install dependencies" -[ -z "$(which brew)" ] && echo "Homebrew is not installed" && exit 1 +mkdir -p "$IMMICH_BIN_DIR" +# Install Homebrew dependencies +[ -z "$(which brew)" ] && echo "Homebrew is not installed" && exit 1 brew install \ - ffmpeg \ node \ npm \ pgvector \ @@ -24,3 +25,10 @@ brew install \ wget brew services restart postgresql@17 brew services restart redis + +# Install custom ffmpeg build jellyfin-ffmpeg +curl -s -L -o - "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v$IMMICH_FFMPEG_VERSION/jellyfin-ffmpeg_${IMMICH_FFMPEG_VERSION}_portable_mac64-gpl.tar.xz" | \ + tar xzvf - -C "$IMMICH_BIN_DIR" + +# Adjust permissions +chown -R "$IMMICH_USER:$IMMICH_GROUP" "$IMMICH_BIN_DIR" diff --git a/launchd/com.immich.machine.learning.plist b/launchd/com.immich.machine.learning.plist index df00408..b0eabd2 100644 --- a/launchd/com.immich.machine.learning.plist +++ b/launchd/com.immich.machine.learning.plist @@ -15,7 +15,7 @@ EnvironmentVariables PATH - /opt/homebrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + ${IMMICH_BIN_DIR}:/opt/homebrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin StandardOutPath /var/log/immich/immich-machine-learning.log diff --git a/launchd/com.immich.plist b/launchd/com.immich.plist index dd4cc1f..2c91a6c 100644 --- a/launchd/com.immich.plist +++ b/launchd/com.immich.plist @@ -15,7 +15,7 @@ EnvironmentVariables PATH - /opt/homebrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + ${IMMICH_BIN_DIR}:/opt/homebrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin StandardOutPath /var/log/immich/immich-app.log