FFmpeg in Kalamu

FFmpeg in Kalamu

How the app uses FFmpeg, how the bundled build is made, and what keeps it compatible with an MIT-licensed app distributed through the Microsoft Store.

What it does

FFmpeg and ffprobe run as separate programs, started by the media crate (crates/media/src/ffmpeg.rs). FFmpeg is never linked into Kalamu.

Release builds look only next to the app’s executable, so no environment variable chooses the program run on a researcher’s recordings. Development builds also look in KALAMU_FFMPEG_DIR first and on PATH last. Without FFmpeg, recordings in a format the provider takes are sent whole, and video is unavailable.

The bundled build

.github/workflows/ffmpeg.yml builds FFmpeg 9.0.2 with libopus 1.6.1 for Windows x64 and ARM64, cross-compiled with llvm-mingw, and for macOS on Apple Silicon, built natively with Apple’s clang for macOS 13 and later:

Each run uploads the two programs with the LGPL text, Opus’s BSD licence, the exact configure line (BUILD.txt) and the source tarballs they were built from. After a run, the archives are published as assets of a GitHub release (ffmpeg-<version>-<n>) and their SHA-256 written into scripts/ffmpeg.json. npm run fetch:ffmpeg then installs the pinned archive into src-tauri/binaries/, and release builds add --config src-tauri/tauri.ffmpeg.conf.json, which bundles both programs as sidecars and their licences as resources. Development builds need none of this.

Licence obligations, and how each is met

From FFmpeg’s licence checklist:

Obligation How Kalamu meets it
No GPL or non-free parts Configure flags above; checked by the workflow
Separate, replaceable library code Separate programs, not linked; names unchanged
Offer the exact source, with any changes and the build configuration Source tarballs and BUILD.txt published with every bundled build; FFmpeg is not modified
Credit FFmpeg and the LGPL where the app is downloaded and in the About box Store listing, GitHub releases and the About section of Settings
Mention FFmpeg and the LGPL in the EULA; claim no ownership of it docs/store-license-terms.md
Do not forbid reverse engineering Our own licence terms replace Microsoft’s standard ones (below)

Microsoft Store

Two points matter for the Store:

Checked against Microsoft Store Policies 7.20 (14 September 2026):

Users never install FFmpeg themselves: it is part of the app on every route (Store, GitHub installers, the macOS disk image). This is not legal advice; check the policies again before each submission.