# Web FFmpeg source and build information

This directory provides upstream source archives, build materials and license notices for the web FFmpeg component. It contains no KolWrite or KolHive proprietary application source.

The distributed ffmpeg-core.wasm matches the ESM object in npm @ffmpeg/core 0.12.10 byte for byte (SHA-256 in manifest.json). The served glue ffmpeg-core.js removes two trailing whitespace characters, adds a dated license/source notice, and preserves the normal C return code from ffprobe. The original glue discarded that return and reported valid probes as -1 after reset. Apply local-core-whitespace.patch, local-core-notice.patch, and local-core-ffprobe-return.patch in that order to the npm ESM file to obtain the served glue exactly. The manifest records the npm, pre-notice, notice-only and served hashes, and the hashes of all three patches. The ffprobe correction changes executable JavaScript; no WebAssembly instructions were changed. The MIT wrapper is @ffmpeg/ffmpeg 0.12.15 with three trailing whitespace removals in classes.js.

The upstream release is ffmpegwasm/ffmpeg.wasm v12.15, commit 71aa99d37c02a7b4c435275ca9ef50e612f6efa1. Its Dockerfile, Makefile, build scripts, bind sources and modified fftools are in the ffmpeg.wasm archive. The main repository tag v0.12.10 is a different earlier source release and is not used here.

The Makefile production single-thread target is make prd. It sets FFMPEG_ST=yes and EXTRA_CFLAGS=-O3 -msimd128; FFMPEG_MT and EXTRA_LDFLAGS are empty. The container toolchain is emscripten/emsdk:3.1.40. The upstream CI definition uses that target; reading it does not require or authorize running GitHub Actions. Use a local build environment.

All external library recipe references have been resolved to the immutable commits recorded in manifest.json and their source archives are provided here. The two moving refs, x264 4-cores and LAME master, currently resolve to commits dated 2022 and 2020 respectively, before the 2025 release. This is source-provenance evidence, not a claim of a bit-reproducible rebuild or a guarantee that historical moving refs were immutable. No independent rebuild has been performed.

For a local rebuild, extract the ffmpeg.wasm archive, retain its Dockerfile/Makefile/build scripts, and use the exact per-library source revisions in the manifest. When extracting the zimg source, place the supplied googletest source in test/extra/googletest if building its tests. The original recipe's recursive zimg clone fetches that test dependency. The separate SDL 2.24.2 source is the port pinned by Emscripten 3.1.40. Source archives preserve upstream source copyright headers and notices. General system build tools, the base container and operating-system package installation are not supplied as binary installers here.

The two tar.xz archives contain the same uncompressed upstream tar streams as their original tar.gz downloads; both compressed hashes are recorded. Every current download hash is in manifest.json.

These materials address the web component. They are not a licensing determination for the separate native FFmpegKit libraries or the proprietary application, and make no patent-license representation.
