Skip to content

Option for an LGPL-2.1+ FFmpeg build: drop gmp/--enable-version3, allow securetransport for TLS #87

Open

Description

@goozakdev

Title: Option for an LGPL-2.1+ FFmpeg build: drop gmp/--enable-version3, allow securetransport for TLS

Hi, and thanks for the quick fix in #77 / #78. Removing --enable-nonfree made the regular artifacts redistributable. This is a follow-up from the same angle: shipping MPVKit in an App Store app.

What we see in 1.0.0

  • Sources/BuildScripts/XCFrameworkBuild/main.swift still passes --enable-version3, and FFmpeg is built with gmp and gnutls (the dependency list near line 612).
  • In FFmpeg n8.1.2's configure, gmp is the only enabled library in EXTERNAL_LIBRARY_VERSION3_LIST, so it is what forces --enable-version3. Inside FFmpeg, gmp only serves ffrtmpcrypt (RTMPE, encrypted RTMP).
  • gnutls brings in nettle/hogweed and gmp, which are licensed LGPL-3.0-or-later OR GPL-2.0-or-later.

So today the regular build is effectively LGPLv3. For apps distributed on locked-down devices (iOS/tvOS App Store), LGPLv3's installation-information requirement for consumer products is hard to satisfy. LGPL-2.1+ is the more practical license there.

Proposal (opt-in, so nothing changes for current users)

A build option, say enableLGPLv21 (name up to you), that:

  1. omits gmp and --enable-version3. The only feature lost is RTMPE.
  2. omits gnutls (and with it nettle/hogweed/gmp) and uses FFmpeg's --enable-securetransport for TLS. That uses Apple's Security.framework, so no crypto library is bundled. A side benefit is simpler export compliance for App Store apps.
    • If Secure Transport is a problem (deprecated API on newer SDKs), the fallback is --enable-openssl with the OpenSSL 3.x already in the package. FFmpeg's configure accepts OpenSSL ≥ 3 without --enable-version3 when --enable-gpl is off.
  3. optionally ships as separate products/artifacts, the way MPVKit-GPL sits beside MPVKit today.

Open questions we haven't verified:

  • Does --enable-securetransport still build cleanly for iOS/tvOS with current Xcode?
  • Does anything besides FFmpeg (libmpv, libbluray, libplacebo…) link against gnutls/nettle/gmp?

We're happy to test a branch on iOS and tvOS hardware, or to send a PR if you'd prefer that direction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions