diff --git a/docker-images/2.8/alpine/Dockerfile b/docker-images/2.8/alpine/Dockerfile index 59ad71318..55e0a1398 100644 --- a/docker-images/2.8/alpine/Dockerfile +++ b/docker-images/2.8/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/2.8/centos/Dockerfile b/docker-images/2.8/centos/Dockerfile index aaf2ebc76..ee862a1c4 100644 --- a/docker-images/2.8/centos/Dockerfile +++ b/docker-images/2.8/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/2.8/scratch/Dockerfile b/docker-images/2.8/scratch/Dockerfile index 81c6d4c8e..562adff8d 100644 --- a/docker-images/2.8/scratch/Dockerfile +++ b/docker-images/2.8/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/2.8/ubuntu/Dockerfile b/docker-images/2.8/ubuntu/Dockerfile index 5da5ef811..61946110a 100644 --- a/docker-images/2.8/ubuntu/Dockerfile +++ b/docker-images/2.8/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/2.8/vaapi/Dockerfile b/docker-images/2.8/vaapi/Dockerfile index 4992cad4f..7889efc9b 100644 --- a/docker-images/2.8/vaapi/Dockerfile +++ b/docker-images/2.8/vaapi/Dockerfile @@ -343,6 +343,7 @@ RUN \ --enable-libfdk_aac \ \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.0/alpine/Dockerfile b/docker-images/3.0/alpine/Dockerfile index 5f7c5c8e5..f51bac009 100644 --- a/docker-images/3.0/alpine/Dockerfile +++ b/docker-images/3.0/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.0/centos/Dockerfile b/docker-images/3.0/centos/Dockerfile index 101f74b0b..c04249f48 100644 --- a/docker-images/3.0/centos/Dockerfile +++ b/docker-images/3.0/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.0/scratch/Dockerfile b/docker-images/3.0/scratch/Dockerfile index cf009e0dc..1e1b7eb28 100644 --- a/docker-images/3.0/scratch/Dockerfile +++ b/docker-images/3.0/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.0/ubuntu/Dockerfile b/docker-images/3.0/ubuntu/Dockerfile index 76258f0d5..e92c881c2 100644 --- a/docker-images/3.0/ubuntu/Dockerfile +++ b/docker-images/3.0/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.0/vaapi/Dockerfile b/docker-images/3.0/vaapi/Dockerfile index 131eb882c..8d4f572a0 100644 --- a/docker-images/3.0/vaapi/Dockerfile +++ b/docker-images/3.0/vaapi/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.1/alpine/Dockerfile b/docker-images/3.1/alpine/Dockerfile index 487dd5fb5..13074aa96 100644 --- a/docker-images/3.1/alpine/Dockerfile +++ b/docker-images/3.1/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.1/centos/Dockerfile b/docker-images/3.1/centos/Dockerfile index 6756f0dc7..79192204b 100644 --- a/docker-images/3.1/centos/Dockerfile +++ b/docker-images/3.1/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.1/scratch/Dockerfile b/docker-images/3.1/scratch/Dockerfile index 254f7c921..f976a64e8 100644 --- a/docker-images/3.1/scratch/Dockerfile +++ b/docker-images/3.1/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.1/ubuntu/Dockerfile b/docker-images/3.1/ubuntu/Dockerfile index 1cc4e7578..7490f1964 100644 --- a/docker-images/3.1/ubuntu/Dockerfile +++ b/docker-images/3.1/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.1/vaapi/Dockerfile b/docker-images/3.1/vaapi/Dockerfile index 900e2766f..2583d9fbe 100644 --- a/docker-images/3.1/vaapi/Dockerfile +++ b/docker-images/3.1/vaapi/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.2/alpine/Dockerfile b/docker-images/3.2/alpine/Dockerfile index b768e53b1..f30b574a5 100644 --- a/docker-images/3.2/alpine/Dockerfile +++ b/docker-images/3.2/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.2/centos/Dockerfile b/docker-images/3.2/centos/Dockerfile index 737a67252..91deca96d 100644 --- a/docker-images/3.2/centos/Dockerfile +++ b/docker-images/3.2/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.2/scratch/Dockerfile b/docker-images/3.2/scratch/Dockerfile index fc989637f..c6ccc2b18 100644 --- a/docker-images/3.2/scratch/Dockerfile +++ b/docker-images/3.2/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.2/ubuntu/Dockerfile b/docker-images/3.2/ubuntu/Dockerfile index f380390b9..c583b0e5d 100644 --- a/docker-images/3.2/ubuntu/Dockerfile +++ b/docker-images/3.2/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.2/vaapi/Dockerfile b/docker-images/3.2/vaapi/Dockerfile index 85f891cfe..7cb601d53 100644 --- a/docker-images/3.2/vaapi/Dockerfile +++ b/docker-images/3.2/vaapi/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.3/alpine/Dockerfile b/docker-images/3.3/alpine/Dockerfile index 2543f1aec..210b3a912 100644 --- a/docker-images/3.3/alpine/Dockerfile +++ b/docker-images/3.3/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.3/centos/Dockerfile b/docker-images/3.3/centos/Dockerfile index 33e630187..71130d39e 100644 --- a/docker-images/3.3/centos/Dockerfile +++ b/docker-images/3.3/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.3/scratch/Dockerfile b/docker-images/3.3/scratch/Dockerfile index 9ad2d1b39..f848edce7 100644 --- a/docker-images/3.3/scratch/Dockerfile +++ b/docker-images/3.3/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.3/ubuntu/Dockerfile b/docker-images/3.3/ubuntu/Dockerfile index eb2143ef8..8ee3142cf 100644 --- a/docker-images/3.3/ubuntu/Dockerfile +++ b/docker-images/3.3/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.3/vaapi/Dockerfile b/docker-images/3.3/vaapi/Dockerfile index 88332ff94..bbbec066a 100644 --- a/docker-images/3.3/vaapi/Dockerfile +++ b/docker-images/3.3/vaapi/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.4/alpine/Dockerfile b/docker-images/3.4/alpine/Dockerfile index 2f1b9cbc6..d9c642efe 100644 --- a/docker-images/3.4/alpine/Dockerfile +++ b/docker-images/3.4/alpine/Dockerfile @@ -340,6 +340,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.4/centos/Dockerfile b/docker-images/3.4/centos/Dockerfile index 5356e5a67..e33d1409a 100644 --- a/docker-images/3.4/centos/Dockerfile +++ b/docker-images/3.4/centos/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.4/scratch/Dockerfile b/docker-images/3.4/scratch/Dockerfile index 258d4abdb..926f40be7 100644 --- a/docker-images/3.4/scratch/Dockerfile +++ b/docker-images/3.4/scratch/Dockerfile @@ -337,6 +337,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.4/ubuntu/Dockerfile b/docker-images/3.4/ubuntu/Dockerfile index 33cfe54ec..ef55a26cc 100644 --- a/docker-images/3.4/ubuntu/Dockerfile +++ b/docker-images/3.4/ubuntu/Dockerfile @@ -342,6 +342,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/3.4/vaapi/Dockerfile b/docker-images/3.4/vaapi/Dockerfile index c5ab51b56..a8ed7cf05 100644 --- a/docker-images/3.4/vaapi/Dockerfile +++ b/docker-images/3.4/vaapi/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.0/alpine/Dockerfile b/docker-images/4.0/alpine/Dockerfile index 4f3cea8aa..474d7c7a7 100644 --- a/docker-images/4.0/alpine/Dockerfile +++ b/docker-images/4.0/alpine/Dockerfile @@ -344,6 +344,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.0/centos/Dockerfile b/docker-images/4.0/centos/Dockerfile index 2e3c9ab2a..dc21da089 100644 --- a/docker-images/4.0/centos/Dockerfile +++ b/docker-images/4.0/centos/Dockerfile @@ -345,6 +345,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.0/scratch/Dockerfile b/docker-images/4.0/scratch/Dockerfile index 878b60be7..9ec8eb6fc 100644 --- a/docker-images/4.0/scratch/Dockerfile +++ b/docker-images/4.0/scratch/Dockerfile @@ -341,6 +341,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.0/ubuntu/Dockerfile b/docker-images/4.0/ubuntu/Dockerfile index 0397334af..9a6b7dcb3 100644 --- a/docker-images/4.0/ubuntu/Dockerfile +++ b/docker-images/4.0/ubuntu/Dockerfile @@ -346,6 +346,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.0/vaapi/Dockerfile b/docker-images/4.0/vaapi/Dockerfile index f6d1d5acd..2b40f0984 100644 --- a/docker-images/4.0/vaapi/Dockerfile +++ b/docker-images/4.0/vaapi/Dockerfile @@ -348,6 +348,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.1/alpine/Dockerfile b/docker-images/4.1/alpine/Dockerfile index 1ad99e164..2a9068705 100644 --- a/docker-images/4.1/alpine/Dockerfile +++ b/docker-images/4.1/alpine/Dockerfile @@ -18,7 +18,7 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION=4.1 \ +ENV FFMPEG_VERSION=4.1.1 \ FDKAAC_VERSION=0.1.5 \ LAME_VERSION=3.99.5 \ LIBASS_VERSION=0.13.7 \ @@ -310,6 +310,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -340,6 +356,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.1/centos/Dockerfile b/docker-images/4.1/centos/Dockerfile index b4e4a0576..f9564545e 100644 --- a/docker-images/4.1/centos/Dockerfile +++ b/docker-images/4.1/centos/Dockerfile @@ -20,7 +20,7 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION=4.1 \ +ENV FFMPEG_VERSION=4.1.1 \ FDKAAC_VERSION=0.1.5 \ LAME_VERSION=3.99.5 \ LIBASS_VERSION=0.13.7 \ @@ -311,6 +311,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -341,6 +357,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.1/scratch/Dockerfile b/docker-images/4.1/scratch/Dockerfile index 81bb62251..6f1389614 100644 --- a/docker-images/4.1/scratch/Dockerfile +++ b/docker-images/4.1/scratch/Dockerfile @@ -13,7 +13,7 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION=4.1 \ +ENV FFMPEG_VERSION=4.1.1 \ FDKAAC_VERSION=0.1.5 \ LAME_VERSION=3.99.5 \ LIBASS_VERSION=0.13.7 \ @@ -307,6 +307,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -337,6 +353,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.1/ubuntu/Dockerfile b/docker-images/4.1/ubuntu/Dockerfile index 1e344ca4d..621efa4f3 100644 --- a/docker-images/4.1/ubuntu/Dockerfile +++ b/docker-images/4.1/ubuntu/Dockerfile @@ -21,7 +21,7 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION=4.1 \ +ENV FFMPEG_VERSION=4.1.1 \ FDKAAC_VERSION=0.1.5 \ LAME_VERSION=3.99.5 \ LIBASS_VERSION=0.13.7 \ @@ -312,6 +312,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -342,6 +358,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/4.1/vaapi/Dockerfile b/docker-images/4.1/vaapi/Dockerfile index f1b9fe75c..b8211ad5d 100644 --- a/docker-images/4.1/vaapi/Dockerfile +++ b/docker-images/4.1/vaapi/Dockerfile @@ -21,7 +21,7 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION=4.1 \ +ENV FFMPEG_VERSION=4.1.1 \ FDKAAC_VERSION=0.1.5 \ LAME_VERSION=3.99.5 \ LIBASS_VERSION=0.13.7 \ @@ -313,6 +313,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -344,6 +360,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/snapshot/alpine/Dockerfile b/docker-images/snapshot/alpine/Dockerfile index f314f76a8..58993bbe9 100644 --- a/docker-images/snapshot/alpine/Dockerfile +++ b/docker-images/snapshot/alpine/Dockerfile @@ -310,6 +310,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -340,6 +356,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/snapshot/centos/Dockerfile b/docker-images/snapshot/centos/Dockerfile index 8af713c3f..ee0fe0519 100644 --- a/docker-images/snapshot/centos/Dockerfile +++ b/docker-images/snapshot/centos/Dockerfile @@ -311,6 +311,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -341,6 +357,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/snapshot/scratch/Dockerfile b/docker-images/snapshot/scratch/Dockerfile index ee4bdeb19..6a85c41f3 100644 --- a/docker-images/snapshot/scratch/Dockerfile +++ b/docker-images/snapshot/scratch/Dockerfile @@ -307,6 +307,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -337,6 +353,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/snapshot/ubuntu/Dockerfile b/docker-images/snapshot/ubuntu/Dockerfile index 46bd966b8..b37c18f39 100644 --- a/docker-images/snapshot/ubuntu/Dockerfile +++ b/docker-images/snapshot/ubuntu/Dockerfile @@ -312,6 +312,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -342,6 +358,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/docker-images/snapshot/vaapi/Dockerfile b/docker-images/snapshot/vaapi/Dockerfile index 41e008093..a62bf8d9e 100644 --- a/docker-images/snapshot/vaapi/Dockerfile +++ b/docker-images/snapshot/vaapi/Dockerfile @@ -313,6 +313,22 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch RUN \ @@ -344,6 +360,9 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + --enable-libsvthevc \ +--enable-libsvtav1 \ + \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/templates/Dockerfile-patch-SVT b/templates/Dockerfile-patch-SVT new file mode 100644 index 000000000..d98514cfd --- /dev/null +++ b/templates/Dockerfile-patch-SVT @@ -0,0 +1,16 @@ +# SVT Codecs +RUN \ + DIR=/tmp/svt && mkdir -p ${DIR} && cd ${DIR} && \ + git clone https://github.com/OpenVisualCloud/SVT-AV1 && \ + git clone https://github.com/intel/SVT-HEVC && \ + git clone https://github.com/OpenVisualCloud/SVT-VP9 && \ + cd ${DIR}/SVT-AV1 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install && \ + cd ${DIR}/SVT-HEVC && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install +# cd ${DIR}/SVT-VP9 && cd Build/linux && sed -i "/cmake/ s|\\\\$|-DCMAKE_INSTALL_PREFIX=${PREFIX} \\\|g" ./build.sh && ./build.sh release && cd release && make && make install + +# Apply patches +RUN \ + DIR=/tmp/ffmpeg && DIR2=/tmp/svt && mkdir -p ${DIR} && mkdir -p ${DIR2} && cd ${DIR} && \ + git apply ${DIR2}/SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch && \ + git apply ${DIR2}/SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch +# git apply ${DIR2}/SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch diff --git a/templates/Dockerfile-patch-SVT-enable b/templates/Dockerfile-patch-SVT-enable new file mode 100644 index 000000000..c4fcfe4f0 --- /dev/null +++ b/templates/Dockerfile-patch-SVT-enable @@ -0,0 +1,2 @@ +--enable-libsvthevc \ +--enable-libsvtav1 \ diff --git a/templates/Dockerfile-run b/templates/Dockerfile-run index 4c767bd10..0950d9f95 100644 --- a/templates/Dockerfile-run +++ b/templates/Dockerfile-run @@ -265,6 +265,7 @@ RUN \ --enable-libfdk_aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ + %%ENABLE_PATCH_CODECS%% \ --enable-postproc \ --enable-small \ --enable-version3 \ diff --git a/update.py b/update.py index f481e3c19..cab4faf4e 100755 --- a/update.py +++ b/update.py @@ -80,11 +80,18 @@ docker_content = docker_content.replace('libva2', 'libva1') patch = '' + patch2 = '' + if (version[0] > '4' or (version[0] == '4' and version[2] >= '1')) or version == 'snapshot': + with open('templates/Dockerfile-patch-SVT', 'r') as tmpfile: + patch += tmpfile.read() + with open('templates/Dockerfile-patch-SVT-enable', 'r') as tmpfile: + patch2 += tmpfile.read() if version[0:3] == '4.0': with open('templates/Dockerfile-patch-4.0', 'r') as tmpfile: - patch = tmpfile.read() + patch += tmpfile.read() docker_content = docker_content.replace('%%FFMPEG_PATCH%%', patch) + docker_content = docker_content.replace('%%ENABLE_PATCH_CODECS%%', patch2) d = os.path.dirname(dockerfile) if not os.path.exists(d):