From f3003ed18f1ccb412bcb9e779ecbeb9a02613fa7 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 4 Aug 2020 16:34:12 +0200 Subject: [PATCH] GitHub CI: build own x264 [Linux] In order to support 10-bit codecs. --- .github/scripts/Linux/download_build_ffmpeg.sh | 2 ++ .github/scripts/Linux/install_ffmpeg.sh | 2 ++ .github/scripts/Linux/prepare.sh | 5 +++++ .github/workflows/ccpp.yml | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/scripts/Linux/download_build_ffmpeg.sh b/.github/scripts/Linux/download_build_ffmpeg.sh index 53b58bedf..866663892 100755 --- a/.github/scripts/Linux/download_build_ffmpeg.sh +++ b/.github/scripts/Linux/download_build_ffmpeg.sh @@ -2,6 +2,8 @@ git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git /var/tmp/ffmpeg 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 diff --git a/.github/scripts/Linux/install_ffmpeg.sh b/.github/scripts/Linux/install_ffmpeg.sh index e83361738..3e70b97a8 100755 --- a/.github/scripts/Linux/install_ffmpeg.sh +++ b/.github/scripts/Linux/install_ffmpeg.sh @@ -1,6 +1,8 @@ #!/bin/bash -eux cd /var/tmp/ffmpeg +( cd nasm && sudo make install ) +( cd x264 && sudo make install ) ( cd nv-codec-headers && sudo make install ) ( cd aom/build && sudo make install ) sudo make install diff --git a/.github/scripts/Linux/prepare.sh b/.github/scripts/Linux/prepare.sh index 20be3411f..1f92077c6 100755 --- a/.github/scripts/Linux/prepare.sh +++ b/.github/scripts/Linux/prepare.sh @@ -21,7 +21,12 @@ sudo apt install libx11-dev sudo apt install libsdl2-dev sudo apt install libssl-dev sudo apt install portaudio19-dev libjack-jackd2-dev libasound-dev libv4l-dev + +# for FFmpeg sudo apt build-dep ffmpeg +sudo apt-get remove 'libx264*' nasm +sudo apt --no-install-recommends install asciidoc xmlto + sudo apt install libopencv-dev sudo apt install libglib2.0-dev libcurl4-nss-dev ( mkdir gpujpeg/build && cd gpujpeg/build && CC=$CUDA_HOST_COMPILER cmake .. && make && sudo make install && sudo ldconfig ) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 6e50891f5..eb3f199ab 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -84,7 +84,7 @@ jobs: uses: actions/cache@v1 with: path: '/var/tmp/ffmpeg' - key: cache-ffmpeg-6 + key: cache-ffmpeg-7 - name: Build FFmpeg if: steps.cache-ffmpeg.outputs.cache-hit != 'true' run: .github/scripts/Linux/download_build_ffmpeg.sh