Allow building without --enable-nonfree for a redistributable image#57
Open
mormegil6 wants to merge 1 commit into
Open
Allow building without --enable-nonfree for a redistributable image#57mormegil6 wants to merge 1 commit into
mormegil6 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a build-time switch to control whether FFmpeg is configured with --enable-nonfree, enabling creation of a redistributable image variant without changing the default build output.
Changes:
- Introduces
ARG ENABLE_NONFREEto make--enable-nonfreeconditional at build time. - Documents the licensing rationale and how to build with
ENABLE_NONFREE=0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+79
to
+83
| # --enable-nonfree gates GPL-incompatible libraries (e.g. libfdk_aac); this | ||
| # build links none of them, so the flag is a no-op that only marks the binary | ||
| # non-redistributable. Default on (behaviour unchanged); build with | ||
| # --build-arg ENABLE_NONFREE=0 for a redistributable image. | ||
| ARG ENABLE_NONFREE=1 |
The flag gates GPL-incompatible external libraries, but this build links none: the only codec libraries in the configure line are libx264 (GPL), libopus (BSD) and libvpx (BSD). Its sole effect is marking the resulting ffmpeg non-redistributable, which blocks publishing a pre-built Earshot image to a public registry. ARG ENABLE_NONFREE=1 keeps the default build byte-for-byte identical; --build-arg ENABLE_NONFREE=0 drops the flag for a redistributable build. Verified with ENABLE_NONFREE=0: 16-channel Opus (hexadecagonal, no downmix) and VP9 output unchanged.
mormegil6
force-pushed
the
nonfree-opt-in
branch
from
July 25, 2026 07:45
4808df2 to
f894097
Compare
Contributor
Author
|
Fair point on the wording: with the default at 1, nonfree stays enabled and it is the redistributable build that is the opt-in. Retitled accordingly. The default is deliberately unchanged so the stock build stays byte-for-byte identical; flipping the default to 0 would change the licence stamp of every existing build and that call belongs to the maintainers, not this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use case. Publishing a pre-built Earshot image alongside a containerised HOA streaming stack.
--enable-nonfreemarks the resulting ffmpeg as non-redistributable, which blocks shipping the image through a public registry.The finding. This build links no nonfree library. From
ffmpeg -buildconfin the current image:The only external codec libraries are libx264 (GPL), libopus (BSD) and libvpx (BSD). There is no libfdk_aac and no openssl.
--enable-nonfreeonly relaxes a licence gate that nothing in the build uses, so removing it changes nothing except the licence stamp.The change.
ARG ENABLE_NONFREE=1. The default build is unchanged, flag included.docker build --build-arg ENABLE_NONFREE=0drops it and produces a plain GPLv3 binary (via libx264) that can be redistributed.Verification. Built with
ENABLE_NONFREE=0; the configure line loses only--enable-nonfree, and the full end-to-end pipeline (16-channel RTMP contribution in, live DASH out) passed identically:Stream probe of an encode made with the no-nonfree binary (the image ships no ffprobe, so this is ffmpeg reading back its own output): 16 discrete channels, hexadecagonal layout, no downmix, VP9 video: