From 86bbcddfeafbf708eb46836349a4308c7a6e5e79 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 10 Aug 2020 12:04:16 +0200 Subject: [PATCH] GitHub CI: added support for SVT to FFmpeg [Linux] --- .github/scripts/Linux/download_build_ffmpeg.sh | 12 ++++++++++-- .github/scripts/Linux/install_ffmpeg.sh | 2 ++ .github/workflows/ccpp.yml | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/scripts/Linux/download_build_ffmpeg.sh b/.github/scripts/Linux/download_build_ffmpeg.sh index 866663892..e9114bcd8 100755 --- a/.github/scripts/Linux/download_build_ffmpeg.sh +++ b/.github/scripts/Linux/download_build_ffmpeg.sh @@ -1,10 +1,18 @@ #!/bin/bash -eux -git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git /var/tmp/ffmpeg +install_svt() { + ( git clone --depth 1 https://github.com/OpenVisualCloud/SVT-HEVC && cd SVT-HEVC/Build/linux && ./build.sh release && cd Release && make && sudo make install ) + ( git clone --depth=1 https://github.com/OpenVisualCloud/SVT-AV1 && cd SVT-AV1 && cd Build && cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && make -j $(nproc) && sudo make install ) + git apply SVT-HEVC/ffmpeg_plugin/0001*.patch + git apply SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch +} + +git clone -b n4.3 --depth 1 https://git.ffmpeg.org/ffmpeg.git /var/tmp/ffmpeg # n4.3 is needed for SVT HEVC patch cd /var/tmp/ffmpeg ( git clone --depth 1 -b nasm-2.13.xx https://github.com/sezero/nasm.git && cd nasm && ./autogen.sh && ./configure && make nasm.1 && make ndisasm.1 && make && sudo make install ) ( git clone --depth 1 http://git.videolan.org/git/x264.git && cd x264 && ./configure --disable-static --enable-shared && make && sudo make install ) ( git clone -b sdk/8.1 https://git.videolan.org/git/ffmpeg/nv-codec-headers.git && cd nv-codec-headers && make && sudo make install ) ( git clone --depth 1 https://aomedia.googlesource.com/aom && mkdir -p aom/build && cd aom/build && cmake -DBUILD_SHARED_LIBS=1 .. && make && sudo make install ) -./configure --disable-static --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libopus --enable-nonfree --enable-nvenc --enable-libaom --enable-libvpx --enable-libspeex --enable-libmp3lame +install_svt +./configure --disable-static --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libopus --enable-nonfree --enable-nvenc --enable-libaom --enable-libvpx --enable-libspeex --enable-libmp3lame --enable-libsvthevc --enable-libsvtav1 make diff --git a/.github/scripts/Linux/install_ffmpeg.sh b/.github/scripts/Linux/install_ffmpeg.sh index 3e70b97a8..d67159f94 100755 --- a/.github/scripts/Linux/install_ffmpeg.sh +++ b/.github/scripts/Linux/install_ffmpeg.sh @@ -5,5 +5,7 @@ cd /var/tmp/ffmpeg ( cd x264 && sudo make install ) ( cd nv-codec-headers && sudo make install ) ( cd aom/build && sudo make install ) +( cd SVT-HEVC/Build/linux/Release && sudo make install ) +( cd SVT-AV1/Build && sudo make install ) sudo make install sudo ldconfig diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index e9380a639..536b309c3 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -81,7 +81,7 @@ jobs: uses: actions/cache@v1 with: path: '/var/tmp/ffmpeg' - key: cache-ffmpeg-7 + key: cache-ffmpeg-8 - name: Build FFmpeg if: steps.cache-ffmpeg.outputs.cache-hit != 'true' run: .github/scripts/Linux/download_build_ffmpeg.sh