From a31282293ecd3256531a888ba9d3103efa5ae6d8 Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Tue, 3 Mar 2026 18:14:50 +0100 Subject: [PATCH 1/9] Add libaom to support AV1 codec --- clean.mjs | 1 + compile-av1.mjs | 96 +++++++++++++++++++++++++++++++++++++++++++++- compile-ffmpeg.mjs | 2 + 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/clean.mjs b/clean.mjs index dcfbed6..8f18044 100644 --- a/clean.mjs +++ b/clean.mjs @@ -15,6 +15,7 @@ const paths = [ path.join(process.cwd(), "x264"), path.join(process.cwd(), "x265"), path.join(process.cwd(), "av1"), + path.join(process.cwd(), "aom"), path.join(process.cwd(), "zimg"), path.join(process.cwd(), "opus"), path.join(process.cwd(), "libmp3lame"), diff --git a/compile-av1.mjs b/compile-av1.mjs index 300eabe..bdcb75f 100644 --- a/compile-av1.mjs +++ b/compile-av1.mjs @@ -1,8 +1,23 @@ import { execSync } from "child_process"; import { join, dirname } from "node:path"; -import { existsSync, mkdirSync, rmSync, cpSync, writeFileSync } from "node:fs"; +import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs"; +import { PREFIX } from "./const.mjs"; -export const enableAv1 = (isWindows) => { +const getCmakeCommand = () => { + try { + execSync("cmake --version", { stdio: "ignore" }); + return "cmake"; + } catch { + try { + execSync("cmake3 --version", { stdio: "ignore" }); + return "cmake3"; + } catch { + throw new Error("Neither cmake nor cmake3 is available in PATH."); + } + } +}; + +const enableDav1d = (isWindows) => { const pkgConfig = ` prefix=${process.cwd()}/av1/build includedir=$\{prefix\}/include @@ -61,3 +76,80 @@ Cflags: -I$\{prefix\}/src -I$\{srcdir\}/src -I$\{prefix\} -I$\{srcdir\} -I$\{pre writeFileSync(outPath, pkgConfig); }; + +const enableLibaom = (isWindows) => { + const AOM_TAG = "v3.9.1"; + if (!existsSync("aom")) { + execSync("git clone https://aomedia.googlesource.com/aom aom", { + stdio: "inherit", + }); + } + + execSync("git fetch --tags", { + cwd: "aom", + stdio: "inherit", + }); + + execSync(`git checkout ${AOM_TAG}`, { + cwd: "aom", + stdio: "inherit", + }); + + rmSync("aom/build", { + force: true, + recursive: true, + }); + mkdirSync("aom/build", { + recursive: true, + }); + + const cmakeCmd = getCmakeCommand(); + execSync( + [ + cmakeCmd, + "..", + `-DCMAKE_INSTALL_PREFIX=${join(process.cwd(), "aom", PREFIX)}`, + "-DBUILD_SHARED_LIBS=OFF", + "-DENABLE_TESTS=0", + "-DENABLE_TESTDATA=0", + "-DENABLE_DOCS=0", + "-DENABLE_EXAMPLES=0", + "-DENABLE_TOOLS=0", + "-DENABLE_NASM=1", + "-DCONFIG_PIC=1", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + isWindows ? "-DCMAKE_SYSTEM_NAME=Windows" : null, + isWindows ? "-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc" : null, + isWindows ? "-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++" : null, + isWindows ? "-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres" : null, + isWindows ? "-DCMAKE_AR=x86_64-w64-mingw32-ar" : null, + isWindows ? "-DCMAKE_RANLIB=x86_64-w64-mingw32-ranlib" : null, + ] + .filter(Boolean) + .join(" "), + { + cwd: "aom/build", + stdio: "inherit", + } + ); + + execSync("make", { + cwd: "aom/build", + stdio: "inherit", + }); + + execSync("make install", { + cwd: "aom/build", + stdio: "inherit", + }); + + execSync("cp -r " + PREFIX + " ../", { + cwd: "aom", + stdio: "inherit", + }); +}; + +export const enableAv1 = (isWindows) => { + enableDav1d(isWindows); + enableLibaom(isWindows); +}; diff --git a/compile-ffmpeg.mjs b/compile-ffmpeg.mjs index bd7de15..83fd20e 100644 --- a/compile-ffmpeg.mjs +++ b/compile-ffmpeg.mjs @@ -213,6 +213,7 @@ execSync( "--enable-small", "--enable-shared", "--enable-libdav1d", + "--enable-libaom", "--enable-libzimg", "--enable-libfdk-aac", "--disable-static", @@ -262,6 +263,7 @@ execSync( "--enable-encoder=pcm_s24le", "--enable-encoder=libx264", "--enable-encoder=libx265", + "--enable-encoder=libaom-av1", "--enable-libvpx", "--enable-encoder=libvpx_vp8", "--enable-encoder=libvpx_vp9", From a3f617d2cffbffaf3b8c63fc1513aecf3299160f Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Wed, 4 Mar 2026 13:54:18 +0100 Subject: [PATCH 2/9] slimmer build --- .gitignore | 2 ++ clean.mjs | 1 + compile-av1.mjs | 16 ++++++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0fa339e..ec9cfda 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ out-test.png out-test.jpeg opus-1.3.1 av1 +aom +aom-build zimg fdk-aac-2.0.2 fdkaac.tar.gz diff --git a/clean.mjs b/clean.mjs index 8f18044..6d9633b 100644 --- a/clean.mjs +++ b/clean.mjs @@ -16,6 +16,7 @@ const paths = [ path.join(process.cwd(), "x265"), path.join(process.cwd(), "av1"), path.join(process.cwd(), "aom"), + path.join(process.cwd(), "aom-build"), path.join(process.cwd(), "zimg"), path.join(process.cwd(), "opus"), path.join(process.cwd(), "libmp3lame"), diff --git a/compile-av1.mjs b/compile-av1.mjs index bdcb75f..1ecc234 100644 --- a/compile-av1.mjs +++ b/compile-av1.mjs @@ -79,6 +79,7 @@ Cflags: -I$\{prefix\}/src -I$\{srcdir\}/src -I$\{prefix\} -I$\{srcdir\} -I$\{pre const enableLibaom = (isWindows) => { const AOM_TAG = "v3.9.1"; + const AOM_BUILD_DIR = "aom-build"; if (!existsSync("aom")) { execSync("git clone https://aomedia.googlesource.com/aom aom", { stdio: "inherit", @@ -95,11 +96,11 @@ const enableLibaom = (isWindows) => { stdio: "inherit", }); - rmSync("aom/build", { + rmSync(AOM_BUILD_DIR, { force: true, recursive: true, }); - mkdirSync("aom/build", { + mkdirSync(AOM_BUILD_DIR, { recursive: true, }); @@ -107,8 +108,9 @@ const enableLibaom = (isWindows) => { execSync( [ cmakeCmd, - "..", + join(process.cwd(), "aom"), `-DCMAKE_INSTALL_PREFIX=${join(process.cwd(), "aom", PREFIX)}`, + "-DCMAKE_BUILD_TYPE=MinSizeRel", "-DBUILD_SHARED_LIBS=OFF", "-DENABLE_TESTS=0", "-DENABLE_TESTDATA=0", @@ -118,6 +120,8 @@ const enableLibaom = (isWindows) => { "-DENABLE_NASM=1", "-DCONFIG_PIC=1", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DCONFIG_AV1_DECODER=0", + "-DCONFIG_AV1_ENCODER=1", isWindows ? "-DCMAKE_SYSTEM_NAME=Windows" : null, isWindows ? "-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc" : null, isWindows ? "-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++" : null, @@ -128,18 +132,18 @@ const enableLibaom = (isWindows) => { .filter(Boolean) .join(" "), { - cwd: "aom/build", + cwd: AOM_BUILD_DIR, stdio: "inherit", } ); execSync("make", { - cwd: "aom/build", + cwd: AOM_BUILD_DIR, stdio: "inherit", }); execSync("make install", { - cwd: "aom/build", + cwd: AOM_BUILD_DIR, stdio: "inherit", }); From 41a827eee0bf67a1d8d876abeb9566d116b6e28e Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Wed, 4 Mar 2026 15:32:09 +0100 Subject: [PATCH 3/9] Fix libaom integration for cross-platform CI builds. 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 --- Dockerfile-aws | 2 +- compile-av1.mjs | 31 ++++++++++++++++++++++++++----- compile-ffmpeg.mjs | 7 ++++++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Dockerfile-aws b/Dockerfile-aws index c7edec3..f363bf2 100644 --- a/Dockerfile-aws +++ b/Dockerfile-aws @@ -23,7 +23,7 @@ RUN amazon-linux-extras install epel python3.8 -y RUN python3.8 -m pip install meson RUN python3.8 -m pip install ninja RUN yum install yasm nasm unzip curl gcc gcc-c++ tar git make ca-certificates pkgconfig bash make cmake3 build-base llvm-static llvm-dev clang-static clang-dev perl zlib zlib-devel clang-libs clang ninja autoconf automake libtool patchelf -y -RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs old-cmake || tail -n 30 ffmpeg/ffbuild/config.log +RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs old-cmake RUN source "$HOME/.cargo/env" && cd app && node generate-bindings.mjs RUN source "$HOME/.cargo/env" && cd app && node zip.mjs RUN source "$HOME/.cargo/env" && cd app && node test-ffmpeg.mjs diff --git a/compile-av1.mjs b/compile-av1.mjs index 1ecc234..7ed5b4f 100644 --- a/compile-av1.mjs +++ b/compile-av1.mjs @@ -17,6 +17,17 @@ const getCmakeCommand = () => { } }; +const getToolPath = (tool) => { + try { + return execSync(`command -v ${tool}`, { + encoding: "utf8", + stdio: ["ignore", "pipe", "ignore"], + }).trim(); + } catch { + throw new Error(`Required tool '${tool}' is not available in PATH.`); + } +}; + const enableDav1d = (isWindows) => { const pkgConfig = ` prefix=${process.cwd()}/av1/build @@ -80,6 +91,15 @@ Cflags: -I$\{prefix\}/src -I$\{srcdir\}/src -I$\{prefix\} -I$\{srcdir\} -I$\{pre const enableLibaom = (isWindows) => { const AOM_TAG = "v3.9.1"; const AOM_BUILD_DIR = "aom-build"; + const windowsToolchain = isWindows + ? { + cc: getToolPath("x86_64-w64-mingw32-gcc"), + cxx: getToolPath("x86_64-w64-mingw32-g++"), + rc: getToolPath("x86_64-w64-mingw32-windres"), + ar: getToolPath("x86_64-w64-mingw32-ar"), + ranlib: getToolPath("x86_64-w64-mingw32-ranlib"), + } + : null; if (!existsSync("aom")) { execSync("git clone https://aomedia.googlesource.com/aom aom", { stdio: "inherit", @@ -110,6 +130,7 @@ const enableLibaom = (isWindows) => { cmakeCmd, join(process.cwd(), "aom"), `-DCMAKE_INSTALL_PREFIX=${join(process.cwd(), "aom", PREFIX)}`, + "-DCMAKE_INSTALL_LIBDIR=lib", "-DCMAKE_BUILD_TYPE=MinSizeRel", "-DBUILD_SHARED_LIBS=OFF", "-DENABLE_TESTS=0", @@ -123,11 +144,11 @@ const enableLibaom = (isWindows) => { "-DCONFIG_AV1_DECODER=0", "-DCONFIG_AV1_ENCODER=1", isWindows ? "-DCMAKE_SYSTEM_NAME=Windows" : null, - isWindows ? "-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc" : null, - isWindows ? "-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++" : null, - isWindows ? "-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres" : null, - isWindows ? "-DCMAKE_AR=x86_64-w64-mingw32-ar" : null, - isWindows ? "-DCMAKE_RANLIB=x86_64-w64-mingw32-ranlib" : null, + isWindows ? `-DCMAKE_C_COMPILER=${windowsToolchain.cc}` : null, + isWindows ? `-DCMAKE_CXX_COMPILER=${windowsToolchain.cxx}` : null, + isWindows ? `-DCMAKE_RC_COMPILER=${windowsToolchain.rc}` : null, + isWindows ? `-DCMAKE_AR=${windowsToolchain.ar}` : null, + isWindows ? `-DCMAKE_RANLIB=${windowsToolchain.ranlib}` : null, ] .filter(Boolean) .join(" "), diff --git a/compile-ffmpeg.mjs b/compile-ffmpeg.mjs index 83fd20e..2267db3 100644 --- a/compile-ffmpeg.mjs +++ b/compile-ffmpeg.mjs @@ -197,6 +197,11 @@ const extraLdFlags = [ execSync("cp -r remotion ffmpeg", { stdio: "inherit" }); +const pkgConfigDirs = [ + path.join(process.cwd(), PREFIX, "lib", "pkgconfig"), + path.join(process.cwd(), PREFIX, "lib64", "pkgconfig"), +]; + execSync( [ path.posix.join(process.cwd().replace(/\\/g, "/"), "ffmpeg", "configure"), @@ -297,7 +302,7 @@ execSync( { env: { ...process.env, - PKG_CONFIG_PATH: path.join(process.cwd(), PREFIX) + "/lib/pkgconfig", + PKG_CONFIG_PATH: pkgConfigDirs.join(path.delimiter), }, cwd: "ffmpeg", stdio: "inherit", From ae28e85dcecda3cb6526dc81b85a5032e06c487b Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Thu, 5 Mar 2026 10:01:56 +0100 Subject: [PATCH 4/9] Update GitHub Actions macOS runner labels. 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 --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d5bced..51fe085 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ env: FORCE_COLOR: 1 jobs: build: - name: Build on macOS M1 - runs-on: macos-13-xlarge + name: Build on macOS ARM64 + runs-on: macos-15-arm64 steps: - uses: actions/checkout@main - uses: actions/setup-node@v3 @@ -19,7 +19,7 @@ jobs: - name: Install deps run: HOMEBREW_INSTALL_FROM_API=1 brew install yasm nasm pkg-config cmake make meson ninja libtool autoconf automake - run: curl https://sh.rustup.rs -sSf | sh -s -- -y - - run: rm /opt/homebrew/opt/libx11/lib/libX11.6.dylib + - run: rm -f /opt/homebrew/opt/libx11/lib/libX11.6.dylib - run: node clean.mjs - run: node compile-ffmpeg.mjs - run: node generate-bindings.mjs @@ -32,7 +32,7 @@ jobs: path: ffmpeg.tar.gz build-macos-x64: name: Build on macOS x64 - runs-on: macos-13 + runs-on: macos-15-intel steps: - uses: actions/checkout@main - uses: actions/setup-node@v3 From 325da64d768cfc5adcca40788ed01365056a0f8d Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Thu, 5 Mar 2026 11:09:55 +0100 Subject: [PATCH 5/9] Fix libaom NASM config on macOS x64. Disable NASM only on darwin/x64 to avoid libaom CMake failures on GitHub runners that report unsupported NASM multipass optimization. Made-with: Cursor --- compile-av1.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compile-av1.mjs b/compile-av1.mjs index 7ed5b4f..8149c02 100644 --- a/compile-av1.mjs +++ b/compile-av1.mjs @@ -91,6 +91,10 @@ Cflags: -I$\{prefix\}/src -I$\{srcdir\}/src -I$\{prefix\} -I$\{srcdir\} -I$\{pre const enableLibaom = (isWindows) => { const AOM_TAG = "v3.9.1"; const AOM_BUILD_DIR = "aom-build"; + const shouldEnableNasm = !( + process.platform === "darwin" && + process.arch === "x64" + ); const windowsToolchain = isWindows ? { cc: getToolPath("x86_64-w64-mingw32-gcc"), @@ -138,7 +142,7 @@ const enableLibaom = (isWindows) => { "-DENABLE_DOCS=0", "-DENABLE_EXAMPLES=0", "-DENABLE_TOOLS=0", - "-DENABLE_NASM=1", + `-DENABLE_NASM=${shouldEnableNasm ? "1" : "0"}`, "-DCONFIG_PIC=1", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DCONFIG_AV1_DECODER=0", From 0228ee3718600166a6c4ab209673425f2628fef5 Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Thu, 5 Mar 2026 13:20:39 +0100 Subject: [PATCH 6/9] Reduce AV1 binary footprint in FFmpeg builds. 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 --- compile-av1.mjs | 1 + compile-ffmpeg.mjs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/compile-av1.mjs b/compile-av1.mjs index 8149c02..b128194 100644 --- a/compile-av1.mjs +++ b/compile-av1.mjs @@ -147,6 +147,7 @@ const enableLibaom = (isWindows) => { "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DCONFIG_AV1_DECODER=0", "-DCONFIG_AV1_ENCODER=1", + "-DCONFIG_AV1_HIGHBITDEPTH=0", isWindows ? "-DCMAKE_SYSTEM_NAME=Windows" : null, isWindows ? `-DCMAKE_C_COMPILER=${windowsToolchain.cc}` : null, isWindows ? `-DCMAKE_CXX_COMPILER=${windowsToolchain.cxx}` : null, diff --git a/compile-ffmpeg.mjs b/compile-ffmpeg.mjs index 2267db3..819790b 100644 --- a/compile-ffmpeg.mjs +++ b/compile-ffmpeg.mjs @@ -29,7 +29,6 @@ if (existsSync("/opt/homebrew/opt/sdl2/lib/libSDL2-2.0.0.dylib")) { const decoders = [ "aac", "ac3", - "av1", "flac", "h264", "hevc", From fbc718d7ddff32c5ffedbc49f35f9589558a579b Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Thu, 5 Mar 2026 15:56:12 +0100 Subject: [PATCH 7/9] slimmify more --- compile-ffmpeg.mjs | 1 + zip.mjs | 127 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/compile-ffmpeg.mjs b/compile-ffmpeg.mjs index 819790b..7b0e6e2 100644 --- a/compile-ffmpeg.mjs +++ b/compile-ffmpeg.mjs @@ -255,6 +255,7 @@ execSync( "--enable-filter=tonemap", "--enable-filter=copy", "--disable-doc", + "--disable-debug", "--enable-gpl", "--enable-nonfree", "--disable-encoders", diff --git a/zip.mjs b/zip.mjs index 2356a71..3caf18a 100644 --- a/zip.mjs +++ b/zip.mjs @@ -1,6 +1,7 @@ import { execSync } from "child_process"; import { copyFileSync, + rmSync, readdirSync, renameSync, unlinkSync, @@ -11,9 +12,104 @@ import { PREFIX } from "./const.mjs"; const isWindows = process.argv[2] === "windows"; const remotionLibDir = path.join(process.cwd(), "remotion", "lib"); +const remotionLib64Dir = path.join(process.cwd(), "remotion", "lib64"); +const remotionBinDir = path.join(process.cwd(), "remotion", "bin"); + +const getStripTool = () => { + const candidates = isWindows + ? ["x86_64-w64-mingw32-strip"] + : process.platform === "darwin" + ? ["strip", "llvm-strip"] + : ["strip", "llvm-strip"]; + + for (const tool of candidates) { + try { + execSync(`command -v ${tool}`, { + stdio: "ignore", + }); + return tool; + } catch { + // Continue trying alternatives. + } + } + + return null; +}; + +const stripFilesInDir = (dir, shouldStrip, stripTool, stripArgs) => { + if (!existsSync(dir)) { + return; + } + + const files = readdirSync(dir, { + withFileTypes: true, + }); + + for (const file of files) { + if (!file.isFile()) { + continue; + } + + if (!shouldStrip(file.name)) { + continue; + } + + const fullPath = path.join(dir, file.name); + try { + execSync( + [stripTool, ...stripArgs, `"${fullPath.replaceAll('"', '\\"')}"`].join( + " " + ), + { + stdio: "inherit", + } + ); + } catch (err) { + console.warn(`Skipping strip for ${fullPath}:`, err.message); + } + } +}; + +const removeDevArtifacts = () => { + const devPaths = [ + path.join(process.cwd(), "remotion", "include"), + path.join(remotionLibDir, "pkgconfig"), + path.join(remotionLib64Dir, "pkgconfig"), + path.join(remotionLibDir, "cmake"), + path.join(remotionLib64Dir, "cmake"), + ]; + + for (const devPath of devPaths) { + if (existsSync(devPath)) { + rmSync(devPath, { + force: true, + recursive: true, + }); + } + } + + for (const libDir of [remotionLibDir, remotionLib64Dir]) { + if (!existsSync(libDir)) { + continue; + } + + const files = readdirSync(libDir, { + withFileTypes: true, + }); + for (const file of files) { + if (!file.isFile()) { + continue; + } + if (file.name.endsWith(".a") || file.name.endsWith(".la")) { + rmSync(path.join(libDir, file.name), { + force: true, + }); + } + } + } +}; if (isWindows) { - const remotionBinDir = path.join(process.cwd(), "remotion", "bin"); copyFileSync( "libwinpthread-1.dll", path.join(remotionLibDir, "libwinpthread-1.dll") @@ -49,6 +145,35 @@ if (isWindows) { } } +const stripTool = getStripTool(); +if (stripTool) { + const stripArgs = + process.platform === "darwin" ? ["-x"] : ["--strip-unneeded"]; + stripFilesInDir( + remotionBinDir, + (fileName) => (isWindows ? fileName.endsWith(".exe") : true), + stripTool, + stripArgs + ); + stripFilesInDir( + remotionLibDir, + (fileName) => + isWindows + ? fileName.endsWith(".dll") + : fileName.endsWith(".dylib") || fileName.includes(".so"), + stripTool, + stripArgs + ); + stripFilesInDir( + remotionLib64Dir, + (fileName) => fileName.endsWith(".dylib") || fileName.includes(".so"), + stripTool, + stripArgs + ); +} + +removeDevArtifacts(); + execSync(`tar cvzf ffmpeg.tar.gz ${PREFIX} bindings.rs`, { stdio: "inherit", }); From 2f191a47e24b261184b28566661dbff8f03536b1 Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Wed, 18 Mar 2026 10:23:08 +0100 Subject: [PATCH 8/9] an attempt to fix arm64 macos build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51fe085..f1b79b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: jobs: build: name: Build on macOS ARM64 - runs-on: macos-15-arm64 + runs-on: macos-15 steps: - uses: actions/checkout@main - uses: actions/setup-node@v3 From 3535f9b35cff6b49d06c034c284dfb3aeecfc445 Mon Sep 17 00:00:00 2001 From: Igor Samokhovets Date: Thu, 19 Mar 2026 18:41:41 +0100 Subject: [PATCH 9/9] fix build for rust-ffmpeg-sys --- zip.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/zip.mjs b/zip.mjs index 3caf18a..b1c5c23 100644 --- a/zip.mjs +++ b/zip.mjs @@ -72,7 +72,6 @@ const stripFilesInDir = (dir, shouldStrip, stripTool, stripArgs) => { const removeDevArtifacts = () => { const devPaths = [ - path.join(process.cwd(), "remotion", "include"), path.join(remotionLibDir, "pkgconfig"), path.join(remotionLib64Dir, "pkgconfig"), path.join(remotionLibDir, "cmake"),