diff --git a/docker-images/3.2/alpine313/Dockerfile b/docker-images/3.2/alpine313/Dockerfile deleted file mode 100644 index b712aa417..000000000 --- a/docker-images/3.2/alpine313/Dockerfile +++ /dev/null @@ -1,594 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# - -FROM alpine:3.13 AS base - -RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git - - -FROM base AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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 \ - bash \ - binutils \ - bzip2 \ - cmake \ - coreutils \ - curl \ - diffutils \ - expat-dev \ - file \ - g++ \ - gcc \ - gperf \ - libtool \ - make \ - nasm \ - openssl-dev \ - python3 \ - tar \ - xcb-proto \ - yasm \ - zlib-dev" && \ - apk add --no-cache --update ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - - -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - mkdir -p /usr/local/include && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -### Release Stage -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.2/centos7/Dockerfile b/docker-images/3.2/centos7/Dockerfile deleted file mode 100644 index b2d4624cb..000000000 --- a/docker-images/3.2/centos7/Dockerfile +++ /dev/null @@ -1,626 +0,0 @@ -# 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 - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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 \ - cmake3 \ - diffutils \ - expat-devel \ - file \ - gcc \ - gcc-c++ \ - git \ - gperf \ - libtool \ - make \ - 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 --enablerepo=epel install -y ${buildDeps} && \ - alternatives --install /usr/bin/cmake cmake /usr/bin/cmake3 0 && \ - # Install the tools required to build nasm 2.14.02 \ - nasmDeps="asciidoc \ - perl-Font-TTF \ - perl-Sort-Versions \ - xmlto" && \ - yum --enablerepo=epel install -y ${nasmDeps} && \ - # Compile and install nasm 2.14.02 \ - DIR=/tmp/nasm && \ - mkdir -p ${DIR} && \ - curl -LSs https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz | \ - tar xzC ${DIR} --strip-components=1 && \ - pushd ${DIR} && \ - ./configure --host=x86_64-redhat-linux-gnu \ - --build=x86_64-redhat-linux-gnu \ - --prefix=/usr/local \ - --exec-prefix=/usr/local \ - --bindir=/usr/local/bin \ - --sbindir=/usr/local/sbin \ - --sysconfdir=/usr/local/etc \ - --datadir=/usr/local/share \ - --includedir=/usr/local/include \ - --libdir=/usr/local/lib \ - --libexecdir=/usr/local/libexec \ - --enable-sections && \ - make all && \ - make install && \ - make install_rdf && \ - popd && rm -rf ${DIR} && \ - alternatives --install /usr/bin/nasm nasm /usr/local/bin/nasm 0 && \ - # Now that we have a modern nasm build and available, we can undo the last \ - # yum transaction as none of those packages are required for the rest of the build \ - yum history undo $(yum history info | grep 'Transaction ID' | awk -F: '{print$2}' | tr -d ' ') -y && \ - yum autoremove -y - -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -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:/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 - -FROM base -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 - -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.2/rockylinux8/Dockerfile b/docker-images/3.2/rockylinux8/Dockerfile deleted file mode 100644 index 9132fecff..000000000 --- a/docker-images/3.2/rockylinux8/Dockerfile +++ /dev/null @@ -1,596 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Centos -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM rockylinux/rockylinux:8 AS base - -RUN dnf -y install libgomp && \ - dnf clean all; - - -FROM base AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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++ \ - git \ - gperf \ - libtool \ - make \ - nasm \ - perl \ - python3 \ - openssl-devel \ - tar \ - yasm \ - which \ - zlib-devel" && \ - echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - dnf --enablerepo=extras install -y epel-release && \ - 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -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:/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 - -FROM base -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 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.2/scratch313/Dockerfile b/docker-images/3.2/scratch313/Dockerfile deleted file mode 100644 index bc9f36c6f..000000000 --- a/docker-images/3.2/scratch313/Dockerfile +++ /dev/null @@ -1,591 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# - -FROM alpine:3.13 AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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 \ - bash \ - binutils \ - bzip2 \ - ca-certificates \ - cmake \ - coreutils \ - curl \ - diffutils \ - expat-dev \ - file \ - g++ \ - gcc \ - git \ - gperf \ - libcrypto1.1 \ - libgcc \ - libssl1.1 \ - libstdc++ \ - libtool \ - make \ - nasm \ - openssl-dev \ - python3 \ - tar \ - xcb-proto \ - yasm \ - zlib-dev" && \ - apk add --update ${buildDeps} - -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - - -RUN \ - mkdir -p /tmp/fakeroot/lib && \ - ldd ${PREFIX}/bin/ffmpeg | cut -d ' ' -f 3 | strings | xargs -I R cp R /tmp/fakeroot/lib/ && \ - for lib in /tmp/fakeroot/lib/*; do strip --strip-all $lib; done && \ - cp -r ${PREFIX}/bin /tmp/fakeroot/bin/ && \ - cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/ && \ - LD_LIBRARY_PATH=/tmp/fakeroot/lib /tmp/fakeroot/bin/ffmpeg -buildconf - -### Release Stage -FROM scratch AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["/bin/ffmpeg"] - -COPY --from=build /tmp/fakeroot/ / - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/3.2/ubuntu2004/Dockerfile b/docker-images/3.2/ubuntu2004/Dockerfile deleted file mode 100644 index 2c3f71703..000000000 --- a/docker-images/3.2/ubuntu2004/Dockerfile +++ /dev/null @@ -1,595 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.2/vaapi2004/Dockerfile b/docker-images/3.2/vaapi2004/Dockerfile deleted file mode 100644 index f69ea3304..000000000 --- a/docker-images/3.2/vaapi2004/Dockerfile +++ /dev/null @@ -1,602 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.2.19 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/3.3/alpine313/Dockerfile b/docker-images/3.3/alpine313/Dockerfile deleted file mode 100644 index 323b10a1a..000000000 --- a/docker-images/3.3/alpine313/Dockerfile +++ /dev/null @@ -1,594 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# - -FROM alpine:3.13 AS base - -RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git - - -FROM base AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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 \ - bash \ - binutils \ - bzip2 \ - cmake \ - coreutils \ - curl \ - diffutils \ - expat-dev \ - file \ - g++ \ - gcc \ - gperf \ - libtool \ - make \ - nasm \ - openssl-dev \ - python3 \ - tar \ - xcb-proto \ - yasm \ - zlib-dev" && \ - apk add --no-cache --update ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - - -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - mkdir -p /usr/local/include && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -### Release Stage -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/centos7/Dockerfile b/docker-images/3.3/centos7/Dockerfile deleted file mode 100644 index 285a02b94..000000000 --- a/docker-images/3.3/centos7/Dockerfile +++ /dev/null @@ -1,626 +0,0 @@ -# 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 - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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 \ - cmake3 \ - diffutils \ - expat-devel \ - file \ - gcc \ - gcc-c++ \ - git \ - gperf \ - libtool \ - make \ - 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 --enablerepo=epel install -y ${buildDeps} && \ - alternatives --install /usr/bin/cmake cmake /usr/bin/cmake3 0 && \ - # Install the tools required to build nasm 2.14.02 \ - nasmDeps="asciidoc \ - perl-Font-TTF \ - perl-Sort-Versions \ - xmlto" && \ - yum --enablerepo=epel install -y ${nasmDeps} && \ - # Compile and install nasm 2.14.02 \ - DIR=/tmp/nasm && \ - mkdir -p ${DIR} && \ - curl -LSs https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz | \ - tar xzC ${DIR} --strip-components=1 && \ - pushd ${DIR} && \ - ./configure --host=x86_64-redhat-linux-gnu \ - --build=x86_64-redhat-linux-gnu \ - --prefix=/usr/local \ - --exec-prefix=/usr/local \ - --bindir=/usr/local/bin \ - --sbindir=/usr/local/sbin \ - --sysconfdir=/usr/local/etc \ - --datadir=/usr/local/share \ - --includedir=/usr/local/include \ - --libdir=/usr/local/lib \ - --libexecdir=/usr/local/libexec \ - --enable-sections && \ - make all && \ - make install && \ - make install_rdf && \ - popd && rm -rf ${DIR} && \ - alternatives --install /usr/bin/nasm nasm /usr/local/bin/nasm 0 && \ - # Now that we have a modern nasm build and available, we can undo the last \ - # yum transaction as none of those packages are required for the rest of the build \ - yum history undo $(yum history info | grep 'Transaction ID' | awk -F: '{print$2}' | tr -d ' ') -y && \ - yum autoremove -y - -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -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:/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 - -FROM base -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 - -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/centos8/Dockerfile b/docker-images/3.3/centos8/Dockerfile deleted file mode 100644 index 340581b05..000000000 --- a/docker-images/3.3/centos8/Dockerfile +++ /dev/null @@ -1,598 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Centos -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM centos:8 AS base - -# Until we move to Rockylinux -RUN sed -i '/mirrorlist=/d;s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \ - dnf -y install libgomp && \ - dnf clean all; - - -FROM base AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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++ \ - git \ - gperf \ - libtool \ - make \ - nasm \ - perl \ - python3 \ - openssl-devel \ - tar \ - yasm \ - which \ - zlib-devel" && \ - echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - dnf --enablerepo=extras install -y epel-release && \ - 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -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:/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 - -FROM base -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 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/nvidia2004/Dockerfile b/docker-images/3.3/nvidia2004/Dockerfile deleted file mode 100644 index 4d15a08ff..000000000 --- a/docker-images/3.3/nvidia2004/Dockerfile +++ /dev/null @@ -1,626 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# - -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base - -ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video -ENV DEBIAN_FRONTEND=nonintercative -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base - -ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video -ENV DEBIAN_FRONTEND=nonintercative -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 libxcb-shape0-dev && \ - apt-get autoremove -y && \ - apt-get clean -y - - -FROM devel-base as build - -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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 \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} - -RUN \ - DIR=/tmp/nv-codec-headers && \ - git clone https://github.com/FFmpeg/nv-codec-headers ${DIR} && \ - cd ${DIR} && \ - git checkout n${NVIDIA_HEADERS_VERSION} && \ - make PREFIX="${PREFIX}" && \ - make install PREFIX="${PREFIX}" && \ - rm -rf ${DIR} - -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-nvenc \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include -I${PREFIX}/include/ffnvcodec -I/usr/local/cuda/include/" \ - --extra-ldflags="-L${PREFIX}/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/lib64:${LD_LIBRARY_PATH}" ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \ - cp ${PREFIX}/bin/* /usr/local/bin/ && \ - cp -r ${PREFIX}/share/* /usr/local/share/ && \ - LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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; s:/lib64:/lib:g" <"$pc" >/usr/local/lib/pkgconfig/"${pc##*/}"; \ - done - - - -FROM runtime-base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -# copy only needed files, without copying nvidia dev files -COPY --from=build /usr/local/bin /usr/local/bin/ -COPY --from=build /usr/local/share /usr/local/share/ -COPY --from=build /usr/local/lib /usr/local/lib/ -COPY --from=build /usr/local/include /usr/local/include/ - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/3.3/rockylinux8/Dockerfile b/docker-images/3.3/rockylinux8/Dockerfile deleted file mode 100644 index 7a3535ac9..000000000 --- a/docker-images/3.3/rockylinux8/Dockerfile +++ /dev/null @@ -1,596 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Centos -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM rockylinux/rockylinux:8 AS base - -RUN dnf -y install libgomp && \ - dnf clean all; - - -FROM base AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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++ \ - git \ - gperf \ - libtool \ - make \ - nasm \ - perl \ - python3 \ - openssl-devel \ - tar \ - yasm \ - which \ - zlib-devel" && \ - echo "${SRC}/lib" > /etc/ld.so.conf.d/libc.conf && \ - dnf --enablerepo=extras install -y epel-release && \ - 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -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:/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 - -FROM base -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 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/scratch313/Dockerfile b/docker-images/3.3/scratch313/Dockerfile deleted file mode 100644 index b8b821ae6..000000000 --- a/docker-images/3.3/scratch313/Dockerfile +++ /dev/null @@ -1,591 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# - -FROM alpine:3.13 AS build - -WORKDIR /tmp/workdir - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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 \ - bash \ - binutils \ - bzip2 \ - ca-certificates \ - cmake \ - coreutils \ - curl \ - diffutils \ - expat-dev \ - file \ - g++ \ - gcc \ - git \ - gperf \ - libcrypto1.1 \ - libgcc \ - libssl1.1 \ - libstdc++ \ - libtool \ - make \ - nasm \ - openssl-dev \ - python3 \ - tar \ - xcb-proto \ - yasm \ - zlib-dev" && \ - apk add --update ${buildDeps} - -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - - -RUN \ - mkdir -p /tmp/fakeroot/lib && \ - ldd ${PREFIX}/bin/ffmpeg | cut -d ' ' -f 3 | strings | xargs -I R cp R /tmp/fakeroot/lib/ && \ - for lib in /tmp/fakeroot/lib/*; do strip --strip-all $lib; done && \ - cp -r ${PREFIX}/bin /tmp/fakeroot/bin/ && \ - cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/ && \ - LD_LIBRARY_PATH=/tmp/fakeroot/lib /tmp/fakeroot/bin/ffmpeg -buildconf - -### Release Stage -FROM scratch AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["/bin/ffmpeg"] - -COPY --from=build /tmp/fakeroot/ / - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/3.3/ubuntu1804/Dockerfile b/docker-images/3.3/ubuntu1804/Dockerfile deleted file mode 100644 index 8a910cea0..000000000 --- a/docker-images/3.3/ubuntu1804/Dockerfile +++ /dev/null @@ -1,592 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:18.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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 \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/ubuntu2004/Dockerfile b/docker-images/3.3/ubuntu2004/Dockerfile deleted file mode 100644 index 13770b721..000000000 --- a/docker-images/3.3/ubuntu2004/Dockerfile +++ /dev/null @@ -1,595 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.3/vaapi2004/Dockerfile b/docker-images/3.3/vaapi2004/Dockerfile deleted file mode 100644 index 075d8fea5..000000000 --- a/docker-images/3.3/vaapi2004/Dockerfile +++ /dev/null @@ -1,602 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.3.9 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/3.4/alpine313/Dockerfile b/docker-images/3.4/alpine317/Dockerfile similarity index 99% rename from docker-images/3.4/alpine313/Dockerfile rename to docker-images/3.4/alpine317/Dockerfile index 1c0451f06..bd98ff657 100644 --- a/docker-images/3.4/alpine313/Dockerfile +++ b/docker-images/3.4/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/3.4/nvidia2004/Dockerfile b/docker-images/3.4/nvidia2204/Dockerfile similarity index 99% rename from docker-images/3.4/nvidia2004/Dockerfile rename to docker-images/3.4/nvidia2204/Dockerfile index 42e917125..441121c16 100644 --- a/docker-images/3.4/nvidia2004/Dockerfile +++ b/docker-images/3.4/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=3.4.12 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/3.4/scratch313/Dockerfile b/docker-images/3.4/scratch317/Dockerfile similarity index 99% rename from docker-images/3.4/scratch313/Dockerfile rename to docker-images/3.4/scratch317/Dockerfile index 970fca4b6..b1842197f 100644 --- a/docker-images/3.4/scratch313/Dockerfile +++ b/docker-images/3.4/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/3.4/ubuntu2004/Dockerfile b/docker-images/3.4/ubuntu2004/Dockerfile deleted file mode 100644 index 36edafac9..000000000 --- a/docker-images/3.4/ubuntu2004/Dockerfile +++ /dev/null @@ -1,595 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=3.4.12 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libass \ - --enable-libbluray \ - --enable-libfdk_aac \ - --enable-libfreetype \ - --enable-libkvazaar \ - --enable-libmp3lame \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libopenjpeg \ - --enable-libopus \ - --enable-libtheora \ - --enable-libvidstab \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/3.4/ubuntu1804/Dockerfile b/docker-images/3.4/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/3.4/ubuntu1804/Dockerfile rename to docker-images/3.4/ubuntu2204/Dockerfile index 17c2edada..fd2f83caf 100644 --- a/docker-images/3.4/ubuntu1804/Dockerfile +++ b/docker-images/3.4/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/3.4/vaapi2004/Dockerfile b/docker-images/3.4/vaapi2204/Dockerfile similarity index 99% rename from docker-images/3.4/vaapi2004/Dockerfile rename to docker-images/3.4/vaapi2204/Dockerfile index e740ea66e..7dad78ecc 100644 --- a/docker-images/3.4/vaapi2004/Dockerfile +++ b/docker-images/3.4/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:20.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -74,8 +74,6 @@ ARG PREFIX=/opt/ffmpeg ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" -ARG DEBIAN_FRONTEND=noninteractive - RUN buildDeps="autoconf \ automake \ cmake \ @@ -88,11 +86,10 @@ RUN buildDeps="autoconf \ gperf \ libtool \ make \ - meson \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/4.0/alpine313/Dockerfile b/docker-images/4.0/alpine317/Dockerfile similarity index 99% rename from docker-images/4.0/alpine313/Dockerfile rename to docker-images/4.0/alpine317/Dockerfile index 16e510ac7..3674de6e0 100644 --- a/docker-images/4.0/alpine313/Dockerfile +++ b/docker-images/4.0/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git @@ -13,7 +13,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.0/centos7/Dockerfile b/docker-images/4.0/centos7/Dockerfile index 18e989b1f..705bbaecd 100644 --- a/docker-images/4.0/centos7/Dockerfile +++ b/docker-images/4.0/centos7/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.0/centos8/Dockerfile b/docker-images/4.0/centos8/Dockerfile index f82fb3f8b..e3b83e12b 100644 --- a/docker-images/4.0/centos8/Dockerfile +++ b/docker-images/4.0/centos8/Dockerfile @@ -17,7 +17,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.0/nvidia2004/Dockerfile b/docker-images/4.0/nvidia2204/Dockerfile similarity index 99% rename from docker-images/4.0/nvidia2004/Dockerfile rename to docker-images/4.0/nvidia2204/Dockerfile index 05582ff1f..2c802c900 100644 --- a/docker-images/4.0/nvidia2004/Dockerfile +++ b/docker-images/4.0/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,9 +31,9 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.0/rockylinux8/Dockerfile b/docker-images/4.0/rockylinux8/Dockerfile index 04344fd41..62f3a689b 100644 --- a/docker-images/4.0/rockylinux8/Dockerfile +++ b/docker-images/4.0/rockylinux8/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.0/scratch313/Dockerfile b/docker-images/4.0/scratch317/Dockerfile similarity index 99% rename from docker-images/4.0/scratch313/Dockerfile rename to docker-images/4.0/scratch317/Dockerfile index 70f852381..5f756b79f 100644 --- a/docker-images/4.0/scratch313/Dockerfile +++ b/docker-images/4.0/scratch317/Dockerfile @@ -4,11 +4,11 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.0/ubuntu2004/Dockerfile b/docker-images/4.0/ubuntu2004/Dockerfile deleted file mode 100644 index e546752b6..000000000 --- a/docker-images/4.0/ubuntu2004/Dockerfile +++ /dev/null @@ -1,598 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.0.6 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libaom \ - --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-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/4.0/ubuntu1804/Dockerfile b/docker-images/4.0/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/4.0/ubuntu1804/Dockerfile rename to docker-images/4.0/ubuntu2204/Dockerfile index 80c3062c6..17774c70f 100644 --- a/docker-images/4.0/ubuntu1804/Dockerfile +++ b/docker-images/4.0/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -16,7 +16,7 @@ RUN apt-get -yqq update && \ FROM base as build -ENV FFMPEG_VERSION=4.0.6 \ +ENV FFMPEG_VERSION=4.0.5 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.0/vaapi2004/Dockerfile b/docker-images/4.0/vaapi2004/Dockerfile deleted file mode 100644 index 4aaa27e7d..000000000 --- a/docker-images/4.0/vaapi2004/Dockerfile +++ /dev/null @@ -1,605 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.0.6 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libaom \ - --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-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/4.0/vaapi2204/Dockerfile b/docker-images/4.0/vaapi2204/Dockerfile new file mode 100644 index 000000000..7ebd521a3 --- /dev/null +++ b/docker-images/4.0/vaapi2204/Dockerfile @@ -0,0 +1,602 @@ +# ffmpeg - http://ffmpeg.org/download.html +# +# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu +# +# https://hub.docker.com/r/jrottenberg/ffmpeg/ +# +# +FROM ubuntu:22.04 AS base + +WORKDIR /tmp/workdir + +RUN apt-get -yqq update && \ + apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ + apt-get autoremove -y && \ + apt-get clean -y + +FROM base as build + +ENV FFMPEG_VERSION=4.0.5 \ + 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" +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" +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 \ + cmake \ + curl \ + bzip2 \ + libexpat1-dev \ + g++ \ + gcc \ + git \ + gperf \ + libtool \ + make \ + nasm \ + perl \ + pkg-config \ + python3 \ + libssl-dev \ + yasm \ + libva-dev \ + zlib1g-dev" && \ + apt-get -yqq update && \ + apt-get install -yq --no-install-recommends ${buildDeps} +## 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://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} +## 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://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 "/^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://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} +### 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" && \ + 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/ +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 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/ +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} + +## 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 -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} + +## 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} + +## 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 && \ + ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ + make ; make install + + + + + +## Build ffmpeg https://ffmpeg.org/ +RUN \ + DIR=/tmp/ffmpeg && cd ${DIR} && \ + ./configure \ + --disable-debug \ + --disable-doc \ + --disable-ffplay \ + --enable-avresample \ + --enable-fontconfig \ + --enable-gpl \ + --enable-libaom \ + --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-libwebp \ + --enable-libx264 \ + --enable-libx265 \ + --enable-libxcb \ + --enable-libxvid \ + --enable-libzmq \ + --enable-nonfree \ + --enable-openssl \ + --enable-postproc \ + --enable-shared \ + --enable-small \ + --enable-vaapi \ + --enable-version3 \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ + --extra-libs=-ldl \ + --extra-libs=-lpthread \ + --prefix="${PREFIX}" && \ + 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/ + +## cleanup +RUN \ + ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ + for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ + done + +FROM base AS release +LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ + org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg + +ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 + +CMD ["--help"] +ENTRYPOINT ["ffmpeg"] + +COPY --from=build /usr/local /usr/local/ + +RUN \ + apt-get update -y && \ + apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ + rm -rf /var/lib/apt/lists/* + +# Let's make sure the app built correctly +# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/4.1/alpine313/Dockerfile b/docker-images/4.1/alpine317/Dockerfile similarity index 99% rename from docker-images/4.1/alpine313/Dockerfile rename to docker-images/4.1/alpine317/Dockerfile index ffc20db85..c0a29375e 100644 --- a/docker-images/4.1/alpine313/Dockerfile +++ b/docker-images/4.1/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/4.1/nvidia2004/Dockerfile b/docker-images/4.1/nvidia2204/Dockerfile similarity index 99% rename from docker-images/4.1/nvidia2004/Dockerfile rename to docker-images/4.1/nvidia2204/Dockerfile index 0d40cf0a7..77784a1e4 100644 --- a/docker-images/4.1/nvidia2004/Dockerfile +++ b/docker-images/4.1/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=4.1.10 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.1/scratch313/Dockerfile b/docker-images/4.1/scratch317/Dockerfile similarity index 99% rename from docker-images/4.1/scratch313/Dockerfile rename to docker-images/4.1/scratch317/Dockerfile index d0007afcd..bf2073d38 100644 --- a/docker-images/4.1/scratch313/Dockerfile +++ b/docker-images/4.1/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/4.1/ubuntu2004/Dockerfile b/docker-images/4.1/ubuntu2004/Dockerfile deleted file mode 100644 index 590045981..000000000 --- a/docker-images/4.1/ubuntu2004/Dockerfile +++ /dev/null @@ -1,598 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.1.10 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --enable-fontconfig \ - --enable-gpl \ - --enable-libaom \ - --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-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/4.1/ubuntu1804/Dockerfile b/docker-images/4.1/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/4.1/ubuntu1804/Dockerfile rename to docker-images/4.1/ubuntu2204/Dockerfile index f3ca5e51b..95e495db6 100644 --- a/docker-images/4.1/ubuntu1804/Dockerfile +++ b/docker-images/4.1/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.1/vaapi2004/Dockerfile b/docker-images/4.1/vaapi2204/Dockerfile similarity index 99% rename from docker-images/4.1/vaapi2004/Dockerfile rename to docker-images/4.1/vaapi2204/Dockerfile index 4f5228ef9..168ec4557 100644 --- a/docker-images/4.1/vaapi2004/Dockerfile +++ b/docker-images/4.1/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:20.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -74,8 +74,6 @@ ARG PREFIX=/opt/ffmpeg ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64" -ARG DEBIAN_FRONTEND=noninteractive - RUN buildDeps="autoconf \ automake \ cmake \ @@ -88,11 +86,10 @@ RUN buildDeps="autoconf \ gperf \ libtool \ make \ - meson \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/4.2/alpine313/Dockerfile b/docker-images/4.2/alpine317/Dockerfile similarity index 99% rename from docker-images/4.2/alpine313/Dockerfile rename to docker-images/4.2/alpine317/Dockerfile index 52f3c5dc2..1d7f3f296 100644 --- a/docker-images/4.2/alpine313/Dockerfile +++ b/docker-images/4.2/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/4.2/nvidia2004/Dockerfile b/docker-images/4.2/nvidia2204/Dockerfile similarity index 99% rename from docker-images/4.2/nvidia2004/Dockerfile rename to docker-images/4.2/nvidia2204/Dockerfile index 24d8af938..93dc60918 100644 --- a/docker-images/4.2/nvidia2004/Dockerfile +++ b/docker-images/4.2/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=4.2.8 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.2/scratch313/Dockerfile b/docker-images/4.2/scratch317/Dockerfile similarity index 99% rename from docker-images/4.2/scratch313/Dockerfile rename to docker-images/4.2/scratch317/Dockerfile index fd66c3b29..c6978c741 100644 --- a/docker-images/4.2/scratch313/Dockerfile +++ b/docker-images/4.2/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/4.2/ubuntu2004/Dockerfile b/docker-images/4.2/ubuntu2004/Dockerfile deleted file mode 100644 index 7ff0890dd..000000000 --- a/docker-images/4.2/ubuntu2004/Dockerfile +++ /dev/null @@ -1,599 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.2.8 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/4.2/ubuntu1804/Dockerfile b/docker-images/4.2/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/4.2/ubuntu1804/Dockerfile rename to docker-images/4.2/ubuntu2204/Dockerfile index a6b1c535f..ea10f96cf 100644 --- a/docker-images/4.2/ubuntu1804/Dockerfile +++ b/docker-images/4.2/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.2/vaapi2004/Dockerfile b/docker-images/4.2/vaapi2004/Dockerfile deleted file mode 100644 index 08ab25bac..000000000 --- a/docker-images/4.2/vaapi2004/Dockerfile +++ /dev/null @@ -1,606 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.2.8 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/4.4/vaapi1804/Dockerfile b/docker-images/4.2/vaapi2204/Dockerfile similarity index 99% rename from docker-images/4.4/vaapi1804/Dockerfile rename to docker-images/4.2/vaapi2204/Dockerfile index 8809a00d6..ea04c91c2 100644 --- a/docker-images/4.4/vaapi1804/Dockerfile +++ b/docker-images/4.2/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -16,7 +16,7 @@ RUN apt-get -yqq update && \ FROM base as build -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.2.8 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/4.4/alpine313/Dockerfile b/docker-images/4.3/alpine317/Dockerfile similarity index 99% rename from docker-images/4.4/alpine313/Dockerfile rename to docker-images/4.3/alpine317/Dockerfile index 01d9fce53..3af54d7fe 100644 --- a/docker-images/4.4/alpine313/Dockerfile +++ b/docker-images/4.3/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git @@ -13,7 +13,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.3/centos7/Dockerfile b/docker-images/4.3/centos7/Dockerfile index 773390c0f..ddc979366 100644 --- a/docker-images/4.3/centos7/Dockerfile +++ b/docker-images/4.3/centos7/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.3/centos8/Dockerfile b/docker-images/4.3/centos8/Dockerfile index b75ca82a6..41d3fec2d 100644 --- a/docker-images/4.3/centos8/Dockerfile +++ b/docker-images/4.3/centos8/Dockerfile @@ -17,7 +17,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.4/nvidia2004/Dockerfile b/docker-images/4.3/nvidia2204/Dockerfile similarity index 99% rename from docker-images/4.4/nvidia2004/Dockerfile rename to docker-images/4.3/nvidia2204/Dockerfile index fe7b63664..0d4215add 100644 --- a/docker-images/4.4/nvidia2004/Dockerfile +++ b/docker-images/4.3/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,9 +31,9 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.3/rockylinux8/Dockerfile b/docker-images/4.3/rockylinux8/Dockerfile index 9b5c37827..f9f612538 100644 --- a/docker-images/4.3/rockylinux8/Dockerfile +++ b/docker-images/4.3/rockylinux8/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.4/scratch313/Dockerfile b/docker-images/4.3/scratch317/Dockerfile similarity index 99% rename from docker-images/4.4/scratch313/Dockerfile rename to docker-images/4.3/scratch317/Dockerfile index 71ce34594..a5cce96ea 100644 --- a/docker-images/4.4/scratch313/Dockerfile +++ b/docker-images/4.3/scratch317/Dockerfile @@ -4,11 +4,11 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.3/ubuntu2004/Dockerfile b/docker-images/4.3/ubuntu2004/Dockerfile deleted file mode 100644 index 99a5b5f0e..000000000 --- a/docker-images/4.3/ubuntu2004/Dockerfile +++ /dev/null @@ -1,600 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.3.5 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/4.4/ubuntu1804/Dockerfile b/docker-images/4.3/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/4.4/ubuntu1804/Dockerfile rename to docker-images/4.3/ubuntu2204/Dockerfile index 1b11305aa..5bacfde7b 100644 --- a/docker-images/4.4/ubuntu1804/Dockerfile +++ b/docker-images/4.3/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -16,7 +16,7 @@ RUN apt-get -yqq update && \ FROM base as build -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.3/vaapi2004/Dockerfile b/docker-images/4.3/vaapi2004/Dockerfile deleted file mode 100644 index 94ba2e24a..000000000 --- a/docker-images/4.3/vaapi2004/Dockerfile +++ /dev/null @@ -1,607 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.3.5 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/4.3/vaapi1804/Dockerfile b/docker-images/4.3/vaapi2204/Dockerfile similarity index 99% rename from docker-images/4.3/vaapi1804/Dockerfile rename to docker-images/4.3/vaapi2204/Dockerfile index dc351ec1f..fa6c5bbeb 100644 --- a/docker-images/4.3/vaapi1804/Dockerfile +++ b/docker-images/4.3/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -16,7 +16,7 @@ RUN apt-get -yqq update && \ FROM base as build -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.3.6 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/4.3/alpine313/Dockerfile b/docker-images/4.4/alpine317/Dockerfile similarity index 99% rename from docker-images/4.3/alpine313/Dockerfile rename to docker-images/4.4/alpine317/Dockerfile index a8a2a71f5..70093681c 100644 --- a/docker-images/4.3/alpine313/Dockerfile +++ b/docker-images/4.4/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git @@ -13,7 +13,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.4/centos7/Dockerfile b/docker-images/4.4/centos7/Dockerfile index 062d22fbf..fefe6c2a1 100644 --- a/docker-images/4.4/centos7/Dockerfile +++ b/docker-images/4.4/centos7/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.4/centos8/Dockerfile b/docker-images/4.4/centos8/Dockerfile index 223c5bc6c..a1f985803 100644 --- a/docker-images/4.4/centos8/Dockerfile +++ b/docker-images/4.4/centos8/Dockerfile @@ -17,7 +17,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.3/nvidia2004/Dockerfile b/docker-images/4.4/nvidia2204/Dockerfile similarity index 99% rename from docker-images/4.3/nvidia2004/Dockerfile rename to docker-images/4.4/nvidia2204/Dockerfile index 5dd3ed297..5b21da496 100644 --- a/docker-images/4.3/nvidia2004/Dockerfile +++ b/docker-images/4.4/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,9 +31,9 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.4/rockylinux8/Dockerfile b/docker-images/4.4/rockylinux8/Dockerfile index 910c29c99..6c8d5588a 100644 --- a/docker-images/4.4/rockylinux8/Dockerfile +++ b/docker-images/4.4/rockylinux8/Dockerfile @@ -15,7 +15,7 @@ FROM base AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.4.3 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.3/scratch313/Dockerfile b/docker-images/4.4/scratch317/Dockerfile similarity index 99% rename from docker-images/4.3/scratch313/Dockerfile rename to docker-images/4.4/scratch317/Dockerfile index 1ca0c5206..7d5aceb27 100644 --- a/docker-images/4.3/scratch313/Dockerfile +++ b/docker-images/4.4/scratch317/Dockerfile @@ -4,11 +4,11 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ diff --git a/docker-images/4.4/ubuntu2004/Dockerfile b/docker-images/4.4/ubuntu2004/Dockerfile deleted file mode 100644 index 39c79cae3..000000000 --- a/docker-images/4.4/ubuntu2004/Dockerfile +++ /dev/null @@ -1,600 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.4.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/4.3/ubuntu1804/Dockerfile b/docker-images/4.4/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/4.3/ubuntu1804/Dockerfile rename to docker-images/4.4/ubuntu2204/Dockerfile index 194638734..e45361ef8 100644 --- a/docker-images/4.3/ubuntu1804/Dockerfile +++ b/docker-images/4.4/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -16,7 +16,7 @@ RUN apt-get -yqq update && \ FROM base as build -ENV FFMPEG_VERSION=4.3.5 \ +ENV FFMPEG_VERSION=4.4.4 \ AOM_VERSION=v1.0.0 \ CHROMAPRINT_VERSION=1.5.0 \ FDKAAC_VERSION=0.1.5 \ @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/4.4/vaapi2004/Dockerfile b/docker-images/4.4/vaapi2004/Dockerfile deleted file mode 100644 index f117c8858..000000000 --- a/docker-images/4.4/vaapi2004/Dockerfile +++ /dev/null @@ -1,607 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=4.4.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --enable-avresample \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/4.4/vaapi2204/Dockerfile b/docker-images/4.4/vaapi2204/Dockerfile new file mode 100644 index 000000000..52b567cd5 --- /dev/null +++ b/docker-images/4.4/vaapi2204/Dockerfile @@ -0,0 +1,603 @@ +# ffmpeg - http://ffmpeg.org/download.html +# +# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu +# +# https://hub.docker.com/r/jrottenberg/ffmpeg/ +# +# +FROM ubuntu:22.04 AS base + +WORKDIR /tmp/workdir + +RUN apt-get -yqq update && \ + apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ + apt-get autoremove -y && \ + apt-get clean -y + +FROM base as build + +ENV FFMPEG_VERSION=4.4.4 \ + 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" +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" +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 \ + cmake \ + curl \ + bzip2 \ + libexpat1-dev \ + g++ \ + gcc \ + git \ + gperf \ + libtool \ + make \ + nasm \ + perl \ + pkg-config \ + python3 \ + libssl-dev \ + yasm \ + libva-dev \ + zlib1g-dev" && \ + apt-get -yqq update && \ + apt-get install -yq --no-install-recommends ${buildDeps} +## 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://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} +## 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://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 "/^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://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} +### 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" && \ + 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/ +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 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/ +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} + +## 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 -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} + +## 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} + +## 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 && \ + ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ + make ; make install + + + + + +## Build ffmpeg https://ffmpeg.org/ +RUN \ + DIR=/tmp/ffmpeg && cd ${DIR} && \ + ./configure \ + --disable-debug \ + --disable-doc \ + --disable-ffplay \ + --enable-avresample \ + --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-libwebp \ + --enable-libx264 \ + --enable-libx265 \ + --enable-libxcb \ + --enable-libxvid \ + --enable-libzmq \ + --enable-nonfree \ + --enable-openssl \ + --enable-postproc \ + --enable-shared \ + --enable-small \ + --enable-vaapi \ + --enable-version3 \ + --extra-cflags="-I${PREFIX}/include" \ + --extra-ldflags="-L${PREFIX}/lib" \ + --extra-libs=-ldl \ + --extra-libs=-lpthread \ + --prefix="${PREFIX}" && \ + 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/ + +## cleanup +RUN \ + ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ + for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ + cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ + mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ + done + +FROM base AS release +LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ + org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg + +ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 + +CMD ["--help"] +ENTRYPOINT ["ffmpeg"] + +COPY --from=build /usr/local /usr/local/ + +RUN \ + apt-get update -y && \ + apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ + rm -rf /var/lib/apt/lists/* + +# Let's make sure the app built correctly +# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/5.0/alpine313/Dockerfile b/docker-images/5.0/alpine317/Dockerfile similarity index 99% rename from docker-images/5.0/alpine313/Dockerfile rename to docker-images/5.0/alpine317/Dockerfile index eefa56529..5a33f963c 100644 --- a/docker-images/5.0/alpine313/Dockerfile +++ b/docker-images/5.0/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/5.0/nvidia2004/Dockerfile b/docker-images/5.0/nvidia2204/Dockerfile similarity index 99% rename from docker-images/5.0/nvidia2004/Dockerfile rename to docker-images/5.0/nvidia2204/Dockerfile index 494f343f7..42ef57562 100644 --- a/docker-images/5.0/nvidia2004/Dockerfile +++ b/docker-images/5.0/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=5.0.3 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/5.0/scratch313/Dockerfile b/docker-images/5.0/scratch317/Dockerfile similarity index 99% rename from docker-images/5.0/scratch313/Dockerfile rename to docker-images/5.0/scratch317/Dockerfile index 017281443..cf3d718ed 100644 --- a/docker-images/5.0/scratch313/Dockerfile +++ b/docker-images/5.0/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/5.0/ubuntu2004/Dockerfile b/docker-images/5.0/ubuntu2004/Dockerfile deleted file mode 100644 index e8902ffc2..000000000 --- a/docker-images/5.0/ubuntu2004/Dockerfile +++ /dev/null @@ -1,599 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=5.0.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/5.0/ubuntu1804/Dockerfile b/docker-images/5.0/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/5.0/ubuntu1804/Dockerfile rename to docker-images/5.0/ubuntu2204/Dockerfile index 787bc5f6d..16f12cc4a 100644 --- a/docker-images/5.0/ubuntu1804/Dockerfile +++ b/docker-images/5.0/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/5.0/vaapi2004/Dockerfile b/docker-images/5.0/vaapi2004/Dockerfile deleted file mode 100644 index 18308a538..000000000 --- a/docker-images/5.0/vaapi2004/Dockerfile +++ /dev/null @@ -1,606 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=5.0.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/5.0/vaapi1804/Dockerfile b/docker-images/5.0/vaapi2204/Dockerfile similarity index 99% rename from docker-images/5.0/vaapi1804/Dockerfile rename to docker-images/5.0/vaapi2204/Dockerfile index e29883199..11ce72bd8 100644 --- a/docker-images/5.0/vaapi1804/Dockerfile +++ b/docker-images/5.0/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/5.1/alpine313/Dockerfile b/docker-images/5.1/alpine317/Dockerfile similarity index 99% rename from docker-images/5.1/alpine313/Dockerfile rename to docker-images/5.1/alpine317/Dockerfile index 2448546d5..b72b53ba2 100644 --- a/docker-images/5.1/alpine313/Dockerfile +++ b/docker-images/5.1/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/5.1/nvidia2004/Dockerfile b/docker-images/5.1/nvidia2204/Dockerfile similarity index 99% rename from docker-images/5.1/nvidia2004/Dockerfile rename to docker-images/5.1/nvidia2204/Dockerfile index 986bd4aaa..ad82e7455 100644 --- a/docker-images/5.1/nvidia2004/Dockerfile +++ b/docker-images/5.1/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=5.1.3 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/5.1/scratch313/Dockerfile b/docker-images/5.1/scratch317/Dockerfile similarity index 99% rename from docker-images/5.1/scratch313/Dockerfile rename to docker-images/5.1/scratch317/Dockerfile index 4d1c21768..9f8286219 100644 --- a/docker-images/5.1/scratch313/Dockerfile +++ b/docker-images/5.1/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/5.1/ubuntu2004/Dockerfile b/docker-images/5.1/ubuntu2004/Dockerfile deleted file mode 100644 index e4a44d2ee..000000000 --- a/docker-images/5.1/ubuntu2004/Dockerfile +++ /dev/null @@ -1,599 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=5.1.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/5.1/ubuntu1804/Dockerfile b/docker-images/5.1/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/5.1/ubuntu1804/Dockerfile rename to docker-images/5.1/ubuntu2204/Dockerfile index 6a4ddc93e..cd91e5016 100644 --- a/docker-images/5.1/ubuntu1804/Dockerfile +++ b/docker-images/5.1/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/5.1/vaapi2004/Dockerfile b/docker-images/5.1/vaapi2004/Dockerfile deleted file mode 100644 index 52c19dba3..000000000 --- a/docker-images/5.1/vaapi2004/Dockerfile +++ /dev/null @@ -1,606 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=5.1.3 \ - 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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/5.1/vaapi1804/Dockerfile b/docker-images/5.1/vaapi2204/Dockerfile similarity index 99% rename from docker-images/5.1/vaapi1804/Dockerfile rename to docker-images/5.1/vaapi2204/Dockerfile index 3423e8b89..db9990cf3 100644 --- a/docker-images/5.1/vaapi1804/Dockerfile +++ b/docker-images/5.1/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/6.0/alpine313/Dockerfile b/docker-images/6.0/alpine317/Dockerfile similarity index 99% rename from docker-images/6.0/alpine313/Dockerfile rename to docker-images/6.0/alpine317/Dockerfile index bd4adb870..7221af506 100644 --- a/docker-images/6.0/alpine313/Dockerfile +++ b/docker-images/6.0/alpine317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/docker-images/6.0/nvidia2004/Dockerfile b/docker-images/6.0/nvidia2204/Dockerfile similarity index 99% rename from docker-images/6.0/nvidia2004/Dockerfile rename to docker-images/6.0/nvidia2204/Dockerfile index b44223e05..4400c756b 100644 --- a/docker-images/6.0/nvidia2004/Dockerfile +++ b/docker-images/6.0/nvidia2204/Dockerfile @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV FFMPEG_VERSION=6.0 \ AOM_VERSION=v1.0.0 \ @@ -106,7 +106,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/6.0/scratch313/Dockerfile b/docker-images/6.0/scratch317/Dockerfile similarity index 99% rename from docker-images/6.0/scratch313/Dockerfile rename to docker-images/6.0/scratch317/Dockerfile index 98ea3f94a..5aee532a5 100644 --- a/docker-images/6.0/scratch313/Dockerfile +++ b/docker-images/6.0/scratch317/Dockerfile @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/docker-images/6.0/ubuntu2004/Dockerfile b/docker-images/6.0/ubuntu2004/Dockerfile deleted file mode 100644 index cbce883f6..000000000 --- a/docker-images/6.0/ubuntu2004/Dockerfile +++ /dev/null @@ -1,599 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=6.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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/docker-images/6.0/ubuntu1804/Dockerfile b/docker-images/6.0/ubuntu2204/Dockerfile similarity index 99% rename from docker-images/6.0/ubuntu1804/Dockerfile rename to docker-images/6.0/ubuntu2204/Dockerfile index 29a2578d2..7eeb0ab0d 100644 --- a/docker-images/6.0/ubuntu1804/Dockerfile +++ b/docker-images/6.0/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/docker-images/6.0/vaapi2004/Dockerfile b/docker-images/6.0/vaapi2004/Dockerfile deleted file mode 100644 index a862201b4..000000000 --- a/docker-images/6.0/vaapi2004/Dockerfile +++ /dev/null @@ -1,606 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV FFMPEG_VERSION=6.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" -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" -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" - - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -## 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://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} -## 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://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 "/^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://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} -### 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" && \ - 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/ -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 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/ -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} - -## 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 -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} - -## 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} - -## 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 && \ - ./configure --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-gpl --extra-libs=-ldl && \ - make ; make install - - - - - -## Build ffmpeg https://ffmpeg.org/ -RUN \ - DIR=/tmp/ffmpeg && cd ${DIR} && \ - ./configure \ - --disable-debug \ - --disable-doc \ - --disable-ffplay \ - --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-libvmaf \ - --enable-libvorbis \ - --enable-libvpx \ - --enable-libwebp \ - --enable-libx264 \ - --enable-libx265 \ - --enable-libxcb \ - --enable-libxvid \ - --enable-libzmq \ - --enable-nonfree \ - --enable-openssl \ - --enable-postproc \ - --enable-shared \ - --enable-small \ - --enable-vaapi \ - --enable-version3 \ - --extra-cflags="-I${PREFIX}/include" \ - --extra-ldflags="-L${PREFIX}/lib" \ - --extra-libs=-ldl \ - --extra-libs=-lpthread \ - --prefix="${PREFIX}" && \ - 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/ - -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/docker-images/6.0/vaapi1804/Dockerfile b/docker-images/6.0/vaapi2204/Dockerfile similarity index 99% rename from docker-images/6.0/vaapi1804/Dockerfile rename to docker-images/6.0/vaapi2204/Dockerfile index bd6d6f0df..d20e295c6 100644 --- a/docker-images/6.0/vaapi1804/Dockerfile +++ b/docker-images/6.0/vaapi2204/Dockerfile @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -89,7 +89,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/docker-images/azure-jobs.yml b/docker-images/azure-jobs.yml index 381dba97d..d5b36f40c 100644 --- a/docker-images/azure-jobs.yml +++ b/docker-images/azure-jobs.yml @@ -8,29 +8,20 @@ jobs: maxParallel: 10 matrix: - ubuntu1804_6.0: + ubuntu2204_6.0: MAJOR_VERSION: 6 VERSION: 6.0 LONG_VERSION: 6.0 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_6.0: - MAJOR_VERSION: 6 - VERSION: 6.0 - LONG_VERSION: 6.0 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_6.0: + alpine317_6.0: MAJOR_VERSION: 6 VERSION: 6.0 LONG_VERSION: 6.0 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -53,38 +44,29 @@ jobs: ISPARENT: True - scratch313_6.0: + scratch317_6.0: MAJOR_VERSION: 6 VERSION: 6.0 LONG_VERSION: 6.0 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi1804_6.0: - MAJOR_VERSION: 6 - VERSION: 6.0 - LONG_VERSION: 6.0 - VARIANT: vaapi1804 - PARENT: vaapi - ISPARENT: False - - - vaapi2004_6.0: + vaapi2204_6.0: MAJOR_VERSION: 6 VERSION: 6.0 LONG_VERSION: 6.0 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_6.0: + nvidia2204_6.0: MAJOR_VERSION: 6 VERSION: 6.0 LONG_VERSION: 6.0 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -98,29 +80,20 @@ jobs: ISPARENT: True - ubuntu1804_5.1.3: + ubuntu2204_5.1.3: MAJOR_VERSION: 5 VERSION: 5.1 LONG_VERSION: 5.1.3 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_5.1.3: - MAJOR_VERSION: 5 - VERSION: 5.1 - LONG_VERSION: 5.1.3 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_5.1.3: + alpine317_5.1.3: MAJOR_VERSION: 5 VERSION: 5.1 LONG_VERSION: 5.1.3 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -143,38 +116,29 @@ jobs: ISPARENT: True - scratch313_5.1.3: + scratch317_5.1.3: MAJOR_VERSION: 5 VERSION: 5.1 LONG_VERSION: 5.1.3 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi1804_5.1.3: - MAJOR_VERSION: 5 - VERSION: 5.1 - LONG_VERSION: 5.1.3 - VARIANT: vaapi1804 - PARENT: vaapi - ISPARENT: False - - - vaapi2004_5.1.3: + vaapi2204_5.1.3: MAJOR_VERSION: 5 VERSION: 5.1 LONG_VERSION: 5.1.3 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_5.1.3: + nvidia2204_5.1.3: MAJOR_VERSION: 5 VERSION: 5.1 LONG_VERSION: 5.1.3 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -188,29 +152,20 @@ jobs: ISPARENT: True - ubuntu1804_5.0.3: - MAJOR_VERSION: 5 - VERSION: 5.0 - LONG_VERSION: 5.0.3 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_5.0.3: + ubuntu2204_5.0.3: MAJOR_VERSION: 5 VERSION: 5.0 LONG_VERSION: 5.0.3 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_5.0.3: + alpine317_5.0.3: MAJOR_VERSION: 5 VERSION: 5.0 LONG_VERSION: 5.0.3 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -233,38 +188,29 @@ jobs: ISPARENT: True - scratch313_5.0.3: + scratch317_5.0.3: MAJOR_VERSION: 5 VERSION: 5.0 LONG_VERSION: 5.0.3 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi1804_5.0.3: + vaapi2204_5.0.3: MAJOR_VERSION: 5 VERSION: 5.0 LONG_VERSION: 5.0.3 - VARIANT: vaapi1804 - PARENT: vaapi - ISPARENT: False - - - vaapi2004_5.0.3: - MAJOR_VERSION: 5 - VERSION: 5.0 - LONG_VERSION: 5.0.3 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_5.0.3: + nvidia2204_5.0.3: MAJOR_VERSION: 5 VERSION: 5.0 LONG_VERSION: 5.0.3 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -278,209 +224,164 @@ jobs: ISPARENT: True - ubuntu1804_4.4.3: + ubuntu2204_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_4.4.3: - MAJOR_VERSION: 4 - VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: ubuntu2004 + LONG_VERSION: 4.4.4 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_4.4.3: + alpine317_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: alpine313 + LONG_VERSION: 4.4.4 + VARIANT: alpine317 PARENT: alpine ISPARENT: True - centos7_4.4.3: + centos7_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 + LONG_VERSION: 4.4.4 VARIANT: centos7 PARENT: centos ISPARENT: False - centos8_4.4.3: + centos8_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 + LONG_VERSION: 4.4.4 VARIANT: centos8 PARENT: centos ISPARENT: True - scratch313_4.4.3: + scratch317_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: scratch313 + LONG_VERSION: 4.4.4 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi1804_4.4.3: + vaapi2204_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: vaapi1804 - PARENT: vaapi - ISPARENT: False - - - vaapi2004_4.4.3: - MAJOR_VERSION: 4 - VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: vaapi2004 + LONG_VERSION: 4.4.4 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_4.4.3: + nvidia2204_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 - VARIANT: nvidia2004 + LONG_VERSION: 4.4.4 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True - rockylinux8_4.4.3: + rockylinux8_4.4.4: MAJOR_VERSION: 4 VERSION: 4.4 - LONG_VERSION: 4.4.3 + LONG_VERSION: 4.4.4 VARIANT: rockylinux8 PARENT: rockylinux ISPARENT: True - ubuntu1804_4.3.5: - MAJOR_VERSION: 4 - VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_4.3.5: + ubuntu2204_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: ubuntu2004 + LONG_VERSION: 4.3.6 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_4.3.5: + alpine317_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: alpine313 + LONG_VERSION: 4.3.6 + VARIANT: alpine317 PARENT: alpine ISPARENT: True - centos7_4.3.5: + centos7_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 + LONG_VERSION: 4.3.6 VARIANT: centos7 PARENT: centos ISPARENT: False - centos8_4.3.5: + centos8_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 + LONG_VERSION: 4.3.6 VARIANT: centos8 PARENT: centos ISPARENT: True - scratch313_4.3.5: + scratch317_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: scratch313 + LONG_VERSION: 4.3.6 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi1804_4.3.5: - MAJOR_VERSION: 4 - VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: vaapi1804 - PARENT: vaapi - ISPARENT: False - - - vaapi2004_4.3.5: + vaapi2204_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: vaapi2004 + LONG_VERSION: 4.3.6 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_4.3.5: + nvidia2204_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 - VARIANT: nvidia2004 + LONG_VERSION: 4.3.6 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True - rockylinux8_4.3.5: + rockylinux8_4.3.6: MAJOR_VERSION: 4 VERSION: 4.3 - LONG_VERSION: 4.3.5 + LONG_VERSION: 4.3.6 VARIANT: rockylinux8 PARENT: rockylinux ISPARENT: True - ubuntu1804_4.2.8: + ubuntu2204_4.2.8: MAJOR_VERSION: 4 VERSION: 4.2 LONG_VERSION: 4.2.8 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_4.2.8: - MAJOR_VERSION: 4 - VERSION: 4.2 - LONG_VERSION: 4.2.8 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_4.2.8: + alpine317_4.2.8: MAJOR_VERSION: 4 VERSION: 4.2 LONG_VERSION: 4.2.8 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -503,29 +404,29 @@ jobs: ISPARENT: True - scratch313_4.2.8: + scratch317_4.2.8: MAJOR_VERSION: 4 VERSION: 4.2 LONG_VERSION: 4.2.8 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi2004_4.2.8: + vaapi2204_4.2.8: MAJOR_VERSION: 4 VERSION: 4.2 LONG_VERSION: 4.2.8 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_4.2.8: + nvidia2204_4.2.8: MAJOR_VERSION: 4 VERSION: 4.2 LONG_VERSION: 4.2.8 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -539,29 +440,20 @@ jobs: ISPARENT: True - ubuntu1804_4.1.10: + ubuntu2204_4.1.10: MAJOR_VERSION: 4 VERSION: 4.1 LONG_VERSION: 4.1.10 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_4.1.10: - MAJOR_VERSION: 4 - VERSION: 4.1 - LONG_VERSION: 4.1.10 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_4.1.10: + alpine317_4.1.10: MAJOR_VERSION: 4 VERSION: 4.1 LONG_VERSION: 4.1.10 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -584,29 +476,29 @@ jobs: ISPARENT: True - scratch313_4.1.10: + scratch317_4.1.10: MAJOR_VERSION: 4 VERSION: 4.1 LONG_VERSION: 4.1.10 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi2004_4.1.10: + vaapi2204_4.1.10: MAJOR_VERSION: 4 VERSION: 4.1 LONG_VERSION: 4.1.10 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_4.1.10: + nvidia2204_4.1.10: MAJOR_VERSION: 4 VERSION: 4.1 LONG_VERSION: 4.1.10 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -620,110 +512,92 @@ jobs: ISPARENT: True - ubuntu1804_4.0.6: - MAJOR_VERSION: 4 - VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_4.0.6: + ubuntu2204_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: ubuntu2004 + LONG_VERSION: 4.0.5 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_4.0.6: + alpine317_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: alpine313 + LONG_VERSION: 4.0.5 + VARIANT: alpine317 PARENT: alpine ISPARENT: True - centos7_4.0.6: + centos7_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 + LONG_VERSION: 4.0.5 VARIANT: centos7 PARENT: centos ISPARENT: False - centos8_4.0.6: + centos8_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 + LONG_VERSION: 4.0.5 VARIANT: centos8 PARENT: centos ISPARENT: True - scratch313_4.0.6: + scratch317_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: scratch313 + LONG_VERSION: 4.0.5 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi2004_4.0.6: + vaapi2204_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: vaapi2004 + LONG_VERSION: 4.0.5 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_4.0.6: + nvidia2204_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 - VARIANT: nvidia2004 + LONG_VERSION: 4.0.5 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True - rockylinux8_4.0.6: + rockylinux8_4.0.5: MAJOR_VERSION: 4 VERSION: 4.0 - LONG_VERSION: 4.0.6 + LONG_VERSION: 4.0.5 VARIANT: rockylinux8 PARENT: rockylinux ISPARENT: True - ubuntu1804_3.4.12: + ubuntu2204_3.4.12: MAJOR_VERSION: 3 VERSION: 3.4 LONG_VERSION: 3.4.12 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_3.4.12: - MAJOR_VERSION: 3 - VERSION: 3.4 - LONG_VERSION: 3.4.12 - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: ubuntu ISPARENT: True - alpine313_3.4.12: + alpine317_3.4.12: MAJOR_VERSION: 3 VERSION: 3.4 LONG_VERSION: 3.4.12 - VARIANT: alpine313 + VARIANT: alpine317 PARENT: alpine ISPARENT: True @@ -746,29 +620,29 @@ jobs: ISPARENT: True - scratch313_3.4.12: + scratch317_3.4.12: MAJOR_VERSION: 3 VERSION: 3.4 LONG_VERSION: 3.4.12 - VARIANT: scratch313 + VARIANT: scratch317 PARENT: scratch ISPARENT: True - vaapi2004_3.4.12: + vaapi2204_3.4.12: MAJOR_VERSION: 3 VERSION: 3.4 LONG_VERSION: 3.4.12 - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: vaapi ISPARENT: True - nvidia2004_3.4.12: + nvidia2204_3.4.12: MAJOR_VERSION: 3 VERSION: 3.4 LONG_VERSION: 3.4.12 - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: nvidia ISPARENT: True @@ -781,140 +655,5 @@ jobs: PARENT: rockylinux ISPARENT: True - - ubuntu1804_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: ubuntu1804 - PARENT: ubuntu - ISPARENT: False - - - ubuntu2004_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: ubuntu2004 - PARENT: ubuntu - ISPARENT: True - - - alpine313_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: alpine313 - PARENT: alpine - ISPARENT: True - - - centos7_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: centos7 - PARENT: centos - ISPARENT: False - - - centos8_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: centos8 - PARENT: centos - ISPARENT: True - - - scratch313_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: scratch313 - PARENT: scratch - ISPARENT: True - - - vaapi2004_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: vaapi2004 - PARENT: vaapi - ISPARENT: True - - - nvidia2004_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: nvidia2004 - PARENT: nvidia - ISPARENT: True - - - rockylinux8_3.3.9: - MAJOR_VERSION: 3 - VERSION: 3.3 - LONG_VERSION: 3.3.9 - VARIANT: rockylinux8 - PARENT: rockylinux - ISPARENT: True - - - ubuntu2004_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: ubuntu2004 - PARENT: ubuntu - ISPARENT: True - - - alpine313_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: alpine313 - PARENT: alpine - ISPARENT: True - - - centos7_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: centos7 - PARENT: centos - ISPARENT: True - - - scratch313_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: scratch313 - PARENT: scratch - ISPARENT: True - - - vaapi2004_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: vaapi2004 - PARENT: vaapi - ISPARENT: True - - - rockylinux8_3.2.19: - MAJOR_VERSION: 3 - VERSION: 3.2 - LONG_VERSION: 3.2.19 - VARIANT: rockylinux8 - PARENT: rockylinux - ISPARENT: True - steps: - template: ../azure-steps.yml diff --git a/docker-images/gitlab-ci.yml b/docker-images/gitlab-ci.yml index c318971fb..03222ae51 100644 --- a/docker-images/gitlab-ci.yml +++ b/docker-images/gitlab-ci.yml @@ -8,36 +8,25 @@ stages: - ubuntu - vaapi -6.0-ubuntu1804: +6.0-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 6 VERSION: "6.0" LONG_VERSION: "6.0" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -6.0-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 6 - VERSION: "6.0" - LONG_VERSION: "6.0" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -6.0-alpine313: +6.0-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 6 VERSION: "6.0" LONG_VERSION: "6.0" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -63,47 +52,36 @@ stages: PARENT: "centos" ISPARENT: "True" -6.0-scratch313: +6.0-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 6 VERSION: "6.0" LONG_VERSION: "6.0" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -6.0-vaapi1804: +6.0-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 6 VERSION: "6.0" LONG_VERSION: "6.0" - VARIANT: vaapi1804 - PARENT: "vaapi" - ISPARENT: "False" - -6.0-vaapi2004: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 6 - VERSION: "6.0" - LONG_VERSION: "6.0" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -6.0-nvidia2004: +6.0-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 6 VERSION: "6.0" LONG_VERSION: "6.0" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -118,37 +96,25 @@ stages: PARENT: "rockylinux" ISPARENT: "True" - -5.1.3-ubuntu1804: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 5 - VERSION: "5.1" - LONG_VERSION: "5.1.3" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -5.1.3-ubuntu2004: +5.1.3-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 5 VERSION: "5.1" LONG_VERSION: "5.1.3" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -5.1.3-alpine313: +5.1.3-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 5 VERSION: "5.1" LONG_VERSION: "5.1.3" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -174,47 +140,36 @@ stages: PARENT: "centos" ISPARENT: "True" -5.1.3-scratch313: +5.1.3-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 5 VERSION: "5.1" LONG_VERSION: "5.1.3" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -5.1.3-vaapi1804: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 5 - VERSION: "5.1" - LONG_VERSION: "5.1.3" - VARIANT: vaapi1804 - PARENT: "vaapi" - ISPARENT: "False" - -5.1.3-vaapi2004: +5.1.3-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 5 VERSION: "5.1" LONG_VERSION: "5.1.3" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -5.1.3-nvidia2004: +5.1.3-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 5 VERSION: "5.1" LONG_VERSION: "5.1.3" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -229,36 +184,25 @@ stages: PARENT: "rockylinux" ISPARENT: "True" -5.0.3-ubuntu1804: +5.0.3-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 5 VERSION: "5.0" LONG_VERSION: "5.0.3" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -5.0.3-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 5 - VERSION: "5.0" - LONG_VERSION: "5.0.3" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -5.0.3-alpine313: +5.0.3-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 5 VERSION: "5.0" LONG_VERSION: "5.0.3" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -284,47 +228,36 @@ stages: PARENT: "centos" ISPARENT: "True" -5.0.3-scratch313: +5.0.3-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 5 VERSION: "5.0" LONG_VERSION: "5.0.3" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -5.0.3-vaapi1804: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 5 - VERSION: "5.0" - LONG_VERSION: "5.0.3" - VARIANT: vaapi1804 - PARENT: "vaapi" - ISPARENT: "False" - -5.0.3-vaapi2004: +5.0.3-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 5 VERSION: "5.0" LONG_VERSION: "5.0.3" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -5.0.3-nvidia2004: +5.0.3-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 5 VERSION: "5.0" LONG_VERSION: "5.0.3" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -339,256 +272,201 @@ stages: PARENT: "rockylinux" ISPARENT: "True" -4.4.3-ubuntu1804: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 4 - VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -4.4.3-ubuntu2004: +4.4.4-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: ubuntu2004 + LONG_VERSION: "4.4.4" + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -4.4.3-alpine313: +4.4.4-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: alpine313 + LONG_VERSION: "4.4.4" + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" -4.4.3-centos7: +4.4.4-centos7: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" + LONG_VERSION: "4.4.4" VARIANT: centos7 PARENT: "centos" ISPARENT: "False" -4.4.3-centos8: +4.4.4-centos8: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" + LONG_VERSION: "4.4.4" VARIANT: centos8 PARENT: "centos" ISPARENT: "True" -4.4.3-scratch313: +4.4.4-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: scratch313 + LONG_VERSION: "4.4.4" + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -4.4.3-vaapi1804: +4.4.4-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: vaapi1804 - PARENT: "vaapi" - ISPARENT: "False" - -4.4.3-vaapi2004: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 4 - VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: vaapi2004 + LONG_VERSION: "4.4.4" + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -4.4.3-nvidia2004: +4.4.4-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" - VARIANT: nvidia2004 + LONG_VERSION: "4.4.4" + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" -4.4.3-rockylinux8: +4.4.4-rockylinux8: extends: .docker stage: rockylinux variables: MAJOR_VERSION: 4 VERSION: "4.4" - LONG_VERSION: "4.4.3" + LONG_VERSION: "4.4.4" VARIANT: rockylinux8 PARENT: "rockylinux" ISPARENT: "True" -4.3.5-ubuntu1804: +4.3.6-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -4.3.5-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 4 - VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: ubuntu2004 + LONG_VERSION: "4.3.6" + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -4.3.5-alpine313: +4.3.6-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: alpine313 + LONG_VERSION: "4.3.6" + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" -4.3.5-centos7: +4.3.6-centos7: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" + LONG_VERSION: "4.3.6" VARIANT: centos7 PARENT: "centos" ISPARENT: "False" -4.3.5-centos8: +4.3.6-centos8: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" + LONG_VERSION: "4.3.6" VARIANT: centos8 PARENT: "centos" ISPARENT: "True" -4.3.5-scratch313: +4.3.6-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: scratch313 + LONG_VERSION: "4.3.6" + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -4.3.5-vaapi1804: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 4 - VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: vaapi1804 - PARENT: "vaapi" - ISPARENT: "False" - -4.3.5-vaapi2004: +4.3.6-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: vaapi2004 + LONG_VERSION: "4.3.6" + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -4.3.5-nvidia2004: +4.3.6-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" - VARIANT: nvidia2004 + LONG_VERSION: "4.3.6" + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" -4.3.5-rockylinux8: +4.3.6-rockylinux8: extends: .docker stage: rockylinux variables: MAJOR_VERSION: 4 VERSION: "4.3" - LONG_VERSION: "4.3.5" + LONG_VERSION: "4.3.6" VARIANT: rockylinux8 PARENT: "rockylinux" ISPARENT: "True" -4.2.8-ubuntu1804: +4.2.8-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 4 VERSION: "4.2" LONG_VERSION: "4.2.8" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -4.2.8-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 4 - VERSION: "4.2" - LONG_VERSION: "4.2.8" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -4.2.8-alpine313: +4.2.8-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 4 VERSION: "4.2" LONG_VERSION: "4.2.8" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -614,36 +492,36 @@ stages: PARENT: "centos" ISPARENT: "True" -4.2.8-scratch313: +4.2.8-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 4 VERSION: "4.2" LONG_VERSION: "4.2.8" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -4.2.8-vaapi2004: +4.2.8-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 4 VERSION: "4.2" LONG_VERSION: "4.2.8" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -4.2.8-nvidia2004: +4.2.8-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 4 VERSION: "4.2" LONG_VERSION: "4.2.8" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -658,36 +536,25 @@ stages: PARENT: "rockylinux" ISPARENT: "True" -4.1.10-ubuntu1804: +4.1.10-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 4 VERSION: "4.1" LONG_VERSION: "4.1.10" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -4.1.10-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 4 - VERSION: "4.1" - LONG_VERSION: "4.1.10" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -4.1.10-alpine313: +4.1.10-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 4 VERSION: "4.1" LONG_VERSION: "4.1.10" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -713,36 +580,36 @@ stages: PARENT: "centos" ISPARENT: "True" -4.1.10-scratch313: +4.1.10-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 4 VERSION: "4.1" LONG_VERSION: "4.1.10" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -4.1.10-vaapi2004: +4.1.10-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 4 VERSION: "4.1" LONG_VERSION: "4.1.10" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -4.1.10-nvidia2004: +4.1.10-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 4 VERSION: "4.1" LONG_VERSION: "4.1.10" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -757,135 +624,113 @@ stages: PARENT: "rockylinux" ISPARENT: "True" -4.0.6-ubuntu1804: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 4 - VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -4.0.6-ubuntu2004: +4.0.5-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: ubuntu2004 + LONG_VERSION: "4.0.5" + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -4.0.6-alpine313: +4.0.5-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: alpine313 + LONG_VERSION: "4.0.5" + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" -4.0.6-centos7: +4.0.5-centos7: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" + LONG_VERSION: "4.0.5" VARIANT: centos7 PARENT: "centos" ISPARENT: "False" -4.0.6-centos8: +4.0.5-centos8: extends: .docker stage: centos variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" + LONG_VERSION: "4.0.5" VARIANT: centos8 PARENT: "centos" ISPARENT: "True" -4.0.6-scratch313: +4.0.5-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: scratch313 + LONG_VERSION: "4.0.5" + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -4.0.6-vaapi2004: +4.0.5-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: vaapi2004 + LONG_VERSION: "4.0.5" + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -4.0.6-nvidia2004: +4.0.5-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" - VARIANT: nvidia2004 + LONG_VERSION: "4.0.5" + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" -4.0.6-rockylinux8: +4.0.5-rockylinux8: extends: .docker stage: rockylinux variables: MAJOR_VERSION: 4 VERSION: "4.0" - LONG_VERSION: "4.0.6" + LONG_VERSION: "4.0.5" VARIANT: rockylinux8 PARENT: "rockylinux" ISPARENT: "True" -3.4.12-ubuntu1804: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 3 - VERSION: "3.4" - LONG_VERSION: "3.4.12" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -3.4.12-ubuntu2004: +3.4.12-ubuntu2204: extends: .docker stage: ubuntu variables: MAJOR_VERSION: 3 VERSION: "3.4" LONG_VERSION: "3.4.12" - VARIANT: ubuntu2004 + VARIANT: ubuntu2204 PARENT: "ubuntu" ISPARENT: "True" -3.4.12-alpine313: +3.4.12-alpine317: extends: .docker stage: alpine variables: MAJOR_VERSION: 3 VERSION: "3.4" LONG_VERSION: "3.4.12" - VARIANT: alpine313 + VARIANT: alpine317 PARENT: "alpine" ISPARENT: "True" @@ -911,36 +756,36 @@ stages: PARENT: "centos" ISPARENT: "True" -3.4.12-scratch313: +3.4.12-scratch317: extends: .docker stage: scratch variables: MAJOR_VERSION: 3 VERSION: "3.4" LONG_VERSION: "3.4.12" - VARIANT: scratch313 + VARIANT: scratch317 PARENT: "scratch" ISPARENT: "True" -3.4.12-vaapi2004: +3.4.12-vaapi2204: extends: .docker stage: vaapi variables: MAJOR_VERSION: 3 VERSION: "3.4" LONG_VERSION: "3.4.12" - VARIANT: vaapi2004 + VARIANT: vaapi2204 PARENT: "vaapi" ISPARENT: "True" -3.4.12-nvidia2004: +3.4.12-nvidia2204: extends: .docker stage: nvidia variables: MAJOR_VERSION: 3 VERSION: "3.4" LONG_VERSION: "3.4.12" - VARIANT: nvidia2004 + VARIANT: nvidia2204 PARENT: "nvidia" ISPARENT: "True" @@ -954,168 +799,3 @@ stages: VARIANT: rockylinux8 PARENT: "rockylinux" ISPARENT: "True" - -3.3.9-ubuntu1804: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: ubuntu1804 - PARENT: "ubuntu" - ISPARENT: "False" - -3.3.9-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: ubuntu2004 - PARENT: "ubuntu" - ISPARENT: "True" - -3.3.9-alpine313: - extends: .docker - stage: alpine - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: alpine313 - PARENT: "alpine" - ISPARENT: "True" - -3.3.9-centos7: - extends: .docker - stage: centos - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: centos7 - PARENT: "centos" - ISPARENT: "False" - -3.3.9-centos8: - extends: .docker - stage: centos - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: centos8 - PARENT: "centos" - ISPARENT: "True" - -3.3.9-scratch313: - extends: .docker - stage: scratch - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: scratch313 - PARENT: "scratch" - ISPARENT: "True" - -3.3.9-vaapi2004: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: vaapi2004 - PARENT: "vaapi" - ISPARENT: "True" - -3.3.9-nvidia2004: - extends: .docker - stage: nvidia - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: nvidia2004 - PARENT: "nvidia" - ISPARENT: "True" - -3.3.9-rockylinux8: - extends: .docker - stage: rockylinux - variables: - MAJOR_VERSION: 3 - VERSION: "3.3" - LONG_VERSION: "3.3.9" - VARIANT: rockylinux8 - PARENT: "rockylinux" - ISPARENT: "True" - -3.2.19-ubuntu2004: - extends: .docker - stage: ubuntu - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: ubuntu2004 - PARENT: "ubuntu" - ISPARENT: "True" - -3.2.19-alpine313: - extends: .docker - stage: alpine - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: alpine313 - PARENT: "alpine" - ISPARENT: "True" - -3.2.19-centos7: - extends: .docker - stage: centos - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: centos7 - PARENT: "centos" - ISPARENT: "True" - -3.2.19-scratch313: - extends: .docker - stage: scratch - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: scratch313 - PARENT: "scratch" - ISPARENT: "True" - -3.2.19-vaapi2004: - extends: .docker - stage: vaapi - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: vaapi2004 - PARENT: "vaapi" - ISPARENT: "True" - -3.2.19-rockylinux8: - extends: .docker - stage: rockylinux - variables: - MAJOR_VERSION: 3 - VERSION: "3.2" - LONG_VERSION: "3.2.19" - VARIANT: rockylinux8 - PARENT: "rockylinux" - ISPARENT: "True" diff --git a/templates/Dockerfile-template.alpine313 b/templates/Dockerfile-template.alpine317 similarity index 98% rename from templates/Dockerfile-template.alpine313 rename to templates/Dockerfile-template.alpine317 index 2635c114b..c5ff9b40a 100644 --- a/templates/Dockerfile-template.alpine313 +++ b/templates/Dockerfile-template.alpine317 @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS base +FROM alpine:3.17 AS base RUN apk add --no-cache --update libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git diff --git a/templates/Dockerfile-template.nvidia2004 b/templates/Dockerfile-template.nvidia2204 similarity index 94% rename from templates/Dockerfile-template.nvidia2004 rename to templates/Dockerfile-template.nvidia2204 index 6276d68b5..04de9e4b4 100644 --- a/templates/Dockerfile-template.nvidia2004 +++ b/templates/Dockerfile-template.nvidia2204 @@ -6,7 +6,7 @@ # # -FROM nvidia/cuda:11.4.1-devel-ubuntu20.04 AS devel-base +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS devel-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -17,7 +17,7 @@ RUN apt-get -yqq update && \ apt-get autoremove -y && \ apt-get clean -y -FROM nvidia/cuda:11.4.1-runtime-ubuntu20.04 AS runtime-base +FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 AS runtime-base ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV DEBIAN_FRONTEND=nonintercative @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \ FROM devel-base as build -ENV NVIDIA_HEADERS_VERSION=11.1.5.0 +ENV NVIDIA_HEADERS_VERSION=11.8.0 ENV %%ENV%% @@ -50,7 +50,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/templates/Dockerfile-template.scratch313 b/templates/Dockerfile-template.scratch317 similarity index 98% rename from templates/Dockerfile-template.scratch313 rename to templates/Dockerfile-template.scratch317 index 733f28e99..3c523b93b 100644 --- a/templates/Dockerfile-template.scratch313 +++ b/templates/Dockerfile-template.scratch317 @@ -4,7 +4,7 @@ # # -FROM alpine:3.13 AS build +FROM alpine:3.17 AS build WORKDIR /tmp/workdir diff --git a/templates/Dockerfile-template.ubuntu2004 b/templates/Dockerfile-template.ubuntu2004 deleted file mode 100644 index a1d5ddb9a..000000000 --- a/templates/Dockerfile-template.ubuntu2004 +++ /dev/null @@ -1,71 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV %%ENV%% - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -%%RUN%% -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -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 diff --git a/templates/Dockerfile-template.ubuntu1804 b/templates/Dockerfile-template.ubuntu2204 similarity index 97% rename from templates/Dockerfile-template.ubuntu1804 rename to templates/Dockerfile-template.ubuntu2204 index f0a3fdcc5..c56a0638d 100644 --- a/templates/Dockerfile-template.ubuntu1804 +++ b/templates/Dockerfile-template.ubuntu2204 @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -33,7 +33,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ zlib1g-dev" && \ diff --git a/templates/Dockerfile-template.vaapi2004 b/templates/Dockerfile-template.vaapi2004 deleted file mode 100644 index b7408b164..000000000 --- a/templates/Dockerfile-template.vaapi2004 +++ /dev/null @@ -1,77 +0,0 @@ -# ffmpeg - http://ffmpeg.org/download.html -# -# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu -# -# https://hub.docker.com/r/jrottenberg/ffmpeg/ -# -# -FROM ubuntu:20.04 AS base - -WORKDIR /tmp/workdir - -RUN apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ - apt-get autoremove -y && \ - apt-get clean -y - -FROM base as build - -ENV %%ENV%% - -ARG DEBIAN_FRONTEND=noninteractive - -RUN buildDeps="autoconf \ - automake \ - cmake \ - curl \ - bzip2 \ - libexpat1-dev \ - g++ \ - gcc \ - git \ - gperf \ - libtool \ - make \ - meson \ - nasm \ - perl \ - pkg-config \ - python \ - libssl-dev \ - yasm \ - libva-dev \ - zlib1g-dev" && \ - apt-get -yqq update && \ - apt-get install -yq --no-install-recommends ${buildDeps} -%%RUN%% -## cleanup -RUN \ - ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ - for lib in /usr/local/lib/*.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/lib ffmpeg -buildconf && \ - cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \ - mkdir -p /usr/local/lib/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/lib/pkgconfig/"${pc##*/}"; \ - done - -FROM base AS release -LABEL org.opencontainers.image.authors="julien@rottenberg.info" \ - org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg - -ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 - -CMD ["--help"] -ENTRYPOINT ["ffmpeg"] - -COPY --from=build /usr/local /usr/local/ - -RUN \ - apt-get update -y && \ - apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver && \ - rm -rf /var/lib/apt/lists/* - -# Let's make sure the app built correctly -# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output diff --git a/templates/Dockerfile-template.vaapi1804 b/templates/Dockerfile-template.vaapi2204 similarity index 97% rename from templates/Dockerfile-template.vaapi1804 rename to templates/Dockerfile-template.vaapi2204 index d29f4bb3e..462acc825 100644 --- a/templates/Dockerfile-template.vaapi1804 +++ b/templates/Dockerfile-template.vaapi2204 @@ -5,7 +5,7 @@ # https://hub.docker.com/r/jrottenberg/ffmpeg/ # # -FROM ubuntu:18.04 AS base +FROM ubuntu:22.04 AS base WORKDIR /tmp/workdir @@ -33,7 +33,7 @@ RUN buildDeps="autoconf \ nasm \ perl \ pkg-config \ - python \ + python3 \ libssl-dev \ yasm \ libva-dev \ diff --git a/update.py b/update.py index 4426501d6..46f3a6d37 100755 --- a/update.py +++ b/update.py @@ -7,7 +7,6 @@ from distutils.version import StrictVersion from urllib import request -MIN_VERSION = "2.7" with open("templates/Dockerfile-env", "r") as tmpfile: ENV_CONTENT = tmpfile.read() with open("templates/Dockerfile-run", "r") as tmpfile: @@ -16,20 +15,20 @@ IMAGE_FORMAT_STR = "{0}/Dockerfile".format(DIR_FORMAT_STR) TEMPLATE_STR = "templates/Dockerfile-template.{0}" -# https://ffmpeg.org/olddownload.html -SKIP_VERSIONS = "3.1.11 3.0.12 snapshot" +# https://endoflife.date/ffmpeg +SKIP_VERSIONS = "4.0.6 3.3.9 3.2.19 3.1.11 3.0.12 snapshot" +MIN_VERSION = "3.4" VARIANTS = [ - {"name": "ubuntu1804", "parent": "ubuntu"}, - {"name": "ubuntu2004", "parent": "ubuntu"}, - {"name": "alpine313", "parent": "alpine"}, + {"name": "ubuntu2204", "parent": "ubuntu"}, + {"name": "alpine317", "parent": "alpine"}, {"name": "centos7", "parent": "centos"}, {"name": "centos8", "parent": "centos"}, - {"name": "scratch313", "parent": "scratch"}, - {"name": "vaapi1804", "parent": "vaapi"}, - {"name": "vaapi2004", "parent": "vaapi"}, - {"name": "nvidia2004", "parent": "nvidia"}, + {"name": "scratch317", "parent": "scratch"}, + {"name": "vaapi2204", "parent": "vaapi"}, + {"name": "nvidia2204", "parent": "nvidia"}, {"name": "rockylinux8", "parent": "rockylinux"}, ] + FFMPEG_RELEASES = "https://ffmpeg.org/releases/" @@ -38,6 +37,7 @@ azure = [] +shutil.rmtree("docker-images") for parent in all_parents: gitlabci.append(f" - {parent}\n") @@ -53,17 +53,7 @@ version, all_versions = all_versions[0], all_versions[1:] SKIP_VARIANTS = { - "3.2": [ - "alpine312", - "centos8", - "nvidia2004", - "scratch312", - "ubuntu1804", - "vaapi1804", - ], - "3.3": ["alpine38", "nvidia1604", "scratch38", "vaapi1804"], "3.4": ["alpine38", "nvidia1604", "scratch38", "vaapi1804"], - "4.0": ["alpine38", "nvidia1604", "scratch38", "vaapi1804"], "4.1": ["alpine38", "nvidia1604", "scratch38", "vaapi1804"], "4.2": ["alpine38", "nvidia1604", "scratch38", "vaapi1804"], } @@ -95,7 +85,7 @@ def get_major_version(version): break if cur in SKIP_VERSIONS: - break + continue tmp = cur.split(".") # Check Minor if len(tmp) >= 2 and tmp[1].isdigit() and tmp[1] < last[1]: @@ -106,8 +96,8 @@ def get_major_version(version): keep_version.append(cur) last = tmp -print("Preparing docker images for ffmpeg versions: ") +print("Preparing docker images for ffmpeg versions: ") for version in keep_version: print(version) skip_variants = None @@ -120,6 +110,8 @@ def get_major_version(version): short_version = get_shorten_version(version) major_version = get_major_version(version) ver_path = os.path.join("docker-images", short_version) + if not os.path.exists(ver_path): + os.makedirs(ver_path) for existing_variant in os.listdir(ver_path): if existing_variant not in compatible_variants: shutil.rmtree(DIR_FORMAT_STR.format(short_version, existing_variant))