Skip to content

🎥 Make videos programmatically with React

quite some simplifications

Jonny Burgerf7fe469aa087
diff --git a/packages/lambda/src/admin/bundle-lambda.ts b/packages/lambda/src/admin/bundle-lambda.ts
index 76849c0c84..2478d9c894 100644
--- a/packages/lambda/src/admin/bundle-lambda.ts
+++ b/packages/lambda/src/admin/bundle-lambda.ts
@@ -1,6 +1,6 @@
import {BundlerInternals} from '@remotion/bundler';
import {dir} from '@remotion/compositor-linux-arm64-gnu';
-import fs from 'node:fs';
+import fs, {cpSync, readdirSync} from 'node:fs';
import path from 'node:path';
import {quit} from '../cli/helpers/quit';
import {FUNCTION_ZIP_ARM64} from '../shared/function-zip-path';
@@ -29,9 +29,20 @@ const bundleLambda = async () => {
external: [],
});
- const compositorFile = `${outdir}/compositor`;
- fs.copyFileSync(path.join(dir, 'compositor'), compositorFile);
- fs.cpSync(path.join(dir, 'ffmpeg'), `${outdir}/ffmpeg`, {recursive: true});
+ const filesInCwd = readdirSync(dir);
+ const filesToCopy = filesInCwd.filter(
+ (f) =>
+ f.startsWith('compositor') ||
+ f.endsWith('.so') ||
+ f.endsWith('.dll') ||
+ f.endsWith('.dylib') ||
+ f.startsWith('ffmpeg') ||
+ f.startsWith('ffprobe'),
+ );
+ for (const file of filesToCopy) {
+ cpSync(path.join(dir, file), path.join(outdir, file));
+ }
+
fs.cpSync(
path.join(
__dirname,
diff --git a/packages/lambda/src/functions/helpers/get-chromium-executable-path.ts b/packages/lambda/src/functions/helpers/get-chromium-executable-path.ts
index 601e8d0d12..04faa9d074 100644
--- a/packages/lambda/src/functions/helpers/get-chromium-executable-path.ts
+++ b/packages/lambda/src/functions/helpers/get-chromium-executable-path.ts
@@ -6,7 +6,6 @@ if (
process.env.FONTCONFIG_FILE = '/opt/fonts.conf';
process.env.READ_ONLY_FS = '1';
- process.env.COMPOSITOR_DIR = './';
process.env.NO_COLOR = '1';
}
diff --git a/packages/renderer/src/compositor/get-executable-path.ts b/packages/renderer/src/compositor/get-executable-path.ts
index 02d9354cba..1aed263fb0 100644
--- a/packages/renderer/src/compositor/get-executable-path.ts
+++ b/packages/renderer/src/compositor/get-executable-path.ts
@@ -67,10 +67,6 @@ export const getExecutableDir = (
indent: boolean,
logLevel: LogLevel,
): string => {
- if (process.env.COMPOSITOR_DIR) {
- return process.env.COMPOSITOR_DIR;
- }
-
switch (process.platform) {
case 'win32':
switch (process.arch) {