update-ffmpeg

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update Remotion FFmpeg

更新 Remotion FFmpeg

The FFmpeg build recipes, Rust bindings and wrapper live in
packages/compositor/ffmpeg
. The compositor and wrapper use local Cargo dependencies, and updates are reviewed in a single Remotion pull request.
FFmpeg 的构建配方(build recipes)、Rust bindings 和 wrapper 位于
packages/compositor/ffmpeg
。compositor 和 wrapper 使用本地 Cargo 依赖,所有更新都在单个 Remotion pull request 中进行评审。

Collect and import

收集与导入

Use the full source commit SHA for the intended FFmpeg build.
Explicitly trigger the CircleCI pipeline on the branch containing that commit using the web app's Trigger Pipeline button or the API. No parameters are needed: the workflow only runs for
pipeline.trigger.type == "api"
, which covers both methods. See the trigger instructions. Wait for its five jobs and the macOS GitHub Actions build for the same commit to succeed. Then collect artifacts from the Remotion repository root:
sh
node packages/compositor/ffmpeg/collect-artifacts.mjs --sha <full-source-sha>
The collector requires successful GitHub Actions and CircleCI builds for that same SHA. Do not combine runs or fill missing targets from an older build. Keep the returned
MANIFEST.json
and
SHA256SUMS
with the seven archives.
Upload the verified archives to a new immutable directory on
remotion.media
using the repository's R2 upload workflow. Never overwrite an existing release directory. Then run:
sh
node packages/compositor/ffmpeg/import-artifacts.mjs <artifact-directory> <immutable-https-base-url>
The importer verifies local and hosted archive checksums before updating
assets.json
and the seven canonical generated bindings. Archives remain ignored downloads. Do not hand-edit bindings.
使用目标 FFmpeg 构建的完整源 commit SHA。
通过 web 应用的 Trigger Pipeline 按钮或 API,显式触发包含该 commit 的分支上的 CircleCI pipeline。无需任何参数:该 workflow 仅在
pipeline.trigger.type == "api"
时运行,这覆盖了上述两种方式。参见 触发说明。等待其五个 job 以及针对同一 commit 的 macOS GitHub Actions 构建全部成功。然后从 Remotion 仓库根目录收集 artifacts:
sh
node packages/compositor/ffmpeg/collect-artifacts.mjs --sha <full-source-sha>
收集器要求同一 SHA 对应的 GitHub Actions 和 CircleCI 构建均成功。不要合并不同运行的结果,也不要用旧构建填补缺失的目标。保留返回的
MANIFEST.json
和
SHA256SUMS
,以及七个归档文件。
使用仓库的 R2 上传 workflow,将已验证的归档文件上传到
remotion.media
上一个新的不可变目录。切勿覆盖已有的发布目录。然后运行:
sh
node packages/compositor/ffmpeg/import-artifacts.mjs <artifact-directory> <immutable-https-base-url>
导入器会在更新
assets.json
和七个规范的生成 bindings 之前,先校验本地与托管归档文件的 checksum。归档文件仍然是会被忽略的下载产物。不要手动编辑 bindings。

Rebuild and validate

重建与验证

Install dependencies with
bun install --frozen-lockfile
. From
packages/compositor
, install missing cross-compilation toolchains with
bun install-toolchain.ts
, then run
bun run build-all
.
Require all seven targets: Windows x64 GNU, macOS ARM64/x64, Linux ARM64/x64 GNU/musl. On macOS, use an MSVCRT-targeting
x86_64-w64-mingw32-gcc
. Verify
objdump -p packages/compositor-win32-x64-msvc/remotion.exe
imports
msvcrt.dll
and no
api-ms-win-crt-*
or
ucrtbase.dll
.
From the repository root, run
bun run build
,
bun run stylecheck
, and
git diff --check
. Inspect the FFmpeg metadata/binding changes and all seven rebuilt compositor packages. Do not include unrelated changes.
When a PR is requested, read
../pr/SKILL.md
and
../pr-name/SKILL.md
. Include the full source SHA, hosted archive directory, CI provenance, rebuilt targets and validation results. Use the title:
text
`@remotion/compositor`: Update FFmpeg and rebuild binaries
packages/lambda-binaries
packages Chromium and fonts and does not need a rebuild for an FFmpeg-only update.
使用
bun install --frozen-lockfile
安装依赖。在
packages/compositor
目录下,通过
bun install-toolchain.ts
安装缺失的交叉编译工具链,然后运行
bun run build-all
。
必须覆盖全部七个目标:Windows x64 GNU、macOS ARM64/x64、Linux ARM64/x64 GNU/musl。在 macOS 上,使用以 MSVCRT 为目标的
x86_64-w64-mingw32-gcc
。验证
objdump -p packages/compositor-win32-x64-msvc/remotion.exe
导入了
msvcrt.dll
,且不包含
api-ms-win-crt-*
或
ucrtbase.dll
。
在仓库根目录运行
bun run build
、
bun run stylecheck
和
git diff --check
。检查 FFmpeg 的元数据/bindings 变更以及全部七个重建的 compositor 包。不要包含无关的改动。
当需要发起 PR 时,阅读
../pr/SKILL.md
和
../pr-name/SKILL.md
。PR 中需包含完整的源 SHA、托管归档目录、CI 来源信息、重建的目标以及验证结果。使用如下标题:
text
`@remotion/compositor`: Update FFmpeg and rebuild binaries
packages/lambda-binaries
打包了 Chromium 和字体,对于仅更新 FFmpeg 的场景无需重建。