Skip to content

Commit

Permalink
Enable ffnvcodec for Linux/Arm64 builds
Browse files Browse the repository at this point in the history
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
  • Loading branch information
nyanmisaka committed Feb 11, 2025
1 parent 3126bc1 commit 84b48c3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion builder/scripts.d/50-ffnvcodec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SCRIPT_COMMIT="451da99614412a7f9526ef301a5ee0c7a6f9ad76"

ffbuild_enabled() {
[[ $TARGET == mac* ]] && return -1
[[ $TARGET == *arm64 ]] && return -1
return 0
}

Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Build-Depends:
# --enable-libzvbi
libzvbi-dev,
# --enable-cuda-llvm
clang [!armhf !arm64],
clang:amd64 [!armhf],
# --enable-opencl
ocl-icd-opencl-dev,
# used to detect libraries
pkg-config,
pkg-config | pkgconf,
# HTML documentation
texinfo,
# assembler optimizations
Expand Down
6 changes: 6 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ CONFIG_ARM := --arch=armhf \
CONFIG_ARM64 := --arch=arm64 \
--cross-prefix=/usr/bin/aarch64-linux-gnu- \
${CONFIG_ARM_COMMON} \
--enable-ffnvcodec \
--enable-cuda \
--enable-cuda-llvm \
--enable-cuvid \
--enable-nvdec \
--enable-nvenc \

HOST_ARCH := $(shell arch)
BUILD_ARCH := ${DEB_HOST_MULTIARCH}
Expand Down
8 changes: 4 additions & 4 deletions docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,18 @@ prepare_extra_common() {
echo "fdk-aac-stripped${TARGET_DIR}/lib/libfdk-aac.so* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST}
popd
popd
}

# Prepare extra headers, libs and drivers for x86_64-linux-gnu
prepare_extra_amd64() {
# FFNVCODEC
pushd ${SOURCE_DIR}
git clone -b n12.0.16.1 --depth=1 https://github.com/FFmpeg/nv-codec-headers.git
pushd nv-codec-headers
make && make install
make PREFIX=${TARGET_DIR} install
popd
popd
}

# Prepare extra headers, libs and drivers for x86_64-linux-gnu
prepare_extra_amd64() {
# AMF
# https://www.ffmpeg.org/general.html#AMD-AMF_002fVCE
pushd ${SOURCE_DIR}
Expand Down

0 comments on commit 84b48c3

Please sign in to comment.