Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg: move back to scale_cuda from scale_npp #2955

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 as build
FROM --platform=$BUILDPLATFORM ubuntu:20.04 as build

ARG TARGETARCH
ARG BUILDARCH
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -13,7 +13,7 @@ require (
github.com/jaypipes/pcidb v1.0.0
github.com/livepeer/go-tools v0.0.0-20220805063103-76df6beb6506
github.com/livepeer/livepeer-data v0.7.5-0.20231004073737-06f1f383fb18
github.com/livepeer/lpms v0.0.0-20240115103113-98566e26c007
github.com/livepeer/lpms v0.0.0-20240123002819-44c738c7c01c
github.com/livepeer/m3u8 v0.11.1
github.com/mattn/go-sqlite3 v1.14.18
github.com/olekukonko/tablewriter v0.0.5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Expand Up @@ -337,6 +337,8 @@ github.com/livepeer/lpms v0.0.0-20231002131146-663c62246a3c h1:qxmMX/j6Yp0xFR17n
github.com/livepeer/lpms v0.0.0-20231002131146-663c62246a3c/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM=
github.com/livepeer/lpms v0.0.0-20240115103113-98566e26c007 h1:0xr1TeIanBDdzI3sE2Zgf2yEV3s+6cPo3lJeyOHKmtM=
github.com/livepeer/lpms v0.0.0-20240115103113-98566e26c007/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM=
github.com/livepeer/lpms v0.0.0-20240123002819-44c738c7c01c h1:8R61T3UX1aukqx1+yG8z15N5ZjJDQxOU13ARzFz6VoU=
github.com/livepeer/lpms v0.0.0-20240123002819-44c738c7c01c/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM=
github.com/livepeer/m3u8 v0.11.1 h1:VkUJzfNTyjy9mqsgp5JPvouwna8wGZMvd/gAfT5FinU=
github.com/livepeer/m3u8 v0.11.1/go.mod h1:IUqAtwWPAG2CblfQa4SVzTQoDcEMPyfNOaBSxqHMS04=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
Expand Down
12 changes: 6 additions & 6 deletions install_ffmpeg.sh
Expand Up @@ -42,8 +42,8 @@ if [[ "$BUILDARCH" == "amd64" && "$BUILDOS" == "linux" && "$GOARCH" == "arm64" &
export STRIP="llvm-strip-14"
export AR="llvm-ar-14"
export RANLIB="llvm-ranlib-14"
EXTRA_CFLAGS="--target=aarch64-linux-gnu -I/usr/local/cuda_arm64/include $EXTRA_CFLAGS"
EXTRA_LDFLAGS="-fuse-ld=lld --target=aarch64-linux-gnu -L/usr/local/cuda_arm64/lib64 $EXTRA_LDFLAGS"
EXTRA_CFLAGS="--target=aarch64-linux-gnu $EXTRA_CFLAGS"
EXTRA_LDFLAGS="-fuse-ld=lld --target=aarch64-linux-gnu $EXTRA_LDFLAGS"
EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --arch=aarch64 --enable-cross-compile --cc=clang --strip=llvm-strip-14"
HOST_OS="--host=aarch64-linux-gnu"
fi
Expand Down Expand Up @@ -184,11 +184,11 @@ if [[ "$BUILDOS" == "darwin" && "$GOOS" == "darwin" ]]; then
EXTRA_FFMPEG_LDFLAGS="$EXTRA_FFMPEG_LDFLAGS -framework CoreFoundation -framework Security"
elif [[ "$GOOS" == "windows" ]]; then
EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-decoder=h264_cuvid,hevc_cuvid,vp8_cuvid,vp9_cuvid --enable-filter=scale_cuda,signature_cuda,hwupload_cuda --enable-encoder=h264_nvenc,hevc_nvenc"
elif [[ -e "/usr/local/cuda/lib64" ]]; then
echo "CUDA SDK detected, building with GPU support"
EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-decoder=h264_cuvid,hevc_cuvid,vp8_cuvid,vp9_cuvid --enable-filter=scale_npp,signature_cuda,hwupload_cuda --enable-encoder=h264_nvenc,hevc_nvenc"
elif which clang >/dev/null; then
echo "clang detected, building with GPU support"
EXTRA_FFMPEG_FLAGS="$EXTRA_FFMPEG_FLAGS --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-decoder=h264_cuvid,hevc_cuvid,vp8_cuvid,vp9_cuvid --enable-filter=scale_cuda,signature_cuda,hwupload_cuda --enable-encoder=h264_nvenc,hevc_nvenc"
else
echo "No CUDA SDK detected, building without GPU support"
echo "No clang detected, building without GPU support"
fi

if [[ $BUILD_TAGS == *"debug-video"* ]]; then
Expand Down