Videos: Make installation of FFmpeg 7 optional #1474 #4181

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-05-30 07:46:49 +02:00
parent d1a55eb478
commit a4c76ce35f
11 changed files with 28 additions and 18 deletions

View File

@@ -103,7 +103,7 @@ services:
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
# LIBVA_DRIVER_NAME: "i965" # For Intel architectures Haswell and older which do not support QSV yet but use VAAPI instead
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
PHOTOPRISM_INIT: "https tensorflow"
## Share hardware devices with FFmpeg and TensorFlow (optional):
# devices:

View File

@@ -45,13 +45,12 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
echo 'force-confold' > /etc/dpkg/dpkg.cfg.d/force-confold && \
apt-get update && apt-get -qq dist-upgrade && \
apt-get -qq install \
software-properties-common pkg-config apt-utils libc6 ca-certificates bash sudo nano \
tzdata gpg make zip unzip wget curl rsync avahi-utils jq lsof lshw libebml5 libgav1-bin libatomic1 \
exiftool sqlite3 imagemagick libvips-dev rawtherapee libjxl-dev libjxl-tools libffmpeg-nvenc-dev \
libc6 ca-certificates bash sudo nano tzdata gpg make zip unzip wget curl rsync\
avahi-utils jq lsof lshw libebml5 libgav1-bin libatomic1 exiftool sqlite3 \
imagemagick libvips-dev rawtherapee libjxl-dev libjxl-tools libffmpeg-nvenc-dev \
libswscale-dev libavfilter-extra libavformat-extra libavcodec-extra x264 x265 libde265-dev libaom-dev \
libvpx-dev libwebm-dev libjpeg-dev libmatroska-dev libdvdread-dev libdav1d-dev \
&& \
/scripts/install-ffmpeg.sh && \
/scripts/install-mariadb.sh mariadb-client && \
/scripts/install-darktable.sh && \
/scripts/install-libheif.sh && \

View File

@@ -51,14 +51,14 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
echo 'force-confold' > /etc/dpkg/dpkg.cfg.d/force-confold && \
apt-get update && apt-get -qq dist-upgrade && \
apt-get -qq install \
software-properties-common pkg-config apt-utils libc6 ca-certificates bash sudo nano \
tzdata gpg make zip unzip wget curl rsync avahi-utils jq lsof lshw libebml5 libgav1-bin libatomic1 \
exiftool sqlite3 imagemagick libvips-dev rawtherapee libjxl-dev libjxl-tools libffmpeg-nvenc-dev \
libc6 ca-certificates bash sudo nano tzdata gpg make zip unzip wget curl rsync\
avahi-utils jq lsof lshw libebml5 libgav1-bin libatomic1 exiftool sqlite3 \
imagemagick libvips-dev rawtherapee libjxl-dev libjxl-tools libffmpeg-nvenc-dev \
libswscale-dev libavfilter-extra libavformat-extra libavcodec-extra x264 x265 libde265-dev libaom-dev \
libvpx-dev libwebm-dev libjpeg-dev libmatroska-dev libdvdread-dev libdav1d-dev \
&& \
/scripts/install-ffmpeg.sh && \
apt-get -qq install \
software-properties-common pkg-config apt-utils \
build-essential gcc g++ git gettext davfs2 chrpath apache2-utils \
autoconf automake cmake libtool libjpeg-dev libpng-dev libwebp-dev \
libx264-dev libx265-dev libaom-dev libvpx-dev libwebm-dev libxft-dev \

View File

@@ -14,6 +14,9 @@ clean:
https: install-https
install-https:
@/scripts/install-https.sh
ffmpeg: install-ffmpeg
install-ffmpeg:
@/scripts/install-ffmpeg.sh
mariadb: mariadb-client
mariadb-client: install-mariadb-client
install-mariadb-client:

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# This installs ffmpeg on Linux.
# This installs FFmpeg on Ubuntu Linux.
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-ffmpeg.sh)
PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/scripts:$PATH"
@@ -24,21 +24,29 @@ set -e
. /etc/os-release
echo "Installing ffmpeg for ${DESTARCH^^}..."
case $DESTARCH in
amd64 | AMD64 | x86_64 | x86-64 | arm64 | ARM64 | aarch64)
if [[ $VERSION_CODENAME == "noble" ]]; then
# Install FFmpeg 7 from a PPA on Ubuntu 24.04 LTS.
echo "Installing FFmpeg 7 for ${DESTARCH^^} from ppa:ubuntuhandbook1/ffmpeg7..."
apt-get update
apt-get -qq install software-properties-common pkg-config apt-utils
add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg7
apt-get update
apt-get -qq install ffmpeg
apt-get -qq dist-upgrade
else
# Otherwise, install the default FFmpeg package.
echo "Installing FFmpeg for ${DESTARCH^^}..."
apt-get update
apt-get -qq install ffmpeg
fi
;;
*)
# Install the default FFmpeg package.
echo "Installing FFmpeg for ${DESTARCH^^}..."
apt-get update
apt-get -qq install ffmpeg
;;
esac

View File

@@ -87,7 +87,7 @@ services:
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT: "https gpu tensorflow"
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
# PHOTOPRISM_UID: 1000

View File

@@ -81,7 +81,7 @@ services:
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT: "https gpu tensorflow"
## Storage Folders: "~" is a shortcut for your home directory, "." for the current directory
volumes:

View File

@@ -69,7 +69,7 @@ PHOTOPRISM_SITE_AUTHOR=
# PHOTOPRISM_FFMPEG_ENCODER=software # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE=1920 # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE=32 # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT=https gpu tensorflow
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
# PHOTOPRISM_UID=1000

View File

@@ -85,7 +85,7 @@ services:
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT: "https gpu tensorflow"
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
# PHOTOPRISM_UID: 1000

View File

@@ -78,7 +78,7 @@ services:
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT: "https gpu tensorflow"
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
# PHOTOPRISM_UID: 1000

View File

@@ -98,7 +98,7 @@ services:
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
## Run/install on first startup (options: update https gpu tensorflow davfs clitools clean):
## Run/install on first startup (options: update https gpu ffmpeg tensorflow davfs clitools clean):
# PHOTOPRISM_INIT: "https gpu tensorflow"
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
# PHOTOPRISM_UID: 1000