Skip to content

🎥 Make videos programmatically with React

hmm

Jonny Burgerb8f08194ddb0
diff --git a/packages/cli/src/render.tsx b/packages/cli/src/render.tsx
index 03ed5d3433..11257bb4d5 100644
--- a/packages/cli/src/render.tsx
+++ b/packages/cli/src/render.tsx
@@ -208,7 +208,6 @@ export const render = async () => {
frameRange: frameRange ?? null,
puppeteerInstance: openedBrowser,
serveUrl,
- bundleDir: bundled,
});
const closeBrowserPromise = openedBrowser.close();
@@ -270,6 +269,7 @@ export const render = async () => {
onDownload: (src: string) => {
Log.info('Downloading asset... ', src);
},
+ webpackBundle: bundled,
verbose: Internals.Logging.isEqualOrBelowLogLevel('verbose'),
});
stitchingProgress.update(
diff --git a/packages/docs/docs/lambda-setup.md b/packages/docs/docs/lambda-setup.md
index e32d92e7e5..5b95b83b32 100644
--- a/packages/docs/docs/lambda-setup.md
+++ b/packages/docs/docs/lambda-setup.md
@@ -6,10 +6,14 @@ slug: /lambda/setup
## 1. Install `@remotion/lambda`
+Check the newest version number in the #lambda Discord channel
+
```
-npm i @remotion/lambda
+npm i @remotion/lambda@<version-number>
```
+Also update **all the other Remotion packages** to have the same version. Make sure no package version number has a `^` character in front of it as it will install a different version.
+
## 2. Create role policy
- Go to AWS account IAM section
diff --git a/packages/example/server.ts b/packages/example/server.ts
index a5aa976598..78fb95f45b 100644
--- a/packages/example/server.ts
+++ b/packages/example/server.ts
@@ -61,7 +61,6 @@ app.get('/', async (req, res) => {
);
const {assetsInfo} = await renderFrames({
config: video,
- webpackBundle: bundled,
onStart: () => console.log('Rendering frames...'),
onFrameUpdate: (f) => {
if (f % 10 === 0) {
@@ -75,6 +74,9 @@ app.get('/', async (req, res) => {
},
compositionId,
imageFormat: 'jpeg',
+ // TODO: Update or remove server
+ serveUrl: 'fsdf',
+ puppeteerInstance: null,
});
const finalOutput = path.join(tmpDir, 'out.mp4');
@@ -87,6 +89,7 @@ app.get('/', async (req, res) => {
outputLocation: finalOutput,
imageFormat: 'jpeg',
assetsInfo,
+ webpackBundle: bundled,
});
cache.set(JSON.stringify(req.query), finalOutput);
sendFile(finalOutput);
diff --git a/packages/lambda/src/functions/renderer.ts b/packages/lambda/src/functions/renderer.ts
index a1f0e63da4..fd55f40135 100644
--- a/packages/lambda/src/functions/renderer.ts
+++ b/packages/lambda/src/functions/renderer.ts
@@ -139,6 +139,7 @@ const renderHandler = async (params: LambdaPayload) => {
onProgress: () => {
// TODO: upload progress from time to time
},
+ webpackBundle: null,
});
stitchLabel.end();
diff --git a/packages/renderer/src/stitcher.ts b/packages/renderer/src/stitcher.ts
index e3e70eafda..46f908c013 100644
--- a/packages/renderer/src/stitcher.ts
+++ b/packages/renderer/src/stitcher.ts
@@ -51,6 +51,7 @@ export const stitchFramesToVideo = async (options: {
proResProfile?: ProResProfile;
verbose?: boolean;
downloadDir?: string;
+ webpackBundle: string | null;
}): Promise<void> => {
Internals.validateDimension(
options.height,
@@ -106,7 +107,7 @@ export const stitchFramesToVideo = async (options: {
assets: options.assetsInfo.assets,
downloadDir: options.downloadDir ?? (await makeAssetsDownloadTmpDir()),
onDownload: options.onDownload ?? (() => undefined),
- webpackBundle: options.assetsInfo.bundleDir,
+ webpackBundle: options.webpackBundle,
}),
]);