# FormatPlease custom FFmpeg distribution

Current core: **0.12.10-formatplease.1**, based on ffmpeg.wasm core 0.12.10 / release v12.15,
FFmpeg **5.1.4**, Emscripten **3.1.40**. This is a custom-built GPL-2.0-or-later
core, not the official npm prebuilt binary. The separate @ffmpeg/ffmpeg 0.12.15
wrapper and @ffmpeg/types 0.12.4 remain MIT.

## Source and modifications

- FFmpeg commit: `4729204c17f756e186d622060088371d10b34f7e`.
- ffmpeg.wasm bindings/build source: `71aa99d37c02a7b4c435275ca9ef50e612f6efa1`.
- The x265 source/build stage, configure enable flag and link dependency are omitted.
- H.264/x264, GPL configuration, internal HEVC decoding and all other pinned codec
  versions are retained. HEVC encoding is unavailable.
- Upstream C/C++ bindings and fftools are unchanged. Native build isolation prevents
  accidental host PNG/bzip2/Brotli dependencies in FreeType and uses its internal zlib.
- `Dockerfile.upstream` and original source archives retain optional upstream
  support, including x265 recipes. They are reference material, not the custom
  production recipe, and contain no standalone x265 library source archive.

The actual recipe and rebuild instructions are in [CUSTOM_BUILD.md](CUSTOM_BUILD.md)
and `scripts/video/build-core.py`. `sources.json` records the 18 fixed source
commits and full-archive checksums actually supplied to this build. Historical
floating branch names are retained only as upstream reference labels; the builder
uses exact commits and verifies archives. `build.json` records the build inputs,
linked libraries and output hashes. `link-map.txt` records the final linked code.
All source/build/notices files are available under `/licenses/video-sources/`.

## Binary evidence

A browser execution records the real `-version`, `-buildconf`, `-encoders`,
`-decoders`, `-demuxers` and `-muxers` in `capabilities.json`. The guard rejects
libx265/HEVC encoders and requires the existing output encoders and HEVC decoder.
Hashes bind this capability record and link map to the reviewed distribution.

| File | Bytes | SHA-256 |
|---|---:|---|
| ffmpeg-core.js | 111531 | `01399ec610d25b5ec5acb5bf0ae385b08a34260df4b043eed9a82af38cd45f43` |
| ffmpeg-core.wasm | 26576294 | `9210ad5c23b47b402bc568086f696f5d7fc8941c9bd8e5253d514dde28f81044` |

The browser asset path contains the custom revision. Website preparation removes
old generated video assets and copies only the retained custom core. The loader
verifies transport chunk hashes before instantiation; reassembly does not change
WASM bytes. Updating a core requires a new revision and reviewed hashes.

## Licenses

The configured FFmpeg aggregate remains GPL-2.0-or-later because x264 and internal
GPL components remain. FreeType's GPL option is compatible with this aggregate.
LAME is LGPL-2.0-or-later; FriBidi is LGPL-2.1-or-later. Other component grants are
in `libraries.json`, `sources.json` and the retained `notices/` texts. Upstream
optional-code references inside original notices are not evidence that those
libraries are linked into this core. Do not remove original copyright notices.

The source-to-binary provenance now records a local build from these pinned inputs;
bit-for-bit reproducibility across host toolchains is not promised. Maintain source
availability for every distributed version. Worker separation is not a legal
exemption from GPL obligations across an application. Copyright licenses and codec
patents remain separate; no universal patent clearance is claimed.
