# FFmpeg — LGPL v2.1 notice

This software uses libraries from the **FFmpeg** project
(<https://ffmpeg.org>) under the **GNU Lesser General Public License,
version 2.1 or later** (see [`LGPL-2.1.txt`](./LGPL-2.1.txt)).

## What is included and how

- FFmpeg **8.1** is compiled from source by the `ffmpeg-sys-next` build script
  (vendored at `vendor/ffmpeg-sys-next`) as **shared libraries** and
  **dynamically linked** by the Audoboom binaries. The shared libraries
  (`libavcodec`, `libavformat`, `libavutil`, `libswresample`, `libswscale` —
  `.so` on Linux, `.dylib` on macOS, `.dll` on Windows) are shipped as separate
  files next to the executable, where the application loads them via its rpath
  (`$ORIGIN` / `@executable_path`; on Windows, the executable's own directory).
- It is built in **LGPL mode**: the build enables **none** of the GPL or
  non-free options. Specifically, `--enable-gpl`, `--enable-nonfree`,
  `--enable-version3`, and the GPL-encumbered external codecs (libx264,
  libx265, libxvid) are all left **disabled**. Only the LGPL-compatible
  components needed for media playback are built: `avcodec`, `avformat`,
  `swresample`, `swscale`.
- We do **not** modify FFmpeg's source. The only patch in the vendored
  `ffmpeg-sys-next` wrapper is to its Rust build script (it drops gcc-only
  `-march/-mtune=native` flags that break the MSVC build); it does not alter
  any FFmpeg C source.

> ⚠️ Enabling any of the `BUILD_LIB_X264`, `BUILD_LIB_X265`, `BUILD_LIB_XVID`,
> or `BUILD_LICENSE_GPL` Cargo features would relicense the **entire** binary
> under the GPL. Do not enable them for an LGPL distribution.

## Corresponding source (LGPL §4 / §6)

The complete, unmodified FFmpeg 8.1 source corresponding to the libraries in
this binary is available from:

- the FFmpeg project's official repository, branch `release/8.1`:
  <https://github.com/FFmpeg/FFmpeg/tree/release/8.1> — this is the exact
  source the build clones verbatim (see `vendor/ffmpeg-sys-next/build.rs`,
  `fetch()`), and
- the FFmpeg releases page: <https://ffmpeg.org/releases/>.

## Modifying / replacing FFmpeg (LGPL §6b)

FFmpeg is **dynamically linked** through a standard shared-library mechanism, so
recipients can use a modified version of FFmpeg with this application directly:
replace the bundled FFmpeg shared libraries that sit next to the executable with
your own interface-compatible build of the same FFmpeg major version, and the
application will load them instead. Nothing in the application prevents this
substitution.

This satisfies LGPL-2.1 §6(b); the application's own object code is therefore not
distributed.
