Skip to content

Commit

Permalink
public ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoensmax committed Sep 27, 2023
1 parent 16fdaac commit 7cb98cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 1 addition & 6 deletions Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/"
Expand Down
6 changes: 5 additions & 1 deletion resource/doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```

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`

0 comments on commit 7cb98cb

Please sign in to comment.