Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Upgrade desktop FFmpeg to Ente 9.0.2 builds

Neeraj Guptab3f2f6efeaf3
diff --git a/.github/workflows/photos-desktop-build.yml b/.github/workflows/photos-desktop-build.yml
index a4ea8c749f..d06696804b 100644
--- a/.github/workflows/photos-desktop-build.yml
+++ b/.github/workflows/photos-desktop-build.yml
@@ -118,19 +118,6 @@ jobs:
- name: Fetch binary dependencies and rebuild native modules
run: npm run postinstall
- - name: Create universal ffmpeg binaries for macOS
- if: startsWith(matrix.os, 'macos')
- # ffmpeg-static ships each macOS architecture separately; combine them with lipo.
- run: |
- rm -f node_modules/ffmpeg-static/ffmpeg
- npm_config_arch=arm64 node node_modules/ffmpeg-static/install.js
- mv node_modules/ffmpeg-static/ffmpeg ffmpeg-arm64
- npm_config_arch=x64 node node_modules/ffmpeg-static/install.js
- mv node_modules/ffmpeg-static/ffmpeg ffmpeg-x64
- lipo -create ffmpeg-arm64 ffmpeg-x64 -output node_modules/ffmpeg-static/ffmpeg
- rm ffmpeg-arm64 ffmpeg-x64
- file node_modules/ffmpeg-static/ffmpeg
-
- name: Install libarchive-tools for pacman build
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libarchive-tools
diff --git a/desktop/.gitignore b/desktop/.gitignore
index ee9fddbf32..c21ada22de 100644
--- a/desktop/.gitignore
+++ b/desktop/.gitignore
@@ -6,6 +6,7 @@ out
dist/
build/vips*
+build/ffmpeg/
build/onnxruntime/
build/napi/
diff --git a/desktop/electron-builder.yml b/desktop/electron-builder.yml
index ae21e68e2d..29c93231e2 100644
--- a/desktop/electron-builder.yml
+++ b/desktop/electron-builder.yml
@@ -3,9 +3,10 @@ artifactName: ${productName}-${version}-${arch}.${ext}
files:
- app/**/*
- out
-extraFiles:
+extraResources:
- from: build
- to: resources
+ to: .
+ filter: ["**/*", "!ffmpeg/{ffprobe,ffprobe.exe,.archive-sha256}"]
beforeBuild: scripts/beforeBuild.js
beforePack: scripts/beforePack.js
protocols:
diff --git a/desktop/package-lock.json b/desktop/package-lock.json
index c641b1d517..3155178516 100644
--- a/desktop/package-lock.json
+++ b/desktop/package-lock.json
@@ -17,7 +17,6 @@
"electron-log": "5.4.4",
"electron-store": "11.0.2",
"electron-updater": "6.8.9",
- "ffmpeg-static": "5.2.0",
"lru-cache": "11.5.1",
"next-electron-server": "1.0.0",
"node-stream-zip": "1.15.0",
@@ -42,21 +41,6 @@
"typescript-eslint": "8.61.0"
}
},
- "node_modules/@derhuerst/http-basic": {
- "version": "8.2.4",
- "resolved": "https://registry.npmjs.org/@derhuerst/http-basic/-/http-basic-8.2.4.tgz",
- "integrity": "sha512-F9rL9k9Xjf5blCz8HsJRO4diy111cayL2vkY2XE4r4t3n0yPXVYy3KD3nJ1qbrSn9743UWSXH4IwuCa/HWlGFw==",
- "license": "MIT",
- "dependencies": {
- "caseless": "^0.12.0",
- "concat-stream": "^2.0.0",
- "http-response-object": "^3.0.1",
- "parse-cache-control": "^1.0.1"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/@electron-internal/extract-zip": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@electron-internal/extract-zip/-/extract-zip-1.0.4.tgz",
@@ -3225,6 +3209,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true,
"license": "MIT"
},
"node_modules/builder-util": {
@@ -3319,12 +3304,6 @@
"node": ">= 0.4"
}
},
- "node_modules/caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
- "license": "Apache-2.0"
- },
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -3543,21 +3522,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/concat-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
- "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
- "engines": [
- "node >= 6.0"
- ],
- "license": "MIT",
- "dependencies": {
- "buffer-from": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^3.0.2",
- "typedarray": "^0.0.6"
- }
- },
"node_modules/concurrently": {
"version": "10.0.4",
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.4.tgz",
@@ -4365,6 +4329,7 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
"integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -4859,47 +4824,6 @@
"reusify": "^1.0.4"
}
},
- "node_modules/ffmpeg-static": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ffmpeg-static/-/ffmpeg-static-5.2.0.tgz",
- "integrity": "sha512-WrM7kLW+do9HLr+H6tk7LzQ7kPqbAgLjdzNE32+u3Ff11gXt9Kkkd2nusGFrlWMIe+XaA97t+I8JS7sZIrvRgA==",
- "hasInstallScript": true,
- "license": "GPL-3.0-or-later",
- "dependencies": {
- "@derhuerst/http-basic": "^8.2.0",
- "env-paths": "^2.2.0",
- "https-proxy-agent": "^5.0.0",
- "progress": "^2.0.3"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/ffmpeg-static/node_modules/agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "license": "MIT",
- "dependencies": {
- "debug": "4"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/ffmpeg-static/node_modules/https-proxy-agent": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
- "license": "MIT",
- "dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/file-entry-cache": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
@@ -5408,21 +5332,6 @@
"node": ">= 14"
}
},
- "node_modules/http-response-object": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz",
- "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==",
- "license": "MIT",
- "dependencies": {
- "@types/node": "^10.0.3"
- }
- },
- "node_modules/http-response-object/node_modules/@types/node": {
- "version": "10.17.60",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
- "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
- "license": "MIT"
- },
"node_modules/http2-wrapper": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
@@ -5487,6 +5396,7 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
"license": "ISC"
},
"node_modules/interpret": {
@@ -6272,11 +6182,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/parse-cache-control": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz",
- "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg=="
- },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -6506,6 +6411,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
@@ -6625,20 +6531,6 @@
"read-binary-file-arch": "cli.js"
}
},
- "node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "license": "MIT",
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/readdirp": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
@@ -6832,26 +6724,6 @@
"tslib": "^2.1.0"
}
},
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@@ -7089,15 +6961,6 @@
"node": ">= 6"
}
},
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -7430,12 +7293,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
- "license": "MIT"
- },
"node_modules/typescript": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
@@ -7579,6 +7436,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true,
"license": "MIT"
},
"node_modules/webcrypto-core": {
diff --git a/desktop/package.json b/desktop/package.json
index 2e55bbabf7..ae186665be 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -32,7 +32,6 @@
"electron-log": "5.4.4",
"electron-store": "11.0.2",
"electron-updater": "6.8.9",
- "ffmpeg-static": "5.2.0",
"lru-cache": "11.5.1",
"next-electron-server": "1.0.0",
"node-stream-zip": "1.15.0",
diff --git a/desktop/scripts/beforePack.js b/desktop/scripts/beforePack.js
index 28624eb170..4f74ae1903 100644
--- a/desktop/scripts/beforePack.js
+++ b/desktop/scripts/beforePack.js
@@ -1,4 +1,5 @@
const { Arch } = require("builder-util");
+const { ensureFFmpeg } = require("./ffmpeg");
const { ensureVips } = require("./vips");
module.exports = async (context) => {
@@ -7,4 +8,9 @@ module.exports = async (context) => {
Arch[context.arch],
context.packager.info.appDir,
);
+ await ensureFFmpeg(
+ context.electronPlatformName,
+ Arch[context.arch],
+ context.packager.info.appDir,
+ );
};
diff --git a/desktop/scripts/ffmpeg.js b/desktop/scripts/ffmpeg.js
new file mode 100644
index 0000000000..12c352cea2
--- /dev/null
+++ b/desktop/scripts/ffmpeg.js
@@ -0,0 +1,93 @@
+const crypto = require("node:crypto");
+const fs = require("node:fs/promises");
+const path = require("node:path");
+const { execFileSync } = require("node:child_process");
+const StreamZip = require("node-stream-zip");
+
+const release = "9.0.2";
+const checksums = {
+ "darwin-universal":
+ "ba2f10d5433ae4b22f482ea2cee85d50819455e1e63b5aa1ecf6201ad2f2b7c9",
+ "linux-x64":
+ "7cf14c99d674d5f2ad2897f83f2b00307f66dba6c2f4fa854601a0521bc47886",
+ "linux-arm64":
+ "00dd72f0f0ac4805d90b3c01a667909f04d6f821f90189791e1dea59cf8507ba",
+ "windows-x64":
+ "0d772b1676871c480a8f140c45507c68e3077013d42792088c8db55f1611aba2",
+ "windows-arm64":
+ "4f6df97fcd471adeac97079e271617e0fee322610faeca89f6590c323a5af654",
+};
+
+const ensureFFmpeg = async (platform, arch, appDir) => {
+ const target =
+ platform == "darwin"
+ ? "darwin-universal"
+ : `${platform == "win32" ? "windows" : platform}-${arch}`;
+ const expected = checksums[target];
+ if (!expected) throw new Error(`No pinned FFmpeg archive for ${target}`);
+
+ const out = path.join(appDir, "build", "ffmpeg");
+ const stamp = path.join(out, ".archive-sha256");
+ const binaries = ["ffmpeg", "ffprobe"].map((name) =>
+ platform == "win32" ? `${name}.exe` : name,
+ );
+ try {
+ if ((await fs.readFile(stamp, "utf8")) == expected) {
+ await Promise.all(
+ binaries.map((name) => fs.access(path.join(out, name))),
+ );
+ return;
+ }
+ } catch (e) {
+ if (e.code != "ENOENT") throw e;
+ }
+
+ const asset = `${target}-ffmpeg.${platform == "win32" ? "zip" : "tar.gz"}`;
+ console.log(`Downloading ${asset} (${release})`);
+ const response = await fetch(
+ `https://github.com/ente/ffmpeg-packaging/releases/download/${release}/${asset}`,
+ );
+ if (!response.ok)
+ throw new Error(`Failed to download ${asset}: HTTP ${response.status}`);
+ const archive = Buffer.from(await response.arrayBuffer());
+ const actual = crypto.createHash("sha256").update(archive).digest("hex");
+ if (actual != expected)
+ throw new Error(`SHA-256 mismatch for ${asset}: ${actual}`);
+
+ await fs.mkdir(path.dirname(out), { recursive: true });
+ const stage = await fs.mkdtemp(path.join(path.dirname(out), ".ffmpeg-"));
+ try {
+ const archivePath = path.join(stage, asset);
+ await fs.writeFile(archivePath, archive);
+ if (platform == "win32") {
+ const zip = new StreamZip.async({ file: archivePath });
+ try {
+ await zip.extract(null, stage);
+ } finally {
+ await zip.close();
+ }
+ } else {
+ execFileSync("tar", ["-xf", archivePath, "-C", stage]);
+ }
+ await fs.unlink(archivePath);
+ for (const name of binaries)
+ await fs.chmod(path.join(stage, name), 0o755);
+ await fs.writeFile(path.join(stage, ".archive-sha256"), expected);
+ await fs.rm(out, { recursive: true, force: true });
+ await fs.rename(stage, out);
+ } finally {
+ await fs.rm(stage, { recursive: true, force: true });
+ }
+};
+
+module.exports = { ensureFFmpeg };
+
+if (require.main === module)
+ ensureFFmpeg(
+ process.platform,
+ process.arch,
+ path.resolve(__dirname, ".."),
+ ).catch((e) => {
+ console.error(e);
+ process.exit(1);
+ });
diff --git a/desktop/scripts/postinstall.mjs b/desktop/scripts/postinstall.mjs
index 1476d8c6c0..b26b144ced 100644
--- a/desktop/scripts/postinstall.mjs
+++ b/desktop/scripts/postinstall.mjs
@@ -1,6 +1,7 @@
import { execSync } from "node:child_process";
import { createHash } from "node:crypto";
import { readFileSync, writeFileSync } from "node:fs";
+import { ensureFFmpeg } from "./ffmpeg.js";
import { ensureVips } from "./vips.js";
const stamp = "node_modules/.postinstall-stamp";
@@ -11,8 +12,8 @@ const treeHash = () =>
.update(readFileSync("node_modules/.package-lock.json"))
.digest("hex");
-// The dependency stamp does not cover libvips.
await ensureVips(process.platform, process.arch, process.cwd());
+await ensureFFmpeg(process.platform, process.arch, process.cwd());
if (process.argv.includes("--if-needed")) {
try {
@@ -29,7 +30,7 @@ const run = (cmd) => {
};
run("node scripts/patch-electron-builder.mjs");
-run("npm rebuild --ignore-scripts=false ffmpeg-static electron-winstaller");
+run("npm rebuild --ignore-scripts=false electron-winstaller");
run("npm exec -- electron-builder install-app-deps");
run("node scripts/ort.js");
diff --git a/desktop/src/main/services/ffmpeg-worker.ts b/desktop/src/main/services/ffmpeg-worker.ts
index a06ab37724..7a488c61f5 100644
--- a/desktop/src/main/services/ffmpeg-worker.ts
+++ b/desktop/src/main/services/ffmpeg-worker.ts
@@ -1,6 +1,5 @@
import shellescape from "any-shell-escape";
import { expose } from "comlink";
-import pathToFfmpeg from "ffmpeg-static";
import { createHash, randomBytes } from "node:crypto";
import fs_ from "node:fs";
import fs from "node:fs/promises";
@@ -64,13 +63,19 @@ process.parentPort.once("message", (e) => {
});
let _desktopAppVersion: string | undefined;
+let _ffmpegPath: string | undefined;
const desktopAppVersion = () => _desktopAppVersion!;
-const FFmpegWorkerInitData = z.object({ appVersion: z.string() });
+const FFmpegWorkerInitData = z.object({
+ appVersion: z.string(),
+ ffmpegPath: z.string(),
+});
const parseInitData = (data: unknown) => {
- _desktopAppVersion = FFmpegWorkerInitData.parse(data).appVersion;
+ const init = FFmpegWorkerInitData.parse(data);
+ _desktopAppVersion = init.appVersion;
+ _ffmpegPath = init.ffmpegPath;
};
const mainProcess = (method: string, param: unknown) =>
@@ -115,11 +120,7 @@ const substitutePlaceholders = (
}
});
-// Packaged dependencies live outside the archive at this rewritten path.
-// https://github.com/eugeneware/ffmpeg-static/issues/16
-const ffmpegBinaryPath = () => {
- return pathToFfmpeg!.replace("app.asar", "app.asar.unpacked");
-};
+const ffmpegBinaryPath = () => _ffmpegPath!;
const ffmpegConvertToMP4 = async (
inputFilePath: string,
@@ -249,7 +250,7 @@ const ffmpegGenerateHLSPlaylistAndSegments = async (
fs.writeFile(keyInfoPath, keyInfo, { encoding: "utf8" }),
]);
- const commandWithRedirection = `${shellescape(command)} 2>${stderrPath}`;
+ const commandWithRedirection = `${shellescape(command)} 2>${shellescape([stderrPath])}`;
await execAsyncWorker(commandWithRedirection);
diff --git a/desktop/src/main/services/workers.ts b/desktop/src/main/services/workers.ts
index 6005fc2008..d6fd3250ff 100644
--- a/desktop/src/main/services/workers.ts
+++ b/desktop/src/main/services/workers.ts
@@ -124,7 +124,14 @@ const createFFmpegUtilityProcessEndpoint = () => {
);
const appVersion = app.getVersion();
- child.postMessage({ appVersion }, [port1]);
+ const ffmpegPath = path.join(
+ app.isPackaged
+ ? process.resourcesPath
+ : path.join(app.getAppPath(), "build"),
+ "ffmpeg",
+ process.platform == "win32" ? "ffmpeg.exe" : "ffmpeg",
+ );
+ child.postMessage({ appVersion, ffmpegPath }, [port1]);
child.on("message", (m: unknown) => {
if (m && typeof m == "object" && "method" in m) {