# Neocodec commercial FFmpeg 8.1.2 build

The commercial/default Neocodec helper pair is a second build from a strict subset of this
already-pinned source set. It is not the martin-riedl binary documented in `SOURCES.md`.
It is built by the canonical recipe distributed beside this document:

```text
./build-commercial-ffmpeg.sh /absolute/output/directory
```

Inside the Neocodec repository, `scripts/build-commercial-ffmpeg.sh` is a convenience wrapper
around this file and adds the separately sourced gifsicle helper to `Vendor/commercial`.

Only these source archives are compiled:

| Component | Pin | Archive |
|---|---|---|
| FFmpeg | 8.1.2 | `ffmpeg-8.1.2.tar.bz2` |
| x264 | `0480cb05fa188d37ae87e8f4fd8f1aea3711f7ee` | `libs/x264-0480cb05fa188d37ae87e8f4fd8f1aea3711f7ee.tar.gz` |
| SVT-AV1 | 3.1.2 | `libs/SVT-AV1-3.1.2.tar.gz` |
| libvpx | 1.16.0 | `libs/libvpx-1.16.0.tar.gz` |
| Opus | 1.6.1 | `libs/opus-1.6.1.tar.gz` |

The recipe verifies those archives against the committed `SHA256SUMS`, exports
`MACOSX_DEPLOYMENT_TARGET=14.0` across dependency compilation and final linking, rejects any
resulting Mach-O whose `LC_BUILD_VERSION` differs, and uses the configuration recorded verbatim
in `commercial-configure-flags.txt`. Dependency autodetection is disabled. The recipe neither
extracts nor builds x265. It builds libvpx with VP9 enabled and VP8 disabled, then links
libvpx and Opus statically for WebM output. FFmpeg's HEVC VideoToolbox encoder and native
HEVC decoder are explicitly disabled. The acceptance gate fails if `libx265` appears, an
HEVC encoder or decoder is exposed, or any required H.264/AV1/VP9/Opus capability is absent.

`--enable-zlib` selects the zlib supplied by macOS; it is needed by FFmpeg's native PNG
encoder for the GIF palette and cover-art test paths. It is an Apple system library, not a
bundled third-party implementation.

The complete source set contains additional archives because it also corresponds to the
older/private martin-riedl helper pair. Those extra archives are not linked into the
commercial binary. Keeping a superset beside the commercial binary does not alter its
license or capability inventory.

Host build tools used on 2026-07-30 were Apple clang/ld from Xcode, GNU Make, CMake 4.4.1,
Ninja 1.13.2, pkg-config, and the standard macOS command-line tools. They are not linked
into the helpers.

The recipe securely claims the fixed build path
`/private/tmp/neocodec-commercial-ffmpeg-build-1783011502` and refuses to reuse or delete a
pre-existing path. FFmpeg and SVT-AV1 embed diagnostic source paths in the executable, so a
random build directory would change the binary hash. A fixed path plus
`SOURCE_DATE_EPOCH=1783011502` makes repeat builds with the pinned source and toolchain
byte-stable; this is verified before a candidate hash is promoted.
