Skip to content

🎥 Make videos programmatically with React

landing page

Jonny Burger1f06a61f8317
diff --git a/packages/docs/components/LambdaSplash/BuildApps.tsx b/packages/docs/components/LambdaSplash/BuildApps.tsx
index d50a82336d..60810e712a 100644
--- a/packages/docs/components/LambdaSplash/BuildApps.tsx
+++ b/packages/docs/components/LambdaSplash/BuildApps.tsx
@@ -1,3 +1,4 @@
+import { useColorMode } from "@docusaurus/theme-common";
import React from "react";
import { BlueButton } from "../layout/Button";
import { Spacer } from "../layout/Spacer";
@@ -63,6 +64,7 @@ const docsButton: React.CSSProperties = {
};
export const BuildApps: React.FC = () => {
+ const { colorMode } = useColorMode();
return (
<div>
<h1 style={center}>Build Video Apps</h1>
@@ -72,7 +74,16 @@ export const BuildApps: React.FC = () => {
<h2 style={stepTitle}>Remotion</h2>
<strong style={center}>Write videos in React</strong>
<br />
- <video src="/img/writeinreact.mp4" muted playsInline loop />
+ <div
+ style={{
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ flex: 1,
+ }}
+ >
+ <img src="/img/writeinreact.png" />
+ </div>
<ul style={list}>
<li>Use the Web to create graphics</li>
<hr style={hr} />
@@ -80,7 +91,6 @@ export const BuildApps: React.FC = () => {
<hr style={hr} />
<li>Render real MP4 videos</li>
</ul>
- <div style={{ flex: 1 }} />
<div style={row}>
<div style={flex}>
<a style={docsButton} href="/">
@@ -107,7 +117,23 @@ export const BuildApps: React.FC = () => {
<h2 style={stepTitle}>Remotion Player</h2>
<strong style={center}>Embeddable interactive videos</strong>
<br />
- <video src="/img/writeinreact.mp4" muted playsInline loop />
+
+ <div
+ style={{
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ flex: 1,
+ }}
+ >
+ <img
+ src={
+ colorMode === "dark"
+ ? "/img/player-example-dark.png"
+ : "/img/player-example.png"
+ }
+ />
+ </div>
<ul style={list}>
<li>Preview videos in the browser</li>
<hr style={hr} />
@@ -115,7 +141,6 @@ export const BuildApps: React.FC = () => {
<hr style={hr} />
<li>Customize look and behavior</li>
</ul>
- <div style={{ flex: 1 }} />
<div style={row}>
<div style={flex}>
<a style={docsButton} href="/player">
@@ -140,9 +165,25 @@ export const BuildApps: React.FC = () => {
<Spacer />
<div style={step}>
<h2 style={stepTitle}>Remotion Lambda</h2>
- <strong style={center}> Render at scale</strong>
+ <strong style={center}>Render at scale</strong>
<br />
- <video src="/img/writeinreact.mp4" muted playsInline loop />
+ <div
+ style={{
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ flex: 1,
+ }}
+ >
+ <img
+ src={
+ colorMode === "dark"
+ ? "/img/cluster-dark.png"
+ : "/img/cluster.png"
+ }
+ />
+ </div>
+
<ul style={list}>
<li>Render videos in the cloud</li>
<hr style={hr} />
@@ -150,7 +191,6 @@ export const BuildApps: React.FC = () => {
<hr style={hr} />
<li>Fast because distributed</li>
</ul>
- <div style={{ flex: 1 }} />
<div style={row}>
<div style={flex}>
<a style={docsButton} href="/docs/lambda">
diff --git a/packages/docs/components/LambdaSplash/Easy.tsx b/packages/docs/components/LambdaSplash/Easy.tsx
index 074a6e2c7e..c6ed52780a 100644
--- a/packages/docs/components/LambdaSplash/Easy.tsx
+++ b/packages/docs/components/LambdaSplash/Easy.tsx
@@ -1,13 +1,19 @@
+import { useColorMode } from "@docusaurus/theme-common";
import React from "react";
import styles from "./easy.module.css";
export const LambdaEasy: React.FC = () => {
+ const { colorMode } = useColorMode();
+
return (
<div className={styles.row}>
<div className={styles.tile}>
<video
- src="/img/npminstall.mp4"
- style={{}}
+ src={
+ colorMode === "dark"
+ ? "/img/npminstalldark.mp4"
+ : "/img/npminstalllight.mp4"
+ }
loop
muted
playsInline
diff --git a/packages/docs/components/LambdaSplash/Fast.tsx b/packages/docs/components/LambdaSplash/Fast.tsx
index 3035d75c7c..2987e31287 100644
--- a/packages/docs/components/LambdaSplash/Fast.tsx
+++ b/packages/docs/components/LambdaSplash/Fast.tsx
@@ -1,14 +1,19 @@
+import { useColorMode } from "@docusaurus/theme-common";
import React from "react";
import { Spacer } from "../layout/Spacer";
import styles from "./fast.module.css";
export const LambdaFast: React.FC = () => {
+ const { colorMode } = useColorMode();
return (
<div className={styles.row}>
<div className={styles.tile}>
<video
- src="/img/timelinesplit.mp4"
- style={{}}
+ src={
+ colorMode === "dark"
+ ? "/img/timelinesplitdark.mp4"
+ : "/img/timelinesplitlight.mp4"
+ }
loop
muted
playsInline
diff --git a/packages/docs/static/img/cluster-dark.png b/packages/docs/static/img/cluster-dark.png
new file mode 100644
index 0000000000..7377610ce4
Binary files /dev/null and b/packages/docs/static/img/cluster-dark.png differ
diff --git a/packages/docs/static/img/cluster.png b/packages/docs/static/img/cluster.png
new file mode 100644
index 0000000000..e1f0b804e4
Binary files /dev/null and b/packages/docs/static/img/cluster.png differ
diff --git a/packages/docs/static/img/npminstalldark.mp4 b/packages/docs/static/img/npminstalldark.mp4
new file mode 100644
index 0000000000..b62321ee5e
Binary files /dev/null and b/packages/docs/static/img/npminstalldark.mp4 differ
diff --git a/packages/docs/static/img/npminstalllight.mp4 b/packages/docs/static/img/npminstalllight.mp4
new file mode 100644
index 0000000000..ce6b645205
Binary files /dev/null and b/packages/docs/static/img/npminstalllight.mp4 differ
diff --git a/packages/docs/static/img/player-example-dark.png b/packages/docs/static/img/player-example-dark.png
new file mode 100644
index 0000000000..bf3289ad30
Binary files /dev/null and b/packages/docs/static/img/player-example-dark.png differ
diff --git a/packages/docs/static/img/player-example.png b/packages/docs/static/img/player-example.png
new file mode 100644
index 0000000000..30e39f76a9
Binary files /dev/null and b/packages/docs/static/img/player-example.png differ
diff --git a/packages/docs/static/img/timelinesplit.mp4 b/packages/docs/static/img/timelinesplit.mp4
deleted file mode 100644
index 7da8cb66a7..0000000000
Binary files a/packages/docs/static/img/timelinesplit.mp4 and /dev/null differ
diff --git a/packages/docs/static/img/timelinesplitdark.mp4 b/packages/docs/static/img/timelinesplitdark.mp4
new file mode 100644
index 0000000000..24d8a9ba58
Binary files /dev/null and b/packages/docs/static/img/timelinesplitdark.mp4 differ
diff --git a/packages/docs/static/img/timelinesplitlight.mp4 b/packages/docs/static/img/timelinesplitlight.mp4
new file mode 100644
index 0000000000..2796c50038
Binary files /dev/null and b/packages/docs/static/img/timelinesplitlight.mp4 differ
diff --git a/packages/docs/static/img/writeinreact.png b/packages/docs/static/img/writeinreact.png
new file mode 100644
index 0000000000..cbccab94fb
Binary files /dev/null and b/packages/docs/static/img/writeinreact.png differ
diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsx
index 4be4283de1..7a4cbabe7f 100644
--- a/packages/example/src/Video.tsx
+++ b/packages/example/src/Video.tsx
@@ -224,7 +224,7 @@ export const Index: React.FC = () => {
fps={30}
durationInFrames={100}
defaultProps={{
- codec: 'mp4',
+ codec: 'mp4' as const,
}}
/>
<Composition
@@ -235,7 +235,7 @@ export const Index: React.FC = () => {
fps={30}
durationInFrames={100}
defaultProps={{
- codec: 'webm',
+ codec: 'webm' as const,
}}
/>
<Composition
diff --git a/packages/example/src/VideoTesting/index.tsx b/packages/example/src/VideoTesting/index.tsx
index 0ad749d0a6..99a9f35878 100644
--- a/packages/example/src/VideoTesting/index.tsx
+++ b/packages/example/src/VideoTesting/index.tsx
@@ -1,7 +1,7 @@
import {Sequence, staticFile, useVideoConfig, Video} from 'remotion';
export const VideoTesting: React.FC<{
- codec: 'mp4' | 'webm' | string;
+ codec: 'mp4' | 'webm';
}> = ({codec}) => {
const {durationInFrames} = useVideoConfig();
const videoMp4 = staticFile('./framer.mp4');