Skip to content

🎥 Make videos programmatically with React

123s for 11mins video

Shankhadeep Dey9c8d44d73b44
diff --git a/packages/lambda/remotion-project/MyVideo.tsx b/packages/lambda/remotion-project/MyVideo.tsx
index cfffaca133..80f6f9239b 100644
--- a/packages/lambda/remotion-project/MyVideo.tsx
+++ b/packages/lambda/remotion-project/MyVideo.tsx
@@ -5,7 +5,7 @@ export const MyVideo: React.FC = () => {
const frame = useCurrentFrame();
return (
<div>
- {new Array(30)
+ {new Array(100)
.fill(1)
.map((_, k) => k)
.map((k) => {
diff --git a/packages/lambda/remotion-project/Root.tsx b/packages/lambda/remotion-project/Root.tsx
index 0deea97c73..93c69581b5 100644
--- a/packages/lambda/remotion-project/Root.tsx
+++ b/packages/lambda/remotion-project/Root.tsx
@@ -6,7 +6,7 @@ export const RemotionRoot: React.FC = () => {
return (
<Composition
fps={30}
- durationInFrames={1000}
+ durationInFrames={20000}
component={MyVideo}
height={1080}
width={1920}
diff --git a/packages/lambda/src/create-lambda.ts b/packages/lambda/src/create-lambda.ts
index f84ef3683d..9f2f651691 100644
--- a/packages/lambda/src/create-lambda.ts
+++ b/packages/lambda/src/create-lambda.ts
@@ -97,7 +97,7 @@ xns(async () => {
Runtime: 'nodejs12.x',
Description: 'Renders a Remotion video.',
MemorySize: 1769 * 2,
- Timeout: 60,
+ Timeout: 300,
Layers: [layerArn],
VpcConfig: ENABLE_EFS
? {
diff --git a/packages/lambda/template/render.ts b/packages/lambda/template/render.ts
index 7ff63d6020..abc7068938 100644
--- a/packages/lambda/template/render.ts
+++ b/packages/lambda/template/render.ts
@@ -177,7 +177,7 @@ export const handler = async (params: LambdaPayload) => {
puppeteerInstance: browserInstance,
serveUrl: params.serveUrl,
});
- const outdir = `tmp/${Math.random()}`;
+ const outdir = `/tmp/${Math.random()}`;
fs.mkdirSync(outdir);
const outputLocation = path.join(outdir, 'out.mp4');