From c4ac23cd80db2706fdaed291a941cbe8fe33fd1e Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 11:33:38 +1000 Subject: [PATCH 01/36] use jdk11 and centos8 --- .travis.yml | 4 +++- Dockerfile | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ad84bd..d5a2ba7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,10 @@ script: - echo "LOGIN TO HUB.DOCKER" - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - echo "PUSH HUB.DOCKER" - - docker push $IMAGE:$IMAGE_VERSION + - if [[ $TRAVIS_BRANCH == "master" ]]; then docker push $IMAGE:$IMAGE_VERSION; fi - if [[ $TRAVIS_BRANCH == "master" ]]; then docker tag $IMAGE:$IMAGE_VERSION $IMAGE:latest && docker push $IMAGE:latest; fi + - echo "PUSH HUB.DOCKER BRANCH" + - if [[ $TRAVIS_BRANCH != "master" ]]; then docker tag $IMAGE:$IMAGE_VERSION $IMAGE:$TRAVIS_BRANCH && docker push $IMAGE:$TRAVIS_BRANCH; fi - echo "UPDATE README IN HUB.DOCKER" - if [[ $TRAVIS_BRANCH == "master" ]]; then docker run --rm -v $(pwd):/data/ aemdesign/dockerhub-description "$DOCKER_USERNAME" "$DOCKER_PASSWORD" "$IMAGE"; fi diff --git a/Dockerfile b/Dockerfile index 83a43aa..73a3980 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ -FROM aemdesign/oracle-jdk:jdk8 +FROM aemdesign/oracle-jdk:jdk11 MAINTAINER devops -LABEL os="centos 7" \ +LABEL os="centos 8" \ container.description="java and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ version="1.0.0" \ imagename="java-ffmpeg" \ test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ - test.command.verify="1.8" + test.command.verify="11." ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib From 8eb233450cf80451d4ef9a8755be8b02f4e9d015 Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 14:11:29 +1000 Subject: [PATCH 02/36] add source file --- Dockerfile-source | 390 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 Dockerfile-source diff --git a/Dockerfile-source b/Dockerfile-source new file mode 100644 index 0000000..4274bde --- /dev/null +++ b/Dockerfile-source @@ -0,0 +1,390 @@ +# ffmpeg - http://ffmpeg.org/download.html +# +# From https://trac.ffmpeg.org/wiki/CompilationGuide/Centos +# +# https://hub.docker.com/r/jrottenberg/ffmpeg/ +# +# +FROM centos:7 AS base + +RUN yum -y install libgomp && \ + yum clean all; + + +FROM base AS build + +WORKDIR /tmp/workdir + +ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig +ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib +ARG PREFIX=/opt/ffmpeg +ARG MAKEFLAGS="-j2" + +ENV FFMPEG_VERSION=4.2.1 \ + AOM_VERSION=v1.0.0 \ + FDKAAC_VERSION=0.1.5 \ + FONTCONFIG_VERSION=2.12.4 \ + FREETYPE_VERSION=2.5.5 \ + FRIBIDI_VERSION=0.19.7 \ + KVAZAAR_VERSION=1.2.0 \ + LAME_VERSION=3.100 \ + LIBASS_VERSION=0.13.7 \ + LIBVIDSTAB_VERSION=1.1.0 \ + OGG_VERSION=1.3.2 \ + OPENCOREAMR_VERSION=0.1.5 \ + OPUS_VERSION=1.2 \ + OPENJPEG_VERSION=2.1.2 \ + THEORA_VERSION=1.1.1 \ + VORBIS_VERSION=1.3.5 \ + VPX_VERSION=1.8.0 \ + WEBP_VERSION=1.0.2 \ + X264_VERSION=20170226-2245-stable \ + X265_VERSION=3.1.1 \ + XVID_VERSION=1.3.4 \ + SRC=/usr/local + +ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz" +ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz" +ARG LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7 0.13.7.tar.gz" +ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz" +ARG OGG_SHA256SUM="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 libogg-1.3.2.tar.gz" +ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz" +ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz" +ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz" +ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz" + + + +RUN buildDeps="autoconf \ + automake \ + bzip2 \ + cmake \ + expat-devel \ + gcc \ + gcc-c++ \ + git \ + gperf \ + libtool \ + make \ + nasm \ + perl \ + openssl-devel \ + tar \ + yasm \ + which \ + zlib-devel" && \ + echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ + yum --enablerepo=extras install -y epel-release && \ + yum install -y ${buildDeps} +## opencore-amr https://sourceforge.net/projects/opencore-amr/ +RUN \ + DIR=/tmp/opencore-amr && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +## x264 http://www.videolan.org/developers/x264.html +RUN \ + DIR=/tmp/x264 && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \ + tar -jx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \ + make && \ + make install && \ + rm -rf ${DIR} +### x265 http://x265.org/ +RUN \ + DIR=/tmp/x265 && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \ + tar -zx && \ + cd x265_${X265_VERSION}/build/linux && \ + sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \ + sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \ + ./multilib.sh && \ + make -C 8bit install && \ + rm -rf ${DIR} +### libogg https://www.xiph.org/ogg/ +RUN \ + DIR=/tmp/ogg && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ + echo ${OGG_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### libopus https://www.opus-codec.org/ +RUN \ + DIR=/tmp/opus && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \ + echo ${OPUS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### libvorbis https://xiph.org/vorbis/ +RUN \ + DIR=/tmp/vorbis && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ + echo ${VORBIS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### libtheora http://www.theora.org/ +RUN \ + DIR=/tmp/theora && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ + echo ${THEORA_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### libvpx https://www.webmproject.org/code/ +RUN \ + DIR=/tmp/vpx && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \ + --disable-debug --disable-examples --disable-docs --disable-install-bins && \ + make && \ + make install && \ + rm -rf ${DIR} +### libwebp https://developers.google.com/speed/webp/ +RUN \ + DIR=/tmp/vebp && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### libmp3lame http://lame.sourceforge.net/ +RUN \ + DIR=/tmp/lame && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --enable-pic --disable-frontend && \ + make && \ + make install && \ + rm -rf ${DIR} +### xvid https://www.xvid.com/ +RUN \ + DIR=/tmp/xvid && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ + echo ${XVID_SHA256SUM} | sha256sum --check && \ + tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \ + cd xvidcore/build/generic && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --datadir="${DIR}" --enable-shared --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +### fdk-aac https://github.com/mstorsjo/fdk-aac +RUN \ + DIR=/tmp/fdk-aac && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + autoreconf -fiv && \ + ./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \ + make && \ + make install && \ + rm -rf ${DIR} +## openjpeg https://github.com/uclouvain/openjpeg +RUN \ + DIR=/tmp/openjpeg && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} +## freetype https://www.freetype.org/ +RUN \ + DIR=/tmp/freetype && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +## libvstab https://github.com/georgmartius/vid.stab +RUN \ + DIR=/tmp/vid.stab && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz &&\ + echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} +## fridibi https://www.fribidi.org/ +# + https://github.com/fribidi/fribidi/issues/8 +RUN \ + DIR=/tmp/fribidi && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \ + echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \ + sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib/' Makefile.am && \ + ./bootstrap --no-config && \ + ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + make -j 1 && \ + make install && \ + rm -rf ${DIR} +## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ +RUN \ + DIR=/tmp/fontconfig && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 &&\ + tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ + ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +## libass https://github.com/libass/libass +RUN \ + DIR=/tmp/libass && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz &&\ + echo ${LIBASS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f ${LIBASS_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +## kvazaar https://github.com/ultravideo/kvazaar +RUN \ + DIR=/tmp/kvazaar && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz &&\ + tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/aom && \ + git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \ + cd ${DIR} ; \ + rm -rf CMakeCache.txt CMakeFiles ; \ + mkdir -p ./aom_build ; \ + cd ./aom_build ; \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 ..; \ + make ; \ + make install ; \ + rm -rf ${DIR} + +## ffmpeg https://ffmpeg.org/ +RUN \ + DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \ + curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 + + + +RUN \ + DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \ + ./configure \ + --disable-debug \ + --disable-doc \ + --disable-ffplay \ + --enable-shared \ + --enable-avresample \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ + --enable-gpl \ + --enable-libass \ + --enable-libfreetype \ + --enable-libvidstab \ + --enable-libmp3lame \ + --enable-libopenjpeg \ + --enable-libopus \ + --enable-libtheora \ + --enable-libvorbis \ + --enable-libvpx \ + --enable-libwebp \ + --enable-libx265 \ + --enable-libxvid \ + --enable-libx264 \ + --enable-nonfree \ + --enable-openssl \ + --enable-libfdk_aac \ + --enable-libkvazaar \ + \ + --enable-postproc \ + --enable-small \ + --enable-version3 \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ + --extra-libs=-ldl \ + --prefix="${PREFIX}" && \ + make && \ + make install && \ + make distclean && \ + hash -r && \ + cd tools && \ + make qt-faststart && \ + cp qt-faststart ${PREFIX}/bin + +RUN \ + ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ + cp ${PREFIX}/bin/* /usr/local/bin/ && \ + cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ + LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf + +FROM base +MAINTAINER Julien Rottenberg + +CMD ["--help"] +ENTRYPOINT ["ffmpeg"] + +ENV LD_LIBRARY_PATH=/usr/local/lib64 + +COPY --from=build /usr/local/ /usr/local/ + +# Let's make sure the app built correctly +# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output \ No newline at end of file From 8c4afa8bfcc9af5a8b3b35938c4abd33a51d3fbf Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 14:11:55 +1000 Subject: [PATCH 03/36] update to match main --- Dockerfile-debug | 108 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 28 deletions(-) diff --git a/Dockerfile-debug b/Dockerfile-debug index a06331f..c5e0308 100644 --- a/Dockerfile-debug +++ b/Dockerfile-debug @@ -1,31 +1,36 @@ -FROM aemdesign/oracle-jdk:latest +FROM aemdesign/oracle-jdk:jdk11 MAINTAINER devops -LABEL container.version="1.0" \ - os.version="centos 7" \ - java.version="oracle 8" \ - container.description="base image for aem" \ +LABEL os="centos 8" \ + container.description="java and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ - description="DEBUG VERSION" + version="1.0.0" \ + imagename="java-ffmpeg" \ + test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ + test.command.verify="11." ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION="4.0" \ - FFMPEG_GPGKEY="D67658D8" \ +ENV FFMPEG_VERSION="4.2.1" \ + AOM_VERSION="dd36e78d825fb2034ea0e3c630cd43360f241021" \ FDKAAC_VERSION="0.1.5" \ - FREETYPE_VERSION="2.9.1" \ - FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FONTCONFIG_VERSION="2.12.4" \ + FFMPEG_GPGKEY="D67658D8" \ FRIBIDI_VERSION="0.19.7" \ FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ - FONTCONFIG_VERSION="2.12.4" \ + KVAZAAR_VERSION="1.2.0" \ + FREETYPE_VERSION="2.9.1" \ + FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ LAME_MAJORVERSION="3.100" \ LAME_VERSION="3.100" \ LIBASS_VERSION="0.13.7" \ LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBVIDSTAB_VERSION="1.1.0" \ + LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ OGG_VERSION="1.3.2" \ OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ OPENCOREAMR_VERSION="0.1.5" \ @@ -36,16 +41,15 @@ ENV FFMPEG_VERSION="4.0" \ THEORA_SHA256="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b" \ VORBIS_VERSION="1.3.5" \ VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ - VPX_VERSION="1.7.0" \ + VPX_VERSION="1.8.0" \ X264_VERSION="20170226-2245-stable" \ X265_VERSION="2.3" \ XVID_VERSION="1.3.4" \ XVID_SHA256="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f" \ YASM_VERSION="1.3.0" \ - LIBVIDSTAB_VERSION="1.1.0" \ - LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ - KVAZAAR_VERSION="1.2.0" \ - AOM_VERSION="master" \ + NASM_VERSION="2.14.02" \ + YASM_VERSION="1.3.0" \ + GPERF_VERSION="3.0.4" \ SRC="/usr/local" ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ @@ -56,7 +60,8 @@ ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ FREETYPE_SHA256SUM="${FREETYPE_SHA256SUM} freetype-${FREETYPE_VERSION}.tar.gz" \ LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256SUM} v${LIBVIDSTAB_VERSION}.tar.gz" \ LIBASS_SHA256SUM="${LIBASS_SHA256SUM} ${LIBASS_VERSION}.tar.gz" \ - FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" \ + PATH="$PATH:${PREFIX}/bin" WORKDIR /tmp/workdir @@ -64,16 +69,64 @@ WORKDIR /tmp/workdir COPY msft-fonts.zip ./ RUN \ + buildDeps="autoconf \ + automake \ + bzip2 \ + expat-devel \ + gcc \ + gcc-c++ \ + git \ + libtool \ + make \ + perl \ + openssl-devel \ + tar \ + diffutils \ + which \ + zlib-devel \ + freetype-devel \ + cmake3 \ + pkgconfig \ + expat-devel \ + libgomp \ + libXext-devel \ + libXfixes-devel \ + unzip \ + wget" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ yum install -y --enablerepo=extras epel-release && \ - yum install -y autoconf automake bzip2 freetype-devel gcc gcc-c++ git libtool make cmake3 nasm pkgconfig expat-devel gperf libgomp \ - zlib-devel libXext-devel libXfixes-devel perl openssl-devel tar yasm which unzip wget && \ - #make cmake3 be default cmake - ln -sf /usr/bin/cmake3 /usr/bin/cmake && \ - ln -sf /usr/bin/cpack3 /usr/bin/cpack && \ - ln -sf /usr/bin/ctest3 /usr/bin/ctest + yum install -y ${buildDeps} +# SETUP BUILD DEPENDECIES FROM SROUCE +RUN \ +## gperf https://www.gnu.org/software/gperf/ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL http://ftp.gnu.org/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} && \ +## nasm https://www.nasm.us/ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} && \ + \ +## yasm https://www.tortall.net + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} +# SETUP FFMPEG LIBRARIES AND FFMPEG RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -140,7 +193,7 @@ RUN \ curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ echo ${THEORA_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ - ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples && \ make && \ make install && \ rm -rf ${DIR} @@ -197,7 +250,7 @@ RUN \ RUN \ ## freetype https://www.freetype.org/ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://jaist.dl.sourceforge.net/project/freetype/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.gz && \ + curl -sLO http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \ ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ @@ -294,10 +347,11 @@ RUN \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ + --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ --enable-libxvid \ - --enable-x86asm \ + --disable-x86asm \ --enable-gpl \ --enable-libx264 \ --enable-nonfree \ @@ -341,5 +395,3 @@ RUN \ yum clean all && rm -rf /var/lib/yum/* ENV LD_LIBRARY_PATH=/usr/local/lib64 - -#CMD ["/bin/bash"] From b5cdc97055acbd5f54bd732d23f6fb10d68c6c45 Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 22:29:30 +1000 Subject: [PATCH 04/36] update xvid --- Dockerfile | 95 +++++++++++++++++++++++++++++++++++++----------- Dockerfile-debug | 4 +- 2 files changed, 75 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73a3980..adc8d13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,18 +15,22 @@ ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib ARG PREFIX=/opt/ffmpeg ARG MAKEFLAGS="-j2" -ENV FFMPEG_VERSION="4.0" \ - FFMPEG_GPGKEY="D67658D8" \ +ENV FFMPEG_VERSION="4.2.1" \ + AOM_VERSION="dd36e78d825fb2034ea0e3c630cd43360f241021" \ FDKAAC_VERSION="0.1.5" \ - FREETYPE_VERSION="2.9.1" \ - FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FONTCONFIG_VERSION="2.12.4" \ + FFMPEG_GPGKEY="D67658D8" \ FRIBIDI_VERSION="0.19.7" \ FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ - FONTCONFIG_VERSION="2.12.4" \ + KVAZAAR_VERSION="1.2.0" \ + FREETYPE_VERSION="2.9.1" \ + FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ LAME_MAJORVERSION="3.100" \ LAME_VERSION="3.100" \ LIBASS_VERSION="0.13.7" \ LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBVIDSTAB_VERSION="1.1.0" \ + LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ OGG_VERSION="1.3.2" \ OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ OPENCOREAMR_VERSION="0.1.5" \ @@ -37,16 +41,15 @@ ENV FFMPEG_VERSION="4.0" \ THEORA_SHA256="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b" \ VORBIS_VERSION="1.3.5" \ VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ - VPX_VERSION="1.7.0" \ + VPX_VERSION="1.8.0" \ X264_VERSION="20170226-2245-stable" \ X265_VERSION="2.3" \ - XVID_VERSION="1.3.4" \ - XVID_SHA256="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f" \ + XVID_VERSION="1.3.5" \ + XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ YASM_VERSION="1.3.0" \ - LIBVIDSTAB_VERSION="1.1.0" \ - LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ - KVAZAAR_VERSION="1.2.0" \ - AOM_VERSION="dd36e78d825fb2034ea0e3c630cd43360f241021" \ + NASM_VERSION="2.14.02" \ + YASM_VERSION="1.3.0" \ + GPERF_VERSION="3.0.4" \ SRC="/usr/local" ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ @@ -57,7 +60,8 @@ ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ FREETYPE_SHA256SUM="${FREETYPE_SHA256SUM} freetype-${FREETYPE_VERSION}.tar.gz" \ LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256SUM} v${LIBVIDSTAB_VERSION}.tar.gz" \ LIBASS_SHA256SUM="${LIBASS_SHA256SUM} ${LIBASS_VERSION}.tar.gz" \ - FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" \ + PATH="$PATH:${PREFIX}/bin" WORKDIR /tmp/workdir @@ -65,16 +69,64 @@ WORKDIR /tmp/workdir COPY msft-fonts.zip ./ RUN \ + buildDeps="autoconf \ + automake \ + bzip2 \ + expat-devel \ + gcc \ + gcc-c++ \ + git \ + libtool \ + make \ + perl \ + openssl-devel \ + tar \ + diffutils \ + which \ + zlib-devel \ + freetype-devel \ + cmake3 \ + pkgconfig \ + expat-devel \ + libgomp \ + libXext-devel \ + libXfixes-devel \ + unzip \ + wget" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ yum install -y --enablerepo=extras epel-release && \ - yum install -y autoconf automake bzip2 freetype-devel gcc gcc-c++ git libtool make cmake3 nasm pkgconfig expat-devel gperf libgomp \ - zlib-devel libXext-devel libXfixes-devel perl openssl-devel tar yasm which unzip wget && \ - #make cmake3 be default cmake - ln -sf /usr/bin/cmake3 /usr/bin/cmake && \ - ln -sf /usr/bin/cpack3 /usr/bin/cpack && \ - ln -sf /usr/bin/ctest3 /usr/bin/ctest + yum install -y ${buildDeps} +# SETUP BUILD DEPENDECIES FROM SROUCE +RUN \ +## gperf https://www.gnu.org/software/gperf/ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL http://ftp.gnu.org/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} && \ +## nasm https://www.nasm.us/ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} && \ + \ +## yasm https://www.tortall.net + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} +# SETUP FFMPEG LIBRARIES AND FFMPEG RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -141,7 +193,7 @@ RUN \ curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ echo ${THEORA_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ - ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples && \ make && \ make install && \ rm -rf ${DIR} && \ @@ -293,6 +345,7 @@ RUN \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ + --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ --enable-libxvid \ @@ -339,5 +392,3 @@ RUN \ yum clean all && rm -rf /var/lib/yum/* ENV LD_LIBRARY_PATH=/usr/local/lib64 - -#CMD ["/bin/bash"] diff --git a/Dockerfile-debug b/Dockerfile-debug index c5e0308..2ddb4b2 100644 --- a/Dockerfile-debug +++ b/Dockerfile-debug @@ -44,8 +44,8 @@ ENV FFMPEG_VERSION="4.2.1" \ VPX_VERSION="1.8.0" \ X264_VERSION="20170226-2245-stable" \ X265_VERSION="2.3" \ - XVID_VERSION="1.3.4" \ - XVID_SHA256="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f" \ + XVID_VERSION="1.3.5" \ + XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ YASM_VERSION="1.3.0" \ NASM_VERSION="2.14.02" \ YASM_VERSION="1.3.0" \ From 7377d6cbb2ceb8389afa50333fd18d9573eb90ad Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 23:25:55 +1000 Subject: [PATCH 05/36] disable examples and unit tests --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index adc8d13..cda45e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -330,6 +330,8 @@ RUN \ --disable-debug \ --disable-doc \ --disable-ffplay \ + --disable-examples \ + --disable-unit-tests \ --enable-shared \ --enable-avresample \ --enable-libopencore-amrnb \ From c5b936635eda5accc845450f9e6c88076035169a Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 23:31:24 +1000 Subject: [PATCH 06/36] --enable-libfdk-aac --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cda45e5..048c932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -340,7 +340,6 @@ RUN \ --enable-libass \ --enable-libfreetype \ --enable-libvidstab \ - --enable-libfdk_aac \ --enable-libmp3lame \ --enable-libopenjpeg \ --enable-libopus \ @@ -357,6 +356,7 @@ RUN \ --enable-nonfree \ --enable-openssl \ --enable-libfdk_aac \ + --enable-libfdk-aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ --enable-postproc \ From 8a3ff0b336f9379b83f9bb4c2933944d6565c79c Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 3 Oct 2019 23:51:18 +1000 Subject: [PATCH 07/36] add CONFIG_UNIT_TESTS=0 to skip tests --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 048c932..517628b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -326,6 +326,7 @@ RUN \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + export CONFIG_UNIT_TESTS=0 && \ ./configure \ --disable-debug \ --disable-doc \ From 480ac4dccb4c310057e3c5e38eaaf3d8751bdfa5 Mon Sep 17 00:00:00 2001 From: wildone Date: Fri, 4 Oct 2019 00:11:54 +1000 Subject: [PATCH 08/36] set ENABLE_TESTS=0 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 517628b..7981e1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -327,6 +327,7 @@ RUN \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ export CONFIG_UNIT_TESTS=0 && \ + export ENABLE_TESTS=0 && \ ./configure \ --disable-debug \ --disable-doc \ From 21ddfb19c86826638d7fd7ac7b15982c46aaae7f Mon Sep 17 00:00:00 2001 From: wildone Date: Fri, 4 Oct 2019 01:47:44 +1000 Subject: [PATCH 09/36] provide custom make command without tests --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7981e1d..a9ea04d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -326,8 +326,6 @@ RUN \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ - export CONFIG_UNIT_TESTS=0 && \ - export ENABLE_TESTS=0 && \ ./configure \ --disable-debug \ --disable-doc \ @@ -369,7 +367,7 @@ RUN \ --extra-ldflags="-L${PREFIX}/lib" \ --extra-libs=-ldl \ --prefix="${PREFIX}" && \ - make && \ + make all all-yes alltools config && \ make install && \ make distclean && \ hash -r && \ From cb92e1fc2f4d57382ce7a47194f17e37fc2b2bb6 Mon Sep 17 00:00:00 2001 From: wildone Date: Fri, 4 Oct 2019 02:19:21 +1000 Subject: [PATCH 10/36] clean tests/Makefile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9ea04d..931f35c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -367,7 +367,8 @@ RUN \ --extra-ldflags="-L${PREFIX}/lib" \ --extra-libs=-ldl \ --prefix="${PREFIX}" && \ - make all all-yes alltools config && \ + echo "#disable all tests">tests/Makefile + make && \ make install && \ make distclean && \ hash -r && \ From 1986e7ab103a096e3d1a730877233ac1ab630a30 Mon Sep 17 00:00:00 2001 From: wildone Date: Fri, 4 Oct 2019 02:28:02 +1000 Subject: [PATCH 11/36] fix missing line end --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 931f35c..8e8250b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -367,7 +367,7 @@ RUN \ --extra-ldflags="-L${PREFIX}/lib" \ --extra-libs=-ldl \ --prefix="${PREFIX}" && \ - echo "#disable all tests">tests/Makefile + echo "#disable all tests">tests/Makefile && \ make && \ make install && \ make distclean && \ From 39e77e5ea8ba14ba8803f58428dece68c8edf4ad Mon Sep 17 00:00:00 2001 From: wildone Date: Fri, 4 Oct 2019 11:39:31 +1000 Subject: [PATCH 12/36] ad debug statements --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8e8250b..b63dcad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,6 +100,7 @@ RUN \ # SETUP BUILD DEPENDECIES FROM SROUCE RUN \ ## gperf https://www.gnu.org/software/gperf/ + echo ">>> BUILD: gperf <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL http://ftp.gnu.org/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -108,6 +109,7 @@ RUN \ make install && \ rm -rf ${DIR} && \ ## nasm https://www.nasm.us/ + echo ">>> BUILD: nasm <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -118,6 +120,7 @@ RUN \ rm -rf ${DIR} && \ \ ## yasm https://www.tortall.net + echo ">>> BUILD: yasm <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -129,6 +132,7 @@ RUN \ # SETUP FFMPEG LIBRARIES AND FFMPEG RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ + echo ">>> BUILD: opencore-amr <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://sourceforge.mirrorservice.org/o/op/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -138,6 +142,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## x264 http://www.videolan.org/developers/x264.html + echo ">>> BUILD: x264 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \ tar -jx --strip-components=1 && \ @@ -147,6 +152,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## x265 http://x265.org/ + echo ">>> BUILD: x265 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \ tar -zx && \ @@ -158,6 +164,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libogg https://www.xiph.org/ogg/ + echo ">>> BUILD: libogg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ echo ${OGG_SHA256SUM} | sha256sum --check && \ @@ -168,6 +175,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libopus https://www.opus-codec.org/ + echo ">>> BUILD: libopus <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz && \ echo ${OPUS_SHA256SUM} | sha256sum --check && \ @@ -179,6 +187,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libvorbis https://xiph.org/vorbis/ + echo ">>> BUILD: libvorbis <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ echo ${VORBIS_SHA256SUM} | sha256sum --check && \ @@ -189,6 +198,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libtheora http://www.theora.org/ + echo ">>> BUILD: libtheora <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ echo ${THEORA_SHA256SUM} | sha256sum --check && \ @@ -199,6 +209,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libvpx https://www.webmproject.org/code/ + echo ">>> BUILD: libvpx <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \ tar -zx --strip-components=1 && \ @@ -209,6 +220,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libmp3lame http://lame.sourceforge.net/ + echo ">>> BUILD: libmp3lame <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://sourceforge.mirrorservice.org/l/la/lame/lame/${LAME_MAJORVERSION}/lame-${LAME_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -218,6 +230,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## xvid https://www.xvid.com/ + echo ">>> BUILD: xvid <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ echo ${XVID_SHA256SUM} | sha256sum --check && \ @@ -229,6 +242,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## fdk-aac https://github.com/mstorsjo/fdk-aac + echo ">>> BUILD: fdk-aac <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -240,6 +254,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## openjpeg https://github.com/uclouvain/openjpeg + echo ">>> BUILD: opnejpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -249,6 +264,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## freetype https://www.freetype.org/ + echo ">>> BUILD: freetype <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ @@ -259,6 +275,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libvstab https://github.com/georgmartius/vid.stab + echo ">>> BUILD: libvstab <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz &&\ echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ @@ -269,6 +286,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## fridibi https://www.fribidi.org/ + echo ">>> BUILD: fridibi <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL -o fribidi-${FRIBIDI_VERSION}.tar.gz https://codeload.github.com/fribidi/fribidi/tar.gz/${FRIBIDI_VERSION} &&\ echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ @@ -281,6 +299,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ + echo ">>> BUILD: fontconfig <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 &&\ tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ @@ -290,6 +309,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## libass https://github.com/libass/libass + echo ">>> BUILD: libass <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz &&\ echo ${LIBASS_SHA256SUM} | sha256sum --check && \ @@ -301,6 +321,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## kvazaar https://github.com/ultravideo/kvazaar + echo ">>> BUILD: kvazaar <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz &&\ tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ @@ -311,6 +332,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## aomedia https://aomedia.googlesource.com/aom/ + echo ">>> BUILD: aomedia <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \ tar -zx -f ${AOM_VERSION}.tar.gz && \ @@ -323,6 +345,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## ffmpeg https://ffmpeg.org/ + echo ">>> BUILD: ffmpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ @@ -378,6 +401,7 @@ RUN \ rm -rf ${DIR} && \ #RUN \ ## setup ffmpeg lib64 libs + echo ">>> SETUP: ffmpeg lib64 libs <<" && \ ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ @@ -385,6 +409,7 @@ RUN \ ldconfig -v && ffmpeg -buildconf && \ #RUN \ ## setup jre fallback fonts + echo ">>> SETUP: jre fallback fonts <<" && \ mkdir -p /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-ukai/ukai.ttc /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-uming/uming.ttc /usr/java/default/jre/lib/fonts/fallback && \ @@ -392,6 +417,7 @@ RUN \ rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip && \ #RUN \ ## clenaup + echo ">>> CLEANUP <<" && \ yum clean all && rm -rf /var/lib/yum/* ENV LD_LIBRARY_PATH=/usr/local/lib64 From f3af1654745301efa6bd13dc2d29754f00a9e4b1 Mon Sep 17 00:00:00 2001 From: wildone Date: Sat, 13 Mar 2021 18:18:55 +1100 Subject: [PATCH 13/36] update to use github actions --- .github/workflows/build.yml | 49 +++++++++++++++++++++++++++++++++++++ Dockerfile | 7 +++--- README.md | 2 +- 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4ec77a9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: build + +on: [push] + +jobs: + build: + if: "!contains(github.event.head_commit.message, 'skip ci')" + runs-on: ubuntu-latest + env: + DOCKER_REGISTRY: docker.io + ORGANISATION_NAME: aemdesign + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + steps: + - uses: actions/checkout@v2 + - name: set envirnment variables + id: config + run: | + source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_config.sh) + source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) + - name: build and test docker image + run: | + docker build --pull -t $IMAGE:$GIT_BRANCH . + source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) + (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") + docker images + - name: login to docker registry + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${DOCKER_REGISTRY} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + - name: push image version + run: | + docker push $IMAGE:$GIT_BRANCH + - name: push latest image on master + if: github.ref == 'refs/heads/master' + run: | + docker tag $IMAGE:$GIT_BRANCH $IMAGE:latest + docker push $IMAGE:latest + - name: update registry description with readme on master + if: github.ref == 'refs/heads/master' + run: | + docker run --rm -v $(pwd):/data/ aemdesign/dockerhub-description "$DOCKER_USERNAME" "$DOCKER_PASSWORD" "$IMAGE" + - uses: meeDamian/github-release@1.0 + if: github.ref == 'refs/heads/master' + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ env.GITHUB_TAG }} + name: ${{ env.GITHUB_TAG }} + body: ${{ env.GIT_RELEASE_NOTES }} diff --git a/Dockerfile b/Dockerfile index b63dcad..554d51d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ FROM aemdesign/oracle-jdk:jdk11 -MAINTAINER devops - -LABEL os="centos 8" \ - container.description="java and ffmpeg" \ +LABEL os="centos" \ + container.description="centos with oracle jdk and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ version="1.0.0" \ imagename="java-ffmpeg" \ + maintainer="devops@aem.design" \ test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ test.command.verify="11." diff --git a/README.md b/README.md index bcb7e0c..1b5e477 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## CentOS 7 with Java and FFMPEG +## CentOS 8 with Java 11 and FFMPEG [![build_status](https://travis-ci.org/aem-design/java-ffmpeg.svg?branch=master)](https://travis-ci.org/aem-design/java-ffmpeg) [![github license](https://img.shields.io/github/license/aem-design/java-ffmpeg)](https://github.com/aem-design/java-ffmpeg) From 4be160f5747af49e1a4036986b5afd4aaa628723 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:49:09 +1100 Subject: [PATCH 14/36] add squash to docker build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ec77a9..a4cf2aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) - name: build and test docker image run: | - docker build --pull -t $IMAGE:$GIT_BRANCH . + docker build --pull --squash -t $IMAGE:$GIT_BRANCH . source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") docker images From 6ae656e9817bba922abd3f0d7f00689450dc59c4 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:49:27 +1100 Subject: [PATCH 15/36] add git ignore --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5dd703 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ + +# Ignore IDE and Operating System artifacts +.idea +.classpath +.metadata +.project +.settings +maven-eclipse.xml +*.iml +*.ipr +*.iws +.DS_Store + +target/ +logs/ From 619a522731cf440079e17246e37e49e1de10d7b2 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:49:41 +1100 Subject: [PATCH 16/36] remove travis pipeline --- .travis.yml | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d5a2ba7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -language: java - -if: tag is blank - -services: - - 'docker' - -before_install: - - echo GET CONFIG FROM DOCKERFILE - - export IMAGE_NAME=$(grep imagename= Dockerfile | sed -e 's/.*imagename="\(.*\)".*/\1/') - - export TEST_COMMAND=$(grep test.command= Dockerfile | sed -e 's/.*test.command="\(.*\)".*/\1/') - - export TEST_COMMAND_VERIFY=$(grep test.command.verify= Dockerfile | sed -e 's/.*test.command.verify="\(.*\)".*/\1/') - - export IMAGE_VERSION=$(grep version= Dockerfile | sed -e 's/.*version="\(.*\)".*/\1/') - - export IMAGE="$ORGANISATION_NAME/$IMAGE_NAME" - - echo IMAGE_NAME=$IMAGE_NAME - - echo IMAGE_VERSION=$IMAGE_VERSION - - echo TEST_COMMAND=$TEST_COMMAND - - echo TEST_COMMAND_VERIFY=$TEST_COMMAND_VERIFY - - echo GET CONFIG FROM GIT - - export CURRENT_VERSION=$(git describe --tag --always --long | sed -e 's/\(.*\)-\(.*\)-.*/\1.\2/') - - declare -a CURRENT_VERSION_ARRAY="(${CURRENT_VERSION//./ })"; export SEMVER_MAJOR=${CURRENT_VERSION_ARRAY[0]}; export SEMVER_MINOR=${CURRENT_VERSION_ARRAY[1]}; export SEMVER_PATCH=${CURRENT_VERSION_ARRAY[2]}; export SEMVER_BUILD=${CURRENT_VERSION_ARRAY[-1]} - - export SEMVER_BUILD=$(( ${SEMVER_PATCH} + ${SEMVER_BUILD} )) - - echo SEMVER_MAJOR:${SEMVER_MAJOR} - - echo SEMVER_MINOR:${SEMVER_MINOR} - - echo SEMVER_BUILD:${SEMVER_BUILD} - - export SEMVER=${SEMVER_MAJOR}.${SEMVER_MINOR}.${SEMVER_BUILD} - - echo SEMVER:$SEMVER - - if [[ ${SEMVER_MAJOR} == "" ]]; then travis_terminate 1; fi - - export TRAVIS_TAG=$SEMVER - - echo TRAVIS_TAG:$TRAVIS_TAG - -#build and test -install: - - docker build --pull -t $IMAGE:$IMAGE_VERSION . - - export CONTAINER_COMMAND="docker run $IMAGE:$IMAGE_VERSION $TEST_COMMAND" - - echo CONTAINER_COMMAND=$CONTAINER_COMMAND - - export CONTAINER_OUTPUT=$(eval $CONTAINER_COMMAND) - - echo CONTAINER_OUTPUT=$CONTAINER_OUTPUT - - if [[ ! ${CONTAINER_OUTPUT} =~ ${TEST_COMMAND_VERIFY} ]]; then travis_terminate 1; fi - - docker images - -#test -script: - - echo "LOGIN TO HUB.DOCKER" - - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - - echo "PUSH HUB.DOCKER" - - if [[ $TRAVIS_BRANCH == "master" ]]; then docker push $IMAGE:$IMAGE_VERSION; fi - - if [[ $TRAVIS_BRANCH == "master" ]]; then docker tag $IMAGE:$IMAGE_VERSION $IMAGE:latest && docker push $IMAGE:latest; fi - - echo "PUSH HUB.DOCKER BRANCH" - - if [[ $TRAVIS_BRANCH != "master" ]]; then docker tag $IMAGE:$IMAGE_VERSION $IMAGE:$TRAVIS_BRANCH && docker push $IMAGE:$TRAVIS_BRANCH; fi - - echo "UPDATE README IN HUB.DOCKER" - - if [[ $TRAVIS_BRANCH == "master" ]]; then docker run --rm -v $(pwd):/data/ aemdesign/dockerhub-description "$DOCKER_USERNAME" "$DOCKER_PASSWORD" "$IMAGE"; fi - -## Get the project version -before_deploy: - - if [[ $TRAVIS_BRANCH == "master" ]]; then git tag $TRAVIS_TAG; fi - -## Create release in GitHub -deploy: - provider: releases - tag_name: $TRAVIS_TAG - name: $TRAVIS_TAG - target_commitish: $TRAVIS_COMMIT - api_key: $GITHUB_TOKEN - skip_cleanup: true - on: - branch: master From 66f1bc74c40ff851f2939fdf5a11d281de6144ca Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:50:06 +1100 Subject: [PATCH 17/36] update to latest version of ffmpeg config --- Dockerfile | 453 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 308 insertions(+), 145 deletions(-) diff --git a/Dockerfile b/Dockerfile index 554d51d..b670234 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,34 @@ FROM aemdesign/oracle-jdk:jdk11 -LABEL os="centos" \ - container.description="centos with oracle jdk and ffmpeg" \ +LABEL os="centos 8" \ + container.description="java and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ version="1.0.0" \ + maintainer="devops " \ imagename="java-ffmpeg" \ - maintainer="devops@aem.design" \ test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ test.command.verify="11." -ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig -ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib -ARG PREFIX=/opt/ffmpeg -ARG MAKEFLAGS="-j2" +WORKDIR /tmp/workdir -ENV FFMPEG_VERSION="4.2.1" \ - AOM_VERSION="dd36e78d825fb2034ea0e3c630cd43360f241021" \ +ENV FFMPEG_VERSION="4.3.2" \ + AOM_VERSION="v1.0.0" \ FDKAAC_VERSION="0.1.5" \ FONTCONFIG_VERSION="2.12.4" \ FFMPEG_GPGKEY="D67658D8" \ - FRIBIDI_VERSION="0.19.7" \ - FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ - KVAZAAR_VERSION="1.2.0" \ FREETYPE_VERSION="2.9.1" \ - FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FREETYPE_SHA256="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FRIBIDI_VERSION="0.19.7" \ + FRIBIDI_SHA256="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ + KVAZAAR_VERSION="2.0.0" \ LAME_MAJORVERSION="3.100" \ LAME_VERSION="3.100" \ LIBASS_VERSION="0.13.7" \ - LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBPTHREAD_STUBS_VERSION=0.4 \ LIBVIDSTAB_VERSION="1.1.0" \ - LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBXCB_VERSION=1.13.1 \ OGG_VERSION="1.3.2" \ OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ OPENCOREAMR_VERSION="0.1.5" \ @@ -41,43 +40,63 @@ ENV FFMPEG_VERSION="4.2.1" \ VORBIS_VERSION="1.3.5" \ VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ VPX_VERSION="1.8.0" \ + WEBP_VERSION=1.0.2 \ X264_VERSION="20170226-2245-stable" \ - X265_VERSION="2.3" \ + X265_VERSION="3.1.1" \ + XAU_VERSION=1.0.9 \ + XORG_MACROS_VERSION=1.19.2 \ + XPROTO_VERSION=7.0.31 \ XVID_VERSION="1.3.5" \ XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ - YASM_VERSION="1.3.0" \ - NASM_VERSION="2.14.02" \ - YASM_VERSION="1.3.0" \ - GPERF_VERSION="3.0.4" \ + LIBXML2_VERSION="2.9.10" \ + LIBXML2_SHA256="f07dab13bf42d2b8db80620cce7419b3b87827cc937c8bb20fe13b8571ee9501" \ + LIBBLURAY_VERSION="1.1.2" \ + LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ + LIBZMQ_VERSION="4.3.2" \ + LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ + LIBARIBB24_VERSION="1.0.3" \ + LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ SRC="/usr/local" -ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ - OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ - THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ - VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ - XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ - FREETYPE_SHA256SUM="${FREETYPE_SHA256SUM} freetype-${FREETYPE_VERSION}.tar.gz" \ - LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256SUM} v${LIBVIDSTAB_VERSION}.tar.gz" \ - LIBASS_SHA256SUM="${LIBASS_SHA256SUM} ${LIBASS_VERSION}.tar.gz" \ - FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" \ +ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256} ${FRIBIDI_VERSION}.tar.gz" \ + LIBASS_SHA256SUM="${LIBASS_SHA256} ${LIBASS_VERSION}.tar.gz" \ + LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256} v${LIBVIDSTAB_VERSION}.tar.gz" \ + OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ + OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ + THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ + VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ + XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ + LIBXML2_SHA256SUM="${LIBXML2_SHA256} libxml2-v${LIBXML2_VERSION}.tar.gz" \ + LIBBLURAY_SHA256SUM="${LIBBLURAY_SHA256} libbluray-${LIBBLURAY_VERSION}.tar.bz2" \ + LIBZMQ_SHA256SUM="${LIBZMQ_SHA256} v${LIBZMQ_VERSION}.tar.gz" \ + LIBARIBB24_SHA256SUM="${LIBARIBB24_SHA256} v${LIBARIBB24_VERSION}.tar.gz" \ PATH="$PATH:${PREFIX}/bin" -WORKDIR /tmp/workdir +ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig" +ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib +ARG PREFIX=/opt/ffmpeg +ARG MAKEFLAGS="-j2" +ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" #https://docs.google.com/uc?id=0B3Uxax626E5DOVdJNjc0TW9Mbmc&export=download COPY msft-fonts.zip ./ -RUN \ - buildDeps="autoconf \ +RUN buildDeps="autoconf \ automake \ bzip2 \ + cmake \ + diffutils \ expat-devel \ gcc \ gcc-c++ \ git \ + gperf \ libtool \ make \ + nasm \ perl \ + python3 \ openssl-devel \ tar \ diffutils \ @@ -91,55 +110,31 @@ RUN \ libXext-devel \ libXfixes-devel \ unzip \ - wget" && \ + yasm \ + which \ + wget \ + libgomp" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - yum install -y --enablerepo=extras epel-release && \ - yum install -y ${buildDeps} - -# SETUP BUILD DEPENDECIES FROM SROUCE -RUN \ -## gperf https://www.gnu.org/software/gperf/ - echo ">>> BUILD: gperf <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL http://ftp.gnu.org/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} && \ -## nasm https://www.nasm.us/ - echo ">>> BUILD: nasm <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./autogen.sh && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} && \ - \ -## yasm https://www.tortall.net - echo ">>> BUILD: yasm <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} + dnf update -y && \ + dnf repolist && \ + dnf --enablerepo=extras install -y epel-release dnf-plugins-core && \ + dnf config-manager --set-enabled powertools && \ + dnf --enablerepo=powertools install -y ${buildDeps} && \ + dnf repolist && \ + alternatives --set python /usr/bin/python3 # SETUP FFMPEG LIBRARIES AND FFMPEG RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ echo ">>> BUILD: opencore-amr <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://sourceforge.mirrorservice.org/o/op/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ + curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## x264 http://www.videolan.org/developers/x264.html echo ">>> BUILD: x264 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -148,8 +143,8 @@ RUN \ ./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## x265 http://x265.org/ echo ">>> BUILD: x265 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -160,10 +155,10 @@ RUN \ sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \ ./multilib.sh && \ make -C 8bit install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libogg https://www.xiph.org/ogg/ - echo ">>> BUILD: libogg <<" && \ + echo ">>> BUILD: ogg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ echo ${OGG_SHA256SUM} | sha256sum --check && \ @@ -171,22 +166,22 @@ RUN \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libopus https://www.opus-codec.org/ - echo ">>> BUILD: libopus <<" && \ + echo ">>> BUILD: opus <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz && \ + curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \ echo ${OPUS_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \ autoreconf -fiv && \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libvorbis https://xiph.org/vorbis/ - echo ">>> BUILD: libvorbis <<" && \ + echo ">>> BUILD: vorbis <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ echo ${VORBIS_SHA256SUM} | sha256sum --check && \ @@ -194,10 +189,10 @@ RUN \ ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libtheora http://www.theora.org/ - echo ">>> BUILD: libtheora <<" && \ + echo ">>> BUILD: theora <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ echo ${THEORA_SHA256SUM} | sha256sum --check && \ @@ -205,19 +200,29 @@ RUN \ ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libvpx https://www.webmproject.org/code/ echo ">>> BUILD: libvpx <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \ tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-pic --enable-shared \ + ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \ --disable-debug --disable-examples --disable-docs --disable-install-bins && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ +### libwebp https://developers.google.com/speed/webp/ + echo ">>> BUILD: libwebp <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} +RUN \ ## libmp3lame http://lame.sourceforge.net/ echo ">>> BUILD: libmp3lame <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -226,8 +231,8 @@ RUN \ ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## xvid https://www.xvid.com/ echo ">>> BUILD: xvid <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -235,11 +240,11 @@ RUN \ echo ${XVID_SHA256SUM} | sha256sum --check && \ tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \ cd xvidcore/build/generic && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --datadir="${DIR}" && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## fdk-aac https://github.com/mstorsjo/fdk-aac echo ">>> BUILD: fdk-aac <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -249,100 +254,237 @@ RUN \ ./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \ make && \ make install && \ - make distclean && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## openjpeg https://github.com/uclouvain/openjpeg - echo ">>> BUILD: opnejpeg <<" && \ + echo ">>> BUILD: openjpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## freetype https://www.freetype.org/ echo ">>> BUILD: freetype <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \ ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libvstab https://github.com/georgmartius/vid.stab echo ">>> BUILD: libvstab <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz &&\ + curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \ echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## fridibi https://www.fribidi.org/ - echo ">>> BUILD: fridibi <<" && \ + echo ">>> BUILD: fribidi <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL -o fribidi-${FRIBIDI_VERSION}.tar.gz https://codeload.github.com/fribidi/fribidi/tar.gz/${FRIBIDI_VERSION} &&\ + curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \ echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ - tar -zx --strip-components=1 -f fribidi-${FRIBIDI_VERSION}.tar.gz && \ - sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib/' Makefile.am && \ - ./bootstrap --no-config && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ - make && \ + tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \ + sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \ + ./bootstrap --no-config --auto && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make -j1 && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ echo ">>> BUILD: fontconfig <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 &&\ + curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## libass https://github.com/libass/libass echo ">>> BUILD: libass <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz &&\ + curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz && \ echo ${LIBASS_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f ${LIBASS_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} +RUN \ ## kvazaar https://github.com/ultravideo/kvazaar echo ">>> BUILD: kvazaar <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz &&\ + curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \ tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} + +RUN \ ## aomedia https://aomedia.googlesource.com/aom/ echo ">>> BUILD: aomedia <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \ - tar -zx -f ${AOM_VERSION}.tar.gz && \ + DIR=$(mktemp -d) && \ + git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} && \ + cd ${DIR} && \ rm -rf CMakeCache.txt CMakeFiles && \ mkdir -p ./aom_build && \ cd ./aom_build && \ - cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 .. && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 .. && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xproto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libXau <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ make && \ make install && \ - rm -rf ${DIR} && \ -#RUN \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libpthread <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xcb-proto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxml2 - for libbluray + echo ">>> BUILD: libxml2 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${LIBXML2_VERSION}/libxml2-v${LIBXML2_VERSION}.tar.gz && \ + echo ${LIBXML2_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f libxml2-v${LIBXML2_VERSION}.tar.gz && \ + ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libbluray - Requires libxml, freetype, and fontconfig + echo ">>> BUILD: libbluray <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://download.videolan.org/pub/videolan/libbluray/${LIBBLURAY_VERSION}/libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + echo ${LIBBLURAY_SHA256SUM} | sha256sum --check && \ + tar -jx --strip-components=1 -f libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + ./configure --prefix="${PREFIX}" --disable-examples --disable-bdjava-jar --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libzmq https://github.com/zeromq/libzmq/ + echo ">>> BUILD: libzmq <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \ + echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libsrt https://github.com/Haivision/srt + echo ">>> BUILD: libsrt <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libpng + echo ">>> BUILD: libpng <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone https://git.code.sf.net/p/libpng/code ${DIR} -b v${LIBPNG_VERSION} --depth 1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libaribb24 + echo ">>> BUILD: libaribb24 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/nkoriyama/aribb24/archive/v${LIBARIBB24_VERSION}.tar.gz && \ + echo ${LIBARIBB24_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBARIBB24_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure CFLAGS="-I${PREFIX}/include -fPIC" --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ ## ffmpeg https://ffmpeg.org/ echo ">>> BUILD: ffmpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -360,8 +502,10 @@ RUN \ --enable-libopencore-amrwb \ --enable-gpl \ --enable-libass \ + --enable-fontconfig \ --enable-libfreetype \ --enable-libvidstab \ + --enable-libfdk_aac \ --enable-libmp3lame \ --enable-libopenjpeg \ --enable-libopus \ @@ -369,6 +513,7 @@ RUN \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ + --enable-libxcb \ --enable-libx264 \ --enable-libx265 \ --enable-libxvid \ @@ -384,39 +529,57 @@ RUN \ --enable-postproc \ --enable-small \ --enable-version3 \ + --enable-libbluray \ + --enable-libzmq \ + --extra-libs=-ldl \ + --prefix="${PREFIX}" \ + --enable-libopenjpeg \ + --enable-libkvazaar \ + --enable-libaom \ + --extra-libs=-lpthread \ + --enable-libsrt \ + --enable-libaribb24 \ --enable-zlib \ --extra-cflags="-I${PREFIX}/include" \ --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ echo "#disable all tests">tests/Makefile && \ make && \ make install && \ + make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ make distclean && \ hash -r && \ cd tools && \ make qt-faststart && \ - cp qt-faststart ${PREFIX}/bin && \ - rm -rf ${DIR} && \ -#RUN \ + cp qt-faststart ${PREFIX}/bin/ && \ + rm -rf ${DIR} + +RUN \ ## setup ffmpeg lib64 libs echo ">>> SETUP: ffmpeg lib64 libs <<" && \ ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ + for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf && \ - ldconfig -v && ffmpeg -buildconf && \ -#RUN \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib64/pkgconfig && \ + for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ + sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib64/pkgconfig/"${pc##*/}"; \ + done && \ + ldconfig -v && ffmpeg -buildconf + +RUN \ ## setup jre fallback fonts echo ">>> SETUP: jre fallback fonts <<" && \ mkdir -p /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-ukai/ukai.ttc /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-uming/uming.ttc /usr/java/default/jre/lib/fonts/fallback && \ cd /tmp/workdir && unzip msft-fonts.zip && cp msft-fonts/* /usr/java/default/jre/lib/fonts/fallback/ && \ - rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip && \ -#RUN \ + rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip + +RUN \ ## clenaup echo ">>> CLEANUP <<" && \ - yum clean all && rm -rf /var/lib/yum/* + dnf clean all && rm -rf /var/lib/yum/* -ENV LD_LIBRARY_PATH=/usr/local/lib64 +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib From c7b07c530735613c61e28adc3a19b14bcf982c4f Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:51:55 +1100 Subject: [PATCH 18/36] add helper script --- build.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..bc6d5ab --- /dev/null +++ b/build.ps1 @@ -0,0 +1,21 @@ +Param( + [string]$LOG_PATH = "${PWD}\logs", + [string]$LOG_PEFIX = "docker", + [string]$LOG_SUFFIX = ".log", + [string]$TAG = "jdk11", + [string]$FILE = "Dockerfile", + [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", + [string]$COMMAND = "docker build . -f .\${FILE} -t ${TAG}" +) + +$SKIP_CONFIG = $true +$PARENT_PROJECT_PATH = "." + +. ([Scriptblock]::Create((([System.Text.Encoding]::ASCII).getString((Invoke-WebRequest -Uri "${FUNCTIONS_URI}").Content)))) + +printSectionBanner "Building Image" +printSectionLine "$COMMAND" "warn" + +Invoke-Expression -Command "$COMMAND" | Tee-Object -Append -FilePath "${LOG_FILE}" + + From 3c273bbd300a9631e9d143940118fa52abac47a3 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:52:10 +1100 Subject: [PATCH 19/36] add debug files --- Dockerfile-debug | 400 ++++++++++++++++++++++++++++++++++------------ Dockerfile-source | 260 +++++++++++++++++++++++++----- 2 files changed, 518 insertions(+), 142 deletions(-) diff --git a/Dockerfile-debug b/Dockerfile-debug index 2ddb4b2..5acde23 100644 --- a/Dockerfile-debug +++ b/Dockerfile-debug @@ -1,36 +1,30 @@ -FROM aemdesign/oracle-jdk:jdk11 +FROM aemdesign/oracle-jdk:jdk11 as base -MAINTAINER devops +RUN dnf -y install libgomp && \ + dnf clean all; -LABEL os="centos 8" \ - container.description="java and ffmpeg" \ - image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ - version="1.0.0" \ - imagename="java-ffmpeg" \ - test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ - test.command.verify="11." +FROM base AS build -ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig -ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib -ARG PREFIX=/opt/ffmpeg -ARG MAKEFLAGS="-j2" +WORKDIR /tmp/workdir -ENV FFMPEG_VERSION="4.2.1" \ - AOM_VERSION="dd36e78d825fb2034ea0e3c630cd43360f241021" \ +ENV FFMPEG_VERSION="4.3.2" \ + AOM_VERSION="v1.0.0" \ FDKAAC_VERSION="0.1.5" \ FONTCONFIG_VERSION="2.12.4" \ FFMPEG_GPGKEY="D67658D8" \ - FRIBIDI_VERSION="0.19.7" \ - FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ - KVAZAAR_VERSION="1.2.0" \ FREETYPE_VERSION="2.9.1" \ - FREETYPE_SHA256SUM="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FREETYPE_SHA256="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ + FRIBIDI_VERSION="0.19.7" \ + FRIBIDI_SHA256="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ + KVAZAAR_VERSION="2.0.0" \ LAME_MAJORVERSION="3.100" \ LAME_VERSION="3.100" \ LIBASS_VERSION="0.13.7" \ - LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBPTHREAD_STUBS_VERSION=0.4 \ LIBVIDSTAB_VERSION="1.1.0" \ - LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBXCB_VERSION=1.13.1 \ OGG_VERSION="1.3.2" \ OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ OPENCOREAMR_VERSION="0.1.5" \ @@ -42,43 +36,63 @@ ENV FFMPEG_VERSION="4.2.1" \ VORBIS_VERSION="1.3.5" \ VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ VPX_VERSION="1.8.0" \ + WEBP_VERSION=1.0.2 \ X264_VERSION="20170226-2245-stable" \ - X265_VERSION="2.3" \ + X265_VERSION="3.1.1" \ + XAU_VERSION=1.0.9 \ + XORG_MACROS_VERSION=1.19.2 \ + XPROTO_VERSION=7.0.31 \ XVID_VERSION="1.3.5" \ XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ - YASM_VERSION="1.3.0" \ - NASM_VERSION="2.14.02" \ - YASM_VERSION="1.3.0" \ - GPERF_VERSION="3.0.4" \ + LIBXML2_VERSION="2.9.10" \ + LIBXML2_SHA256="f07dab13bf42d2b8db80620cce7419b3b87827cc937c8bb20fe13b8571ee9501" \ + LIBBLURAY_VERSION="1.1.2" \ + LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ + LIBZMQ_VERSION="4.3.2" \ + LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ + LIBARIBB24_VERSION="1.0.3" \ + LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ SRC="/usr/local" -ENV OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ - OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ - THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ - VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ - XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ - FREETYPE_SHA256SUM="${FREETYPE_SHA256SUM} freetype-${FREETYPE_VERSION}.tar.gz" \ - LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256SUM} v${LIBVIDSTAB_VERSION}.tar.gz" \ - LIBASS_SHA256SUM="${LIBASS_SHA256SUM} ${LIBASS_VERSION}.tar.gz" \ - FRIBIDI_SHA256SUM="${FRIBIDI_SHA256SUM} fribidi-${FRIBIDI_VERSION}.tar.gz" \ +ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256} ${FRIBIDI_VERSION}.tar.gz" \ + LIBASS_SHA256SUM="${LIBASS_SHA256} ${LIBASS_VERSION}.tar.gz" \ + LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256} v${LIBVIDSTAB_VERSION}.tar.gz" \ + OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ + OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ + THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ + VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ + XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ + LIBXML2_SHA256SUM="${LIBXML2_SHA256} libxml2-v${LIBXML2_VERSION}.tar.gz" \ + LIBBLURAY_SHA256SUM="${LIBBLURAY_SHA256} libbluray-${LIBBLURAY_VERSION}.tar.bz2" \ + LIBZMQ_SHA256SUM="${LIBZMQ_SHA256} v${LIBZMQ_VERSION}.tar.gz" \ + LIBARIBB24_SHA256SUM="${LIBARIBB24_SHA256} v${LIBARIBB24_VERSION}.tar.gz" \ PATH="$PATH:${PREFIX}/bin" -WORKDIR /tmp/workdir +ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig" +ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib +ARG PREFIX=/opt/ffmpeg +ARG MAKEFLAGS="-j2" +ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" #https://docs.google.com/uc?id=0B3Uxax626E5DOVdJNjc0TW9Mbmc&export=download COPY msft-fonts.zip ./ -RUN \ - buildDeps="autoconf \ +RUN buildDeps="autoconf \ automake \ bzip2 \ + cmake \ + diffutils \ expat-devel \ gcc \ gcc-c++ \ git \ + gperf \ libtool \ make \ + nasm \ perl \ + python3 \ openssl-devel \ tar \ diffutils \ @@ -92,45 +106,24 @@ RUN \ libXext-devel \ libXfixes-devel \ unzip \ + yasm \ + which \ wget" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - yum install -y --enablerepo=extras epel-release && \ - yum install -y ${buildDeps} - -# SETUP BUILD DEPENDECIES FROM SROUCE -RUN \ -## gperf https://www.gnu.org/software/gperf/ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL http://ftp.gnu.org/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} && \ -## nasm https://www.nasm.us/ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./autogen.sh && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} && \ - \ -## yasm https://www.tortall.net - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz | \ - tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ - make && \ - make install && \ - rm -rf ${DIR} + dnf update -y && \ + dnf repolist && \ + dnf --enablerepo=extras install -y epel-release dnf-plugins-core && \ + dnf config-manager --set-enabled powertools && \ + dnf --enablerepo=powertools install -y ${buildDeps} && \ + dnf repolist && \ + alternatives --set python /usr/bin/python3 # SETUP FFMPEG LIBRARIES AND FFMPEG RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ + echo ">>> BUILD: opencore-amr <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://sourceforge.mirrorservice.org/o/op/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ + curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ @@ -138,6 +131,7 @@ RUN \ rm -rf ${DIR} RUN \ ## x264 http://www.videolan.org/developers/x264.html + echo ">>> BUILD: x264 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \ tar -jx --strip-components=1 && \ @@ -147,6 +141,7 @@ RUN \ rm -rf ${DIR} RUN \ ## x265 http://x265.org/ + echo ">>> BUILD: x265 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \ tar -zx && \ @@ -158,6 +153,7 @@ RUN \ rm -rf ${DIR} RUN \ ## libogg https://www.xiph.org/ogg/ + echo ">>> BUILD: ogg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ echo ${OGG_SHA256SUM} | sha256sum --check && \ @@ -168,8 +164,9 @@ RUN \ rm -rf ${DIR} RUN \ ## libopus https://www.opus-codec.org/ + echo ">>> BUILD: opus <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz && \ + curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \ echo ${OPUS_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \ autoreconf -fiv && \ @@ -179,6 +176,7 @@ RUN \ rm -rf ${DIR} RUN \ ## libvorbis https://xiph.org/vorbis/ + echo ">>> BUILD: vorbis <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ echo ${VORBIS_SHA256SUM} | sha256sum --check && \ @@ -189,6 +187,7 @@ RUN \ rm -rf ${DIR} RUN \ ## libtheora http://www.theora.org/ + echo ">>> BUILD: theora <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ echo ${THEORA_SHA256SUM} | sha256sum --check && \ @@ -199,16 +198,28 @@ RUN \ rm -rf ${DIR} RUN \ ## libvpx https://www.webmproject.org/code/ + echo ">>> BUILD: libvpx <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \ tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-pic --enable-shared \ + ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \ --disable-debug --disable-examples --disable-docs --disable-install-bins && \ make && \ make install && \ rm -rf ${DIR} +RUN \ +### libwebp https://developers.google.com/speed/webp/ + echo ">>> BUILD: libwebp <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} RUN \ ## libmp3lame http://lame.sourceforge.net/ + echo ">>> BUILD: libmp3lame <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://sourceforge.mirrorservice.org/l/la/lame/lame/${LAME_MAJORVERSION}/lame-${LAME_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -218,17 +229,19 @@ RUN \ rm -rf ${DIR} RUN \ ## xvid https://www.xvid.com/ + echo ">>> BUILD: xvid <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ echo ${XVID_SHA256SUM} | sha256sum --check && \ tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \ cd xvidcore/build/generic && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --datadir="${DIR}" && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ make && \ make install && \ rm -rf ${DIR} RUN \ ## fdk-aac https://github.com/mstorsjo/fdk-aac + echo ">>> BUILD: fdk-aac <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -236,10 +249,10 @@ RUN \ ./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \ make && \ make install && \ - make distclean && \ rm -rf ${DIR} RUN \ ## openjpeg https://github.com/uclouvain/openjpeg + echo ">>> BUILD: openjpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ @@ -249,8 +262,9 @@ RUN \ rm -rf ${DIR} RUN \ ## freetype https://www.freetype.org/ + echo ">>> BUILD: freetype <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \ ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ @@ -259,8 +273,9 @@ RUN \ rm -rf ${DIR} RUN \ ## libvstab https://github.com/georgmartius/vid.stab + echo ">>> BUILD: libvstab <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz &&\ + curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \ echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ @@ -269,62 +284,204 @@ RUN \ rm -rf ${DIR} RUN \ ## fridibi https://www.fribidi.org/ + echo ">>> BUILD: fribidi <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL -o fribidi-${FRIBIDI_VERSION}.tar.gz https://codeload.github.com/fribidi/fribidi/tar.gz/${FRIBIDI_VERSION} &&\ + curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \ echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ - tar -zx --strip-components=1 -f fribidi-${FRIBIDI_VERSION}.tar.gz && \ - sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib/' Makefile.am && \ - ./bootstrap --no-config && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ - make && \ + tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \ + sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \ + ./bootstrap --no-config --auto && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make -j1 && \ make install && \ rm -rf ${DIR} RUN \ ## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ + echo ">>> BUILD: fontconfig <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 &&\ + curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} RUN \ ## libass https://github.com/libass/libass + echo ">>> BUILD: libass <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz &&\ + curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz && \ echo ${LIBASS_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f ${LIBASS_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} RUN \ ## kvazaar https://github.com/ultravideo/kvazaar + echo ">>> BUILD: kvazaar <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz &&\ + curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \ tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} RUN \ ## aomedia https://aomedia.googlesource.com/aom/ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \ - tar -zx -f ${AOM_VERSION}.tar.gz && \ + echo ">>> BUILD: aomedia <<" && \ + DIR=$(mktemp -d) && \ + git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} && \ + cd ${DIR} && \ rm -rf CMakeCache.txt CMakeFiles && \ mkdir -p ./aom_build && \ cd ./aom_build && \ - cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 .. && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 .. && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xproto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libXau <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libpthread <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xcb-proto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxml2 - for libbluray + echo ">>> BUILD: libxml2 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${LIBXML2_VERSION}/libxml2-v${LIBXML2_VERSION}.tar.gz && \ + echo ${LIBXML2_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f libxml2-v${LIBXML2_VERSION}.tar.gz && \ + ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libbluray - Requires libxml, freetype, and fontconfig + echo ">>> BUILD: libbluray <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://download.videolan.org/pub/videolan/libbluray/${LIBBLURAY_VERSION}/libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + echo ${LIBBLURAY_SHA256SUM} | sha256sum --check && \ + tar -jx --strip-components=1 -f libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + ./configure --prefix="${PREFIX}" --disable-examples --disable-bdjava-jar --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libzmq https://github.com/zeromq/libzmq/ + echo ">>> BUILD: libzmq <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \ + echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libsrt https://github.com/Haivision/srt + echo ">>> BUILD: libsrt <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libpng + echo ">>> BUILD: libpng <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone https://git.code.sf.net/p/libpng/code ${DIR} -b v${LIBPNG_VERSION} --depth 1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libaribb24 + echo ">>> BUILD: libaribb24 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/nkoriyama/aribb24/archive/v${LIBARIBB24_VERSION}.tar.gz && \ + echo ${LIBARIBB24_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBARIBB24_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure CFLAGS="-I${PREFIX}/include -fPIC" --prefix="${PREFIX}" && \ make && \ make install && \ rm -rf ${DIR} RUN \ ## ffmpeg https://ffmpeg.org/ + echo ">>> BUILD: ffmpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ @@ -332,12 +489,15 @@ RUN \ --disable-debug \ --disable-doc \ --disable-ffplay \ + --disable-examples \ + --disable-unit-tests \ --enable-shared \ --enable-avresample \ --enable-libopencore-amrnb \ --enable-libopencore-amrwb \ --enable-gpl \ --enable-libass \ + --enable-fontconfig \ --enable-libfreetype \ --enable-libvidstab \ --enable-libfdk_aac \ @@ -348,50 +508,86 @@ RUN \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ + --enable-libxcb \ --enable-libx264 \ --enable-libx265 \ --enable-libxvid \ - --disable-x86asm \ + --enable-x86asm \ --enable-gpl \ --enable-libx264 \ --enable-nonfree \ --enable-openssl \ --enable-libfdk_aac \ + --enable-libfdk-aac \ --enable-libkvazaar \ --enable-libaom --extra-libs=-lpthread \ --enable-postproc \ --enable-small \ --enable-version3 \ + --enable-libbluray \ + --enable-libzmq \ + --extra-libs=-ldl \ + --prefix="${PREFIX}" \ + --enable-libopenjpeg \ + --enable-libkvazaar \ + --enable-libaom \ + --extra-libs=-lpthread \ + --enable-libsrt \ + --enable-libaribb24 \ --enable-zlib \ --extra-cflags="-I${PREFIX}/include" \ --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ + echo "#disable all tests">tests/Makefile && \ make && \ make install && \ + make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ make distclean && \ hash -r && \ cd tools && \ make qt-faststart && \ - cp qt-faststart ${PREFIX}/bin && \ + cp qt-faststart ${PREFIX}/bin/ && \ rm -rf ${DIR} RUN \ ## setup ffmpeg lib64 libs + echo ">>> SETUP: ffmpeg lib64 libs <<" && \ ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ + for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf && \ - ldconfig -v && ffmpeg -buildconf && \ -#RUN \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib64/pkgconfig && \ + for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ + sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib64/pkgconfig/"${pc##*/}"; \ + done && \ + ldconfig -v && ffmpeg -buildconf + +RUN \ ## setup jre fallback fonts + echo ">>> SETUP: jre fallback fonts <<" && \ mkdir -p /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-ukai/ukai.ttc /usr/java/default/jre/lib/fonts/fallback && \ ln -s /usr/share/fonts/cjkuni-uming/uming.ttc /usr/java/default/jre/lib/fonts/fallback && \ cd /tmp/workdir && unzip msft-fonts.zip && cp msft-fonts/* /usr/java/default/jre/lib/fonts/fallback/ && \ - rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip && \ -#RUN \ + rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip + +RUN \ ## clenaup - yum clean all && rm -rf /var/lib/yum/* + echo ">>> CLEANUP <<" && \ + dnf clean all && rm -rf /var/lib/yum/* + +FROM base + +LABEL os="centos 8" \ + container.description="java and ffmpeg" \ + image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ + version="1.0.0" \ + maintainer="devops " \ + imagename="java-ffmpeg" \ + test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ + test.command.verify="11." + +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib -ENV LD_LIBRARY_PATH=/usr/local/lib64 +COPY --from=build /usr/local/ /usr/local/ diff --git a/Dockerfile-source b/Dockerfile-source index 4274bde..5e858ca 100644 --- a/Dockerfile-source +++ b/Dockerfile-source @@ -5,31 +5,29 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM centos:7 AS base +FROM centos:8 AS base -RUN yum -y install libgomp && \ - yum clean all; +RUN dnf -y install libgomp && \ + dnf clean all; FROM base AS build WORKDIR /tmp/workdir -ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig -ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib -ARG PREFIX=/opt/ffmpeg -ARG MAKEFLAGS="-j2" - -ENV FFMPEG_VERSION=4.2.1 \ +ENV FFMPEG_VERSION=4.3.2 \ AOM_VERSION=v1.0.0 \ FDKAAC_VERSION=0.1.5 \ FONTCONFIG_VERSION=2.12.4 \ FREETYPE_VERSION=2.5.5 \ FRIBIDI_VERSION=0.19.7 \ - KVAZAAR_VERSION=1.2.0 \ + KVAZAAR_VERSION=2.0.0 \ LAME_VERSION=3.100 \ LIBASS_VERSION=0.13.7 \ + LIBPTHREAD_STUBS_VERSION=0.4 \ LIBVIDSTAB_VERSION=1.1.0 \ + LIBXCB_VERSION=1.13.1 \ + XCBPROTO_VERSION=1.13 \ OGG_VERSION=1.3.2 \ OPENCOREAMR_VERSION=0.1.5 \ OPUS_VERSION=1.2 \ @@ -40,7 +38,16 @@ ENV FFMPEG_VERSION=4.2.1 \ WEBP_VERSION=1.0.2 \ X264_VERSION=20170226-2245-stable \ X265_VERSION=3.1.1 \ + XAU_VERSION=1.0.9 \ + XORG_MACROS_VERSION=1.19.2 \ + XPROTO_VERSION=7.0.31 \ XVID_VERSION=1.3.4 \ + LIBXML2_VERSION=2.9.10 \ + LIBBLURAY_VERSION=1.1.2 \ + LIBZMQ_VERSION=4.3.2 \ + LIBSRT_VERSION=1.4.1 \ + LIBARIBB24_VERSION=1.0.3 \ + LIBPNG_VERSION=1.6.9 \ SRC=/usr/local ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz" @@ -52,13 +59,24 @@ ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207d ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz" ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz" ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz" +ARG LIBXML2_SHA256SUM="f07dab13bf42d2b8db80620cce7419b3b87827cc937c8bb20fe13b8571ee9501 libxml2-v2.9.10.tar.gz" +ARG LIBBLURAY_SHA256SUM="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42 libbluray-1.1.2.tar.bz2" +ARG LIBZMQ_SHA256SUM="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb v4.3.2.tar.gz" +ARG LIBARIBB24_SHA256SUM="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128 v1.0.3.tar.gz" + +ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib +ARG MAKEFLAGS="-j2" +ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig" +ARG PREFIX=/opt/ffmpeg +ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" RUN buildDeps="autoconf \ automake \ bzip2 \ cmake \ + diffutils \ expat-devel \ gcc \ gcc-c++ \ @@ -68,14 +86,16 @@ RUN buildDeps="autoconf \ make \ nasm \ perl \ + python3 \ openssl-devel \ tar \ yasm \ which \ zlib-devel" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - yum --enablerepo=extras install -y epel-release && \ - yum install -y ${buildDeps} + dnf --enablerepo=extras install -y epel-release && \ + dnf --enablerepo=powertools install -y ${buildDeps} && \ + alternatives --set python /usr/bin/python3 ## opencore-amr https://sourceforge.net/projects/opencore-amr/ RUN \ DIR=/tmp/opencore-amr && \ @@ -190,7 +210,7 @@ RUN \ cd ${DIR} && \ curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --enable-pic --disable-frontend && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ make && \ make install && \ rm -rf ${DIR} @@ -203,7 +223,7 @@ RUN \ echo ${XVID_SHA256SUM} | sha256sum --check && \ tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \ cd xvidcore/build/generic && \ - ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --datadir="${DIR}" --enable-shared --enable-shared && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ make && \ make install && \ rm -rf ${DIR} @@ -247,15 +267,14 @@ RUN \ DIR=/tmp/vid.stab && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz &&\ - echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ + curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \ + echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ make && \ make install && \ rm -rf ${DIR} ## fridibi https://www.fribidi.org/ -# + https://github.com/fribidi/fribidi/issues/8 RUN \ DIR=/tmp/fribidi && \ mkdir -p ${DIR} && \ @@ -263,10 +282,10 @@ RUN \ curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \ echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \ - sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib/' Makefile.am && \ - ./bootstrap --no-config && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ - make -j 1 && \ + sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \ + ./bootstrap --no-config --auto && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make -j1 && \ make install && \ rm -rf ${DIR} ## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ @@ -274,9 +293,9 @@ RUN \ DIR=/tmp/fontconfig && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 &&\ + curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} @@ -285,11 +304,11 @@ RUN \ DIR=/tmp/libass && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz &&\ + curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz && \ echo ${LIBASS_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f ${LIBASS_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} @@ -298,16 +317,16 @@ RUN \ DIR=/tmp/kvazaar && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz &&\ + curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \ tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ ./autogen.sh && \ - ./configure -prefix="${PREFIX}" --disable-static --enable-shared && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ make && \ make install && \ rm -rf ${DIR} RUN \ - DIR=/tmp/aom && \ + DIR=/tmp/aom && \ git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \ cd ${DIR} ; \ rm -rf CMakeCache.txt CMakeFiles ; \ @@ -318,6 +337,154 @@ RUN \ make install ; \ rm -rf ${DIR} +## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ +RUN \ + DIR=/tmp/xorg-macros && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/xproto && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/libXau && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/libpthread-stubs && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/libxcb-proto && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + DIR=/tmp/libxcb && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +## libxml2 - for libbluray +RUN \ + DIR=/tmp/libxml2 && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${LIBXML2_VERSION}/libxml2-v${LIBXML2_VERSION}.tar.gz && \ + echo ${LIBXML2_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f libxml2-v${LIBXML2_VERSION}.tar.gz && \ + ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ + make && \ + make install && \ + rm -rf ${DIR} + +## libbluray - Requires libxml, freetype, and fontconfig +RUN \ + DIR=/tmp/libbluray && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://download.videolan.org/pub/videolan/libbluray/${LIBBLURAY_VERSION}/libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + echo ${LIBBLURAY_SHA256SUM} | sha256sum --check && \ + tar -jx --strip-components=1 -f libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + ./configure --prefix="${PREFIX}" --disable-examples --disable-bdjava-jar --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +## libzmq https://github.com/zeromq/libzmq/ +RUN \ + DIR=/tmp/libzmq && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \ + echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make check && \ + make install && \ + rm -rf ${DIR} + +## libsrt https://github.com/Haivision/srt +RUN \ + DIR=/tmp/srt && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} + +## libpng +RUN \ + DIR=/tmp/png && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + git clone https://git.code.sf.net/p/libpng/code ${DIR} -b v${LIBPNG_VERSION} --depth 1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make check && \ + make install && \ + rm -rf ${DIR} + +## libaribb24 +RUN \ + DIR=/tmp/b24 && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/nkoriyama/aribb24/archive/v${LIBARIBB24_VERSION}.tar.gz && \ + echo ${LIBARIBB24_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBARIBB24_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure CFLAGS="-I${PREFIX}/include -fPIC" --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + ## ffmpeg https://ffmpeg.org/ RUN \ DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \ @@ -338,53 +505,66 @@ RUN \ --enable-libopencore-amrwb \ --enable-gpl \ --enable-libass \ + --enable-fontconfig \ --enable-libfreetype \ --enable-libvidstab \ --enable-libmp3lame \ - --enable-libopenjpeg \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ + --enable-libxcb \ --enable-libx265 \ --enable-libxvid \ --enable-libx264 \ --enable-nonfree \ --enable-openssl \ --enable-libfdk_aac \ - --enable-libkvazaar \ - \ --enable-postproc \ --enable-small \ --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ + --enable-libbluray \ + --enable-libzmq \ --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ + --prefix="${PREFIX}" \ + --enable-libopenjpeg \ + --enable-libkvazaar \ + --enable-libaom \ + --extra-libs=-lpthread \ + --enable-libsrt \ + --enable-libaribb24 \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" && \ make && \ make install && \ + make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ make distclean && \ hash -r && \ cd tools && \ - make qt-faststart && \ - cp qt-faststart ${PREFIX}/bin + make qt-faststart && cp qt-faststart ${PREFIX}/bin/ RUN \ ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ + for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ - LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf + LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf && \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib64/pkgconfig && \ + for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ + sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib64/pkgconfig/"${pc##*/}"; \ + done FROM base MAINTAINER Julien Rottenberg +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib + CMD ["--help"] ENTRYPOINT ["ffmpeg"] -ENV LD_LIBRARY_PATH=/usr/local/lib64 - COPY --from=build /usr/local/ /usr/local/ # Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output \ No newline at end of file +# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output From e6cf3b28bcc9581fc875cab3c3ccab8065c10e60 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:59:16 +1100 Subject: [PATCH 20/36] update url --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b670234..25a73fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -226,7 +226,7 @@ RUN \ ## libmp3lame http://lame.sourceforge.net/ echo ">>> BUILD: libmp3lame <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://sourceforge.mirrorservice.org/l/la/lame/lame/${LAME_MAJORVERSION}/lame-${LAME_VERSION}.tar.gz | \ + curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ make && \ From 1aa440c19c10c8ea40981f4611e65cfc578da1fc Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 00:59:33 +1100 Subject: [PATCH 21/36] enable experimental features --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4cf2aa..0d1a609 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) - name: build and test docker image run: | + export DOCKER_CLI_EXPERIMENTAL=enabled docker build --pull --squash -t $IMAGE:$GIT_BRANCH . source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") From e6a7ccfe3ca7998895307a7556e485e336b88cba Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 20:41:02 +1100 Subject: [PATCH 22/36] update container configure command --- Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 25a73fd..7a5ddcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,10 +25,11 @@ ENV FFMPEG_VERSION="4.3.2" \ LAME_VERSION="3.100" \ LIBASS_VERSION="0.13.7" \ LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ - LIBPTHREAD_STUBS_VERSION=0.4 \ + LIBPTHREAD_STUBS_VERSION="0.4" \ LIBVIDSTAB_VERSION="1.1.0" \ LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ - LIBXCB_VERSION=1.13.1 \ + LIBXCB_VERSION="1.13.1" \ + XCBPROTO_VERSION="1.13" \ OGG_VERSION="1.3.2" \ OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ OPENCOREAMR_VERSION="0.1.5" \ @@ -40,12 +41,12 @@ ENV FFMPEG_VERSION="4.3.2" \ VORBIS_VERSION="1.3.5" \ VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ VPX_VERSION="1.8.0" \ - WEBP_VERSION=1.0.2 \ + WEBP_VERSION="1.0.2" \ X264_VERSION="20170226-2245-stable" \ X265_VERSION="3.1.1" \ - XAU_VERSION=1.0.9 \ - XORG_MACROS_VERSION=1.19.2 \ - XPROTO_VERSION=7.0.31 \ + XAU_VERSION="1.0.9" \ + XORG_MACROS_VERSION="1.19.2" \ + XPROTO_VERSION="7.0.31" \ XVID_VERSION="1.3.5" \ XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ LIBXML2_VERSION="2.9.10" \ @@ -54,8 +55,10 @@ ENV FFMPEG_VERSION="4.3.2" \ LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ LIBZMQ_VERSION="4.3.2" \ LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ + LIBSRT_VERSION="1.4.1" \ LIBARIBB24_VERSION="1.0.3" \ LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ + LIBPNG_VERSION="1.6.9" \ SRC="/usr/local" ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ @@ -490,12 +493,11 @@ RUN \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + ./configure --help && \ ./configure \ --disable-debug \ --disable-doc \ --disable-ffplay \ - --disable-examples \ - --disable-unit-tests \ --enable-shared \ --enable-avresample \ --enable-libopencore-amrnb \ @@ -541,7 +543,7 @@ RUN \ --enable-libaribb24 \ --enable-zlib \ --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ + --extra-ldflags="-L${PREFIX}/lib" && \ echo "#disable all tests">tests/Makefile && \ make && \ make install && \ From c70095be384977daf4b4e0f99b41ee2c922720d2 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 21:26:56 +1100 Subject: [PATCH 23/36] update docker experimental config --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d1a609..38d302f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,11 @@ jobs: source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) - name: build and test docker image run: | + docker version -f '{{.Server.Experimental}}' export DOCKER_CLI_EXPERIMENTAL=enabled + docker version -f '{{.Server.Experimental}}' + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + docker version -f '{{.Server.Experimental}}' docker build --pull --squash -t $IMAGE:$GIT_BRANCH . source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") From a3373e0df3622228804dfe48f93b5fe4d2364472 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 21:28:54 +1100 Subject: [PATCH 24/36] update docker experimental config --- .github/workflows/build.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38d302f..91ddd04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,20 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} steps: + - name: Experimental Status + run: | + docker version -f '{{.Server.Experimental}}' + - name: Docker + run: | + docker version -f '{{.Server.Experimental}}' + export DOCKER_CLI_EXPERIMENTAL=enabled + docker version -f '{{.Server.Experimental}}' + sudo service docker restart + docker version -f '{{.Server.Experimental}}' + sudo rm /etc/docker/daemon.json + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + sudo service docker restart + docker version -f '{{.Server.Experimental}}' - uses: actions/checkout@v2 - name: set envirnment variables id: config @@ -21,11 +35,6 @@ jobs: source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) - name: build and test docker image run: | - docker version -f '{{.Server.Experimental}}' - export DOCKER_CLI_EXPERIMENTAL=enabled - docker version -f '{{.Server.Experimental}}' - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - docker version -f '{{.Server.Experimental}}' docker build --pull --squash -t $IMAGE:$GIT_BRANCH . source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") From 98a44ea25e8f785e3771753197f8387c12bd7759 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 21:29:33 +1100 Subject: [PATCH 25/36] update typo --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91ddd04..325681e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,8 @@ jobs: steps: - name: Experimental Status - run: | - docker version -f '{{.Server.Experimental}}' + run: | + docker version -f '{{.Server.Experimental}}' - name: Docker run: | docker version -f '{{.Server.Experimental}}' From ae578f0fc179889e4083c369388e44ee2c3f1e02 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 21:31:14 +1100 Subject: [PATCH 26/36] update badge [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b5e477..ccae5ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## CentOS 8 with Java 11 and FFMPEG -[![build_status](https://travis-ci.org/aem-design/java-ffmpeg.svg?branch=master)](https://travis-ci.org/aem-design/java-ffmpeg) +[![build](https://github.com/aem-design/docker-java-ffmpeg/actions/workflows/build.yml/badge.svg?branch=jdk11)](https://github.com/aem-design/docker-java-ffmpeg/actions/workflows/build.yml) [![github license](https://img.shields.io/github/license/aem-design/java-ffmpeg)](https://github.com/aem-design/java-ffmpeg) [![github issues](https://img.shields.io/github/issues/aem-design/java-ffmpeg)](https://github.com/aem-design/java-ffmpeg) [![github last commit](https://img.shields.io/github/last-commit/aem-design/java-ffmpeg)](https://github.com/aem-design/java-ffmpeg) From 38c1f73f8500da8f2dd13358be2a092f32af6cad Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 14 Mar 2021 21:58:20 +1100 Subject: [PATCH 27/36] add tests --- .github/workflows/build.yml | 2 +- test/run_tests.sh | 114 ++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 test/run_tests.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 325681e..949c735 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: - name: build and test docker image run: | docker build --pull --squash -t $IMAGE:$GIT_BRANCH . - source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) + docker tag $IMAGE:$GIT_BRANCH $IMAGE:$IMAGE_VERSION (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") docker images - name: login to docker registry diff --git a/test/run_tests.sh b/test/run_tests.sh new file mode 100644 index 0000000..2bb63c1 --- /dev/null +++ b/test/run_tests.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# +# The 'run' performs a simple test that verifies that STI image. +# The main focus is that the image prints out the base-usage properly. +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# +IMAGE_NAME=${1:-aemdesign/oracle-jdk} +FLAG_DEBUG=${2:-true} +IP=$(which ip) +if [[ -z $IP ]]; then + LOCAL_IP="localhost" +else + LOCAL_IP=$($IP route | awk '/default/ { print $3 }') +fi + + + +#debug(message,type[error,info,warning],newlinesiffix) +function debug { + + local DEFAULT_COLOR_WARN="\033[0;31;93m" #light yellow + local DEFAULT_COLOR_ERROR="\033[0;31;91m" #light red + local DEFAULT_COLOR_INFO="\033[0;31;94m" #light blue + local DEFAULT_COLOR_DEFAULT="\033[0;31;92m" #light green + local DEFAULT_COLOR_RESET="\033[0m" #light green + + COLOR_WARN="${COLOR_WARN:-$DEFAULT_COLOR_WARN}" #light yellow + COLOR_ERROR="${COLOR_ERROR:-$DEFAULT_COLOR_ERROR}" #light red + COLOR_INFO="${COLOR_INFO:-$DEFAULT_COLOR_INFO}" #light blue + COLOR_DEFAULT="${COLOR_DEFAULT:-$DEFAULT_COLOR_DEFAULT}" #light green + COLOR_RESET="${COLOR_RESET:-$DEFAULT_COLOR_RESET}" #light green + + LABEL_WARN="${LABEL_WARN:-*WARN*}" + LABEL_ERROR="${LABEL_ERROR:-*ERROR*}" + LABEL_INFO="${LABEL_INFO:-*INFO*}" + LABEL_DEFAULT="${LABEL_DEFAULT:-}" + + + COLOR_START="$COLOR_DEFAULT" + COLOR_END="$COLOR_RESET" + + local TEXT="${1:-}" + local TYPE="${2:-}" + local LABEL_TEXT="" + local TEXT_SUFFUX="" + local NEWLINESUFFUX=$3 + + if [ ! "$NEWLINESUFFUX" == "" ]; then + TEXT_SUFFUX="$NEWLINESUFFUX" + fi + + case $TYPE in + ("error") COLOR_START="$COLOR_ERROR" LABEL_TEXT="$LABEL_ERROR " COLOR_END="$COLOR_END";; + ("info") COLOR_START="$COLOR_INFO" LABEL_TEXT="$LABEL_INFO ";; + ("warn") COLOR_START="$COLOR_WARN" LABEL_TEXT="$LABEL_WARN ";; + esac + + + if [ "$FLAG_DEBUG" == "true" ]; then + + local LABEL="" + if [ "$FLAG_DEBUG_LABEL" == "true" ]; then + LABEL=${LABEL_TEXT:-} + fi + + TEXT="${TEXT//#d:/$COLOR_DEFAULT}" + TEXT="${TEXT//#w:/$COLOR_WARN}" + TEXT="${TEXT//#e:/$COLOR_ERROR}" + TEXT="${TEXT//#i:/$COLOR_INFO}" + TEXT="${TEXT//#r:/$COLOR_INFO}" + + echo -e "$COLOR_START$LABEL$TEXT$TEXT_SUFFUX$COLOR_END" +# printf "$COLOR_START%s%s$COLOR_END$TEXT_SUFFUX" "$LABEL" "$TEXT" + fi +} + + +printTitle() { + echo -n ${1:-Test} +} +printLine() { + echo ${1:-Test} +} +printResult() { + debug "${1:-fail}" "${1:-fail}" +} +printDebug() { + debug "$(printf '*%.0s' {1..100})" "error" + echo ${1:-Test Failed} + echo "${2:-No Output}" + debug "$(printf '*%.0s' {1..100})" "error" +} + +test_docker_run_usage() { + printLine "Testing 'docker run' usage" + CHECK="tini" + + printLine "Starting Container" + + OUTPUT=$(docker run --rm ${IMAGE_NAME} /bin/tini --version) + + if [[ "$OUTPUT" != *"$CHECK"* ]]; then + printResult "error" + printDebug "Image '${IMAGE_NAME}' test FAILED could not find ${CHECK} in output" "${OUTPUT}" + exit 1 + else + printResult "success" + fi +} + + +test_docker_run_usage From 133b6c67463365589d24c3ac550b29949ca984f6 Mon Sep 17 00:00:00 2001 From: wildone Date: Mon, 15 Mar 2021 00:14:03 +1100 Subject: [PATCH 28/36] update scripts [skip ci] --- build.ps1 | 1 + debug.ps1 | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 debug.ps1 diff --git a/build.ps1 b/build.ps1 index bc6d5ab..a91ed89 100644 --- a/build.ps1 +++ b/build.ps1 @@ -19,3 +19,4 @@ printSectionLine "$COMMAND" "warn" Invoke-Expression -Command "$COMMAND" | Tee-Object -Append -FilePath "${LOG_FILE}" + diff --git a/debug.ps1 b/debug.ps1 new file mode 100644 index 0000000..5163961 --- /dev/null +++ b/debug.ps1 @@ -0,0 +1,21 @@ +Param( + [string]$LOG_PATH = "${PWD}\logs", + [string]$LOG_PEFIX = "docker", + [string]$LOG_SUFFIX = ".log", + [string]$TAG = "jdk11", + [string]$FILE = "Dockerfile", + [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", + [string]$COMMAND = "docker build . -f .\${FILE} -t ${TAG}" +) + +$SKIP_CONFIG = $true +$PARENT_PROJECT_PATH = "." + +. ([Scriptblock]::Create((([System.Text.Encoding]::ASCII).getString((Invoke-WebRequest -Uri "${FUNCTIONS_URI}").Content)))) + +printSectionBanner "Loading Debug Image" +printSectionLine "$COMMAND" "warn" + +$IMAGENAME=Select-String -path $FILE '.*imagename="(.*)".*' -AllMatches | Foreach-Object {$_.Matches} | Foreach-Object {$_.Groups[1].Value} + +docker run -it --rm -v ${PWD}:/build/source:rw aemdesign/centos-java-buildpack bash --login From 3acecde2be6380f39955ad12f798c9e3f2610aa8 Mon Sep 17 00:00:00 2001 From: wildone Date: Mon, 15 Mar 2021 00:14:23 +1100 Subject: [PATCH 29/36] update tests --- test/run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index 2bb63c1..405a31d 100644 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -95,11 +95,11 @@ printDebug() { test_docker_run_usage() { printLine "Testing 'docker run' usage" - CHECK="tini" + CHECK="11" printLine "Starting Container" - OUTPUT=$(docker run --rm ${IMAGE_NAME} /bin/tini --version) + OUTPUT=$(docker run --rm ${IMAGE_NAME} java --version) if [[ "$OUTPUT" != *"$CHECK"* ]]; then printResult "error" From 3e45e74cdbc4c7646ebab08b43280f3997a8f12d Mon Sep 17 00:00:00 2001 From: wildone Date: Mon, 15 Mar 2021 00:27:32 +1100 Subject: [PATCH 30/36] update tests --- test/run_tests.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index 405a31d..fec88e6 100644 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -93,8 +93,8 @@ printDebug() { debug "$(printf '*%.0s' {1..100})" "error" } -test_docker_run_usage() { - printLine "Testing 'docker run' usage" +test_usage_java() { + printLine "Testing java" CHECK="11" printLine "Starting Container" @@ -110,5 +110,24 @@ test_docker_run_usage() { fi } +test_usage_ffmpeg() { + printLine "Testing ffmpeg" + CHECK="$(cat ../Dockerfile | grep -m1 FFMPEG_VERSION | sed -e 's/.*FFMPEG_VERSION="\(.*\)"\s.*/\1/g')" + + printLine "Starting Container" + + OUTPUT=$(docker run --rm ${IMAGE_NAME} ffmpeg -version) + + if [[ "$OUTPUT" != *"$CHECK"* ]]; then + printResult "error" + printDebug "Image '${IMAGE_NAME}' test FAILED could not find ${CHECK} in output" "${OUTPUT}" + exit 1 + else + printResult "success" + fi +} + +test_usage_java + +test_usage_ffmpeg -test_docker_run_usage From 82762f14c68106648a90b7796f03a7844f2bc989 Mon Sep 17 00:00:00 2001 From: wildone Date: Mon, 15 Mar 2021 00:53:54 +1100 Subject: [PATCH 31/36] remove not required step --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 949c735..cee6166 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,6 @@ jobs: - name: build and test docker image run: | docker build --pull --squash -t $IMAGE:$GIT_BRANCH . - docker tag $IMAGE:$GIT_BRANCH $IMAGE:$IMAGE_VERSION (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") docker images - name: login to docker registry From fa38322c3cab013c263c9a3aed7671d8aeb235ee Mon Sep 17 00:00:00 2001 From: wildone Date: Mon, 15 Mar 2021 01:05:23 +1100 Subject: [PATCH 32/36] update tests --- test/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index fec88e6..59b9367 100644 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -112,7 +112,7 @@ test_usage_java() { test_usage_ffmpeg() { printLine "Testing ffmpeg" - CHECK="$(cat ../Dockerfile | grep -m1 FFMPEG_VERSION | sed -e 's/.*FFMPEG_VERSION="\(.*\)"\s.*/\1/g')" + CHECK="$(cat ../Dockerfile | grep -m1 FFMPEG_VERSION | sed -e 's/.*FFMPEG_VERSION="\(.*\)".*/\1/g')" printLine "Starting Container" From 2f132ae9bf80bbaf59d49462c7485ccb224e4c23 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 16 May 2021 00:21:33 +1000 Subject: [PATCH 33/36] update gitattibutes [skip ci] --- .gitattributes | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4595cc3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,31 @@ +* text eol=crlf +* text eol=lf + +*.zip filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.tar.gz filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.tiff filter=lfs diff=lfs merge=lfs -text +*.ico filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +original filter=lfs diff=lfs merge=lfs -text +file filter=lfs diff=lfs merge=lfs -text +folderThumbnail filter=lfs diff=lfs merge=lfs -text +*.woff filter=lfs diff=lfs merge=lfs -text +*.woff2 filter=lfs diff=lfs merge=lfs -text +*.eot filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.flv filter=lfs diff=lfs merge=lfs -text +*.m4v filter=lfs diff=lfs merge=lfs -text +*.avi filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.3gp filter=lfs diff=lfs merge=lfs -text +*.ogv filter=lfs diff=lfs merge=lfs -text +*.webm filter=lfs diff=lfs merge=lfs -text +*.wdmg filter=lfs diff=lfs merge=lfs -text +*.svg filter=lfs diff=lfs merge=lfs -text +*.sftmp filter=lfs diff=lfs merge=lfs -text From 7d903e624e329e528c3ffc7f6752f9008fcbeac7 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 6 Feb 2022 02:14:58 +1100 Subject: [PATCH 34/36] move to debian. --- .github/workflows/build.yml | 81 +++-- Dockerfile | 556 ++++++++++++++++++++----------- Dockerfile-debug | 2 +- Dockerfile-serial | 646 ++++++++++++++++++++++++++++++++++++ Dockerfile-source | 170 ++++++---- README.md | 11 +- build-serial.ps1 | 22 ++ build.ps1 | 2 +- test/run_tests.sh | 2 +- 9 files changed, 1187 insertions(+), 305 deletions(-) create mode 100644 Dockerfile-serial create mode 100644 build-serial.ps1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cee6166..ba9c605 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,46 +13,61 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} steps: - - name: Experimental Status - run: | - docker version -f '{{.Server.Experimental}}' - - name: Docker - run: | - docker version -f '{{.Server.Experimental}}' - export DOCKER_CLI_EXPERIMENTAL=enabled - docker version -f '{{.Server.Experimental}}' - sudo service docker restart - docker version -f '{{.Server.Experimental}}' - sudo rm /etc/docker/daemon.json - echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json - sudo service docker restart - docker version -f '{{.Server.Experimental}}' - uses: actions/checkout@v2 - name: set envirnment variables id: config run: | source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_config.sh) source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) - - name: build and test docker image - run: | - docker build --pull --squash -t $IMAGE:$GIT_BRANCH . - (cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH") - docker images - - name: login to docker registry - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${DOCKER_REGISTRY} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - - name: push image version - run: | - docker push $IMAGE:$GIT_BRANCH - - name: push latest image on master - if: github.ref == 'refs/heads/master' - run: | - docker tag $IMAGE:$GIT_BRANCH $IMAGE:latest - docker push $IMAGE:latest - - name: update registry description with readme on master - if: github.ref == 'refs/heads/master' - run: | - docker run --rm -v $(pwd):/data/ aemdesign/dockerhub-description "$DOCKER_USERNAME" "$DOCKER_PASSWORD" "$IMAGE" + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and export to Docker + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/arm64 + load: true + tags: | + ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} + ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.GIT_BRANCH }} + + + # - name: test docker image + # run: | + # cd test && bash ./run_tests.sh "$IMAGE:$GIT_BRANCH" + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/arm64 + push: true + tags: | + ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} + ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.GIT_BRANCH }} + + - name: Update Docker Hub Description + uses: peter-evans/dockerhub-description@v2 + continue-on-error: true + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: peterevans/dockerhub-description - uses: meeDamian/github-release@1.0 if: github.ref == 'refs/heads/master' with: diff --git a/Dockerfile b/Dockerfile index 7a5ddcb..a75ecd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,142 +1,177 @@ -FROM aemdesign/oracle-jdk:jdk11 +FROM aemdesign/oracle-jdk:jdk11 as base + +RUN apt-get update -y && \ + apt-get install libgomp1 libxdmcp6 libexpat-dev -y && \ + apt-get autoclean + +FROM base AS build + +WORKDIR /tmp/workdir + +ARG PREFIX=/opt/ffmpeg +ARG MAKEFLAGS="-j2" +ARG PKG_CONFIG_PATH="${PREFIX}/share/pkgconfig:${PREFIX}/lib:${PREFIX}/lib/pkgconfig:${PREFIX}/lib64/pkgconfig" +ARG LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/lib64" + +ENV FFMPEG_VERSION="5.0" \ + AOM_VERSION="v1.0.0" \ + CHROMAPRINT_VERSION="1.5.0" \ + FDKAAC_VERSION="0.1.5" \ + FONTCONFIG_VERSION="2.12.4" \ + FFMPEG_GPGKEY="D67658D8" \ + FREETYPE_VERSION="2.10.4" \ + FREETYPE_SHA256="5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac" \ + FRIBIDI_VERSION="0.19.7" \ + FRIBIDI_SHA256="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ + KVAZAAR_VERSION="2.0.0" \ + LAME_MAJORVERSION="3.100" \ + LAME_VERSION="3.100" \ + LIBASS_VERSION="0.13.7" \ + LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBPTHREAD_STUBS_VERSION="0.4" \ + LIBVIDSTAB_VERSION="1.1.0" \ + LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBXCB_VERSION="1.14" \ + XCBPROTO_VERSION="1.14.1" \ + OGG_VERSION="1.3.2" \ + OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ + OPENCOREAMR_VERSION="0.1.5" \ + OPUS_VERSION="1.2" \ + OPUS_SHA256="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9" \ + OPENJPEG_VERSION="2.1.2" \ + THEORA_VERSION="1.1.1" \ + THEORA_SHA256="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b" \ + VORBIS_VERSION="1.3.5" \ + VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ + VPX_VERSION="1.8.0" \ + WEBP_VERSION="1.0.2" \ + X264_VERSION="20191217-2245-stable" \ + X265_VERSION="3.4" \ + XAU_VERSION="1.0.9" \ + XORG_MACROS_VERSION="1.19.2" \ + XPROTO_VERSION="7.0.31" \ + XVID_VERSION="1.3.5" \ + XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ + LIBXML2_VERSION="2.9.12" \ + LIBBLURAY_VERSION="1.1.2" \ + LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ + LIBZMQ_VERSION="4.3.2" \ + LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ + LIBSRT_VERSION="1.4.1" \ + LIBARIBB24_VERSION="1.0.3" \ + LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ + LIBPNG_VERSION="1.6.9" \ + LIBVMAF_VERSION="2.3.0" \ + PYTHON_VERSION="3.10.2" \ + PYTHON_VERSION_ALT="3.10" \ + SRC="/usr/local" + + +ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256} ${FRIBIDI_VERSION}.tar.gz" \ + LIBASS_SHA256SUM="${LIBASS_SHA256} ${LIBASS_VERSION}.tar.gz" \ + LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256} v${LIBVIDSTAB_VERSION}.tar.gz" \ + OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ + OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ + THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ + VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ + XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ + LIBBLURAY_SHA256SUM="${LIBBLURAY_SHA256} libbluray-${LIBBLURAY_VERSION}.tar.bz2" \ + LIBZMQ_SHA256SUM="${LIBZMQ_SHA256} v${LIBZMQ_VERSION}.tar.gz" \ + LIBARIBB24_SHA256SUM="${LIBARIBB24_SHA256} v${LIBARIBB24_VERSION}.tar.gz" \ + PATH="$PATH:${PREFIX}/bin" + -LABEL os="centos 8" \ - container.description="java and ffmpeg" \ - image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ - version="1.0.0" \ - maintainer="devops " \ - imagename="java-ffmpeg" \ - test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ - test.command.verify="11." - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION="4.3.2" \ - AOM_VERSION="v1.0.0" \ - FDKAAC_VERSION="0.1.5" \ - FONTCONFIG_VERSION="2.12.4" \ - FFMPEG_GPGKEY="D67658D8" \ - FREETYPE_VERSION="2.9.1" \ - FREETYPE_SHA256="ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce" \ - FRIBIDI_VERSION="0.19.7" \ - FRIBIDI_SHA256="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ - KVAZAAR_VERSION="2.0.0" \ - LAME_MAJORVERSION="3.100" \ - LAME_VERSION="3.100" \ - LIBASS_VERSION="0.13.7" \ - LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ - LIBPTHREAD_STUBS_VERSION="0.4" \ - LIBVIDSTAB_VERSION="1.1.0" \ - LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ - LIBXCB_VERSION="1.13.1" \ - XCBPROTO_VERSION="1.13" \ - OGG_VERSION="1.3.2" \ - OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ - OPENCOREAMR_VERSION="0.1.5" \ - OPUS_VERSION="1.2" \ - OPUS_SHA256="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9" \ - OPENJPEG_VERSION="2.1.2" \ - THEORA_VERSION="1.1.1" \ - THEORA_SHA256="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b" \ - VORBIS_VERSION="1.3.5" \ - VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ - VPX_VERSION="1.8.0" \ - WEBP_VERSION="1.0.2" \ - X264_VERSION="20170226-2245-stable" \ - X265_VERSION="3.1.1" \ - XAU_VERSION="1.0.9" \ - XORG_MACROS_VERSION="1.19.2" \ - XPROTO_VERSION="7.0.31" \ - XVID_VERSION="1.3.5" \ - XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ - LIBXML2_VERSION="2.9.10" \ - LIBXML2_SHA256="f07dab13bf42d2b8db80620cce7419b3b87827cc937c8bb20fe13b8571ee9501" \ - LIBBLURAY_VERSION="1.1.2" \ - LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ - LIBZMQ_VERSION="4.3.2" \ - LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ - LIBSRT_VERSION="1.4.1" \ - LIBARIBB24_VERSION="1.0.3" \ - LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ - LIBPNG_VERSION="1.6.9" \ - SRC="/usr/local" - -ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ - FRIBIDI_SHA256SUM="${FRIBIDI_SHA256} ${FRIBIDI_VERSION}.tar.gz" \ - LIBASS_SHA256SUM="${LIBASS_SHA256} ${LIBASS_VERSION}.tar.gz" \ - LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256} v${LIBVIDSTAB_VERSION}.tar.gz" \ - OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ - OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ - THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ - VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ - XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ - LIBXML2_SHA256SUM="${LIBXML2_SHA256} libxml2-v${LIBXML2_VERSION}.tar.gz" \ - LIBBLURAY_SHA256SUM="${LIBBLURAY_SHA256} libbluray-${LIBBLURAY_VERSION}.tar.bz2" \ - LIBZMQ_SHA256SUM="${LIBZMQ_SHA256} v${LIBZMQ_VERSION}.tar.gz" \ - LIBARIBB24_SHA256SUM="${LIBARIBB24_SHA256} v${LIBARIBB24_VERSION}.tar.gz" \ - PATH="$PATH:${PREFIX}/bin" - -ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig" -ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib -ARG PREFIX=/opt/ffmpeg -ARG MAKEFLAGS="-j2" -ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" #https://docs.google.com/uc?id=0B3Uxax626E5DOVdJNjc0TW9Mbmc&export=download -COPY msft-fonts.zip ./ +COPY msft-fonts.zip ./ -RUN buildDeps="autoconf \ +RUN echo ">>> INSTALL: os packages <<" && \ + buildDeps="autoconf \ automake \ bzip2 \ cmake \ diffutils \ - expat-devel \ + libexpat1-dev \ + build-essential \ gcc \ - gcc-c++ \ git \ gperf \ libtool \ make \ nasm \ perl \ - python3 \ - openssl-devel \ + libssl-dev \ + xutils-dev \ tar \ diffutils \ - which \ - zlib-devel \ - freetype-devel \ - cmake3 \ - pkgconfig \ - expat-devel \ - libgomp \ - libXext-devel \ - libXfixes-devel \ + zlib1g-dev \ + libfreetype-dev \ + libunistring-dev \ + pkg-config \ + libxext-dev \ + libxfixes-dev \ unzip \ yasm \ - which \ - wget \ - libgomp" && \ + tzdata \ + wget" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - dnf update -y && \ - dnf repolist && \ - dnf --enablerepo=extras install -y epel-release dnf-plugins-core && \ - dnf config-manager --set-enabled powertools && \ - dnf --enablerepo=powertools install -y ${buildDeps} && \ - dnf repolist && \ - alternatives --set python /usr/bin/python3 - -# SETUP FFMPEG LIBRARIES AND FFMPEG + apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y ${buildDeps} + +RUN \ + echo ">>> INSTALL: latest python <<" && \ + apt install software-properties-common -y && \ + add-apt-repository ppa:deadsnakes/ppa -y && \ + apt install python3.9 python3-pip -y && \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 && \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \ + echo ">>> INSTALL: python libraries <<" && \ + pip3 install --upgrade pip && \ + pip3 install scikit-build meson ninja + +FROM build as build-libogg +RUN \ +## libogg https://www.xiph.org/ogg/ + echo ">>> BUILD: ogg <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ + echo ${OGG_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +FROM build as build-vmaf +RUN \ +## libvmaf https://github.com/Netflix/vmaf + echo ">>> BUILD: vmaf <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/Netflix/vmaf/archive/v${LIBVMAF_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBVMAF_VERSION}.tar.gz && \ + cd libvmaf && \ + meson build --default-library=both --buildtype=release -Denable_tests=false -Denable_docs=false -Dbuilt_in_models=true --prefix=${PREFIX} --libdir=lib && \ + ninja -vC build && \ + ninja -vC build install && \ + mkdir -p ${PREFIX}/share/model/ && \ + cp -r ${DIR}/model/* ${PREFIX}/share/model/ && \ + rm -rf ${DIR} + +FROM build as build-amr RUN \ ## opencore-amr https://sourceforge.net/projects/opencore-amr/ echo ">>> BUILD: opencore-amr <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ + curl -sL https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz/download | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-x264 RUN \ ## x264 http://www.videolan.org/developers/x264.html echo ">>> BUILD: x264 <<" && \ @@ -147,29 +182,32 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-x265 RUN \ ## x265 http://x265.org/ echo ">>> BUILD: x265 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \ + curl -sL https://github.com/videolan/x265/archive/refs/tags/${X265_VERSION}.tar.gz | \ tar -zx && \ - cd x265_${X265_VERSION}/build/linux && \ + cd x265-${X265_VERSION}/build/linux && \ sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \ + sed -i "/-DEXTRA_LIB/ s/$/ -DENABLE_SHARED:bool=off/" multilib.sh && \ sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCMAKE_CXX_FLAGS=\"-fPIC\"/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCROSS_COMPILE_ARM=ON/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DENABLE_ASSEMBLY=OFF/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCMAKE_SYSTEM_PROCESSOR=aarch64/' multilib.sh && \ + sed -i '/^cd 12bit/ s/$/ \&\& echo MAKE 12bit/' multilib.sh && \ + sed -i '/^cd 10bit/ s/$/ \&\& echo MAKE 10bit/' multilib.sh && \ + sed -i '/^cd 8bit/ s/$/ \&\& echo MAKE 8bit/' multilib.sh && \ + cat multilib.sh && \ + echo `uname` && \ ./multilib.sh && \ make -C 8bit install && \ rm -rf ${DIR} -RUN \ -## libogg https://www.xiph.org/ogg/ - echo ">>> BUILD: ogg <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ - echo ${OGG_SHA256SUM} | sha256sum --check && \ - tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \ - ./configure --prefix="${PREFIX}" --enable-shared && \ - make && \ - make install && \ - rm -rf ${DIR} + +FROM build as build-opus RUN \ ## libopus https://www.opus-codec.org/ echo ">>> BUILD: opus <<" && \ @@ -182,9 +220,18 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-vorbis +COPY --from=build-libogg ${PREFIX}/ ${PREFIX}/ RUN \ ## libvorbis https://xiph.org/vorbis/ echo ">>> BUILD: vorbis <<" && \ + find / -name ogg.pc && \ + echo "^^12" && \ + ls -l ${PREFIX}/ && \ + echo "^^13" && \ + pkg-config --libs "ogg >= 1.3.2" && \ + echo "^^14" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ echo ${VORBIS_SHA256SUM} | sha256sum --check && \ @@ -193,17 +240,8 @@ RUN \ make && \ make install && \ rm -rf ${DIR} -RUN \ -## libtheora http://www.theora.org/ - echo ">>> BUILD: theora <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ - echo ${THEORA_SHA256SUM} | sha256sum --check && \ - tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ - ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples && \ - make && \ - make install && \ - rm -rf ${DIR} + +FROM build as build-libvpx RUN \ ## libvpx https://www.webmproject.org/code/ echo ">>> BUILD: libvpx <<" && \ @@ -215,6 +253,8 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-libwebp RUN \ ### libwebp https://developers.google.com/speed/webp/ echo ">>> BUILD: libwebp <<" && \ @@ -225,16 +265,20 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-libmp3lame RUN \ ## libmp3lame http://lame.sourceforge.net/ echo ">>> BUILD: libmp3lame <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz | \ + curl -sL https://sourceforge.net/projects/lame/files/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz/download | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-xvid RUN \ ## xvid https://www.xvid.com/ echo ">>> BUILD: xvid <<" && \ @@ -247,6 +291,8 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-fdk-aac RUN \ ## fdk-aac https://github.com/mstorsjo/fdk-aac echo ">>> BUILD: fdk-aac <<" && \ @@ -258,16 +304,20 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-openjpeg RUN \ ## openjpeg https://github.com/uclouvain/openjpeg echo ">>> BUILD: openjpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ tar -zx --strip-components=1 && \ - cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_C_FLAGS="-DPNG_ARM_NEON_OPT=0" . && \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-freetype RUN \ ## freetype https://www.freetype.org/ echo ">>> BUILD: freetype <<" && \ @@ -279,6 +329,8 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-libvstab RUN \ ## libvstab https://github.com/georgmartius/vid.stab echo ">>> BUILD: libvstab <<" && \ @@ -286,10 +338,13 @@ RUN \ curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \ echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ - cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DSSE2_FOUND=False . && \ + ls -l && \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-fribidi RUN \ ## fridibi https://www.fribidi.org/ echo ">>> BUILD: fribidi <<" && \ @@ -303,6 +358,8 @@ RUN \ make -j1 && \ make install && \ rm -rf ${DIR} + +FROM build as build-fontconfig RUN \ ## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ echo ">>> BUILD: fontconfig <<" && \ @@ -313,6 +370,10 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-libass +COPY --from=build-fribidi ${PREFIX}/ ${PREFIX}/ +COPY --from=build-fontconfig ${PREFIX}/ ${PREFIX}/ RUN \ ## libass https://github.com/libass/libass echo ">>> BUILD: libass <<" && \ @@ -325,6 +386,8 @@ RUN \ make && \ make install && \ rm -rf ${DIR} + +FROM build as build-kvazaar RUN \ ## kvazaar https://github.com/ultravideo/kvazaar echo ">>> BUILD: kvazaar <<" && \ @@ -337,41 +400,87 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-aom RUN \ ## aomedia https://aomedia.googlesource.com/aom/ echo ">>> BUILD: aomedia <<" && \ DIR=$(mktemp -d) && \ - git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} && \ + git clone --branch "v3.2.0" --depth 1 https://aomedia.googlesource.com/aom ${DIR} && \ cd ${DIR} && \ rm -rf CMakeCache.txt CMakeFiles && \ mkdir -p ./aom_build && \ cd ./aom_build && \ - cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 .. && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DAOM_EXTRA_C_FLAGS="-fPIC" -DENABLE_DOCS=0 -DENABLE_TESTS=0 .. && \ make && \ make install && \ rm -rf ${DIR} +FROM build as build-xcb-proto +RUN \ + echo ">>> BUILD: xcb-proto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +FROM build as build-libxcb +COPY --from=build-xcb-proto ${PREFIX}/ ${PREFIX}/ RUN \ -## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ echo ">>> BUILD: libxcb <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +FROM build as build-xorg-macro +COPY --from=build-libxcb ${PREFIX}/ ${PREFIX}/ +# RUN \ +# echo ">>> BUILD: xorg-macro <<" && \ +# ls -l ${PREFIX}/ && \ +# exit 1 +COPY --from=build-xcb-proto ${PREFIX}/ ${PREFIX}/ +# RUN \ +# echo ">>> BUILD: xorg-macro <<" && \ +# ls -l ${PREFIX}/ && \ +# exit 1 +RUN \ +## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ + echo ">>> BUILD: xorg-macro <<" && \ + # ls -l ${PREFIX}/ && \ + # echo "^^11" && \ + # find / -name xcb && \ + # echo "^^12" && \ + # pkg-config --libs "xcb-proto >= 1.14.1" && \ + # echo "^^13" && \ + # exit 1 && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \ ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ make && \ make install && \ rm -rf ${DIR} +FROM build as build-xproto RUN \ echo ">>> BUILD: xproto <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \ tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \ - ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" --build=aarch64-unknown-linux-gnu && \ make && \ make install && \ rm -rf ${DIR} +FROM build as build-libXau RUN \ echo ">>> BUILD: libXau <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -382,6 +491,7 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-libpthread RUN \ echo ">>> BUILD: libpthread <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ @@ -392,40 +502,22 @@ RUN \ make install && \ rm -rf ${DIR} -RUN \ - echo ">>> BUILD: xcb-proto <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ - tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ - ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ - ./configure --prefix="${PREFIX}" && \ - make && \ - make install && \ - rm -rf ${DIR} - -RUN \ - echo ">>> BUILD: libxcb <<" && \ - DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ - tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ - ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ - ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ - make && \ - make install && \ - rm -rf ${DIR} - +FROM build as build-libxml2 RUN \ ## libxml2 - for libbluray echo ">>> BUILD: libxml2 <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ - curl -sLO https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${LIBXML2_VERSION}/libxml2-v${LIBXML2_VERSION}.tar.gz && \ - echo ${LIBXML2_SHA256SUM} | sha256sum --check && \ - tar -xz --strip-components=1 -f libxml2-v${LIBXML2_VERSION}.tar.gz && \ + curl -sL https://github.com/GNOME/libxml2/archive/refs/tags/v${LIBXML2_VERSION}.tar.gz | \ + tar -xz --strip-components=1 && \ ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ make && \ make install && \ rm -rf ${DIR} +FROM build as build-libbluray +COPY --from=build-libxml2 ${PREFIX}/ ${PREFIX}/ +COPY --from=build-freetype ${PREFIX}/ ${PREFIX}/ +COPY --from=build-fontconfig ${PREFIX}/ ${PREFIX}/ RUN \ ## libbluray - Requires libxml, freetype, and fontconfig echo ">>> BUILD: libbluray <<" && \ @@ -438,6 +530,7 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-libzmq RUN \ ## libzmq https://github.com/zeromq/libzmq/ echo ">>> BUILD: libzmq <<" && \ @@ -452,6 +545,7 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-libsrt RUN \ ## libsrt https://github.com/Haivision/srt echo ">>> BUILD: libsrt <<" && \ @@ -463,6 +557,7 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-libpng RUN \ ## libpng echo ">>> BUILD: libpng <<" && \ @@ -474,6 +569,7 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-libaribb24 RUN \ ## libaribb24 echo ">>> BUILD: libaribb24 <<" && \ @@ -487,64 +583,111 @@ RUN \ make install && \ rm -rf ${DIR} +FROM build as build-theora +COPY --from=build-libogg ${PREFIX}/ ${PREFIX}/ +RUN \ +## libtheora http://www.theora.org/ + echo ">>> BUILD: theora <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ + echo ${THEORA_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples --build=aarch64-unknown-linux-gnu && \ + make && \ + make install && \ + rm -rf ${DIR} + +FROM build as build-ffmpeg +# copy all plugins from build images +COPY --from=build-vmaf ${PREFIX}/ ${PREFIX}/ +COPY --from=build-amr ${PREFIX}/ ${PREFIX}/ +COPY --from=build-x264 ${PREFIX}/ ${PREFIX}/ +COPY --from=build-x265 ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libogg ${PREFIX}/ ${PREFIX}/ +COPY --from=build-opus ${PREFIX}/ ${PREFIX}/ +COPY --from=build-vorbis ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libvpx ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libwebp ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libmp3lame ${PREFIX}/ ${PREFIX}/ +COPY --from=build-xvid ${PREFIX}/ ${PREFIX}/ +COPY --from=build-fdk-aac ${PREFIX}/ ${PREFIX}/ +COPY --from=build-openjpeg ${PREFIX}/ ${PREFIX}/ +COPY --from=build-freetype ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libvstab ${PREFIX}/ ${PREFIX}/ +COPY --from=build-fribidi ${PREFIX}/ ${PREFIX}/ +COPY --from=build-fontconfig ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libass ${PREFIX}/ ${PREFIX}/ +COPY --from=build-kvazaar ${PREFIX}/ ${PREFIX}/ +COPY --from=build-aom ${PREFIX}/ ${PREFIX}/ +COPY --from=build-xorg-macro ${PREFIX}/ ${PREFIX}/ +COPY --from=build-xproto ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libXau ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libpthread ${PREFIX}/ ${PREFIX}/ +COPY --from=build-xcb-proto ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libxcb ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libxml2 ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libbluray ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libzmq ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libsrt ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libpng ${PREFIX}/ ${PREFIX}/ +COPY --from=build-libaribb24 ${PREFIX}/ ${PREFIX}/ +COPY --from=build-theora ${PREFIX}/ ${PREFIX}/ RUN \ ## ffmpeg https://ffmpeg.org/ echo ">>> BUILD: ffmpeg <<" && \ DIR=$(mktemp -d) && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ - ./configure --help && \ + export PKG_CONFIG_PATH="${PREFIX}/lib:${PREFIX}/lib/pkgconfig" && \ ./configure \ + --arch=aarch64 \ + --enable-cross-compile \ --disable-debug \ --disable-doc \ --disable-ffplay \ - --enable-shared \ - --enable-avresample \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ + --disable-shared \ + --enable-fontconfig \ --enable-gpl \ + --enable-libaom \ + --enable-libaribb24 \ --enable-libass \ - --enable-fontconfig \ - --enable-libfreetype \ - --enable-libvidstab \ + --enable-libbluray \ --enable-libfdk_aac \ + --enable-libfreetype \ + --enable-libkvazaar \ --enable-libmp3lame \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ --enable-libopenjpeg \ --enable-libopus \ + --enable-libsrt \ --enable-libtheora \ + --enable-libvidstab \ --enable-libvorbis \ --enable-libvpx \ + --enable-libvmaf \ --enable-libwebp \ - --enable-libxcb \ --enable-libx264 \ --enable-libx265 \ + --enable-libxcb \ --enable-libxvid \ - --enable-x86asm \ - --enable-gpl \ - --enable-libx264 \ + --enable-libzmq \ --enable-nonfree \ --enable-openssl \ - --enable-libfdk_aac \ - --enable-libfdk-aac \ - --enable-libkvazaar \ - --enable-libaom --extra-libs=-lpthread \ --enable-postproc \ + --enable-shared \ --enable-small \ --enable-version3 \ - --enable-libbluray \ - --enable-libzmq \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" \ - --enable-libopenjpeg \ - --enable-libkvazaar \ - --enable-libaom \ - --extra-libs=-lpthread \ - --enable-libsrt \ - --enable-libaribb24 \ --enable-zlib \ --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" && \ - echo "#disable all tests">tests/Makefile && \ + --extra-cxxflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ + --extra-libs="-lm -lpthread" \ + --ld="g++" \ + --pkg-config-flags="--static" \ + --prefix="${PREFIX}" && \ + echo "#disable all tests">./tests/Makefile && \ + make clean && \ make && \ make install && \ make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ @@ -558,11 +701,12 @@ RUN \ RUN \ ## setup ffmpeg lib64 libs echo ">>> SETUP: ffmpeg lib64 libs <<" && \ + mkdir -p /usr/local/lib64/ && \ ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ - LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf && \ + LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib ffmpeg -buildconf && \ cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ mkdir -p /usr/local/lib64/pkgconfig && \ for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ @@ -582,6 +726,22 @@ RUN \ RUN \ ## clenaup echo ">>> CLEANUP <<" && \ - dnf clean all && rm -rf /var/lib/yum/* + apt-get autoclean && apt-get autoremove + +# make a clean image +FROM base + +LABEL os="debian 8" \ + java="1.8" \ + container.description="java and ffmpeg" \ + image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ + version="1.0.0" \ + maintainer="devops " \ + imagename="java-ffmpeg" \ + test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ + test.command.verify="1.8" + +ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib -ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib +# copy all content from build-ffmpeg +COPY --from=build-ffmpeg /usr/local/ /usr/local/ diff --git a/Dockerfile-debug b/Dockerfile-debug index 5acde23..7960ffe 100644 --- a/Dockerfile-debug +++ b/Dockerfile-debug @@ -579,7 +579,7 @@ RUN \ FROM base -LABEL os="centos 8" \ +LABEL os="debain 8" \ container.description="java and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ version="1.0.0" \ diff --git a/Dockerfile-serial b/Dockerfile-serial new file mode 100644 index 0000000..cd8a566 --- /dev/null +++ b/Dockerfile-serial @@ -0,0 +1,646 @@ +FROM aemdesign/oracle-jdk:jdk11 as base + +RUN apt-get update -y && \ + apt-get install libgomp1 -y && \ + apt-get autoclean + +FROM base AS build + +WORKDIR /tmp/workdir + +ARG PREFIX=/opt/ffmpeg +ARG MAKEFLAGS="-j2" +ARG PKG_CONFIG_PATH="${PREFIX}/share/pkgconfig:${PREFIX}/lib:${PREFIX}/lib/pkgconfig:${PREFIX}/lib64/pkgconfig" +ARG LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/lib64" + +ENV FFMPEG_VERSION="5.0" \ + AOM_VERSION="v1.0.0" \ + CHROMAPRINT_VERSION="1.5.0" \ + FDKAAC_VERSION="0.1.5" \ + FONTCONFIG_VERSION="2.12.4" \ + FFMPEG_GPGKEY="D67658D8" \ + FREETYPE_VERSION="2.10.4" \ + FREETYPE_SHA256="5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac" \ + FRIBIDI_VERSION="0.19.7" \ + FRIBIDI_SHA256="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8" \ + KVAZAAR_VERSION="2.0.0" \ + LAME_MAJORVERSION="3.100" \ + LAME_VERSION="3.100" \ + LIBASS_VERSION="0.13.7" \ + LIBASS_SHA256="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7" \ + LIBPTHREAD_STUBS_VERSION="0.4" \ + LIBVIDSTAB_VERSION="1.1.0" \ + LIBVIDSTAB_SHA256="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb" \ + LIBXCB_VERSION="1.14" \ + XCBPROTO_VERSION="1.14.1" \ + OGG_VERSION="1.3.2" \ + OGG_SHA256="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692" \ + OPENCOREAMR_VERSION="0.1.5" \ + OPUS_VERSION="1.2" \ + OPUS_SHA256="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9" \ + OPENJPEG_VERSION="2.1.2" \ + THEORA_VERSION="1.1.1" \ + THEORA_SHA256="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b" \ + VORBIS_VERSION="1.3.5" \ + VORBIS_SHA256="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce" \ + VPX_VERSION="1.8.0" \ + WEBP_VERSION="1.0.2" \ + X264_VERSION="20191217-2245-stable" \ + X265_VERSION="3.4" \ + XAU_VERSION="1.0.9" \ + XORG_MACROS_VERSION="1.19.2" \ + XPROTO_VERSION="7.0.31" \ + XVID_VERSION="1.3.5" \ + XVID_SHA256="165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0" \ + LIBXML2_VERSION="2.9.12" \ + LIBBLURAY_VERSION="1.1.2" \ + LIBBLURAY_SHA256="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42" \ + LIBZMQ_VERSION="4.3.2" \ + LIBZMQ_SHA256="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb" \ + LIBSRT_VERSION="1.4.1" \ + LIBARIBB24_VERSION="1.0.3" \ + LIBARIBB24_SHA256="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128" \ + LIBPNG_VERSION="1.6.9" \ + LIBVMAF_VERSION="2.3.0" \ + PYTHON_VERSION="3.10.2" \ + PYTHON_VERSION_ALT="3.10" \ + SRC="/usr/local" + + +ENV FREETYPE_SHA256SUM="${FREETYPE_SHA256} freetype-${FREETYPE_VERSION}.tar.gz" \ + FRIBIDI_SHA256SUM="${FRIBIDI_SHA256} ${FRIBIDI_VERSION}.tar.gz" \ + LIBASS_SHA256SUM="${LIBASS_SHA256} ${LIBASS_VERSION}.tar.gz" \ + LIBVIDSTAB_SHA256SUM="${LIBVIDSTAB_SHA256} v${LIBVIDSTAB_VERSION}.tar.gz" \ + OGG_SHA256SUM="${OGG_SHA256} libogg-${OGG_VERSION}.tar.gz" \ + OPUS_SHA256SUM="${OPUS_SHA256} opus-${OPUS_VERSION}.tar.gz" \ + THEORA_SHA256SUM="${THEORA_SHA256} libtheora-${THEORA_VERSION}.tar.gz" \ + VORBIS_SHA256SUM="${VORBIS_SHA256} libvorbis-${VORBIS_VERSION}.tar.gz" \ + XVID_SHA256SUM="${XVID_SHA256} xvidcore-${XVID_VERSION}.tar.gz" \ + LIBBLURAY_SHA256SUM="${LIBBLURAY_SHA256} libbluray-${LIBBLURAY_VERSION}.tar.bz2" \ + LIBZMQ_SHA256SUM="${LIBZMQ_SHA256} v${LIBZMQ_VERSION}.tar.gz" \ + LIBARIBB24_SHA256SUM="${LIBARIBB24_SHA256} v${LIBARIBB24_VERSION}.tar.gz" \ + PATH="$PATH:${PREFIX}/bin" + + + +#https://docs.google.com/uc?id=0B3Uxax626E5DOVdJNjc0TW9Mbmc&export=download +COPY msft-fonts.zip ./ + +RUN echo ">>> INSTALL: os packages <<" && \ + buildDeps="autoconf \ + automake \ + bzip2 \ + cmake \ + diffutils \ + libexpat1-dev \ + build-essential \ + gcc \ + git \ + gperf \ + libtool \ + make \ + nasm \ + perl \ + libssl-dev \ + tar \ + diffutils \ + zlib1g-dev \ + libfreetype-dev \ + libunistring-dev \ + pkg-config \ + libxext-dev \ + libxfixes-dev \ + unzip \ + yasm \ + tzdata \ + wget" && \ + echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ + apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y ${buildDeps} + +RUN \ + echo ">>> INSTALL: latest python <<" && \ + apt install software-properties-common -y && \ + add-apt-repository ppa:deadsnakes/ppa -y && \ + apt install python3.9 python3-pip -y && \ + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 && \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \ + echo ">>> INSTALL: python libraries <<" && \ + pip3 install --upgrade pip && \ + pip3 install scikit-build meson ninja + +RUN \ +## libvmaf https://github.com/Netflix/vmaf + echo ">>> BUILD: vmaf <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/Netflix/vmaf/archive/v${LIBVMAF_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBVMAF_VERSION}.tar.gz && \ + cd libvmaf && \ + meson build --default-library=both --buildtype=release -Denable_tests=false -Denable_docs=false -Dbuilt_in_models=true --prefix=${PREFIX} --libdir=lib && \ + ninja -vC build && \ + ninja -vC build install && \ + mkdir -p ${PREFIX}/share/model/ && \ + cp -r ${DIR}/model/* ${PREFIX}/share/model/ && \ + rm -rf ${DIR} + +RUN \ +## opencore-amr https://sourceforge.net/projects/opencore-amr/ + echo ">>> BUILD: opencore-amr <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz/download | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## x264 http://www.videolan.org/developers/x264.html + echo ">>> BUILD: x264 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \ + tar -jx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## x265 http://x265.org/ + echo ">>> BUILD: x265 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://github.com/videolan/x265/archive/refs/tags/${X265_VERSION}.tar.gz | \ + tar -zx && \ + cd x265-${X265_VERSION}/build/linux && \ + sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \ + sed -i "/-DEXTRA_LIB/ s/$/ -DENABLE_SHARED:bool=off/" multilib.sh && \ + sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCMAKE_CXX_FLAGS=\"-fPIC\"/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCROSS_COMPILE_ARM=ON/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DENABLE_ASSEMBLY=OFF/' multilib.sh && \ + sed -i '/^cmake/ s/$/ -DCMAKE_SYSTEM_PROCESSOR=aarch64/' multilib.sh && \ + sed -i '/^cd 12bit/ s/$/ \&\& echo MAKE 12bit/' multilib.sh && \ + sed -i '/^cd 10bit/ s/$/ \&\& echo MAKE 10bit/' multilib.sh && \ + sed -i '/^cd 8bit/ s/$/ \&\& echo MAKE 8bit/' multilib.sh && \ + cat multilib.sh && \ + echo `uname` && \ + ./multilib.sh && \ + make -C 8bit install && \ + rm -rf ${DIR} + +RUN \ +## libogg https://www.xiph.org/ogg/ + echo ">>> BUILD: ogg <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ + echo ${OGG_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libopus https://www.opus-codec.org/ + echo ">>> BUILD: opus <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \ + echo ${OPUS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libvorbis https://xiph.org/vorbis/ + echo ">>> BUILD: vorbis <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ + echo ${VORBIS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libvpx https://www.webmproject.org/code/ + echo ">>> BUILD: libvpx <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \ + --disable-debug --disable-examples --disable-docs --disable-install-bins && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +### libwebp https://developers.google.com/speed/webp/ + echo ">>> BUILD: libwebp <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libmp3lame http://lame.sourceforge.net/ + echo ">>> BUILD: libmp3lame <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://sourceforge.net/projects/lame/files/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz/download | \ + tar -zx --strip-components=1 && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## xvid https://www.xvid.com/ + echo ">>> BUILD: xvid <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ + echo ${XVID_SHA256SUM} | sha256sum --check && \ + tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \ + cd xvidcore/build/generic && \ + ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## fdk-aac https://github.com/mstorsjo/fdk-aac + echo ">>> BUILD: fdk-aac <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + autoreconf -fiv && \ + ./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## openjpeg https://github.com/uclouvain/openjpeg + echo ">>> BUILD: openjpeg <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \ + tar -zx --strip-components=1 && \ + cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_C_FLAGS="-DPNG_ARM_NEON_OPT=0" . && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## freetype https://www.freetype.org/ + echo ">>> BUILD: freetype <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + echo ${FREETYPE_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libvstab https://github.com/georgmartius/vid.stab + echo ">>> BUILD: libvstab <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \ + echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DSSE2_FOUND=False . && \ + ls -l && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## fridibi https://www.fribidi.org/ + echo ">>> BUILD: fribidi <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \ + echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \ + sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \ + ./bootstrap --no-config --auto && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make -j1 && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/ + echo ">>> BUILD: fontconfig <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ + tar -jx --strip-components=1 -f fontconfig-${FONTCONFIG_VERSION}.tar.bz2 && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libass https://github.com/libass/libass + echo ">>> BUILD: libass <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/libass/libass/archive/${LIBASS_VERSION}.tar.gz && \ + echo ${LIBASS_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f ${LIBASS_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## kvazaar https://github.com/ultravideo/kvazaar + echo ">>> BUILD: kvazaar <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## aomedia https://aomedia.googlesource.com/aom/ + echo ">>> BUILD: aomedia <<" && \ + DIR=$(mktemp -d) && \ + git clone --branch "v3.2.0" --depth 1 https://aomedia.googlesource.com/aom ${DIR} && \ + cd ${DIR} && \ + rm -rf CMakeCache.txt CMakeFiles && \ + mkdir -p ./aom_build && \ + cd ./aom_build && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DAOM_EXTRA_C_FLAGS="-fPIC" -DENABLE_DOCS=0 -DENABLE_TESTS=0 .. && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xproto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" --build=aarch64-unknown-linux-gnu && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libXau <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \ + ./configure --srcdir=${DIR} --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libpthread <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: xcb-proto <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ + echo ">>> BUILD: libxcb <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \ + tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \ + ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \ + ./configure --prefix="${PREFIX}" --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libxml2 - for libbluray + echo ">>> BUILD: libxml2 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sL https://github.com/GNOME/libxml2/archive/refs/tags/v${LIBXML2_VERSION}.tar.gz | \ + tar -xz --strip-components=1 && \ + ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libbluray - Requires libxml, freetype, and fontconfig + echo ">>> BUILD: libbluray <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://download.videolan.org/pub/videolan/libbluray/${LIBBLURAY_VERSION}/libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + echo ${LIBBLURAY_SHA256SUM} | sha256sum --check && \ + tar -jx --strip-components=1 -f libbluray-${LIBBLURAY_VERSION}.tar.bz2 && \ + ./configure --prefix="${PREFIX}" --disable-examples --disable-bdjava-jar --disable-static --enable-shared && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libzmq https://github.com/zeromq/libzmq/ + echo ">>> BUILD: libzmq <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \ + echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libsrt https://github.com/Haivision/srt + echo ">>> BUILD: libsrt <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \ + cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libpng + echo ">>> BUILD: libpng <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone https://git.code.sf.net/p/libpng/code ${DIR} -b v${LIBPNG_VERSION} --depth 1 && \ + ./autogen.sh && \ + ./configure --prefix="${PREFIX}" && \ + make check && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libaribb24 + echo ">>> BUILD: libaribb24 <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://github.com/nkoriyama/aribb24/archive/v${LIBARIBB24_VERSION}.tar.gz && \ + echo ${LIBARIBB24_SHA256SUM} | sha256sum --check && \ + tar -xz --strip-components=1 -f v${LIBARIBB24_VERSION}.tar.gz && \ + autoreconf -fiv && \ + ./configure CFLAGS="-I${PREFIX}/include -fPIC" --prefix="${PREFIX}" && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## libtheora http://www.theora.org/ + echo ">>> BUILD: theora <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \ + echo ${THEORA_SHA256SUM} | sha256sum --check && \ + tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \ + ./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared --disable-examples --build=aarch64-unknown-linux-gnu && \ + make && \ + make install && \ + rm -rf ${DIR} + +RUN \ +## ffmpeg https://ffmpeg.org/ + echo ">>> BUILD: ffmpeg <<" && \ + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + export PKG_CONFIG_PATH="${PREFIX}/lib:${PREFIX}/lib/pkgconfig" && \ + ./configure \ + --arch=aarch64 \ + --enable-cross-compile \ + --disable-debug \ + --disable-doc \ + --disable-ffplay \ + --disable-shared \ + --enable-fontconfig \ + --enable-gpl \ + --enable-libaom \ + --enable-libaribb24 \ + --enable-libass \ + --enable-libbluray \ + --enable-libfdk_aac \ + --enable-libfreetype \ + --enable-libkvazaar \ + --enable-libmp3lame \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ + --enable-libopenjpeg \ + --enable-libopus \ + --enable-libsrt \ + --enable-libtheora \ + --enable-libvidstab \ + --enable-libvorbis \ + --enable-libvpx \ + --enable-libvmaf \ + --enable-libwebp \ + --enable-libx264 \ + --enable-libx265 \ + --enable-libxcb \ + --enable-libxvid \ + --enable-libzmq \ + --enable-nonfree \ + --enable-openssl \ + --enable-postproc \ + --enable-shared \ + --enable-small \ + --enable-version3 \ + --enable-zlib \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-cxxflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ + --extra-libs="-lm -lpthread" \ + --ld="g++" \ + --pkg-config-flags="--static" \ + --prefix="${PREFIX}" && \ + echo "#disable all tests">./tests/Makefile && \ + make clean && \ + make && \ + make install && \ + make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ + make distclean && \ + hash -r && \ + cd tools && \ + make qt-faststart && \ + cp qt-faststart ${PREFIX}/bin/ && \ + rm -rf ${DIR} + +RUN \ +## setup ffmpeg lib64 libs + echo ">>> SETUP: ffmpeg lib64 libs <<" && \ + mkdir -p /usr/local/lib64/ && \ + ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib64/ && \ + for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ + cp ${PREFIX}/bin/* /usr/local/bin/ && \ + cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ + LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib ffmpeg -buildconf && \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib64/pkgconfig && \ + for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ + sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib64/pkgconfig/"${pc##*/}"; \ + done && \ + ldconfig -v && ffmpeg -buildconf + +RUN \ +## setup jre fallback fonts + echo ">>> SETUP: jre fallback fonts <<" && \ + mkdir -p /usr/java/default/jre/lib/fonts/fallback && \ + ln -s /usr/share/fonts/cjkuni-ukai/ukai.ttc /usr/java/default/jre/lib/fonts/fallback && \ + ln -s /usr/share/fonts/cjkuni-uming/uming.ttc /usr/java/default/jre/lib/fonts/fallback && \ + cd /tmp/workdir && unzip msft-fonts.zip && cp msft-fonts/* /usr/java/default/jre/lib/fonts/fallback/ && \ + rm -fr /tmp/workdir/msft-fonts /tmp/workdir/msft-fonts.zip + +RUN \ +## clenaup + echo ">>> CLEANUP <<" && \ + apt-get autoclean && apt-get autoremove + + + +FROM base +ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH} + +LABEL os="debian 8" \ + java="1.8" \ + container.description="java and ffmpeg" \ + image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ + version="1.0.0" \ + maintainer="devops " \ + imagename="java-ffmpeg" \ + test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ + test.command.verify="1.8" + +COPY --from=build /usr/local/ /usr/local/ diff --git a/Dockerfile-source b/Dockerfile-source index 5e858ca..6890790 100644 --- a/Dockerfile-source +++ b/Dockerfile-source @@ -15,42 +15,44 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.2 \ - AOM_VERSION=v1.0.0 \ - FDKAAC_VERSION=0.1.5 \ - FONTCONFIG_VERSION=2.12.4 \ - FREETYPE_VERSION=2.5.5 \ - FRIBIDI_VERSION=0.19.7 \ - KVAZAAR_VERSION=2.0.0 \ - LAME_VERSION=3.100 \ - LIBASS_VERSION=0.13.7 \ - LIBPTHREAD_STUBS_VERSION=0.4 \ - LIBVIDSTAB_VERSION=1.1.0 \ - LIBXCB_VERSION=1.13.1 \ - XCBPROTO_VERSION=1.13 \ - OGG_VERSION=1.3.2 \ - OPENCOREAMR_VERSION=0.1.5 \ - OPUS_VERSION=1.2 \ - OPENJPEG_VERSION=2.1.2 \ - THEORA_VERSION=1.1.1 \ - VORBIS_VERSION=1.3.5 \ - VPX_VERSION=1.8.0 \ - WEBP_VERSION=1.0.2 \ - X264_VERSION=20170226-2245-stable \ - X265_VERSION=3.1.1 \ - XAU_VERSION=1.0.9 \ - XORG_MACROS_VERSION=1.19.2 \ - XPROTO_VERSION=7.0.31 \ - XVID_VERSION=1.3.4 \ - LIBXML2_VERSION=2.9.10 \ - LIBBLURAY_VERSION=1.1.2 \ - LIBZMQ_VERSION=4.3.2 \ - LIBSRT_VERSION=1.4.1 \ - LIBARIBB24_VERSION=1.0.3 \ - LIBPNG_VERSION=1.6.9 \ - SRC=/usr/local - -ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz" +ENV FFMPEG_VERSION=5.0 \ + AOM_VERSION=v1.0.0 \ + CHROMAPRINT_VERSION=1.5.0 \ + FDKAAC_VERSION=0.1.5 \ + FONTCONFIG_VERSION=2.12.4 \ + FREETYPE_VERSION=2.10.4 \ + FRIBIDI_VERSION=0.19.7 \ + KVAZAAR_VERSION=2.0.0 \ + LAME_VERSION=3.100 \ + LIBASS_VERSION=0.13.7 \ + LIBPTHREAD_STUBS_VERSION=0.4 \ + LIBVIDSTAB_VERSION=1.1.0 \ + LIBXCB_VERSION=1.13.1 \ + XCBPROTO_VERSION=1.13 \ + OGG_VERSION=1.3.2 \ + OPENCOREAMR_VERSION=0.1.5 \ + OPUS_VERSION=1.2 \ + OPENJPEG_VERSION=2.1.2 \ + THEORA_VERSION=1.1.1 \ + VORBIS_VERSION=1.3.5 \ + VPX_VERSION=1.8.0 \ + WEBP_VERSION=1.0.2 \ + X264_VERSION=20170226-2245-stable \ + X265_VERSION=3.4 \ + XAU_VERSION=1.0.9 \ + XORG_MACROS_VERSION=1.19.2 \ + XPROTO_VERSION=7.0.31 \ + XVID_VERSION=1.3.4 \ + LIBXML2_VERSION=2.9.12 \ + LIBBLURAY_VERSION=1.1.2 \ + LIBZMQ_VERSION=4.3.2 \ + LIBSRT_VERSION=1.4.1 \ + LIBARIBB24_VERSION=1.0.3 \ + LIBPNG_VERSION=1.6.9 \ + LIBVMAF_VERSION=2.1.1 \ + SRC=/usr/local + +ARG FREETYPE_SHA256SUM="5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac freetype-2.10.4.tar.gz" ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz" ARG LIBASS_SHA256SUM="8fadf294bf701300d4605e6f1d92929304187fca4b8d8a47889315526adbafd7 0.13.7.tar.gz" ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz" @@ -59,10 +61,10 @@ ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207d ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz" ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz" ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz" -ARG LIBXML2_SHA256SUM="f07dab13bf42d2b8db80620cce7419b3b87827cc937c8bb20fe13b8571ee9501 libxml2-v2.9.10.tar.gz" ARG LIBBLURAY_SHA256SUM="a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42 libbluray-1.1.2.tar.bz2" ARG LIBZMQ_SHA256SUM="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb v4.3.2.tar.gz" ARG LIBARIBB24_SHA256SUM="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128 v1.0.3.tar.gz" +ARG LIBVMAF_SHA256SUM="e7fc00ae1322a7eccfcf6d4f1cdf9c67eec8058709887c8c6c3795c617326f77 v2.1.1.tar.gz" ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib @@ -94,14 +96,37 @@ RUN buildDeps="autoconf \ zlib-devel" && \ echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ dnf --enablerepo=extras install -y epel-release && \ - dnf --enablerepo=powertools install -y ${buildDeps} && \ + dnf update -y && \ + dnf -y install dnf-plugins-core && \ + yum config-manager --set-enabled powertools && \ + dnf install -y ${buildDeps} && \ alternatives --set python /usr/bin/python3 +## libvmaf https://github.com/Netflix/vmaf +RUN \ + if which meson || false; then \ + echo "Building VMAF." && \ + DIR=/tmp/vmaf && \ + mkdir -p ${DIR} && \ + cd ${DIR} && \ + curl -sLO https://github.com/Netflix/vmaf/archive/v${LIBVMAF_VERSION}.tar.gz && \ + tar -xz --strip-components=1 -f v${LIBVMAF_VERSION}.tar.gz && \ + cd /tmp/vmaf/libvmaf && \ + meson build --buildtype release --prefix=${PREFIX} && \ + ninja -vC build && \ + ninja -vC build install && \ + mkdir -p ${PREFIX}/share/model/ && \ + cp -r /tmp/vmaf/model/* ${PREFIX}/share/model/ && \ + rm -rf ${DIR}; \ + else \ + echo "VMAF skipped."; \ + fi + ## opencore-amr https://sourceforge.net/projects/opencore-amr/ RUN \ DIR=/tmp/opencore-amr && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \ + curl -sL https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz/download | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --enable-shared && \ make && \ @@ -123,9 +148,9 @@ RUN \ DIR=/tmp/x265 && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \ + curl -sL https://github.com/videolan/x265/archive/refs/tags/${X265_VERSION}.tar.gz | \ tar -zx && \ - cd x265_${X265_VERSION}/build/linux && \ + cd x265-${X265_VERSION}/build/linux && \ sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \ sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \ ./multilib.sh && \ @@ -208,7 +233,7 @@ RUN \ DIR=/tmp/lame && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \ + curl -sL https://sourceforge.net/projects/lame/files/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz/download | \ tar -zx --strip-components=1 && \ ./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \ make && \ @@ -411,9 +436,8 @@ RUN \ DIR=/tmp/libxml2 && \ mkdir -p ${DIR} && \ cd ${DIR} && \ - curl -sLO https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${LIBXML2_VERSION}/libxml2-v${LIBXML2_VERSION}.tar.gz && \ - echo ${LIBXML2_SHA256SUM} | sha256sum --check && \ - tar -xz --strip-components=1 -f libxml2-v${LIBXML2_VERSION}.tar.gz && \ + curl -sL https://github.com/GNOME/libxml2/archive/refs/tags/v${LIBXML2_VERSION}.tar.gz | \ + tar -xz --strip-components=1 && \ ./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no && \ make && \ make install && \ @@ -485,57 +509,62 @@ RUN \ make install && \ rm -rf ${DIR} -## ffmpeg https://ffmpeg.org/ +## Download ffmpeg https://ffmpeg.org/ RUN \ DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \ curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ - tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 + tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \ + ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ + make ; make install -RUN \ - DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \ + + +## Build ffmpeg https://ffmpeg.org/ +RUN \ + DIR=/tmp/ffmpeg && cd ${DIR} && \ ./configure \ --disable-debug \ --disable-doc \ --disable-ffplay \ - --enable-shared \ - --enable-avresample \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ + --enable-fontconfig \ --enable-gpl \ + --enable-libaom \ + --enable-libaribb24 \ --enable-libass \ - --enable-fontconfig \ + --enable-libbluray \ + --enable-libfdk_aac \ --enable-libfreetype \ - --enable-libvidstab \ + --enable-libkvazaar \ --enable-libmp3lame \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ + --enable-libopenjpeg \ --enable-libopus \ + --enable-libsrt \ --enable-libtheora \ + --enable-libvidstab \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ - --enable-libxcb \ + --enable-libx264 \ --enable-libx265 \ + --enable-libxcb \ --enable-libxvid \ - --enable-libx264 \ + --enable-libzmq \ --enable-nonfree \ --enable-openssl \ - --enable-libfdk_aac \ --enable-postproc \ + --enable-shared \ --enable-small \ --enable-version3 \ - --enable-libbluray \ - --enable-libzmq \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ --extra-libs=-ldl \ - --prefix="${PREFIX}" \ - --enable-libopenjpeg \ - --enable-libkvazaar \ - --enable-libaom \ --extra-libs=-lpthread \ - --enable-libsrt \ - --enable-libaribb24 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" && \ + --prefix="${PREFIX}" && \ + make clean && \ make && \ make install && \ make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \ @@ -549,7 +578,7 @@ RUN \ for lib in /usr/local/lib64/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ cp ${PREFIX}/bin/* /usr/local/bin/ && \ cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ - LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg -buildconf && \ + LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib ffmpeg -buildconf && \ cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ mkdir -p /usr/local/lib64/pkgconfig && \ for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \ @@ -557,7 +586,8 @@ RUN \ done FROM base -MAINTAINER Julien Rottenberg +LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ + org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib diff --git a/README.md b/README.md index ccae5ec..4ef68dc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## CentOS 8 with Java 11 and FFMPEG +## Debian with Java 8 and FFMPEG [![build](https://github.com/aem-design/docker-java-ffmpeg/actions/workflows/build.yml/badge.svg?branch=jdk11)](https://github.com/aem-design/docker-java-ffmpeg/actions/workflows/build.yml) [![github license](https://img.shields.io/github/license/aem-design/java-ffmpeg)](https://github.com/aem-design/java-ffmpeg) @@ -11,6 +11,15 @@ This is docker image based on [aemdesign/oracle-jdk](https://hub.docker.com/r/aemdesign/oracle-jdk/) with AEM base libs + +## Self Hosted runner + +To build and deploy this repo you will need to add a self-hosted runner. + +``` +docker run -d --restart always --name github-runner-aemdesign -e RUNNER_NAME_PREFIX="ghraemd" -e ACCESS_TOKEN="" -e RUNNER_WORKDIR="/tmp/github-runner-aemdesign" -e RUNNER_GROUP="self-hosted" -e RUNNER_SCOPE="org" -e ORG_NAME="aem-design" -e LABELS="aemdesign,github-runner" -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/tmp/github-runner-your-repo myoung34/github-runner:latest +``` + ### Included Packages Following is the list of packages included diff --git a/build-serial.ps1 b/build-serial.ps1 new file mode 100644 index 0000000..bcaa7be --- /dev/null +++ b/build-serial.ps1 @@ -0,0 +1,22 @@ +Param( + [string]$LOG_PATH = "${PWD}\logs", + [string]$LOG_PEFIX = "docker-serial", + [string]$LOG_SUFFIX = ".log", + [string]$TAG = "jdk8-serial", + [string]$FILE = "Dockerfile-serial", + [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", + [string]$COMMAND = "docker buildx build . -f .\${FILE} -t ${TAG}" +) + +$SKIP_CONFIG = $true +$PARENT_PROJECT_PATH = "." + +. ([Scriptblock]::Create((([System.Text.Encoding]::ASCII).getString((Invoke-WebRequest -Uri "${FUNCTIONS_URI}").Content)))) + +printSectionBanner "Building Image" +printSectionLine "$COMMAND" "warn" + +Invoke-Expression -Command "$COMMAND" | Tee-Object -Append -FilePath "${LOG_FILE}" + + + diff --git a/build.ps1 b/build.ps1 index a91ed89..fd3ca7e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,7 +5,7 @@ Param( [string]$TAG = "jdk11", [string]$FILE = "Dockerfile", [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", - [string]$COMMAND = "docker build . -f .\${FILE} -t ${TAG}" + [string]$COMMAND = "docker buildx build . -f .\${FILE} -t ${TAG}" ) $SKIP_CONFIG = $true diff --git a/test/run_tests.sh b/test/run_tests.sh index 59b9367..6d04c0f 100644 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -6,7 +6,7 @@ # IMAGE_NAME specifies a name of the candidate image used for testing. # The image has to be available before this script is executed. # -IMAGE_NAME=${1:-aemdesign/oracle-jdk} +IMAGE_NAME=${1:-aemdesign/java-ffmpeg:jdk11} FLAG_DEBUG=${2:-true} IP=$(which ip) if [[ -z $IP ]]; then From da75c2ec555fd1781231bb24507a2dffd404edc2 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 6 Feb 2022 02:15:32 +1100 Subject: [PATCH 35/36] update amd64 build. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba9c605..119dc37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/arm64 + platforms: linux/amd64 load: true tags: | ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} @@ -55,7 +55,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/arm64 + platforms: linux/amd64 push: true tags: | ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} From 3a20b9a95254b96d2cc84a46067f62fbba99dfc6 Mon Sep 17 00:00:00 2001 From: wildone Date: Sun, 6 Feb 2022 02:19:24 +1100 Subject: [PATCH 36/36] init. --- .github/workflows/build.yml | 4 ++-- Dockerfile | 2 +- Dockerfile-debug | 4 ++-- Dockerfile-serial | 2 +- build-serial.ps1 | 4 ++-- build.ps1 | 4 ++-- debug.ps1 | 8 ++++---- docker-compose.yml | 2 +- test/run_tests.sh | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 119dc37..ba9c605 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64 + platforms: linux/arm64 load: true tags: | ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} @@ -55,7 +55,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64 + platforms: linux/arm64 push: true tags: | ${{ env.IMAGE }}:${{ env.GIT_BRANCH }} diff --git a/Dockerfile b/Dockerfile index a75ecd5..cdff37e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM aemdesign/oracle-jdk:jdk11 as base +FROM aemdesign/oracle-jdk:jdk11-arm as base RUN apt-get update -y && \ apt-get install libgomp1 libxdmcp6 libexpat-dev -y && \ diff --git a/Dockerfile-debug b/Dockerfile-debug index 7960ffe..48c2d4b 100644 --- a/Dockerfile-debug +++ b/Dockerfile-debug @@ -1,4 +1,4 @@ -FROM aemdesign/oracle-jdk:jdk11 as base +FROM aemdesign/oracle-jdk:jdk11-arm as base RUN dnf -y install libgomp && \ dnf clean all; @@ -579,7 +579,7 @@ RUN \ FROM base -LABEL os="debain 8" \ +LABEL os="debain" \ container.description="java and ffmpeg" \ image.source="https://github.com/jrottenberg/ffmpeg/tree/master/docker-images" \ version="1.0.0" \ diff --git a/Dockerfile-serial b/Dockerfile-serial index cd8a566..921c2ef 100644 --- a/Dockerfile-serial +++ b/Dockerfile-serial @@ -1,4 +1,4 @@ -FROM aemdesign/oracle-jdk:jdk11 as base +FROM aemdesign/oracle-jdk:jdk11-arm as base RUN apt-get update -y && \ apt-get install libgomp1 -y && \ diff --git a/build-serial.ps1 b/build-serial.ps1 index bcaa7be..6fd4446 100644 --- a/build-serial.ps1 +++ b/build-serial.ps1 @@ -2,10 +2,10 @@ Param( [string]$LOG_PATH = "${PWD}\logs", [string]$LOG_PEFIX = "docker-serial", [string]$LOG_SUFFIX = ".log", - [string]$TAG = "jdk8-serial", + [string]$TAG = "jdk11-arm-serial", [string]$FILE = "Dockerfile-serial", [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", - [string]$COMMAND = "docker buildx build . -f .\${FILE} -t ${TAG}" + [string]$COMMAND = "docker buildx build --platform linux/arm64 . -f .\${FILE} -t ${TAG}" ) $SKIP_CONFIG = $true diff --git a/build.ps1 b/build.ps1 index fd3ca7e..82ce131 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,10 +2,10 @@ Param( [string]$LOG_PATH = "${PWD}\logs", [string]$LOG_PEFIX = "docker", [string]$LOG_SUFFIX = ".log", - [string]$TAG = "jdk11", + [string]$TAG = "jdk11-arm", [string]$FILE = "Dockerfile", [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", - [string]$COMMAND = "docker buildx build . -f .\${FILE} -t ${TAG}" + [string]$COMMAND = "docker buildx build --platform linux/arm64 . -f .\${FILE} -t ${TAG}" ) $SKIP_CONFIG = $true diff --git a/debug.ps1 b/debug.ps1 index 5163961..1ec08c7 100644 --- a/debug.ps1 +++ b/debug.ps1 @@ -2,10 +2,10 @@ Param( [string]$LOG_PATH = "${PWD}\logs", [string]$LOG_PEFIX = "docker", [string]$LOG_SUFFIX = ".log", - [string]$TAG = "jdk11", - [string]$FILE = "Dockerfile", + [string]$TAG = "jdk11-arm", + [string]$FILE = "Dockerfile-debug", [string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1", - [string]$COMMAND = "docker build . -f .\${FILE} -t ${TAG}" + [string]$COMMAND = "docker buildx build --platform linux/arm64 . -f .\${FILE} -t ${TAG}" ) $SKIP_CONFIG = $true @@ -18,4 +18,4 @@ printSectionLine "$COMMAND" "warn" $IMAGENAME=Select-String -path $FILE '.*imagename="(.*)".*' -AllMatches | Foreach-Object {$_.Matches} | Foreach-Object {$_.Groups[1].Value} -docker run -it --rm -v ${PWD}:/build/source:rw aemdesign/centos-java-buildpack bash --login +docker run -it --rm -v ${PWD}:/build/source:rw aemdesign/java-buildpack bash --login diff --git a/docker-compose.yml b/docker-compose.yml index 11c337a..ed0ecff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ aem-base: labels: ffmpeg.version: "2.8.3" ffmpeg.plugins: "yasm x264 x265 libogg libopus libvorbis libtheora libvpx libmp3lame faac xvid fdk-aac ffmpeg" - os.version: "centos 7" + os.version: "debian 7" java.version: "oracle 8" container.description: "aem instance, will run as author unless specified otherwise" container_name: "java-ffmpeg" diff --git a/test/run_tests.sh b/test/run_tests.sh index 6d04c0f..a65320c 100644 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -6,7 +6,7 @@ # IMAGE_NAME specifies a name of the candidate image used for testing. # The image has to be available before this script is executed. # -IMAGE_NAME=${1:-aemdesign/java-ffmpeg:jdk11} +IMAGE_NAME=${1:-aemdesign/java-ffmpeg:jdk11-arm} FLAG_DEBUG=${2:-true} IP=$(which ip) if [[ -z $IP ]]; then