@devenvy/ffmpeg-build

中文文档
0.0.24发布于 2026/11/11MITES Module构建来源已验证近 30 天下载 5604

Build FFmpeg your way: version, platforms, license, libraries and patches from one YAML file, with locked versions and checked licenses

原始使用文档
文档目录7 节
  1. Platforms
  2. Install
  3. Quick start
  4. Commands
  5. Documentation
  6. Development
  7. License

ffmpeg-build

Build FFmpeg your way: the FFmpeg version, platforms, license, libraries and your own patches, from one YAML file. Every library version is locked, every license is checked before anything builds, and every archive says what it was made from.

# ffmpeg-build.yml
bases:
  common: { with: [dav1d, opus, srt] }
targets:
  linux-x64-lgplv3:
    { platform: linux-x64, license: lgplv3, ffmpeg: 9, base: [common], with: [vaapi] }
  win-x64-gplv3:
    { platform: win-x64, license: gplv3, ffmpeg: 9, base: [common], with: [x264, x265] }
ffmpeg-build check                          # is every target possible? (offline)
ffmpeg-build lock                           # pick and lock the versions (asks upstream)
ffmpeg-build build --target win-x64-gplv3   # ffmpeg-9.x.y-win-x64-gplv3.tar.gz and -dev.tar.gz

Status: 0.x, early. Every platform below builds and reproduces the published devenvy/ffmpeg builds, and releases are built, published and fetched end to end in CI. Until 1.0 the ffmpeg-build.yml format, ffmpeg.lock and the @v0 workflow inputs may still change; a release that changes them says so in its notes.

Platforms

Linux (glibc 2.28+)linux-x64, linux-arm64, linux-armhf
Linux (musl)linux-musl-x64, linux-musl-arm64
Windowswin-x64, win-arm64
Androidandroid-arm64, android-x64
macOSosx-arm64, osx-x64
iOS and Mac Catalystios-arm64, ios-sim-arm64, maccatalyst-arm64, maccatalyst-x64

Linux, Windows and Android build in pinned Docker images on any host; Apple platforms build on a Mac with Xcode. Each one reproduces the builds devenvy/ffmpeg publishes (files, configure flags, components and dependencies, with every difference listed and explained). Vulkan on Apple runs on MoltenVK, as devenvy/ffmpeg's does (v3 only: it is Apache-2.0): macOS archives carry the Vulkan loader, libMoltenVK.dylib and MoltenVK_icd.json (point VK_ICD_FILENAMES at it); on iOS and Mac Catalyst MoltenVK is linked into the libav* frameworks, and an app links -framework Metal -framework IOSurface -framework Foundation -framework QuartzCore -framework CoreGraphics -framework UIKit (and -framework IOKit on Mac Catalyst).

Install

npm install --global @devenvy/ffmpeg-build      # Node 24+

Building also needs Docker (Linux, Windows, Android targets) or Xcode (Apple targets); lock, update and outdated need git.

Quick start

mkdir my-ffmpeg && cd my-ffmpeg
ffmpeg-build init --license lgplv3 --platforms linux-x64,win-x64   # from the shipped targets
ffmpeg-build profile remove whisper --from linux-x64-lgplv3        # make it yours
ffmpeg-build check && ffmpeg-build lock
ffmpeg-build build --target linux-x64-lgplv3

Getting started walks through a small first build, then CI that builds and publishes releases, and a product that downloads them.

Commands

init         write ffmpeg-build.yml from the shipped targets
check        is every target possible? (offline)
plan         what each target builds: options, libraries, versions (offline)
show         what one target gets and which base gave it; --has <name>: which targets get it
targets      the targets (--json for CI matrices)
options      what a target can list: library, licenses, platforms (offline)
profile      add | remove | missing: edit ffmpeg-build.yml in place, keeping its comments
lock         write ffmpeg.lock, looking up only what is missing
outdated     what is newer upstream (read-only)
update       move ffmpeg.lock to the newest allowed versions (and write the PR text)
build        build one target in its pinned toolchain
test         run a build where this machine can (a library build: link a program against it, run that where it can)
releases     each release's next tag, and whether it changed since it was last published
bundle       write a release's sources archive, manifest.yml, SHA256SUMS and notes (--apple: the iOS bundle)
fetch        take a published build (for products that don't build FFmpeg)
migrate      convert a folder of old matrix profiles
guide        the step-by-step guide, for people, scripts and AI agents

Most take --json. Nothing prompts. Exit codes: 0 fine, 1 a target has problems, 2 a usage, data, network or tool problem (the message says which).

Documentation

  • Getting started: a first build, CI and releases, a product; environment variables
  • Targets: ffmpeg-build.yml, bases, licenses, pins, patches, updates
  • Building: toolchains, caching, THIRD-PARTY-NOTICES.txt, what a build was made from
  • Releases, CI and products: release tags, workflows, fetch
  • The commands (ffmpeg-build guide): in the order you'd use them, with exit codes

Development

pnpm install
pnpm test                                                 # vitest
pnpm run dev check                                        # the CLI from source, in the folder you are in
node <path to the engine>/src/cli.ts check                # the same, from anywhere (or `npm link` once)

See DEVELOPMENT.md for the checks CI runs, how recipes and platforms fit together, and how releases go out.

License

The engine is MIT. The FFmpeg builds it produces are under the license each target chooses (LGPL or GPL, or nonfree for internal use), and carry every component's license in THIRD-PARTY-NOTICES.txt at their root.

版本与发布记录

@devenvy/ffmpeg-build 共发布 25 个版本,首次发布于 2026/10/15;过去 12 个月发布了 25 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.24latest2026/11/111 天前
0.0.232026/11/092 天前
0.0.222026/11/066 天前
0.0.212026/11/029 天前
0.0.202026/10/2715 天前
0.0.192026/10/2715 天前

关于 @devenvy/ffmpeg-build 的常见问题

@devenvy/ffmpeg-build 是什么?

Build FFmpeg your way: version, platforms, license, libraries and patches from one YAML file, with locked versions and checked licenses

如何安装 @devenvy/ffmpeg-build?

在项目目录运行 npm install @devenvy/ffmpeg-build,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ffmpeg-build,可以用 npx ffmpeg-build 直接运行。

@devenvy/ffmpeg-build 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/devenvy__ffmpeg-build 是否存在。

@devenvy/ffmpeg-build 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@devenvy/ffmpeg-build 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@devenvy/ffmpeg-build 可以商用吗?

@devenvy/ffmpeg-build 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@devenvy/ffmpeg-build 的下载量有多少?

根据 npm 官方下载统计,@devenvy/ffmpeg-build 在 2026/10/12 – 2026/11/10 这 30 天内被下载 5,604 次,日均约 187 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@devenvy/ffmpeg-build 还在维护吗?

最新版本 0.0.24 发布于 2026/11/11(1 天前);至今共发布 25 个版本,其中过去 12 个月发布了 25 个;首次发布于 2026/10/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。