Skip to content

🎥 Make videos programmatically with React

video speed example

Jonny Burger5940e1a9d33b
diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsx
index 4b7719d7b1..e0232ca1ad 100644
--- a/packages/example/src/Video.tsx
+++ b/packages/example/src/Video.tsx
@@ -5,6 +5,7 @@ import {Framer} from './Framer';
import {MissingImg} from './MissingImg';
import RemoteVideo from './RemoteVideo';
import {TenFrameTester} from './TenFrameTester';
+import {VideoSpeed} from './VideoSpeed';
import {VideoTesting} from './VideoTesting';
export const Index: React.FC = () => {
@@ -233,6 +234,14 @@ export const Index: React.FC = () => {
fps={30}
durationInFrames={100}
/>
+ <Composition
+ id="video-speed"
+ component={VideoSpeed}
+ width={1280}
+ height={720}
+ fps={30}
+ durationInFrames={100}
+ />
</>
);
};
diff --git a/packages/example/src/VideoSpeed/index.tsx b/packages/example/src/VideoSpeed/index.tsx
new file mode 100644
index 0000000000..a4f9e3f33f
--- /dev/null
+++ b/packages/example/src/VideoSpeed/index.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import {Video} from 'remotion';
+import framer from '../resources/framer.mp4';
+
+export const VideoSpeed: React.FC = () => {
+ return (
+ <div
+ style={{
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ flex: 1,
+ }}
+ >
+ <Video src={framer} playbackRate={2} startFrom={20} />
+ </div>
+ );
+};