From 7cb98cbb024eea3788a84bd0d0aa17b9b02ba4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20M=C3=BCller?= Date: Wed, 27 Sep 2023 21:24:56 +0200 Subject: [PATCH] public ffmpeg --- Dockerfile.cuda | 7 +------ resource/doc/docker.md | 6 +++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile.cuda b/Dockerfile.cuda index d6adb3815..c4bc1f708 100644 --- a/Dockerfile.cuda +++ b/Dockerfile.cuda @@ -7,12 +7,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteract RUN git clone https://github.com/Netflix/vmaf.git -# ffmpeg patch from http://ffmpeg.org/pipermail/ffmpeg-devel/2023-August/313073.html -RUN curl -LJ -o vf_libvmaf_cuda.diff https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230807/29cf249a/attachment.obj - RUN git clone https://github.com/FFmpeg/FFmpeg.git -RUN cd FFmpeg && \ - git apply --ignore-whitespace ../vf_libvmaf_cuda.diff RUN git clone https://github.com/FFmpeg/nv-codec-headers.git && cd nv-codec-headers && make && make install @@ -32,7 +27,7 @@ RUN cd FFmpeg && ./configure \ --enable-cuda \ --enable-cuda-nvcc \ --enable-libvmaf \ - --enable-libvmaf-cuda \ + --enable-ffnvcodec \ --disable-stripping \ --extra-cflags="-I/usr/local/cuda/include" \ --extra-ldflags="-L/usr/local/cuda/lib64 -L/usr/local/cuda/lib64/stubs/" diff --git a/resource/doc/docker.md b/resource/doc/docker.md index cdb814d78..1e3e5853c 100644 --- a/resource/doc/docker.md +++ b/resource/doc/docker.md @@ -62,4 +62,8 @@ docker run --gpus all -e NVIDIA_DRIVER_CAPABILITIES=compute,video -v $REF_VIDEO To run a custom ffmpeg command line inside the container use: ```shell script docker run --gpus all -e NVIDIA_DRIVER_CAPABILITIES=compute,video --entrypoint=bash -it --rm vmaf_cuda -``` \ No newline at end of file +``` + +For 420 video format we will have to convert from NV12 to 420 as well: +`-filter_complex [0:v]scale_cuda=format=yuv420p[ref];[1:v]scale_cuda=format=yuv420p[dist];[ref][dist]libvmaf_cuda` + \ No newline at end of file