2023-09-16, 04:00 PM
To make this a little easier to read, I formatted it a bit, but here's what jellyfin-ffmpeg has configured when compiled in the container:
That's a lot. You likely don't need all of it, e.g., if you don't have any NVIDIA hardware you won't use anything cuda*/nv* but it's kinda hard to sort through. Looking at the fork you linked, it's nearly 7000 commits behind the master branch of ffmpeg, which is behind jellyfin-ffmpeg in a number of ways. So...I went on a bit of a hunt and found that there's really only one change they made...a single commit that supposedly offers AC4 support. This is about where I get in over my head.
Best guess? You could try to fork jellyfin-ffmpeg, figure out what exactly happened in this commit, duplicate that work in your fork of jellyfin-ffmpeg, and see if it compiles. The unfortunate part here is that there's not really any documentation on the fork you linked or the jellyfin-ffmpeg fork for how to compile with the correct configuration, nor do I know if the AC4 support requires an additional callout during compile. Only way to know is to try I guess.
From here, all I can do is share the script I used to compile...the last part is the most useful, though...it was sort of custom made for my purposes. This script DOES NOT cover all of the sources above and DOES NOT utilize jellyfin-ffmpeg, but SHOULD be able to adapt to compiling jellyfin-ffmpeg with enough elbow grease. This was adapted from the Ubuntu compilation script, automating several portions, adding in the Netflix VMAF library, and fixing several inaccuracies and issues with their instructions. Wish I could be more helpful, maybe I'll take a stab at compiling a custom version of jellyfin-ffmpeg (I am interested in the idea of setting a VMAF score instead of using CRF as an indicator, though I don't think that's possible with how transcoding works currently).
Good luck!
Code:
configuration:
--extra-libs=-lfftw3f
--extra-version=Jellyfin
--disable-doc
--disable-ffplay
--disable-ptx-compression
--disable-static
--disable-libxcb
--disable-sdl2
--disable-xlib
--enable-lto
--enable-gpl
--enable-version3
--enable-shared
--enable-gmp
--enable-gnutls
--enable-chromaprint
--enable-libdrm
--enable-libass
--enable-libfreetype
--enable-libfribidi
--enable-libfontconfig
--enable-libbluray
--enable-libmp3lame
--enable-libopus
--enable-libtheora
--enable-libvorbis
--enable-libopenmpt
--enable-libdav1d
--enable-libwebp
--enable-libvpx
--enable-libx264
--enable-libx265
--enable-libzvbi
--enable-libzimg
--enable-libfdk-aac
--enable-libsvtav1
--enable-libshaderc
--enable-libplacebo
--enable-vulkan
--enable-opencl
--enable-vaapi
--enable-amf
--enable-libmfx
--enable-ffnvcodec
--enable-cuda
--enable-cuda-llvm
--enable-cuvid
--enable-nvdec
--enable-nvenc
That's a lot. You likely don't need all of it, e.g., if you don't have any NVIDIA hardware you won't use anything cuda*/nv* but it's kinda hard to sort through. Looking at the fork you linked, it's nearly 7000 commits behind the master branch of ffmpeg, which is behind jellyfin-ffmpeg in a number of ways. So...I went on a bit of a hunt and found that there's really only one change they made...a single commit that supposedly offers AC4 support. This is about where I get in over my head.
Best guess? You could try to fork jellyfin-ffmpeg, figure out what exactly happened in this commit, duplicate that work in your fork of jellyfin-ffmpeg, and see if it compiles. The unfortunate part here is that there's not really any documentation on the fork you linked or the jellyfin-ffmpeg fork for how to compile with the correct configuration, nor do I know if the AC4 support requires an additional callout during compile. Only way to know is to try I guess.
From here, all I can do is share the script I used to compile...the last part is the most useful, though...it was sort of custom made for my purposes. This script DOES NOT cover all of the sources above and DOES NOT utilize jellyfin-ffmpeg, but SHOULD be able to adapt to compiling jellyfin-ffmpeg with enough elbow grease. This was adapted from the Ubuntu compilation script, automating several portions, adding in the Netflix VMAF library, and fixing several inaccuracies and issues with their instructions. Wish I could be more helpful, maybe I'll take a stab at compiling a custom version of jellyfin-ffmpeg (I am interested in the idea of setting a VMAF score instead of using CRF as an indicator, though I don't think that's possible with how transcoding works currently).
Good luck!
Code:
mkdir -p ~/ffmpeg_sources ~/ffmpeg_build ~/bin && \
sudo apt-get update -qq && sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libmp3lame-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
meson \
ninja-build \
pkg-config \
texinfo \
wget \
yasm \
zlib1g-dev \
libunistring-dev \
libaom-dev \
libdav1d-dev \
nasm \
libx264-dev \
libx265-dev \
libnuma-dev \
libvpx-dev \
libfdk-aac-dev \
libopus-dev && \
cd ~/ffmpeg_sources && \
wget https://github.com/Netflix/vmaf/archive/v2.3.1.tar.gz && \
tar xvf v2.3.1.tar.gz && \
mkdir -p vmaf-2.3.1/libvmaf/build &&\
cd vmaf-2.3.1/libvmaf/build && \
meson setup -Denable_tests=false -Denable_docs=false --buildtype=release --default-library=static .. --prefix "$HOME/ffmpeg_build" --bindir="$HOME/ffmpeg_build/bin" --libdir="$HOME/ffmpeg_build/lib" && \
ninja && \
ninja install && \
cd ~/ffmpeg_sources && \
git -C SVT-AV1 pull 2> /dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git && \
mkdir -p SVT-AV1/build && \
cd SVT-AV1/build && \
PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. && \
PATH="$HOME/bin:$PATH" make -j$(nproc) && \
make install && \
cd ~/ffmpeg_sources && \
wget -O ffmpeg-6.0.tar.bz2 https://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2 && \
tar xjvf ffmpeg-6.0.tar.bz2 && \
cd ffmpeg-6.0 && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-gnutls \
--enable-libaom \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libsvtav1 \
--enable-libdav1d \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libwebp \
--enable-libxvid \
--enable-libvmaf \
--enable-vaapi \
--enable-libvpl \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make -j$(nproc) && \
make install && \
hash -r
Jellyfin 10.10.0 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage