Video 63: LGPL FFmpeg build, fetch, packaging and licence notices #403

Closed
opened 2026-11-13 02:50:45 +00:00 by charles · 0 comments
Owner

Plan: docs/superpowers/plans/2026-11-12-textchat.md, section "Task 63" (added 2026-11-13 at Charles's request: rename the client to Flaxative; in-client video playback with bundled LGPL FFmpeg, spec §19).

Task 63: LGPL FFmpeg build, fetch, packaging and licence notices

Issue: (to be created)
Closes: none.

Touches tools/, xtask, packaging/, .forgejo/ and the top-level README — serialised in
one task: the build recipe, the fetcher, the packager's library checks and the workflows must
agree on one file layout, and none of it is a crate the others build on except through xtask.

Files:

  • Create: tools/ffmpeg/{build.sh,configure-flags.txt,ffmpeg.lock,README.md}, xtask/src/ffmpeg.rs, packaging/licenses/ffmpeg/{COPYING.LGPLv2.1,NOTICE.txt}, packaging/licenses/dav1d/COPYING, .forgejo/workflows/ffmpeg.yaml (manual dispatch)
  • Modify: xtask/src/{main.rs,package.rs,package/libs.rs}, xtask/tests/package.rs, xtask/README.md, packaging/linux/AppRun, .forgejo/workflows/{ci.yaml,release.yaml}, README.md ("Building", "Licences")
  • Test: xtask/src/ffmpeg.rs (unit), xtask/src/package/libs.rs (unit), xtask/tests/package.rs

Interfaces:

  • Produces (tools/ffmpeg/ffmpeg.lock, TOML, the one place versions live): [ffmpeg] version (the newest 7.1.x point release when the task starts; rsmpeg's supported FFmpeg line decides 7.1 vs 8.0 — check docs.rs first and say which), source_url, source_sha256; [dav1d] version, source_url, source_sha256; [nv_codec_headers] version, source_url, source_sha256; revision: u32 (bumped when the flags change); [artifacts.linux-x86_64] and [artifacts.win-x64] { url, sha256 } — the built archives, attached to the Forgejo release ffmpeg-<version>-r<revision> of charles/fluxer-native together with the three source tarballs.
  • Produces (configure-flags.txt): --disable-everything --disable-autodetect --disable-programs --disable-doc --disable-network --disable-avdevice --disable-postproc --enable-shared --disable-static --enable-pic, components avcodec avformat avutil swscale swresample avfilter, filters abuffer abuffersink aformat aresample atempo, demuxers mov matroska ogg mp3 aac flac wav, parsers h264 hevc vp8 vp9 av1 aac opus vorbis mpegaudio flac, decoders h264 hevc vp8 vp9 av1 libdav1d mpeg4 aac opus vorbis mp3 flac pcm_s16le pcm_f32le, encoders and muxer for test clips only mpeg4 aac / mp4, bsfs h264_mp4toannexb hevc_mp4toannexb vp9_superframe_split, --enable-libdav1d; Linux --enable-vaapi --enable-hwaccel=h264_vaapi,hevc_vaapi,vp8_vaapi,vp9_vaapi,av1_vaapi --enable-ffnvcodec --enable-nvdec --enable-hwaccel=h264_nvdec,hevc_nvdec,vp8_nvdec,vp9_nvdec,av1_nvdec; Windows (mingw-w64 cross build, --target-os=mingw32 --arch=x86_64, -static-libgcc, static winpthreads) --enable-d3d11va --enable-hwaccel=h264_d3d11va,hevc_d3d11va,vp9_d3d11va,av1_d3d11va plus the nvdec set; both: --extra-ldflags giving each library RUNPATH=$ORIGIN on Linux. No protocol is enabled: all I/O goes through a custom AVIOContext (Task 64).
  • Produces (build.sh <linux|windows> <out-dir>): builds dav1d (meson, static PIC so it adds no file — or shared if static breaks FFmpeg's link; record which), nv-codec-headers, then FFmpeg with the flags above; fails if config.h has CONFIG_GPL 1, CONFIG_NONFREE 1 or CONFIG_VERSION3 1; writes buildinfo.toml (version, revision, the full configure line, license = avutil_license() from a tiny C check program, the source checksums) into the archive; on Windows also writes MSVC import libraries (.lib) from FFmpeg's .def files with llvm-dlltool (the clang toolchain CI already installs) so rusty_ffmpeg can link from MSVC. Archive layout: include/, lib/ (.so* or .lib), bin/ (Windo

🤖 Generated with Claude Code

Plan: `docs/superpowers/plans/2026-11-12-textchat.md`, section "Task 63" (added 2026-11-13 at Charles's request: rename the client to Flaxative; in-client video playback with bundled LGPL FFmpeg, spec §19). ### Task 63: LGPL FFmpeg build, fetch, packaging and licence notices **Issue:** (to be created) **Closes:** none. Touches `tools/`, `xtask`, `packaging/`, `.forgejo/` and the top-level README — serialised in one task: the build recipe, the fetcher, the packager's library checks and the workflows must agree on one file layout, and none of it is a crate the others build on except through `xtask`. **Files:** - Create: `tools/ffmpeg/{build.sh,configure-flags.txt,ffmpeg.lock,README.md}`, `xtask/src/ffmpeg.rs`, `packaging/licenses/ffmpeg/{COPYING.LGPLv2.1,NOTICE.txt}`, `packaging/licenses/dav1d/COPYING`, `.forgejo/workflows/ffmpeg.yaml` (manual dispatch) - Modify: `xtask/src/{main.rs,package.rs,package/libs.rs}`, `xtask/tests/package.rs`, `xtask/README.md`, `packaging/linux/AppRun`, `.forgejo/workflows/{ci.yaml,release.yaml}`, `README.md` ("Building", "Licences") - Test: `xtask/src/ffmpeg.rs` (unit), `xtask/src/package/libs.rs` (unit), `xtask/tests/package.rs` **Interfaces:** - Produces (`tools/ffmpeg/ffmpeg.lock`, TOML, the one place versions live): `[ffmpeg] version` (the newest 7.1.x point release when the task starts; rsmpeg's supported FFmpeg line decides 7.1 vs 8.0 — check docs.rs first and say which), `source_url`, `source_sha256`; `[dav1d] version, source_url, source_sha256`; `[nv_codec_headers] version, source_url, source_sha256`; `revision: u32` (bumped when the flags change); `[artifacts.linux-x86_64]` and `[artifacts.win-x64]` `{ url, sha256 }` — the built archives, attached to the Forgejo release `ffmpeg-<version>-r<revision>` of `charles/fluxer-native` together with the three source tarballs. - Produces (`configure-flags.txt`): `--disable-everything --disable-autodetect --disable-programs --disable-doc --disable-network --disable-avdevice --disable-postproc --enable-shared --disable-static --enable-pic`, components `avcodec avformat avutil swscale swresample avfilter`, filters `abuffer abuffersink aformat aresample atempo`, demuxers `mov matroska ogg mp3 aac flac wav`, parsers `h264 hevc vp8 vp9 av1 aac opus vorbis mpegaudio flac`, decoders `h264 hevc vp8 vp9 av1 libdav1d mpeg4 aac opus vorbis mp3 flac pcm_s16le pcm_f32le`, encoders and muxer for test clips only `mpeg4 aac` / `mp4`, bsfs `h264_mp4toannexb hevc_mp4toannexb vp9_superframe_split`, `--enable-libdav1d`; Linux `--enable-vaapi --enable-hwaccel=h264_vaapi,hevc_vaapi,vp8_vaapi,vp9_vaapi,av1_vaapi --enable-ffnvcodec --enable-nvdec --enable-hwaccel=h264_nvdec,hevc_nvdec,vp8_nvdec,vp9_nvdec,av1_nvdec`; Windows (mingw-w64 cross build, `--target-os=mingw32 --arch=x86_64`, `-static-libgcc`, static winpthreads) `--enable-d3d11va --enable-hwaccel=h264_d3d11va,hevc_d3d11va,vp9_d3d11va,av1_d3d11va` plus the nvdec set; both: `--extra-ldflags` giving each library `RUNPATH=$ORIGIN` on Linux. No protocol is enabled: all I/O goes through a custom `AVIOContext` (Task 64). - Produces (`build.sh <linux|windows> <out-dir>`): builds dav1d (meson, static PIC so it adds no file — or shared if static breaks FFmpeg's link; record which), nv-codec-headers, then FFmpeg with the flags above; **fails if `config.h` has `CONFIG_GPL 1`, `CONFIG_NONFREE 1` or `CONFIG_VERSION3 1`**; writes `buildinfo.toml` (`version`, `revision`, the full configure line, `license` = `avutil_license()` from a tiny C check program, the source checksums) into the archive; on Windows also writes MSVC import libraries (`.lib`) from FFmpeg's `.def` files with `llvm-dlltool` (the clang toolchain CI already installs) so `rusty_ffmpeg` can link from MSVC. Archive layout: `include/`, `lib/` (`.so*` or `.lib`), `bin/` (Windo 🤖 Generated with [Claude Code](https://claude.com/claude-code)
charles added this to the Text chat milestone 2026-11-13 02:50:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#403
No description provided.