Skip to content

🎥 Make videos programmatically with React

remove project - can run from example folder

Jonny Burger28dbdc864319
diff --git a/packages/lambda/package.json b/packages/lambda/package.json
index 0b459d2e93..4576181f9c 100644
--- a/packages/lambda/package.json
+++ b/packages/lambda/package.json
@@ -12,8 +12,7 @@
"test": "eslint src --ext ts,tsx",
"watch": "tsc -w",
"build": "tsc -d",
- "start": "ts-node src/run.ts",
- "test-re": "npx remotion preview remotion-project/index.ts"
+ "start": "ts-node src/run.ts"
},
"author": "",
"license": "MIT",
diff --git a/packages/lambda/remotion-project/MyVideo.tsx b/packages/lambda/remotion-project/MyVideo.tsx
deleted file mode 100644
index 80f6f9239b..0000000000
--- a/packages/lambda/remotion-project/MyVideo.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import {AbsoluteFill, Sequence, useCurrentFrame, Video} from 'remotion';
-import video from './video.webm';
-
-export const MyVideo: React.FC = () => {
- const frame = useCurrentFrame();
- return (
- <div>
- {new Array(100)
- .fill(1)
- .map((_, k) => k)
- .map((k) => {
- return (
- <Sequence key={k} from={k * 300} durationInFrames={300}>
- <Video
- style={{
- transform: `scale(${(Math.sin(frame / 30) + 1) / 2})`,
- }}
- src={video}
- />
- </Sequence>
- );
- })}
- <AbsoluteFill
- style={{
- justifyContent: 'center',
- alignItems: 'center',
- display: 'flex',
- }}
- >
- <div style={{color: 'white', fontSize: 400}}>{frame}</div>
- </AbsoluteFill>
- </div>
- );
-};
diff --git a/packages/lambda/remotion-project/Root.tsx b/packages/lambda/remotion-project/Root.tsx
deleted file mode 100644
index 61d3d5ab11..0000000000
--- a/packages/lambda/remotion-project/Root.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-import {Composition, getInputProps} from 'remotion';
-import {MyVideo} from './MyVideo';
-
-export const RemotionRoot: React.FC = () => {
- const inputProps = getInputProps();
- return (
- <Composition
- fps={30}
- durationInFrames={inputProps.duration ?? 200}
- component={MyVideo}
- height={1080}
- width={1920}
- id="my-video"
- />
- );
-};
diff --git a/packages/lambda/remotion-project/index.ts b/packages/lambda/remotion-project/index.ts
deleted file mode 100644
index d831f7b0f1..0000000000
--- a/packages/lambda/remotion-project/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import {registerRoot} from 'remotion';
-import {RemotionRoot} from './Root';
-
-registerRoot(RemotionRoot);
diff --git a/packages/lambda/remotion-project/video.webm b/packages/lambda/remotion-project/video.webm
deleted file mode 100644
index ff10805fd9..0000000000
Binary files a/packages/lambda/remotion-project/video.webm and /dev/null differ