Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos: # pre-commit autoupdate
- id: flake8

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -22,7 +22,7 @@ repos: # pre-commit autoupdate

# If you want to avoid flake8 errors due to unused vars or imports:
- repo: https://github.com/myint/autoflake.git
rev: v1.4
rev: v1.6.0
hooks:
- id: autoflake
args:
Expand All @@ -34,15 +34,13 @@ repos: # pre-commit autoupdate
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.8.0
hooks:
- id: black
language_version: python3

- repo: local
hooks:
- id: update
name: Generate Dockerfiles
entry: ./update.py
language: python
pass_filenames: false
# - repo: https://github.com/jrottenberg/ffmpeg
# rev: libaom-3.4.0
# hooks:
# - id: generate_dockerfile
# language_version: python3
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- id: generate_dockerfile
name: Generate Dockerfile
entry: generate_dockerfile
language: python
require_serial: true
always_run: true
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Before you open a PR make the change locally and verify it passes pre-commit :


```sh
pip install pre-commit
# you'll need python3-packaging
pip install pre-commit packaging
pre-commit install # inside the local checkout
pre-commit run -a # to force a run, but it will execute on commits
```
Expand All @@ -38,9 +39,9 @@ If you forget and don't have pre-commit configured, the pre-commit step will fai

```sh
# Generates the Dockerfile for all variants
./update.py
./generate_dockerfile.py

pre-commit run -a # recommanded
pre-commit run -a # recommended

# Test a specific variant
docker build -t my-build docker-images/VERSION/
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg?logo=docker)](https://hub.docker.com/r/jrottenberg/ffmpeg/tags)
[![Github Container Registry Images](https://img.shields.io/badge/images-automated-blue?logo=github&style=plastic)](https://github.com/jrottenberg/ffmpeg/pkgs/container/ffmpeg)
[![gitlab pipeline status](https://gitlab.com/jrottenberg/ffmpeg/badges/main/pipeline.svg)](https://gitlab.com/jrottenberg/ffmpeg/commits/main)
[![Azure Build Status](https://dev.azure.com/video-tools/ffmpeg/_apis/build/status/jrottenberg.ffmpeg)](https://dev.azure.com/video-tools/ffmpeg/_build/latest?definitionId=1)
[![Build Status](https://dev.azure.com/video-tools/ffmpeg/_apis/build/status/jrottenberg.ffmpeg?branchName=main)](https://dev.azure.com/video-tools/ffmpeg/_build/latest?definitionId=1&branchName=main)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)


This project prepares a minimalist Docker image with FFmpeg. It compiles FFmpeg from sources following instructions from the [Compilation Guide](https://trac.ffmpeg.org/wiki/CompilationGuide).
Expand All @@ -26,13 +27,13 @@ There are different builds available:

`<version>` can be one of the following:
- 3.2
- 3.3
- 3.4
- 4.0
- 4.1
- 4.2
- 4.3
- 4.4
- 5.0
- 5.1

Not all combinations are supported and older versions will fade out over time. See the table below for the currently supported combinations.

Expand Down Expand Up @@ -260,3 +261,19 @@ See Dockerfile-env to update a version
## Contribute

See [the contributing guide](CONTRIBUTING.md)


## Contributors

Thanks to [all contributors](https://github.com/jrottenberg/ffmpeg/graphs/contributors)

[![jrottenberg/ffmpeg's contributors](https://contrib.rocks/image?repo=jrottenberg/ffmpeg)](https://github.com/jrottenberg/ffmpeg/graphs/contributors)

### GitHub Contributor Over Time
[![GitHub Contributor Over Time](https://contributor-overtime-api.git-contributor.com/contributors-svg?chart=contributorOverTime&repo=jrottenberg/ffmpeg)](https://git-contributor.com?chart=contributorOverTime&repo=jrottenberg/ffmpeg)

## Stargazers over time

Thanks to our users starring the project

[![Stargazers over time for jrottenberg/ffmpeg](https://starchart.cc/jrottenberg/ffmpeg.svg)](https://starchart.cc/jrottenberg/ffmpeg)
42 changes: 21 additions & 21 deletions docker-images/3.2/alpine313/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@ FROM base AS build
WORKDIR /tmp/workdir

ENV FFMPEG_VERSION=3.2.18 \
AOM_VERSION=v1.0.0 \
AOM_VERSION=v3.4.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 \
LIBARIBB24_VERSION=1.0.3 \
LIBASS_VERSION=0.13.7 \
LIBBLURAY_VERSION=1.1.2 \
LIBPNG_VERSION=1.6.9 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBSRT_VERSION=1.4.1 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
LIBVMAF_VERSION=2.1.1 \
LIBXCB_VERSION=1.15 \
LIBXML2_VERSION=2.9.12 \
LIBZMQ_VERSION=4.3.2 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
OPUS_VERSION=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 \
XCBPROTO_VERSION=1.15.1 \
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"
Expand Down Expand Up @@ -91,7 +91,6 @@ RUN buildDeps="autoconf \
openssl-dev \
python3 \
tar \
xcb-proto \
yasm \
zlib-dev" && \
apk add --no-cache --update ${buildDeps}
Expand Down Expand Up @@ -346,17 +345,18 @@ RUN \

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 ; \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \
tar -zx -f ${AOM_VERSION}.tar.gz && \
mkdir -p ./aom_build && \
cd ./aom_build && \
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DENABLE_NASM=on -DENABLE_TESTDATA=off -DENABLE_TESTS=off -DENABLE_TOOLS=off && \
make && \
make install && \
rm -rf ${DIR}

## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
## xorg-macros (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
Expand Down
41 changes: 21 additions & 20 deletions docker-images/3.2/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,40 @@ FROM base AS build
WORKDIR /tmp/workdir

ENV FFMPEG_VERSION=3.2.18 \
AOM_VERSION=v1.0.0 \
AOM_VERSION=v3.4.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 \
LIBARIBB24_VERSION=1.0.3 \
LIBASS_VERSION=0.13.7 \
LIBBLURAY_VERSION=1.1.2 \
LIBPNG_VERSION=1.6.9 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBSRT_VERSION=1.4.1 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
LIBVMAF_VERSION=2.1.1 \
LIBXCB_VERSION=1.15 \
LIBXML2_VERSION=2.9.12 \
LIBZMQ_VERSION=4.3.2 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
OPUS_VERSION=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 \
XCBPROTO_VERSION=1.15.1 \
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"
Expand Down Expand Up @@ -382,17 +382,18 @@ RUN \

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 ; \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \
tar -zx -f ${AOM_VERSION}.tar.gz && \
mkdir -p ./aom_build && \
cd ./aom_build && \
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DENABLE_NASM=on -DENABLE_TESTDATA=off -DENABLE_TESTS=off -DENABLE_TOOLS=off && \
make && \
make install && \
rm -rf ${DIR}

## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
## xorg-macros (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
Expand Down
42 changes: 21 additions & 21 deletions docker-images/3.2/scratch313/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@ FROM alpine:3.13 AS build
WORKDIR /tmp/workdir

ENV FFMPEG_VERSION=3.2.18 \
AOM_VERSION=v1.0.0 \
AOM_VERSION=v3.4.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 \
LIBARIBB24_VERSION=1.0.3 \
LIBASS_VERSION=0.13.7 \
LIBBLURAY_VERSION=1.1.2 \
LIBPNG_VERSION=1.6.9 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBSRT_VERSION=1.4.1 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
LIBVMAF_VERSION=2.1.1 \
LIBXCB_VERSION=1.15 \
LIBXML2_VERSION=2.9.12 \
LIBZMQ_VERSION=4.3.2 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
OPUS_VERSION=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 \
XCBPROTO_VERSION=1.15.1 \
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"
Expand Down Expand Up @@ -92,7 +92,6 @@ RUN buildDeps="autoconf \
openssl-dev \
python3 \
tar \
xcb-proto \
yasm \
zlib-dev" && \
apk add --update ${buildDeps}
Expand Down Expand Up @@ -348,17 +347,18 @@ RUN \

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 ; \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://aomedia.googlesource.com/aom/+archive/${AOM_VERSION}.tar.gz && \
tar -zx -f ${AOM_VERSION}.tar.gz && \
mkdir -p ./aom_build && \
cd ./aom_build && \
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 -DENABLE_NASM=on -DENABLE_TESTDATA=off -DENABLE_TESTS=off -DENABLE_TOOLS=off && \
make && \
make install && \
rm -rf ${DIR}

## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
## xorg-macros (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
Expand Down
Loading