Skip to content

🎥 Make videos programmatically with React

Move binary to compositor

Jonny Burger71642879b98b
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index cacddcd0a1..9d301853a4 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -33,7 +33,7 @@ jobs:
bun-version: 1.1.20
- uses: Swatinem/rust-cache@v2
with:
- workspaces: "packages/renderer -> target"
+ workspaces: "packages/compositor -> target"
- name: Install
run: pnpm i --frozen-lockfile
- name: build
@@ -159,7 +159,7 @@ jobs:
bun-version: 1.1.20
- uses: Swatinem/rust-cache@v2
with:
- workspaces: "packages/renderer -> target"
+ workspaces: "packages/compositor -> target"
- name: Install
run: pnpm i --frozen-lockfile
- name: Build & Test
diff --git a/packages/STATS.md b/packages/STATS.md
index 3d6575013e..75fe777f32 100644
--- a/packages/STATS.md
+++ b/packages/STATS.md
@@ -7,6 +7,7 @@ Monthly downloads of Remotion packages
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/captions.svg?style=flat&color=black&label=@remotion/captions)](https://npmcharts.com/compare/@remotion/captions?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/cli.svg?style=flat&color=black&label=@remotion/cli)](https://npmcharts.com/compare/@remotion/cli?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/cloudrun.svg?style=flat&color=black&label=@remotion/cloudrun)](https://npmcharts.com/compare/@remotion/cloudrun?minimal=true)
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/compositor.svg?style=flat&color=black&label=@remotion/compositor)](https://npmcharts.com/compare/@remotion/compositor?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/compositor-darwin-arm64.svg?style=flat&color=black&label=@remotion/compositor-darwin-arm64)](https://npmcharts.com/compare/@remotion/compositor-darwin-arm64?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/compositor-darwin-x64.svg?style=flat&color=black&label=@remotion/compositor-darwin-x64)](https://npmcharts.com/compare/@remotion/compositor-darwin-x64?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/compositor-linux-arm64-gnu.svg?style=flat&color=black&label=@remotion/compositor-linux-arm64-gnu)](https://npmcharts.com/compare/@remotion/compositor-linux-arm64-gnu?minimal=true)
diff --git a/packages/compositor-darwin-arm64/remotion b/packages/compositor-darwin-arm64/remotion
index a59c76d96b..29d93079f2 100755
Binary files a/packages/compositor-darwin-arm64/remotion and b/packages/compositor-darwin-arm64/remotion differ
diff --git a/packages/renderer/Cargo.lock b/packages/compositor/Cargo.lock
similarity index 100%
rename from packages/renderer/Cargo.lock
rename to packages/compositor/Cargo.lock
diff --git a/packages/renderer/Cargo.toml b/packages/compositor/Cargo.toml
similarity index 100%
rename from packages/renderer/Cargo.toml
rename to packages/compositor/Cargo.toml
diff --git a/packages/compositor/README.md b/packages/compositor/README.md
new file mode 100644
index 0000000000..8cbc0a6a4b
--- /dev/null
+++ b/packages/compositor/README.md
@@ -0,0 +1,18 @@
+# @remotion/compositor
+
+Rust binary for Remotion
+
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/compositor.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/compositor?minimal=true)
+
+## Installation
+
+```bash
+npm install @remotion/compositor --save-exact
+```
+
+When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
+Remove the `^` character from the version number to use the exact version.
+
+## Usage
+
+This is an internal package and has no documentation.
diff --git a/packages/compositor/package.json b/packages/compositor/package.json
index c4cc66136a..9df571180b 100644
--- a/packages/compositor/package.json
+++ b/packages/compositor/package.json
@@ -4,7 +4,7 @@
},
"name": "@remotion/compositor",
"version": "4.0.226",
- "description": "Render Remotion videos using Node.js or Bun",
+ "description": "Rust binary for Remotion",
"sideEffects": false,
"scripts": {
"make": "bun build.ts --debug"
@@ -16,6 +16,5 @@
},
"dependencies": {},
"peerDependencies": {},
- "devDependencies": {},
- "homepage": "https://www.remotion.dev/docs/renderer"
+ "devDependencies": {}
}
diff --git a/packages/docs/docs/contributing/rust.mdx b/packages/docs/docs/contributing/rust.mdx
index 32bf1b20cc..8576f255dc 100644
--- a/packages/docs/docs/contributing/rust.mdx
+++ b/packages/docs/docs/contributing/rust.mdx
@@ -34,6 +34,7 @@ These instructions currently are for macOS. Contributions for other platforms ar
To build the Rust binaries for all supported platforms, you need to install their toolchains:
```sh
+cd packages/compositor
node install-toolchains.mjs
```
@@ -43,7 +44,7 @@ You can then build all binaries with:
pnpm build-all
```
-in the `packages/renderer` package. The resulting artifacts should be checked into Git.
+The resulting artifacts should be checked into Git.
## Architecture
diff --git a/packages/renderer/package.json b/packages/renderer/package.json
index 1492c26acf..8aefa2ed69 100644
--- a/packages/renderer/package.json
+++ b/packages/renderer/package.json
@@ -12,7 +12,7 @@
"formatting": "prettier src --check",
"lint": "eslint src",
"test": "bun test src",
- "make": "tsc -d && bun build.ts --debug",
+ "make": "tsc -d",
"build-all": "bun build.ts --all",
"prepublishOnly": "bun build.ts --all"
},
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index 87fdbf65b6..f767c6e8f2 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -65,11 +65,13 @@ export const packages = [
'convert',
'captions',
'openai-whisper',
+ 'compositor',
] as const;
export type Pkgs = (typeof packages)[number];
export const descriptions: {[key in Pkgs]: string | null} = {
+ compositor: 'Rust binary for Remotion',
player: 'React component for embedding a Remotion preview into your app',
cloudrun: 'Render Remotion videos on Google Cloud Run',
renderer: 'Render Remotion videos using Node.js or Bun',
@@ -210,4 +212,5 @@ export const apiDocs: {[key in Pkgs]: string | null} = {
captions: 'https://remotion.dev/docs/captions',
'openai-whisper': 'https://www.remotion.dev/docs/openai-whisper',
'eslint-config-internal': null,
+ compositor: null,
};
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e7ddbd096f..2f22b4c676 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -349,6 +349,8 @@ importers:
specifier: 9.14.0
version: 9.14.0
+ packages/compositor: {}
+
packages/compositor-darwin-arm64: {}
packages/compositor-darwin-x64: {}
diff --git a/set-version.ts b/set-version.ts
index 59ea853e05..783f1debd3 100644
--- a/set-version.ts
+++ b/set-version.ts
@@ -66,7 +66,7 @@ execSync('bun test src/monorepo', {
});
execSync('bun build.ts --all', {
- cwd: 'packages/renderer',
+ cwd: 'packages/compositor',
stdio: 'inherit',
});
diff --git a/turbo.json b/turbo.json
index 776780cd8c..572a390048 100644
--- a/turbo.json
+++ b/turbo.json
@@ -69,9 +69,8 @@
"outputs": ["dist", "container/dist", "gcpInstaller/gcpInstaller.tar"],
"outputLogs": "new-only"
},
- "@remotion/renderer#make": {
- "outputs": ["dist", "target/debug/build", "target/release/build"],
- "dependsOn": ["^make"],
+ "@remotion/compositor#make": {
+ "outputs": ["target/debug/build", "target/release/build"],
"outputLogs": "new-only"
},
"@remotion/it-tests#test": {