• Stars
    star
    211
  • Rank 180,348 (Top 4 %)
  • Language
    Dockerfile
  • License
    MIT License
  • Created about 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Multi-arch docker image with ffmpeg/ffprobe binaries built as hardened static PIE binaries with no external dependencies

static-ffmpeg

Docker image with ffmpeg and ffprobe built as hardened static PIE binaries with no external dependencies that can be used with any base image.

See Dockerfile for versions used. In general, master should have the latest stable version of ffmpeg and below libraries. Versions are kept up to date automatically using bump.

Usage

Use mwader/static-ffmpeg from Docker Hub or build image yourself.

In Dockerfile

COPY --from=mwader/static-ffmpeg:6.1 /ffmpeg /usr/local/bin/
COPY --from=mwader/static-ffmpeg:6.1 /ffprobe /usr/local/bin/

Run directly

docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" mwader/static-ffmpeg:6.1 -i file.wav file.mp3
docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" --entrypoint=/ffprobe mwader/static-ffmpeg:6.1 -i file.wav

As shell alias

alias ffmpeg='docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" mwader/static-ffmpeg:6.1'
alias ffprobe='docker run -i --rm -u $UID:$GROUPS -v "$PWD:$PWD" -w "$PWD" --entrypoint=/ffprobe mwader/static-ffmpeg:6.1'

Libraries

  • fontconfig
  • gray
  • iconv
  • lcms2
  • libaom
  • libaribb24
  • libass
  • libbluray
  • libdav1d
  • libdavs2
  • libfdk-aac (only if explicitly enabled during build, see below)
  • libfreetype
  • libfribidi
  • libgme
  • libgsm
  • libkvazaar
  • libmodplug
  • libmp3lame
  • libmysofa
  • libopencore
  • libopenjpeg
  • libopus
  • librabbitmq
  • librav1e
  • librtmp
  • librubberband
  • libshine
  • libsnappy
  • libsoxr
  • libspeex
  • libsrt
  • libssh
  • libsvtav1
  • libtheora
  • libtwolame
  • libuavs3d
  • libvidstab
  • libvmaf
  • libvo-amrwbenc
  • libvorbis
  • libvpx
  • libwebp
  • libx264
  • libx265 (multilib with support for 10 and 12 bits)
  • libxavs2
  • libxml2
  • libxvid
  • libzimg
  • openssl
  • and all native ffmpeg codecs, formats, filters etc.

Files in the image

  • /ffmpeg ffmpeg binary
  • /ffprobe ffprobe binary
  • /doc Documentation
  • /versions.json JSON file with build versions of ffmpeg and libraries.
  • /etc/ssl/cert.pem CA certs to make -tls_verify 1 -ca_file /etc/ssl/cert.pem work if running image directly

Tags

latest Latest master build.

MAJOR.MINOR.PATCH[-BUILD] Specific version of FFmpeg with the features that was in master at the time of tagging. -BUILD means that was an additional build with that version to add of fix something.

Security

Binaries are built with various hardening features but it's still a good idea to run them as non-root even when used inside a container, especially so if running on input files that you don't control.

libfdk-aac

Due to license issues the docker image does not include libfdk-aac by default. A docker image including libfdk-aac can be built by passing a non empty value to the build-arg ENABLE_FDKAAC, example below.

docker build --build-arg ENABLE_FDKAAC=1 . -t my-ffmpeg-static:latest

Known issues and tricks

Multi-arch and arm64

Since version 5.0.1-3 dockerhub images are multi-arch amd64 and arm64 images.

Copy out binaries from image

This will copy ffmpeg and ffprobe to the current directory:

docker run --rm -v "$PWD:/out" $(echo -e 'FROM alpine\nCOPY --from=mwader/static-ffmpeg:latest /ff* /\nENTRYPOINT cp /ff* /out' | docker build -q -)

Quickly see what versions an image was built with

docker run --rm mwader/static-ffmpeg -v quiet -f data -i versions.json -map 0:0 -c text -f data -

I see Name does not resolve errors for hosts that should resolve

This could happen if the hostname resolve to more IP-addresses than can fit in DNS UDP packet (probably 512 bytes) causing the response to be truncated. Usually clients should then switch to TCP and redo the query. This should only be a problem with version 6.0-1 or earlier of this image that uses musl libc 1.2.3 or older.

TLS

Binaries are built with TLS support but, by default, ffmpeg currently do not do certificate verification. To enable verification you need to run ffmpeg with -tls_verify 1 and -ca_file /path/to/cert.pem.

  • Alpine Linux at /etc/ssl/cert.pem
  • Debian/Ubuntu install the ca-certificates package at it will be available at /etc/ssl/certs/ca-certificates.crt.

Docker Hub images

Multi-arch dockerhub images are built using pldin601/build-multiarch-on-aws-spots. See build-multiarch.yml for config. Thanks to @pldin601 for making this possible.

Contribute

Feel free to create issues or PRs if you have any improvements or encounter any problems. Please also consider making a donation to the FFmpeg project or to other projects used by this image if you find it useful.

Please also be mindful of the license limitations used by libraries this project uses and your own usage and potential distribution of such.

TODOs and possible things to add

  • Add libplacebo, chromaprint, etc. ...
  • Add libjxl support once in stable
  • Add xeve/xevd support once in stable
  • Add acceleration support (GPU, CUDA, ...)
  • Add *.a *.so libraries, headers and pkg-config somehow

More Repositories

1

fq

jq for binary formats - tool, language and decoders for working with binary and text formats
Go
9,333
star
2

jqjq

jq implementation of jq
jq
480
star
3

ydls

youtube-dl HTTP download and transcode service
Go
176
star
4

postfix-relay

Postfix SMTP relay docker image
Shell
109
star
5

ansisvg

Convert ANSI to SVG
Go
72
star
6

bump

A generic version tracking and update tool
Go
60
star
7

goutubedl

Go wrapper for youtube-dl and yt-dlp
Go
58
star
8

gormstore

GORM backend for gorilla sessions
Go
51
star
9

jq-lsp

jq language server
JSONiq
46
star
10

rgen

Resource code generator for iOS inspired by Android resource handling
Objective-C
40
star
11

catgolf

cat(1) golf
36
star
12

inkmake

Makefile inspired export from SVG files using Inkscape as backend with some added smartness.
Ruby
24
star
13

php-tftpserver

TFTP server written in PHP
PHP
22
star
14

ffcat

Preview media files in the shell
Go
15
star
15

chromesthesia

Find out what song is playing in a Chrome tab
JavaScript
15
star
16

vscode-jq

jq extension for VSCode
TypeScript
13
star
17

aes-arraybuffer

JavaScript AES and CBC implementation using ArrayBuffer
JavaScript
13
star
18

docker-webdav

WebDAV and web file browser server
Go
12
star
19

flac.tcl

Probably the slowest FLAC decoder in the world
Tcl
11
star
20

disable_sendfile_vbox_linux

Go VirtualBox vboxsf sendfile bug workaround
Go
11
star
21

crxreload

Reload Chrome extension automatically when files are changed
JavaScript
10
star
22

libfa

C automata library to build, determinize, minimize, translate regexp etc
C
10
star
23

ios-misc

Misc iOS related classes
Objective-C
10
star
24

respect

Resource inspector and lint tool to help find issues with resources in Xcode projects
Objective-C
10
star
25

gtktetris

Simple GTK tetris game
C
5
star
26

appsnax

Generate wireless app distribution mainifests for iOS directly from IPA files
PHP
5
star
27

static-gm

Image with graphicsmagick binary built as hardened static PIE binaries with no external dependencies
Dockerfile
5
star
28

filtertransport

Filtering go http transport and proxy handler
Go
4
star
29

static-shaka-packager

Image with shaka-packager binary built as hardened static PIE binaries with no external dependencies
Dockerfile
4
star
30

fultracker

Erlang bittorrent tracker experiment (Inactive project)
Erlang
3
star
31

jq-dash-docset

Tools to generate jq dash docset
HTML
3
star
32

maggie

Maggie, a GNU GameBoy Emulator (Inactive project)
C
3
star
33

textfiend

TCL implementation of the hexfiend binary template API
Tcl
3
star
34

slippy

iOS puzzle game featuring the hungry non-swimmer penguin Slippy that needs your help to catch fish
Objective-C
2
star
35

homebrew-tap

wader homebrew taps
Ruby
2
star
36

gameboy-games

Archive of GameBoy games I wrote many years ago
C
2
star
37

notify

Configurable inotify based file system monitor (Inactive project)
Python
2
star
38

objcheck

an ObjC port of the QuickCheck unit test framework
Objective-C
1
star
39

rails-misc

Misc ruby on rails goodies
Shell
1
star
40

citris

Circular Tetris (Inactive project)
C
1
star
41

fuse-misc

Misc FUSE file systems, ccxfuse, fusememfs, ircfs, pipefs, tagfs and erlfuse (Inactive projects)
C
1
star
42

gae-misc

Misc Google App Engine snippets
Python
1
star
43

chrome-search-spotify

Search Spotify Chrome extension
JavaScript
1
star
44

compose-hook

git hook for running docker-compose
Shell
1
star
45

lurker

Audio silence splitter (Inactive project)
C
1
star
46

vscode-go-debug-test

Test project for custom vscode-go debug command
Go
1
star
47

app-client-macos

Experimental appsocket support for macOS
Go
1
star
48

mo-mw-test

Testing
1
star
49

firefox-all-spaces

Ugly hack to have a separate Firefox window visible on all Mac OS X spaces (workaround because afloat etc can't be used with Firefox)
Shell
1
star
50

hugo-dropbox

Docker image that serves a hugo site from dropbox
Nginx
1
star
51

htmx-dash-docset

</> htmx dash docset
Shell
1
star