wader / static-ffmpeg
Multi-arch docker image with ffmpeg/ffprobe binaries built as hardened static PIE binaries with no external dependencies
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing wader/static-ffmpeg in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewstatic-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 from Docker Hub or build the image yourself. In Dockerfile Run directly As shell alias Libraries • fontconfig • gray (full grayscale support) • iconv (from musl) • lcms2 • libaom • libaribb24 • libass • libbluray • libdav1d • libdavs2 • libfdk-aac (only if explicitly enabled during build, see below) • libfreetype • libfribidi • libgme • libgsm • libharfbuzz • libjxl • libkvazaar • libmodplug • libmp3lame • libmysofa • libopencore • libopenjpeg • libopus • librabbitmq • librav1e • librsvg • librtmp • librubberband • libshine • libsnappy • libsoxr • libspeex • libsrt • libssh • libsvtav1 • libtheora • libtwolame • libuavs3d • libva • libvidstab • libvmaf • libvo-amrwbenc • libvorbis • libvpl • libvpx • libvvenc • libwebp • libx264 • libx265 (multilib with support for 10 and 12 bits) • libxavs2 • libxevd • libxeve • libxml2 • libxvid • libzimg • libzmq • openssl • and all native ffmpeg codecs, formats, filters etc. Files in the image • ffmpeg binary • ffprobe binary • Documentation • JSON file with build versions of ffmpeg and libraries. • CA certs to make work if running image directly • Fonts, fontconfig config and pre-populated cache: • - • - Tags Latest master build. Specific version of FFmpeg with the features that was in master at the time of tagging. 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 , example below. Fonts usage with SVG or draw text filters etc The image ships with some basic fonts ( ) that can be used when running the image directly. If your copying the binaries into some image you have to install fonts somehow. How to do this depends a bit on distributions but in general look for font packages and how to make fontconfig know about them. • Alpine Linux see https://wiki.alpinelinux.org/wiki/Fonts • Debian/Ubuntu see https://wiki.debian.org/Fonts Custom fonts directory Let's say you're building a docker image for your application that requires the and binaries, and want to have a dedicated directory for storing fonts, e.g. . In order to achieve this, let's take a look at the following steps. • A custom config file containing the fonts directory you want to use has to be added to the image. Here, a file will be added to the directory, containing an additional directory for Fontconfig to use. > [!TIP] > Check the Fontconfig User Documentation for examples and available options for your custom fontconfig file. • Copy the (and ) binaries. • Make sure the directory exist in your image. If you followed the steps above, your image should look something like this. You can now build the image and run a container that has volume mounted to . Inspecting the log, you will find that the font is located in . > [!NOTE] > The volume mount for is optional. If you run the container as a non-root user, just make sure the cache directory exists on host before mounting, else it will still show the debug message . This error does *not* further impact Fontconfig in locating the appropriate fonts. 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 and . • Alpine Linux at • Debian/Ubuntu install the package at it will be available at . 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 and to the current directory: Quickly see what versions an image was built with I see 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. I see errors This could be because the statically linked openssl version in the static-ffmpeg binaries are not compatible with the (possibly distro modified openssl) configuration files found in the filesystem. The error is about openssl encountering an option that it does not know about. Possible workarounds: • Add to the openssl config to ignore unknown options with the risk of ignoring real problems. • Use ffmpeg option to ignore the error but will still warn. See these references for further discussion and workarounds: • First call to SSL_CTX_new is failing on AL2023 (3.0.12) • OpenSSL issue with binary outside container (RedHat/Fedora specific) Thanks • @pyldin601 for working on multi arch builds 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 libopenapv • Add libplacebo, chromaprint, etc. ... • Add acceleration support (GPU, CUDA, ...) • Add *.a *.so libraries, headers and pkg-config somehow