Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(packaging): CodeRabbit follow-up on #371 — require all six ffmpeg libs, guard --sdk-only

superkc202632c5c1a19720
diff --git a/scripts/before-pack.cjs b/scripts/before-pack.cjs
index c27934326..e978ca4c7 100644
--- a/scripts/before-pack.cjs
+++ b/scripts/before-pack.cjs
@@ -95,13 +95,16 @@ const MAC_REQUIRED = [
breaks: "the preview and every export render nothing",
fix: FIX_MAC,
},
- {
- match: (name) => /^libav(codec|format|util|filter)\.\d+\.dylib$/.test(name),
- what: "the LGPL ffmpeg dylibs the compositor links",
+ // One requirement per library, not `atLeast: N` over a combined regex — the
+ // same trap LINUX_REQUIRED documents above. Several versioned copies of one
+ // library would satisfy a combined count while another was missing entirely,
+ // and the addon would still fail to load.
+ ...["avcodec", "avformat", "avutil", "swresample", "swscale", "avfilter"].map((library) => ({
+ match: (name) => new RegExp(`^lib${library}\\.\\d+\\.dylib$`).test(name),
+ what: `the LGPL lib${library} dylib the compositor links`,
breaks: "the compositor addon cannot be loaded at all (dyld error at require())",
fix: FIX_MAC,
- atLeast: 4,
- },
+ })),
{
match: (name) => name === "whisper-stt-server",
what: "the whisper.cpp STT helper",
@@ -276,7 +279,7 @@ const WIN_REQUIRED = [
// (avcodec-60/61/62.dll left by an earlier fetch) would satisfy a combined count
// while another library was missing entirely, and the addon would still fail to
// load.
- ...["avcodec", "avformat", "avutil", "avfilter"].map((library) => ({
+ ...["avcodec", "avformat", "avutil", "swresample", "swscale", "avfilter"].map((library) => ({
match: (name) => new RegExp(`^${library}-\\d+\\.dll$`).test(name),
what: `the ${library} DLL the compositor links`,
breaks: "the addon cannot be loaded at all under MSIX, which ignores PATH",
diff --git a/scripts/fetch-ffmpeg.mjs b/scripts/fetch-ffmpeg.mjs
index efad3cf65..07c78e5f1 100644
--- a/scripts/fetch-ffmpeg.mjs
+++ b/scripts/fetch-ffmpeg.mjs
@@ -422,6 +422,7 @@ async function fetchSharedDlls(tag, binDir) {
"swscale",
"avfilter",
];
+ fs.mkdirSync(binDir, { recursive: true });
const vendoredFiles = new Set(
fs
.readdirSync(binDir, { withFileTypes: true })
diff --git a/technical-documentation/engineering/build-and-packaging.md b/technical-documentation/engineering/build-and-packaging.md
index 01749f235..27ec043cc 100644
--- a/technical-documentation/engineering/build-and-packaging.md
+++ b/technical-documentation/engineering/build-and-packaging.md
@@ -204,7 +204,7 @@ The hook now reads `electron/native/bin/darwin-<arch>/` — the directory `mac.e
| Required | Without it |
|---|---|
| `compositor_view.node` | preview and every export render nothing |
-| `libavcodec/libavformat/libavutil/libavfilter.*.dylib` | the addon cannot load at all (dyld error at `require()`) |
+| `libavcodec/libavformat/libavutil/libavfilter/libswresample/libswscale.*.dylib` | the addon cannot load at all (dyld error at `require()`) |
| `whisper-stt-server` | transcription and captions fail with a developer error shown to end users |
| `libggml*.dylib` | the helper dies in dyld before `main()`; STT times out with no diagnostic |
| `openscreen-screencapturekit-helper` | native screen capture unavailable |