$npx -y skills add remotion-dev/remotion --skill update-remotion-rust-ffmpegUpdate Remotion's ffmpeg-next Git revision to a published rust-ffmpeg commit, refresh Cargo.lock, rebuild all supported compositor binaries, validate the monorepo, and open a draft pull request. Use for the final step of the rust-ffmpeg binary update chain.
| 1 | # Update Remotion Rust FFmpeg |
| 2 | |
| 3 | Require the full published `rust-ffmpeg` commit SHA from `$update-rust-ffmpeg-sys`. |
| 4 | |
| 5 | Read [`../pr/SKILL.md`](../pr/SKILL.md) and [`../pr-name/SKILL.md`](../pr-name/SKILL.md) before committing or opening the pull request. |
| 6 | |
| 7 | ## Prepare the worktree |
| 8 | |
| 9 | Run from the dedicated Remotion worktree on `codex/update-rust-ffmpeg`. Never perform this work in the primary `/Users/jonathanburger/remotion` checkout. |
| 10 | |
| 11 | Fetch `origin`. If the branch has no release commits yet, fast-forward it to `origin/main`. Do not rebase, reset, or overwrite unrelated work. |
| 12 | |
| 13 | Allow this skill's own tracked `.agents/skills/update-remotion-rust-ffmpeg` files to exist unchanged. Stop on any pre-existing change that is not explicitly part of the requested pull request. |
| 14 | |
| 15 | Verify that the supplied full SHA is reachable from `remotion-dev/rust-ffmpeg`'s `main` branch. Read that commit's `Cargo.toml` and record the exact `ffmpeg-sys-next` revision for later lockfile verification. |
| 16 | |
| 17 | ## Update Cargo and rebuild artifacts |
| 18 | |
| 19 | Change only the `ffmpeg-next.rev` value in `packages/compositor/Cargo.toml` to the supplied full SHA. From `packages/compositor`, run: |
| 20 | |
| 21 | ```sh |
| 22 | cargo update -p ffmpeg-next |
| 23 | ``` |
| 24 | |
| 25 | Verify in `Cargo.lock` that: |
| 26 | |
| 27 | - `ffmpeg-next` resolves to the supplied `rust-ffmpeg` SHA; |
| 28 | - `ffmpeg-sys-next` resolves to the recorded `rust-ffmpeg-sys` SHA. |
| 29 | |
| 30 | Install workspace dependencies without changing the lockfile: |
| 31 | |
| 32 | ```sh |
| 33 | bun install --frozen-lockfile |
| 34 | ``` |
| 35 | |
| 36 | Install cross-compilation toolchains if `packages/compositor/toolchains` is absent: |
| 37 | |
| 38 | ```sh |
| 39 | cd packages/compositor |
| 40 | bun install-toolchain.ts |
| 41 | bun run build-all |
| 42 | ``` |
| 43 | |
| 44 | The all-platform build must complete for Windows x64 GNU, macOS ARM64/x64, and Linux ARM64/x64 GNU/musl. On macOS, ensure an MSVCRT-targeting `x86_64-w64-mingw32-gcc` linker is available before running the build; do not use a UCRT-defaulting toolchain. It refreshes both the `remotion` executables and the FFmpeg shared libraries/CLI files in their platform packages. Do not substitute a native-only build. |
| 45 | |
| 46 | From the repository root, run: |
| 47 | |
| 48 | ```sh |
| 49 | bun run build |
| 50 | bun run stylecheck |
| 51 | git diff --check |
| 52 | ``` |
| 53 | |
| 54 | Inspect the diff. It may contain: |
| 55 | |
| 56 | - `packages/compositor/Cargo.toml` and `packages/compositor/Cargo.lock`; |
| 57 | - rebuilt files under the six `packages/compositor-{darwin,linux}-*` platform packages and `packages/compositor-win32-x64-msvc`. |
| 58 | |
| 59 | Stop if unrelated tracked files changed. Confirm that the Windows compositor package changed, including `remotion.exe` and the FFmpeg files from the updated archive. Run `objdump -p packages/compositor-win32-x64-msvc/remotion.exe`: require `msvcrt.dll` and reject `api-ms-win-crt-*` or `ucrtbase.dll` imports. |
| 60 | |
| 61 | ## Commit, push, and open the PR |
| 62 | |
| 63 | Before committing, check for an existing pull request for the current branch. If one exists, report it and stop instead of duplicating or rewriting it. |
| 64 | |
| 65 | Stage only the two Cargo files, the seven rebuilt compositor platform packages, `packages/compositor/build.ts`, and any intentional update to this skill. Use this commit and PR title: |
| 66 | |
| 67 | ```text |
| 68 | `@remotion/compositor`: Update rust-ffmpeg and rebuild binaries |
| 69 | ``` |
| 70 | |
| 71 | Push once with `git push -u origin HEAD`. Never force-push. If the push is rejected, stop and report it. |
| 72 | |
| 73 | Write a concise PR body to a temporary Markdown file. Include the full `rust-ffmpeg` and `rust-ffmpeg-sys` SHAs, the splitter source SHA if available in the handoff, the seven rebuilt targets, and validation results. Create a draft PR against `main` with `gh pr create --draft --body-file`; do not pass the body inline. |
| 74 | |
| 75 | ## Finish the chain |
| 76 | |
| 77 | Report the PR URL, branch, all three source commit SHAs available in the handoff, rebuilt targets, and validation results. There is no next repository; the multi-repository update chain is complete. |