Add libaom to support AV1 codec#13
Merged
Merged
Conversation
Use a stable CMake toolchain setup, make pkg-config discovery robust for lib/lib64, and stop masking arm build failures in Docker so ffmpeg AV1 configuration errors surface directly. Made-with: Cursor
Switch deprecated macOS 13 labels to supported macOS 15 arm64/intel runners and make the libX11 cleanup step non-fatal so jobs can start reliably. Made-with: Cursor
Disable NASM only on darwin/x64 to avoid libaom CMake failures on GitHub runners that report unsupported NASM multipass optimization. Made-with: Cursor
Build libaom in 8-bit mode and rely on dav1d for AV1 decoding to trim artifact size while keeping AV1 encode support. Made-with: Cursor
JonnyBurger
requested changes
Mar 18, 2026
Member
JonnyBurger
left a comment
There was a problem hiding this comment.
-> Downloaded the binaries and put them in remotion-dev/rust-ffmpeg-sys
-> Updated Cargo.toml in remotion-dev/rust-ffmpeg
-> Updated Cargo.toml in remotion-dev/remotion
-> Ran bun build.ts --all in packages/compositor
Unfortunately remotion-dev/remotion does not compile, whereas it did before:
Updating git repository `https://github.com/remotion-dev/rust-ffmpeg`
Updating git repository `https://github.com/remotion-dev/rust-ffmpeg-sys`
Locking 2 packages to latest compatible versions
Adding ffmpeg-next v7.1.0 (https://github.com/remotion-dev/rust-ffmpeg?rev=8f113e914929e0f0ca14017701bb3b51a471843c#8f113e91)
Adding ffmpeg-sys-next v7.1.0 (https://github.com/remotion-dev/rust-ffmpeg-sys?rev=e92611248be5b8dbc07831e531b688882a94a238#e9261124)
cargo build --release --target=aarch64-apple-darwin
Compiling ffmpeg-sys-next v7.1.0 (https://github.com/remotion-dev/rust-ffmpeg-sys?rev=e92611248be5b8dbc07831e531b688882a94a238#e9261124)
error: failed to run custom build command for `ffmpeg-sys-next v7.1.0 (https://github.com/remotion-dev/rust-ffmpeg-sys?rev=e92611248be5b8dbc07831e531b688882a94a238#e9261124)`
Caused by:
process didn't exit successfully: `/Users/jonathanburger/remotion/packages/compositor/target/release/build/ffmpeg-sys-next-1cd3941a4f03cfd3/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-env=TARGET=aarch64-apple-darwin
cargo:rustc-link-search=native=/Users/jonathanburger/.cargo/git/checkouts/rust-ffmpeg-sys-c5933b9ebbab4aba/e926112/extracted/aarch64-apple-darwin/remotion/lib
cargo:rustc-link-lib=dylib=avcodec
cargo:rustc-link-lib=dylib=avdevice
cargo:rustc-link-lib=dylib=avfilter
cargo:rustc-link-lib=dylib=avformat
cargo:rustc-link-lib=dylib=avutil
cargo:rustc-link-lib=dylib=swresample
cargo:rustc-link-lib=dylib=swscale
OPT_LEVEL = Some(3)
OUT_DIR = Some(/Users/jonathanburger/remotion/packages/compositor/target/aarch64-apple-darwin/release/build/ffmpeg-sys-next-9d7364709ac0aa02/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
CC_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
CC_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET
MACOSX_DEPLOYMENT_TARGET = None
cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
CFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
CFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
--- stderr
check.c:3:22: fatal error: 'libavutil/avutil.h' file not found
3 | #include <libavutil/avutil.h>
| ^~~~~~~~~~~~~~~~~~~~
1 error generated.
thread 'main' panicked at /Users/jonathanburger/.cargo/git/checkouts/rust-ffmpeg-sys-c5933b9ebbab4aba/e926112/build.rs:263:9:
Compile failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
255 |
256 | const optimizations = all
257 | ? `-C opt-level=3 -C lto=fat -C strip=debuginfo -C embed-bitcode=yes ${rPathOrigin} ${macOSHeaderPad}`
258 | : macOSHeaderPad;
259 |
260 | execSync(command, {
^
error: Command failed: cargo build --release --target=aarch64-apple-darwin
signal: null,
status: 101,
output: [ null, null, null ],
pid: 2354,
stdout: null,
stderr: null,
at genericNodeError (node:child_process:998:13)
at checkExecSyncError (node:child_process:458:27)
at execSync (node:child_process:278:31)
at /Users/jonathanburger/remotion/packages/compositor/build.ts:260:2
at loadAndEvaluateModule (2:1)
Bun v1.3.3 (macOS arm64)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for remotion-dev/remotion#6771