Skip to content

🎥 Make videos programmatically with React

rename compositor to remotion

Jonny Burgercb0b5a500054
diff --git a/packages/Cargo.toml b/packages/Cargo.toml
index 1983b7e0a0..637a390039 100644
--- a/packages/Cargo.toml
+++ b/packages/Cargo.toml
@@ -22,6 +22,6 @@ mp4 = {git = "https://github.com/jonnyburger/mp4-rust", rev = "92ba375738cc2f05a
ffmpeg-next = {git = "https://github.com/remotion-dev/rust-ffmpeg", rev ="8aa490ab200967bce272fada58bc6d63f3b0c51e"}
[[bin]]
-name = "compositor"
+name = "remotion"
path = "renderer/rust/main.rs"
diff --git a/packages/cloudrun/src/admin/bundle-renderLogic.ts b/packages/cloudrun/src/admin/bundle-renderLogic.ts
index f527255018..29c8bd6fb3 100644
--- a/packages/cloudrun/src/admin/bundle-renderLogic.ts
+++ b/packages/cloudrun/src/admin/bundle-renderLogic.ts
@@ -22,18 +22,27 @@ const bundleRenderLogic = async () => {
entryPoints: [template],
treeShaking: true,
external: [
- './compositor',
- './compositor.exe',
+ './remotion',
+ './remotion.exe',
'./ffmpeg/remotion/bin/ffmpeg',
'./ffmpeg/remotion/bin/ffprobe',
'./mappings.wasm',
],
});
- const compositorFile = `${outdir}/compositor`;
-
- fs.copyFileSync(path.join(dir, 'compositor'), compositorFile);
- fs.cpSync(path.join(dir, 'ffmpeg'), `${outdir}/ffmpeg`, {recursive: true});
+ const filesInCwd = fs.readdirSync(dir);
+ const filesToCopy = filesInCwd.filter(
+ (f) =>
+ f.startsWith('remotion') ||
+ f.endsWith('.so') ||
+ f.endsWith('.dll') ||
+ f.endsWith('.dylib') ||
+ f.startsWith('ffmpeg') ||
+ f.startsWith('ffprobe'),
+ );
+ for (const file of filesToCopy) {
+ fs.cpSync(path.join(dir, file), path.join(outdir, file));
+ }
fs.cpSync(
path.join(
diff --git a/packages/compositor-darwin-arm64/compositor b/packages/compositor-darwin-arm64/compositor
deleted file mode 100755
index 8fac5ca13e..0000000000
Binary files a/packages/compositor-darwin-arm64/compositor and /dev/null differ
diff --git a/packages/compositor-darwin-arm64/remotion b/packages/compositor-darwin-arm64/remotion
new file mode 100755
index 0000000000..55121dbc75
Binary files /dev/null and b/packages/compositor-darwin-arm64/remotion differ
diff --git a/packages/compositor-darwin-x64/compositor b/packages/compositor-darwin-x64/compositor
deleted file mode 100755
index 27a9b84a07..0000000000
Binary files a/packages/compositor-darwin-x64/compositor and /dev/null differ
diff --git a/packages/compositor-darwin-x64/remotion b/packages/compositor-darwin-x64/remotion
new file mode 100755
index 0000000000..39cafe7ea4
Binary files /dev/null and b/packages/compositor-darwin-x64/remotion differ
diff --git a/packages/compositor-linux-arm64-gnu/compositor b/packages/compositor-linux-arm64-gnu/compositor
deleted file mode 100755
index cd565ca3d6..0000000000
Binary files a/packages/compositor-linux-arm64-gnu/compositor and /dev/null differ
diff --git a/packages/compositor-linux-arm64-gnu/remotion b/packages/compositor-linux-arm64-gnu/remotion
new file mode 100755
index 0000000000..2df4d76585
Binary files /dev/null and b/packages/compositor-linux-arm64-gnu/remotion differ
diff --git a/packages/compositor-linux-arm64-musl/compositor b/packages/compositor-linux-arm64-musl/compositor
deleted file mode 100755
index 6efc18acd9..0000000000
Binary files a/packages/compositor-linux-arm64-musl/compositor and /dev/null differ
diff --git a/packages/compositor-linux-arm64-musl/remotion b/packages/compositor-linux-arm64-musl/remotion
new file mode 100755
index 0000000000..0a643fa8d4
Binary files /dev/null and b/packages/compositor-linux-arm64-musl/remotion differ
diff --git a/packages/compositor-linux-x64-gnu/compositor b/packages/compositor-linux-x64-gnu/compositor
deleted file mode 100755
index af7a3194c2..0000000000
Binary files a/packages/compositor-linux-x64-gnu/compositor and /dev/null differ
diff --git a/packages/compositor-linux-x64-gnu/remotion b/packages/compositor-linux-x64-gnu/remotion
new file mode 100755
index 0000000000..5c5ed1bf5a
Binary files /dev/null and b/packages/compositor-linux-x64-gnu/remotion differ
diff --git a/packages/compositor-linux-x64-musl/compositor b/packages/compositor-linux-x64-musl/compositor
deleted file mode 100755
index e6885ab6ad..0000000000
Binary files a/packages/compositor-linux-x64-musl/compositor and /dev/null differ
diff --git a/packages/compositor-linux-x64-musl/remotion b/packages/compositor-linux-x64-musl/remotion
new file mode 100755
index 0000000000..bf64a16b3f
Binary files /dev/null and b/packages/compositor-linux-x64-musl/remotion differ
diff --git a/packages/compositor-win32-x64-msvc/compositor.exe b/packages/compositor-win32-x64-msvc/compositor.exe
deleted file mode 100755
index 3b49f2eabd..0000000000
Binary files a/packages/compositor-win32-x64-msvc/compositor.exe and /dev/null differ
diff --git a/packages/compositor-win32-x64-msvc/remotion.exe b/packages/compositor-win32-x64-msvc/remotion.exe
new file mode 100755
index 0000000000..ec4782ca31
Binary files /dev/null and b/packages/compositor-win32-x64-msvc/remotion.exe differ
diff --git a/packages/docs/docs/contributing/rust.md b/packages/docs/docs/contributing/rust.md
index ac0efad56e..c48f9c0dcf 100644
--- a/packages/docs/docs/contributing/rust.md
+++ b/packages/docs/docs/contributing/rust.md
@@ -56,5 +56,5 @@ in the `packages/renderer` package. The resulting artifacts should be checked in
### FFmpeg bindings
-- Both the Rust binary as well as the FFmpeg binaries use the shared libraries located in the `ffmpeg/remotion/lib` folder of each compositor package.
+- Both the Rust binary as well as the FFmpeg binaries use the shared libraries located in the folder of each compositor package.
- Those shared libraries and FFmpeg binaries come from the [`rust-ffmpeg-splitter`](https://github.com/remotion-dev/rust-ffmpeg-splitter) repository. They are built in CircleCI as well as on a M1 Macbook and pasted into the [`rust-ffmpeg-sys`](https://github.com/remotion-dev/rust-ffmpeg-sys) project. The `rust-ffmpeg-sys` project is a dependency of [`rust-ffmpeg`](https://github.com/remotion-dev/rust-ffmpeg) which is a dependency of the main Remotion project. Refer to those repositories to learn how to build them.
diff --git a/packages/docs/docs/miscellaneous/vercel-functions.md b/packages/docs/docs/miscellaneous/vercel-functions.md
index 09fe2b498b..4e2d279e35 100644
--- a/packages/docs/docs/miscellaneous/vercel-functions.md
+++ b/packages/docs/docs/miscellaneous/vercel-functions.md
@@ -17,7 +17,7 @@ Check if your provider has enough disk space for Chromium and Remotion and has s
⚠️ You need to be aware of the following:
- You cannot use `@remotion/bundler` inside an API route, because it includes Webpack, and the API route itself is being bundled with Webpack. It is not possible to bundle Webpack with Webpack. Instead, use `@remotion/bundler` to create a bundle outside the API route and then use the resulting folder in your API route.
-- The `@remotion/renderer` package requires an FFmpeg binary from `node_modules`. Because an API route is being bundled, you might need to override the Webpack configuration to ensure the `compositor` binary is being included in it.
+- The `@remotion/renderer` package requires an FFmpeg binary from `node_modules`. Because an API route is being bundled, you might need to override the Webpack configuration to ensure the `remotion` binary is being included in it.
- Error have been reported with the Next.js App Router because the `remotion` package exports client-side components. Those are false positives because no React components are being rendered.
**Recommendation:**
diff --git a/packages/docs/docs/troubleshooting/bundling-bundle.md b/packages/docs/docs/troubleshooting/bundling-bundle.md
index 11a4fc8710..58564661ac 100644
--- a/packages/docs/docs/troubleshooting/bundling-bundle.md
+++ b/packages/docs/docs/troubleshooting/bundling-bundle.md
@@ -8,7 +8,7 @@ crumb: "Troubleshooting"
If you receive the following error:
```
- ⨯ ./node_modules/@remotion/compositor-darwin-arm64/compositor
+ ⨯ ./node_modules/@remotion/compositor-darwin-arm64/remotion
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
diff --git a/packages/it-tests/src/rendering/bundle-renderer.test.ts b/packages/it-tests/src/rendering/bundle-renderer.test.ts
index af188e3083..c16ddeffae 100644
--- a/packages/it-tests/src/rendering/bundle-renderer.test.ts
+++ b/packages/it-tests/src/rendering/bundle-renderer.test.ts
@@ -29,6 +29,7 @@ test("Should be able to bundle the renderer", () => {
const filesInCwd = readdirSync(ffmpegCwd);
const filesToCopy = filesInCwd.filter(
(f) =>
+ f.startsWith("remotion") ||
f.endsWith(".so") ||
f.endsWith(".dll") ||
f.endsWith(".dylib") ||
diff --git a/packages/lambda/src/admin/bundle-lambda.ts b/packages/lambda/src/admin/bundle-lambda.ts
index 2478d9c894..ddce704f4b 100644
--- a/packages/lambda/src/admin/bundle-lambda.ts
+++ b/packages/lambda/src/admin/bundle-lambda.ts
@@ -32,7 +32,7 @@ const bundleLambda = async () => {
const filesInCwd = readdirSync(dir);
const filesToCopy = filesInCwd.filter(
(f) =>
- f.startsWith('compositor') ||
+ f.startsWith('remotion') ||
f.endsWith('.so') ||
f.endsWith('.dll') ||
f.endsWith('.dylib') ||
diff --git a/packages/renderer/build.mjs b/packages/renderer/build.mjs
index 29cba8d81c..87a95dcf48 100644
--- a/packages/renderer/build.mjs
+++ b/packages/renderer/build.mjs
@@ -105,38 +105,38 @@ const mode = debug ? 'debug' : 'release';
const copyDestinations = {
'aarch64-unknown-linux-gnu': {
- from: `target/aarch64-unknown-linux-gnu/${mode}/compositor`,
- to: '../compositor-linux-arm64-gnu/compositor',
+ from: `target/aarch64-unknown-linux-gnu/${mode}/remotion`,
+ to: '../compositor-linux-arm64-gnu/remotion',
dir: '../compositor-linux-arm64-gnu',
},
'aarch64-unknown-linux-musl': {
- from: 'target/aarch64-unknown-linux-musl/' + mode + '/compositor',
- to: '../compositor-linux-arm64-musl/compositor',
+ from: 'target/aarch64-unknown-linux-musl/' + mode + '/remotion',
+ to: '../compositor-linux-arm64-musl/remotion',
dir: '../compositor-linux-arm64-musl',
},
'x86_64-unknown-linux-gnu': {
- from: 'target/x86_64-unknown-linux-gnu/' + mode + '/compositor',
- to: '../compositor-linux-x64-gnu/compositor',
+ from: 'target/x86_64-unknown-linux-gnu/' + mode + '/remotion',
+ to: '../compositor-linux-x64-gnu/remotion',
dir: '../compositor-linux-x64-gnu',
},
'x86_64-unknown-linux-musl': {
- from: 'target/x86_64-unknown-linux-musl/' + mode + '/compositor',
- to: '../compositor-linux-x64-musl/compositor',
+ from: 'target/x86_64-unknown-linux-musl/' + mode + '/remotion',
+ to: '../compositor-linux-x64-musl/remotion',
dir: '../compositor-linux-x64-musl',
},
'x86_64-apple-darwin': {
- from: 'target/x86_64-apple-darwin/' + mode + '/compositor',
- to: '../compositor-darwin-x64/compositor',
+ from: 'target/x86_64-apple-darwin/' + mode + '/remotion',
+ to: '../compositor-darwin-x64/remotion',
dir: '../compositor-darwin-x64',
},
'aarch64-apple-darwin': {
- from: 'target/aarch64-apple-darwin/' + mode + '/compositor',
- to: '../compositor-darwin-arm64/compositor',
+ from: 'target/aarch64-apple-darwin/' + mode + '/remotion',
+ to: '../compositor-darwin-arm64/remotion',
dir: '../compositor-darwin-arm64',
},
'x86_64-pc-windows-gnu': {
- from: 'target/x86_64-pc-windows-gnu/' + mode + '/compositor.exe',
- to: '../compositor-win32-x64-msvc/compositor.exe',
+ from: 'target/x86_64-pc-windows-gnu/' + mode + '/remotion.exe',
+ to: '../compositor-win32-x64-msvc/remotion.exe',
dir: '../compositor-win32-x64-msvc',
},
};
diff --git a/packages/renderer/src/compositor/get-executable-path.ts b/packages/renderer/src/compositor/get-executable-path.ts
index 1aed263fb0..2f0a767727 100644
--- a/packages/renderer/src/compositor/get-executable-path.ts
+++ b/packages/renderer/src/compositor/get-executable-path.ts
@@ -40,10 +40,10 @@ export const getExecutablePath = (
switch (type) {
case 'compositor':
if (process.platform === 'win32') {
- return path.resolve(base, 'compositor.exe');
+ return path.resolve(base, 'remotion.exe');
}
- return path.resolve(base, 'compositor');
+ return path.resolve(base, 'remotion');
case 'ffmpeg':
if (process.platform === 'win32') {
diff --git a/packages/renderer/src/take-frame-and-compose.ts b/packages/renderer/src/take-frame-and-compose.ts
index 582176f678..33a8caa117 100644
--- a/packages/renderer/src/take-frame-and-compose.ts
+++ b/packages/renderer/src/take-frame-and-compose.ts
@@ -107,13 +107,13 @@ export const takeFrameAndCompose = async ({
if (needsComposing) {
if (imageFormat === 'pdf') {
throw new Error(
- "You cannot use compositor APIs (like <Clipper>) if `imageFormat` is 'pdf'.",
+ "You cannot use Rust APIs (like <Clipper>) if `imageFormat` is 'pdf'.",
);
}
if (imageFormat === 'webp') {
throw new Error(
- "You cannot use compositor APIs (like <Clipper>) if `imageFormat` is 'webp'.",
+ "You cannot use Rust APIs (like <Clipper>) if `imageFormat` is 'webp'.",
);
}