Skip to content

feat(pkg): compat.ffmpeg 8.1.2 — 全源码直编形态(config 快照 + 源列表)#74

Merged
Sunrisepeak merged 2 commits into
mainfrom
feat/add-compat-ffmpeg
Jul 18, 2026
Merged

feat(pkg): compat.ffmpeg 8.1.2 — 全源码直编形态(config 快照 + 源列表)#74
Sunrisepeak merged 2 commits into
mainfrom
feat/add-compat-ffmpeg

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

概要

收录 compat.ffmpeg 8.1.2,引入第五种包形态:全源码直编——上游 ./configure 产物一次性冻结进描述符(generated_files,15 个文件 ≈240KB),配合 make -n 推导的精确源列表(2281 TU,含 157 个 NASM .asm),由 mcpp 直接编译全部源码。消费者构建期零 configure/make/CMake(对比 compat.opencv 的 install()+CMake 形态)。

要点

  • 档位:--disable-autodetect --disable-programs --disable-doc,其余全默认 → 全部内部组件(600+ decoders / 358 demuxers / 7 库),LGPL-2.1+,hermetic
  • 汇编:157 个 .asm 直接进 sources(mcpp 0.0.95 汇编一等公民);nasm 惰性解析(PATH → sandbox → xlings,xim 已收录)
  • 平台:linux-x86_64 only(先例 compat.x11);macOS/Windows 待各自快照(ffmpeg-m 的 macOS CI 已在产 artifact;依赖侧 cfg sources 需 mcpp#229)
  • CN 镜像:mcpp-res/ffmpeg release 8.1.2,已验证 200 + 与 GLOBAL 字节一致
  • example:tests/examples/ffmpeg,gui-stack 模式(cfg(linux) 依赖,非 Linux no-op),断言版本/解码器/demuxer 数
  • ⚠️ MCPP_VERSION 0.0.94 → 0.0.95:描述符 per-glob flags 是 0.0.95 语法(mcpp#223);floor-first 规则的预期路径
  • 描述符由 ffmpeg-m tools/gen_descriptor.py 生成(勿手改);升级 = 重跑生成器 + review diff

本地验证(mcpp 0.0.95 = bump 后 CI pin)

  • example mcpp test 通过:ffmpeg 60.26: decoders+demuxers(358) ok
  • 157 个 .asm.o 全部产出,最终二进制 3260 个 ssse3/avx2 符号
  • lint 五项全过(语法 / 必填字段 / 无前导 v / 镜像表 / mcpp xpkg parse)

设计文档:.agents/docs/2026-07-18-add-ffmpeg-plan.md;完整调研与 POC:ffmpeg-m 仓 .agents/docs/

配套:ffmpeg-m 将瘦身为纯模块层(移除 vendor,依赖本包)—— mcpplibs/ffmpeg-m#1 的后续 commit。

@Sunrisepeak

Copy link
Copy Markdown
Member Author

CI 证据记录(dispatch run 29617083414,供 mcpp 侧调试参考):

windows ✅ 首绿(0.0.94 钉回生效,#230 规避确认)。

linux ❌,两个独立原因:

  1. nasm 自举时序(13aa71d 移除 apt nasm 后):

    22:15:46.05 error: NASM sources (.asm) present but no usable nasm (>= 2.16) was found or installable...
    22:15:46.29 Bootstrap nasm into mcpp sandbox (one-time)
    

    错误在 “Bootstrap … (one-time)” 消息之前 0.24s 打出——自举似乎被触发但 ffmpeg 成员的构建已先行判死。注:本 job 结束时 registry 缓存已保存(应含自举产物),重跑该 job 可验证:若重跑即绿,则纯时序问题(bootstrap 完成后未重试/未阻塞等待)。

  2. compat.opencv install() 冷环境闪失(与 ffmpeg 无关的存量抖动):
    error: fetch 'compat.opencv@4.13.0' failed (exit 1) —— 三轮冷环境战绩:round1 ❌ / round2 ✅ / 本轮 ❌,同一 descriptor 同一 pin(0.0.95)。install() 钩子内 CMake 构建的错误被吞(log 落在包内 build log),建议 mcpp 侧把 install() 失败时的日志尾部透传到 stderr。

已触发 failed-jobs 重跑验证缓存热路径。

FFmpeg 8.1.2 compiled entirely by mcpp: 2281 TUs (incl. 157 NASM .asm)
from the official source tarball, no configure/make at build time — the
platform config snapshot ships as generated_files in the descriptor.
Linux-only via cfg(linux); the test member compiles to a no-op main()
elsewhere so the workspace stays green on macOS/Windows.
- All mcpp pins -> 0.0.96; drop the windows 0.0.94 pin-back (mcpp#230
  fixed in 0.0.96).
- Replace host nasm with one 'mcpp index update' before the workspace
  run: 0.0.96's release archive vendors an index snapshot cut before
  xim-pkgindex#398 fixed the nasm descriptor, and the bootstrap is
  offline-first (mcpp#232). Drop once a release vendors a newer snapshot.
- Selective member testing: PRs map changed files -> affected workspace
  members and run 'mcpp test -p <member>' per member instead of the full
  'mcpp test --workspace'. Full run stays for non-PR events, changes to
  this workflow (carries the version pins), shared test scripts, or
  non-member mcpp.toml edits; new-package PRs (members list append)
  select only the added member.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant