Skip to content

🎥 Make videos programmatically with React

Docs: Add automator homepage strip (#8831)

Jonny Burger7093babe1b17
diff --git a/packages/brand/public/homepage-assets/gt-planar-medium.otf b/packages/brand/public/homepage-assets/gt-planar-medium.otf
new file mode 100644
index 0000000000..0ab1be0aaa
Binary files /dev/null and b/packages/brand/public/homepage-assets/gt-planar-medium.otf differ
diff --git a/packages/brand/render-homepage-assets.sh b/packages/brand/render-homepage-assets.sh
index a06d93e8e9..b52eda2410 100755
--- a/packages/brand/render-homepage-assets.sh
+++ b/packages/brand/render-homepage-assets.sh
@@ -14,3 +14,7 @@ bunx remotion render WhatIsRemotion ../promo-pages/public/img/what-is-remotion.w
bunx remotion render RenderProgress ../promo-pages/public/img/render-progress.webm --timeout=120000 "${transparent_webm_flags[@]}"
bunx remotion render Studio ../promo-pages/public/img/editing-vp9-chrome.webm --timeout=120000 "${transparent_webm_flags[@]}"
bunx remotion render homepage-assets-master ../promo-pages/public/img/homepage-assets-master.webm --timeout=120000 "${transparent_webm_flags[@]}"
+bunx remotion render Applications ../promo-pages/public/img/applications.webm --timeout=120000 --scale=0.5 --muted "${transparent_webm_flags[@]}"
+bunx remotion render Applications ../promo-pages/public/img/applications.mp4 --timeout=120000 --codec=h265 --scale=0.5 --muted --overwrite
+cp ../promo-pages/public/img/applications.webm ../docs/static/img/applications.webm
+cp ../promo-pages/public/img/applications.mp4 ../docs/static/img/applications.mp4
diff --git a/packages/brand/src/Applications.tsx b/packages/brand/src/Applications.tsx
new file mode 100644
index 0000000000..9f38c5ff5f
--- /dev/null
+++ b/packages/brand/src/Applications.tsx
@@ -0,0 +1,106 @@
+import {loadFont} from '@remotion/fonts';
+import {
+ AbsoluteFill,
+ interpolate,
+ Sequence,
+ staticFile,
+ useCurrentFrame,
+ Easing,
+} from 'remotion';
+import {ApplicationRenderButton} from './Applications/RenderButton';
+import {ApplicationSimpleApp} from './Applications/SimpleApp';
+import {ApplicationVideoEditor} from './Applications/VideoEditor';
+
+loadFont({
+ family: 'GT Planar',
+ url: staticFile('GT Planar/GT-Planar-Medium.woff2'),
+ weight: '500',
+});
+
+export function Applications() {
+ const frame = useCurrentFrame();
+
+ return (
+ <AbsoluteFill>
+ <Sequence
+ durationInFrames={180}
+ name="Simple application slide"
+ style={{
+ translate: interpolate(
+ frame,
+ [0, 85, 95, 167, 179],
+ ['0px 0px', '0px 0px', '-1240px 0px', '-1240px 0px', '0px 0px'],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.linear,
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ Easing.linear,
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ },
+ ),
+ }}
+ >
+ <ApplicationSimpleApp kineticTypeFrame={frame >= 167 ? 0 : frame} />
+ </Sequence>
+ <Sequence
+ durationInFrames={180}
+ name="Video editor slide"
+ style={{
+ translate: interpolate(
+ frame,
+ [0, 85, 95, 167, 179],
+ ['1240px 0px', '1240px 0px', '0px 0px', '0px 0px', '1240px 0px'],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.linear,
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ Easing.linear,
+ Easing.spring({
+ damping: 200,
+ mass: 1,
+ stiffness: 100,
+ allowTail: true,
+ durationRestThreshold: 0.02,
+ overshootClamping: false,
+ }),
+ ],
+ },
+ ),
+ }}
+ >
+ <ApplicationVideoEditor kineticTypeFrame={frame - 95} />
+ </Sequence>
+ <Sequence>
+ <ApplicationRenderButton />
+ </Sequence>
+ </AbsoluteFill>
+ );
+}
+
+export {ApplicationRenderButton, ApplicationSimpleApp, ApplicationVideoEditor};
diff --git a/packages/brand/src/Applications/KineticType.tsx b/packages/brand/src/Applications/KineticType.tsx
new file mode 100644
index 0000000000..8db8a3f326
--- /dev/null
+++ b/packages/brand/src/Applications/KineticType.tsx
@@ -0,0 +1,82 @@
+import type {CSSProperties} from 'react';
+import {Easing, interpolate} from 'remotion';
+
+const titleWords = [
+ {
+ key: 'summer',
+ letters: [
+ {key: 'summer-s', value: 'S'},
+ {key: 'summer-u', value: 'U'},
+ {key: 'summer-first-m', value: 'M'},
+ {key: 'summer-second-m', value: 'M'},
+ {key: 'summer-e', value: 'E'},
+ {key: 'summer-r', value: 'R'},
+ ],
+ },
+ {
+ key: 'collection',
+ letters: [
+ {key: 'collection-c', value: 'C'},
+ {key: 'collection-o', value: 'O'},
+ {key: 'collection-first-l', value: 'L'},
+ {key: 'collection-second-l', value: 'L'},
+ {key: 'collection-e', value: 'E'},
+ {key: 'collection-c-2', value: 'C'},
+ {key: 'collection-t', value: 'T'},
+ {key: 'collection-i', value: 'I'},
+ {key: 'collection-o-2', value: 'O'},
+ {key: 'collection-n', value: 'N'},
+ ],
+ },
+] as const;
+
+const wordLetterOffsets = [0, titleWords[0].letters.length] as const;
+
+export function KineticType({
+ frame,
+ style,
+}: {
+ readonly frame: number;
+ readonly style?: CSSProperties;
+}) {
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ ...style,
+ }}
+ >
+ {titleWords.map((word, wordIndex) => (
+ <div key={word.key} style={{display: 'flex'}}>
+ {word.letters.map((letter, letterIndex) => {
+ const globalLetterIndex =
+ wordLetterOffsets[wordIndex] + letterIndex;
+
+ return (
+ <div key={letter.key} style={{overflow: 'hidden'}}>
+ <span
+ style={{
+ display: 'inline-block',
+ translate: interpolate(
+ frame,
+ [6 + globalLetterIndex * 2, 18 + globalLetterIndex * 2],
+ ['0px 80px', '0px 0px'],
+ {
+ easing: Easing.bezier(0.16, 1, 0.3, 1),
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ ),
+ }}
+ >
+ {letter.value}
+ </span>
+ </div>
+ );
+ })}
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/packages/brand/src/Applications/RenderButton.tsx b/packages/brand/src/Applications/RenderButton.tsx
new file mode 100644
index 0000000000..e92e08c07f
--- /dev/null
+++ b/packages/brand/src/Applications/RenderButton.tsx
@@ -0,0 +1,66 @@
+import {AbsoluteFill} from 'remotion';
+import {ExtrudeDiv} from '../3DContext/Div3D';
+
+export function ApplicationRenderButton() {
+ return (
+ <AbsoluteFill
+ style={{
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ paddingTop: 700,
+ }}
+ >
+ <ExtrudeDiv
+ backFace={
+ <div
+ style={{
+ backgroundColor: '#075cb0',
+ border: '5px solid black',
+ borderRadius: 30,
+ height: '100%',
+ width: '100%',
+ }}
+ />
+ }
+ cornerRadius={30}
+ depth={48}
+ height={104}
+ name="Render video button"
+ rotationX={-0.14}
+ rotationY={-0.08}
+ rotationZ={0.01}
+ translationX={-4}
+ translationY={2}
+ width={300}
+ style={{
+ translate: '262.5px 27.7px',
+ scale: 1.291,
+ }}
+ >
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#0b84f3',
+ border: '5px solid black',
+ borderRadius: 30,
+ color: 'white',
+ display: 'flex',
+ fontFamily: 'GT Planar, sans-serif',
+ fontFeatureSettings: "'ss03'",
+ fontSize: 40,
+ fontWeight: 500,
+ gap: 22,
+ height: '100%',
+ justifyContent: 'center',
+ overflow: 'hidden',
+ position: 'relative',
+ width: '100%',
+ }}
+ >
+ <span>Render</span>
+ </div>
+ </ExtrudeDiv>
+ </AbsoluteFill>
+ );
+}
diff --git a/packages/brand/src/Applications/SimpleApp.tsx b/packages/brand/src/Applications/SimpleApp.tsx
new file mode 100644
index 0000000000..77faa4911a
--- /dev/null
+++ b/packages/brand/src/Applications/SimpleApp.tsx
@@ -0,0 +1,148 @@
+import {AbsoluteFill, useCurrentFrame} from 'remotion';
+import {ExtrudeDiv} from '../3DContext/Div3D';
+import {KineticType} from './KineticType';
+
+export function ApplicationSimpleApp({
+ kineticTypeFrame,
+}: {
+ readonly kineticTypeFrame?: number;
+}) {
+ const frame = useCurrentFrame();
+ const titleFrame = kineticTypeFrame ?? frame;
+
+ return (
+ <AbsoluteFill
+ style={{
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <ExtrudeDiv
+ backFace={
+ <div
+ style={{
+ backgroundColor: '#cfd6df',
+ border: '4px solid #111111',
+ borderRadius: 30,
+ height: '100%',
+ width: '100%',
+ }}
+ />
+ }
+ cornerRadius={30}
+ depth={46}
+ height={590}
+ name="Simple application"
+ rotationX={-Math.PI / 24}
+ rotationY={-Math.PI / 30}
+ rotationZ={0.01}
+ width={820}
+ style={{
+ translate: '-3.9px 60.7px',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#ffffff',
+ border: '4px solid #111111',
+ borderRadius: 30,
+ fontFamily: 'GT Planar, sans-serif',
+ fontFeatureSettings: "'ss03'",
+ height: '100%',
+ overflow: 'hidden',
+ width: '100%',
+ }}
+ >
+ <div
+ style={{
+ alignItems: 'center',
+ borderBottom: '2px solid #e5e7eb',
+ display: 'flex',
+ height: 72,
+ justifyContent: 'space-between',
+ padding: '0 26px',
+ }}
+ >
+ <div style={{display: 'flex', gap: 9}}>
+ <div
+ style={{
+ backgroundColor: '#ff5f57',
+ borderRadius: '50%',
+ height: 16,
+ width: 16,
+ }}
+ />
+ <div
+ style={{
+ backgroundColor: '#febc2e',
+ borderRadius: '50%',
+ height: 16,
+ width: 16,
+ }}
+ />
+ <div
+ style={{
+ backgroundColor: '#28c840',
+ borderRadius: '50%',
+ height: 16,
+ width: 16,
+ }}
+ />
+ </div>
+ <div style={{width: 66}} />
+ </div>
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 22,
+ padding: 28,
+ }}
+ >
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#111827',
+ borderRadius: 18,
+ display: 'flex',
+ height: 332,
+ justifyContent: 'center',
+ overflow: 'hidden',
+ }}
+ >
+ <KineticType
+ frame={titleFrame}
+ style={{
+ alignItems: 'center',
+ color: '#ffffff',
+ fontSize: 64,
+ fontWeight: 500,
+ gap: 8,
+ justifyContent: 'center',
+ letterSpacing: 1,
+ lineHeight: 1,
+ }}
+ />
+ </div>
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#f8fafc',
+ border: '2px solid #d9dee7',
+ borderRadius: 12,
+ color: '#15171a',
+ display: 'flex',
+ fontSize: 22,
+ height: 58,
+ padding: '0 18px',
+ }}
+ >
+ Summer collection
+ </div>
+ </div>
+ </div>
+ </ExtrudeDiv>
+ </AbsoluteFill>
+ );
+}
diff --git a/packages/brand/src/Applications/VideoEditor.tsx b/packages/brand/src/Applications/VideoEditor.tsx
new file mode 100644
index 0000000000..886d5da4f7
--- /dev/null
+++ b/packages/brand/src/Applications/VideoEditor.tsx
@@ -0,0 +1,446 @@
+import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';
+import {ExtrudeDiv} from '../3DContext/Div3D';
+import {KineticType} from './KineticType';
+
+export function ApplicationVideoEditor({
+ kineticTypeFrame,
+}: {
+ readonly kineticTypeFrame?: number;
+}) {
+ const frame = useCurrentFrame();
+ const titleFrame = kineticTypeFrame ?? frame;
+
+ return (
+ <AbsoluteFill
+ style={{
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <ExtrudeDiv
+ backFace={
+ <div
+ style={{
+ backgroundColor: '#090a0d',
+ border: '4px solid #050506',
+ borderRadius: 30,
+ height: '100%',
+ width: '100%',
+ }}
+ />
+ }
+ cornerRadius={30}
+ depth={46}
+ height={724}
+ name="Video editor"
+ rotationX={-Math.PI / 24}
+ rotationY={-Math.PI / 30}
+ rotationZ={0.01}
+ width={940}
+ >
+ <div
+ style={{
+ backgroundColor: '#16181d',
+ border: '4px solid #050506',
+ borderRadius: 30,
+ color: '#e5e7eb',
+ display: 'flex',
+ flexDirection: 'column',
+ fontFamily: 'GT Planar, sans-serif',
+ fontFeatureSettings: "'ss03'",
+ height: '100%',
+ overflow: 'hidden',
+ width: '100%',
+ }}
+ >
+ <div style={{display: 'flex', flex: 1, minHeight: 0}}>
+ <div style={{display: 'flex', flex: 1, flexDirection: 'column'}}>
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#101216',
+ display: 'flex',
+ flex: 1,
+ justifyContent: 'center',
+ minHeight: 0,
+ }}
+ >
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: '#b9dff4',
+ display: 'flex',
+ height: 292,
+ justifyContent: 'center',
+ overflow: 'hidden',
+ position: 'relative',
+ scale: 1.3,
+ width: 292,
+ }}
+ >
+ <div
+ style={{
+ background:
+ 'linear-gradient(180deg, #91d5f2 0%, #d9edf4 58%, #f0b46e 59%, #d76d4e 100%)',
+ inset: 0,
+ position: 'absolute',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#fff4c7',
+ borderRadius: '50%',
+ boxShadow: '0 0 24px #fff4c7',
+ height: 48,
+ position: 'absolute',
+ right: 34,
+ top: 34,
+ width: 48,
+ }}
+ />
+ <div
+ style={{
+ background: 'linear-gradient(145deg, #356d67, #173f43)',
+ clipPath: 'polygon(0 100%, 44% 14%, 100% 100%)',
+ height: 122,
+ left: -18,
+ position: 'absolute',
+ top: 96,
+ width: 210,
+ }}
+ />
+ <div
+ style={{
+ background: 'linear-gradient(145deg, #4d8580, #24545a)',
+ clipPath: 'polygon(0 100%, 62% 18%, 100% 100%)',
+ height: 108,
+ position: 'absolute',
+ right: -24,
+ top: 116,
+ width: 180,
+ }}
+ />
+ </div>
+ <div
+ style={{
+ backgroundColor: 'white',
+ boxShadow: '0 7px 18px rgba(4, 18, 28, 0.28)',
+ padding: 5,
+ position: 'absolute',
+ right: 20,
+ top: 62,
+ transform: 'rotate(4deg)',
+ width: 96,
+ }}
+ >
+ <div
+ style={{
+ background:
+ 'linear-gradient(150deg, #f7c76f 0%, #f28872 48%, #7a65b6 49%, #443d78 100%)',
+ height: 72,
+ position: 'relative',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#ffe4a6',
+ borderRadius: '50%',
+ height: 22,
+ left: 12,
+ position: 'absolute',
+ top: 10,
+ width: 22,
+ }}
+ />
+ </div>
+ <div
+ style={{
+ color: '#39404a',
+ fontSize: 8,
+ fontWeight: 700,
+ letterSpacing: 0.9,
+ padding: '5px 1px 1px',
+ }}
+ >
+ IMAGE
+ </div>
+ </div>
+ <div
+ style={{
+ bottom: 32,
+ color: 'white',
+ fontSize: 30,
+ fontWeight: 700,
+ left: 25,
+ letterSpacing: -1.2,
+ lineHeight: 0.88,
+ position: 'absolute',
+ textShadow: '0 2px 10px rgba(6, 20, 28, 0.4)',
+ }}
+ >
+ <KineticType frame={titleFrame} />
+ <div
+ style={{
+ border: '2px solid #0b84f3',
+ inset: -10,
+ position: 'absolute',
+ }}
+ >
+ {[
+ {key: 'top-left', left: -5, top: -5},
+ {key: 'top-right', right: -5, top: -5},
+ {bottom: -5, key: 'bottom-left', left: -5},
+ {bottom: -5, key: 'bottom-right', right: -5},
+ ].map(({key, ...position}) => (
+ <div
+ key={key}
+ style={{
+ backgroundColor: 'white',
+ border: '2px solid #0b84f3',
+ height: 9,
+ position: 'absolute',
+ width: 9,
+ ...position,
+ }}
+ />
+ ))}
+ </div>
+ </div>
+ </div>
+ </div>
+ <div
+ style={{
+ backgroundColor: '#1b1e23',
+ borderTop: '2px solid #2b2f36',
+ height: 120,
+ position: 'relative',
+ }}
+ >
+ <div
+ style={{
+ bottom: 12,
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 8,
+ left: 18,
+ position: 'absolute',
+ right: 18,
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 5,
+ height: 23,
+ position: 'relative',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#0b84f3',
+ borderRadius: 4,
+ height: '100%',
+ left: '5%',
+ opacity: 0.9,
+ position: 'absolute',
+ width: '72%',
+ }}
+ />
+ </div>
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 5,
+ height: 23,
+ position: 'relative',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#8b5cf6',
+ borderRadius: 4,
+ height: '100%',
+ left: '18%',
+ opacity: 0.9,
+ position: 'absolute',
+ width: '55%',
+ }}
+ />
+ </div>
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 5,
+ height: 23,
+ position: 'relative',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#2fbf71',
+ borderRadius: 4,
+ height: '100%',
+ left: '0%',
+ opacity: 0.9,
+ position: 'absolute',
+ width: '84%',
+ }}
+ />
+ </div>
+ <div
+ style={{
+ bottom: 0,
+ left: `${interpolate(titleFrame, [0, 65], [45, 82], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ })}%`,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top: -7,
+ width: 1,
+ zIndex: 1,
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#f02c00',
+ height: '100%',
+ width: 1,
+ }}
+ />
+ <div
+ style={{
+ height: 20,
+ left: -8,
+ position: 'absolute',
+ top: 0,
+ width: 20,
+ }}
+ >
+ <svg width={17} viewBox="0 0 159 212">
+ <path
+ d="M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z"
+ fill="#f02c00"
+ />
+ </svg>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div
+ style={{
+ backgroundColor: '#1b1e23',
+ borderLeft: '2px solid #2b2f36',
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 14,
+ padding: 18,
+ width: 180,
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderBottom: '1px solid #343942',
+ borderRadius: 8,
+ color: '#f4f6f8',
+ fontSize: 15,
+ padding: '12px 10px',
+ }}
+ >
+ Position
+ </div>
+ <div
+ style={{
+ borderBottom: '1px solid #343942',
+ borderRadius: 0,
+ color: '#a6adb8',
+ fontSize: 15,
+ padding: '12px 10px',
+ }}
+ >
+ Typography
+ </div>
+ <div
+ style={{
+ borderBottom: '1px solid #343942',
+ borderRadius: 0,
+ color: '#a6adb8',
+ fontSize: 15,
+ padding: '12px 10px',
+ }}
+ >
+ Effects
+ </div>
+ <div
+ style={{
+ borderBottom: '1px solid #343942',
+ borderRadius: 0,
+ color: '#a6adb8',
+ fontSize: 15,
+ padding: '12px 10px',
+ }}
+ >
+ Animation
+ </div>
+ <div
+ style={{
+ display: 'grid',
+ gap: 8,
+ gridTemplateColumns: '1fr 1fr',
+ }}
+ >
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 7,
+ color: '#a6adb8',
+ fontSize: 12,
+ padding: '9px 7px',
+ }}
+ >
+ X 312
+ </div>
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 7,
+ color: '#a6adb8',
+ fontSize: 12,
+ padding: '9px 7px',
+ }}
+ >
+ Y 148
+ </div>
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 7,
+ color: '#a6adb8',
+ fontSize: 12,
+ padding: '9px 7px',
+ }}
+ >
+ W 456
+ </div>
+ <div
+ style={{
+ backgroundColor: '#252930',
+ borderRadius: 7,
+ color: '#a6adb8',
+ fontSize: 12,
+ padding: '9px 7px',
+ }}
+ >
+ H 128
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </ExtrudeDiv>
+ </AbsoluteFill>
+ );
+}
diff --git a/packages/brand/src/DesignSystems.tsx b/packages/brand/src/DesignSystems.tsx
index ac4eb07bfc..c27ab12f75 100644
--- a/packages/brand/src/DesignSystems.tsx
+++ b/packages/brand/src/DesignSystems.tsx
@@ -1,56 +1,114 @@
import React from 'react';
-import {Sequence, interpolate, useCurrentFrame} from 'remotion';
-import {FolderTree} from './HomepageAssets/FolderTree';
+import {Easing, Sequence, interpolate, useCurrentFrame} from 'remotion';
+import {
+ FolderTree,
+ folderTreeSelectionMoveEnd,
+ folderTreeSelectionMoveStart,
+} from './HomepageAssets/FolderTree';
import {RemotionTriangle} from './HomepageAssets/RemotionTriangle';
import {TemplateRecorderEndcard} from './HomepageAssets/TemplateRecorderEndcard';
+const forwardDurationInFrames = 150;
+const pingPongDurationInFrames = forwardDurationInFrames * 2 - 1;
+export const designSystemsDurationInFrames =
+ pingPongDurationInFrames - folderTreeSelectionMoveStart;
+const endcardSequenceStart = folderTreeSelectionMoveStart - 2;
+const animatedLogoExitEnd = 100;
+const assetScaleOverlap = 1;
+const endcardEnterStart = animatedLogoExitEnd - assetScaleOverlap;
+const scaleSpring = Easing.spring({
+ damping: 200,
+ mass: 1,
+ overshootClamping: true,
+ stiffness: 100,
+});
+const exitTransition = {
+ easing: Easing.out(scaleSpring),
+ extrapolateLeft: 'clamp' as const,
+ extrapolateRight: 'clamp' as const,
+};
+const enterTransition = {
+ easing: scaleSpring,
+ extrapolateLeft: 'clamp' as const,
+ extrapolateRight: 'clamp' as const,
+};
+
export const DesignSystems: React.FC = () => {
const frame = useCurrentFrame();
+ const pingPongFrame =
+ frame < forwardDurationInFrames
+ ? frame
+ : pingPongDurationInFrames - 1 - frame;
+ const endcardFrame = Math.max(
+ 0,
+ Math.min(frame, forwardDurationInFrames - 1) - endcardSequenceStart,
+ );
+ const animatedLogoFrame =
+ frame < forwardDurationInFrames
+ ? pingPongFrame
+ : 0;
+ const animatedLogoScale = interpolate(
+ pingPongFrame,
+ [folderTreeSelectionMoveStart, animatedLogoExitEnd],
+ [1.3, 0],
+ exitTransition,
+ );
+ const endcardScale = interpolate(
+ pingPongFrame,
+ [endcardEnterStart, folderTreeSelectionMoveEnd],
+ [0, 0.513],
+ enterTransition,
+ );
+ const endcardOpacity = interpolate(
+ pingPongFrame,
+ [endcardEnterStart, endcardEnterStart + 3],
+ [0, 1],
+ enterTransition,
+ );
+
return (
<>
<Sequence
- width={1080}
- height={1080}
- durationInFrames={90}
+ width={480}
+ height={160}
+ durationInFrames={designSystemsDurationInFrames}
style={{
position: 'absolute',
- translate: '747px 7.5px',
- opacity: interpolate(frame, [75], [1], {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
- scale: interpolate(frame, [75], [1], {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
+ translate: '157px 264.7px',
+ scale: 3.233,
}}
>
- <RemotionTriangle />
+ <FolderTree frame={pingPongFrame} />
</Sequence>
<Sequence
width={1080}
- height={1620}
- durationInFrames={200}
+ height={1080}
+ durationInFrames={designSystemsDurationInFrames}
style={{
position: 'absolute',
- translate: '243.4px -278px',
- scale: 0.513,
+ translate: '189.6px 162px',
+ opacity: interpolate(pingPongFrame, [75], [1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ scale: animatedLogoScale,
}}
- from={72}
>
- <TemplateRecorderEndcard />
+ <RemotionTriangle frame={animatedLogoFrame} />
</Sequence>
<Sequence
- width={480}
- height={160}
- durationInFrames={160}
+ width={1080}
+ height={1620}
+ durationInFrames={designSystemsDurationInFrames}
style={{
position: 'absolute',
- translate: '69.6px 448.4px',
- scale: 2.409,
+ translate: '170.7px -145.5px',
+ opacity: endcardOpacity,
+ scale: endcardScale,
}}
+ from={endcardSequenceStart}
>
- <FolderTree />
+ <TemplateRecorderEndcard frame={endcardFrame} />
</Sequence>
</>
);
diff --git a/packages/brand/src/HomepageAssets/FolderTree.tsx b/packages/brand/src/HomepageAssets/FolderTree.tsx
index 828dcf8ac2..f79cd8ed3a 100644
--- a/packages/brand/src/HomepageAssets/FolderTree.tsx
+++ b/packages/brand/src/HomepageAssets/FolderTree.tsx
@@ -10,15 +10,42 @@ import {
} from 'remotion';
import {ExtrudeDiv} from '../3DContext/Div3D';
-export const FolderTree: React.FC = () => {
- const frame = useCurrentFrame();
+const panelWidth = 360;
+const panelHeight = 98;
+const panelRadius = 8;
+const contentPadding = 4;
+const rowHeight = 32;
+const rowGap = 1;
+const selectionHeight = 28;
+const selectionRadius = Math.max(panelRadius - contentPadding, 0);
+const childRowOffset = rowHeight + rowGap;
+const finalSelectionY = panelHeight - contentPadding - selectionHeight;
+export const folderTreeSelectionMoveStart = 86;
+export const folderTreeSelectionMoveEnd = 126;
+const selectionTiming = [
+ 0,
+ folderTreeSelectionMoveStart,
+ folderTreeSelectionMoveEnd,
+ 149,
+];
+const selectionTransition = {
+ easing: Easing.bezier(0.45, 0, 0.55, 1),
+ extrapolateLeft: 'clamp' as const,
+ extrapolateRight: 'clamp' as const,
+};
+
+export const FolderTree: React.FC<{
+ readonly frame?: number;
+}> = ({frame: frameOverride}) => {
+ const currentFrame = useCurrentFrame();
+ const frame = frameOverride ?? currentFrame;
return (
<AbsoluteFill className="justify-center items-center">
<ExtrudeDiv
- height={98}
+ height={panelHeight}
depth={27}
- cornerRadius={8}
+ cornerRadius={panelRadius}
translationX={-15}
translationY={5}
scaleX={1.15}
@@ -31,7 +58,7 @@ export const FolderTree: React.FC = () => {
<Interactive.Div
style={{
backgroundColor: '#141414',
- borderRadius: 8,
+ borderRadius: panelRadius,
height: '100%',
width: '100%',
}}
@@ -42,31 +69,32 @@ export const FolderTree: React.FC = () => {
<Interactive.Div
style={{
backgroundColor: 'rgb(31,36,40)',
- borderRadius: 8,
- height: 98,
+ borderRadius: panelRadius,
+ height: panelHeight,
overflow: 'hidden',
position: 'relative',
- width: 360,
+ width: panelWidth,
}}
>
<Interactive.Div
style={{
backgroundColor: 'hsla(0, 0%, 100%, 0.15)',
- borderRadius: Math.max(8 - 4, 0),
- height: 28,
- left: 4,
+ borderRadius: selectionRadius,
+ height: selectionHeight,
+ left: contentPadding,
position: 'absolute',
- right: 4,
+ right: contentPadding,
top: 0,
translate: interpolate(
frame,
- [0, 18, 84, 119],
- ['0px 35px', '0px 35px', '0px 68px', '0px 68px'],
- {
- easing: Easing.bezier(0.16, 1, 0.3, 1),
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- },
+ selectionTiming,
+ [
+ `0px ${childRowOffset + contentPadding / 2}px`,
+ `0px ${childRowOffset + contentPadding / 2}px`,
+ `0px ${finalSelectionY}px`,
+ `0px ${finalSelectionY}px`,
+ ],
+ selectionTransition,
),
}}
/>
@@ -78,13 +106,13 @@ export const FolderTree: React.FC = () => {
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
fontSize: 13,
- height: 32,
- left: 4,
+ height: rowHeight,
+ left: contentPadding,
lineHeight: '18px',
paddingLeft: 12,
paddingRight: 10,
position: 'absolute',
- right: 4,
+ right: contentPadding,
top: 0,
translate: '0px 0px',
userSelect: 'none',
@@ -123,15 +151,15 @@ export const FolderTree: React.FC = () => {
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
fontSize: 13,
- height: 32,
- left: 4,
+ height: rowHeight,
+ left: contentPadding,
lineHeight: '18px',
paddingLeft: 20,
paddingRight: 10,
position: 'absolute',
- right: 4,
+ right: contentPadding,
top: 0,
- translate: '0px 33px',
+ translate: `0px ${childRowOffset}px`,
userSelect: 'none',
}}
>
@@ -145,11 +173,12 @@ export const FolderTree: React.FC = () => {
>
<Interactive.Path
fill={interpolateColors(
- interpolate(frame, [0, 18, 84, 119], [1, 1, 0, 0], {
- easing: Easing.bezier(0.16, 1, 0.3, 1),
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
+ interpolate(
+ frame,
+ selectionTiming,
+ [1, 1, 0, 0],
+ selectionTransition,
+ ),
[0, 1],
['#A6A7A9', '#fff'],
)}
@@ -159,11 +188,12 @@ export const FolderTree: React.FC = () => {
<Interactive.Div
style={{
color: interpolateColors(
- interpolate(frame, [0, 18, 84, 119], [1, 1, 0, 0], {
- easing: Easing.bezier(0.16, 1, 0.3, 1),
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
+ interpolate(
+ frame,
+ selectionTiming,
+ [1, 1, 0, 0],
+ selectionTransition,
+ ),
[0, 1],
['#A6A7A9', '#fff'],
),
@@ -184,15 +214,15 @@ export const FolderTree: React.FC = () => {
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
fontSize: 13,
- height: 32,
- left: 4,
+ height: rowHeight,
+ left: contentPadding,
lineHeight: '18px',
paddingLeft: 20,
paddingRight: 10,
position: 'absolute',
- right: 4,
+ right: contentPadding,
top: 0,
- translate: '0px 66px',
+ translate: `0px ${childRowOffset * 2}px`,
userSelect: 'none',
}}
>
@@ -206,11 +236,12 @@ export const FolderTree: React.FC = () => {
>
<Interactive.Path
fill={interpolateColors(
- interpolate(frame, [0, 18, 84, 119], [0, 0, 1, 1], {
- easing: Easing.bezier(0.16, 1, 0.3, 1),
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
+ interpolate(
+ frame,
+ selectionTiming,
+ [0, 0, 1, 1],
+ selectionTransition,
+ ),
[0, 1],
['#A6A7A9', '#fff'],
)}
@@ -220,11 +251,12 @@ export const FolderTree: React.FC = () => {
<Interactive.Div
style={{
color: interpolateColors(
- interpolate(frame, [0, 18, 84, 119], [0, 0, 1, 1], {
- easing: Easing.bezier(0.16, 1, 0.3, 1),
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- }),
+ interpolate(
+ frame,
+ selectionTiming,
+ [0, 0, 1, 1],
+ selectionTransition,
+ ),
[0, 1],
['#A6A7A9', '#fff'],
),
diff --git a/packages/brand/src/HomepageAssets/RemotionTriangle.tsx b/packages/brand/src/HomepageAssets/RemotionTriangle.tsx
index 71bfe9985d..6af7b000bb 100644
--- a/packages/brand/src/HomepageAssets/RemotionTriangle.tsx
+++ b/packages/brand/src/HomepageAssets/RemotionTriangle.tsx
@@ -16,8 +16,11 @@ import {Faces} from './Faces';
import {extrudeElement} from './join-inbetween-tiles';
import {rotateX, scaled} from './matrix';
-export const RemotionTriangle: React.FC = () => {
- const frame = useCurrentFrame();
+export const RemotionTriangle: React.FC<{
+ readonly frame?: number;
+}> = ({frame: frameOverride}) => {
+ const currentFrame = useCurrentFrame();
+ const frame = frameOverride ?? currentFrame;
const {fps} = useVideoConfig();
const progress = spring({
fps,
@@ -74,7 +77,6 @@ export const RemotionTriangle: React.FC = () => {
height: '100%',
overflow: 'visible',
width: '100%',
- translate: '-479.8px -11.8px',
scale: 0.667,
}}
>
diff --git a/packages/brand/src/HomepageAssets/RenderProgress.tsx b/packages/brand/src/HomepageAssets/RenderProgress.tsx
index b4d8a6c92f..f4cbdcfca4 100644
--- a/packages/brand/src/HomepageAssets/RenderProgress.tsx
+++ b/packages/brand/src/HomepageAssets/RenderProgress.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import {
AbsoluteFill,
+ interpolate,
Sequence,
useCurrentFrame,
useVideoConfig,
@@ -19,11 +20,38 @@ export const renderProgressDurationInFrames = 268;
const rotationReferenceDurationInFrames = 1200;
const phrases = ['video.mp4', 'thumb.png', 'sound.wav', 'doc.pdf'] as const;
const cycleOffsets = [-1, 0, 1] as const;
+const progressStartFrame = -60;
+const fadeInDurationInFrames = 6;
+const fadeOutStartFrame = 82;
+const fadeOutDurationInFrames = 6;
const modulo = (value: number, by: number) => {
return ((value % by) + by) % by;
};
+const getCardOpacity = (localFrame: number) => {
+ const fadeIn = interpolate(
+ localFrame,
+ [progressStartFrame - fadeInDurationInFrames - 4, progressStartFrame - 4],
+ [0, 1],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ );
+ const fadeOut = interpolate(
+ localFrame,
+ [fadeOutStartFrame, fadeOutStartFrame + fadeOutDurationInFrames],
+ [1, 0],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ );
+
+ return Math.min(fadeIn, fadeOut);
+};
+
export const RenderProgress: React.FC = () => {
const currentFrame = useCurrentFrame();
const {durationInFrames, fps} = useVideoConfig();
@@ -49,24 +77,40 @@ export const RenderProgress: React.FC = () => {
const y = initialY + i * spacing - scroll + cycleOffset * cycleHeight;
const localFrame = frame - itemIndex * itemSpacingInFrames;
- return getButton({
- font,
- phrase,
- depth,
- color,
- delay: 0,
- transformations: [translateY(y), ...commonTransformations],
- frame: localFrame,
- fps,
- });
+ return {
+ elements: getButton({
+ font,
+ phrase,
+ depth,
+ color,
+ delay: 0,
+ transformations: [translateY(y), ...commonTransformations],
+ frame: localFrame,
+ fps,
+ }),
+ opacity: getCardOpacity(localFrame),
+ };
});
});
return (
<AbsoluteFill>
- <svg viewBox={viewBox.join(' ')} style={{overflow: 'visible'}}>
- <Faces elements={rendered.flat(1)} />
- </svg>
+ {rendered.map((item, i) => {
+ return (
+ <svg
+ key={i}
+ viewBox={viewBox.join(' ')}
+ style={{
+ inset: 0,
+ opacity: item.opacity,
+ overflow: 'visible',
+ position: 'absolute',
+ }}
+ >
+ <Faces elements={item.elements} />
+ </svg>
+ );
+ })}
</AbsoluteFill>
);
};
diff --git a/packages/brand/src/HomepageAssets/TemplateRecorderEndcard.tsx b/packages/brand/src/HomepageAssets/TemplateRecorderEndcard.tsx
index 46d0f4f09b..31f88cc5cd 100644
--- a/packages/brand/src/HomepageAssets/TemplateRecorderEndcard.tsx
+++ b/packages/brand/src/HomepageAssets/TemplateRecorderEndcard.tsx
@@ -16,6 +16,17 @@ import {ExtrudeDiv} from '../3DContext/Div3D';
const cardWidth = 880;
const cardHeight = 1320;
const cornerRadius = 52;
+const canvasWidth = 1080;
+const canvasHeight = 1620;
+const outlineGap = 24;
+const outlineHandleSize = 40;
+const outlineStrokeWidth = 5;
+const outlineWidth = cardWidth + outlineGap * 2;
+const outlineHeight = cardHeight + outlineGap * 2;
+const outlineLeft = (canvasWidth - cardWidth) / 2 - outlineGap;
+const outlineVerticalNudge = 30;
+const outlineTop =
+ (canvasHeight - cardHeight) / 2 - outlineGap + outlineVerticalNudge;
const fontFamily = 'GT Planar';
const followButtonHeight = 140;
const spaceBetweenImgAndText = 30;
@@ -61,8 +72,7 @@ const remotionSocialRows: readonly {type: IconType; label: string}[] = [
];
const remotionLinks: readonly {type: IconType; label: string}[] = [
- {type: 'link', label: 'remotion.dev/recorder'},
- {type: 'link', label: 'remotion.dev/discord'},
+ {type: 'link', label: 'remotion.dev'},
];
const Icon: React.FC<{
@@ -121,8 +131,11 @@ const IconRow: React.FC<{
);
};
-const TemplateRecorderEndcardFace: React.FC = () => {
- const frame = useCurrentFrame();
+const TemplateRecorderEndcardFace: React.FC<{
+ readonly frame?: number;
+}> = ({frame: frameOverride}) => {
+ const currentFrame = useCurrentFrame();
+ const frame = frameOverride ?? currentFrame;
const {fps, width} = useVideoConfig();
const totalLinks = remotionSocialRows.length + remotionLinks.length;
const slideUp = spring({
@@ -243,7 +256,78 @@ const TemplateRecorderEndcardFace: React.FC = () => {
);
};
-export const TemplateRecorderEndcard: React.FC = () => {
+const FlatSelectionOutline: React.FC = () => {
+ const handleOffset = outlineHandleSize / 2;
+
+ return (
+ <Interactive.Svg
+ viewBox={`0 0 ${outlineWidth} ${outlineHeight}`}
+ style={{
+ height: outlineHeight,
+ left: outlineLeft,
+ overflow: 'visible',
+ position: 'absolute',
+ top: outlineTop,
+ width: outlineWidth,
+ }}
+ >
+ <Interactive.Rect
+ fill="none"
+ height={outlineHeight}
+ stroke="#0d99ff"
+ strokeWidth={outlineStrokeWidth}
+ vectorEffect="non-scaling-stroke"
+ width={outlineWidth}
+ x={0}
+ y={0}
+ />
+ <Interactive.Rect
+ fill="white"
+ height={outlineHandleSize}
+ stroke="#0d99ff"
+ strokeWidth={outlineStrokeWidth}
+ vectorEffect="non-scaling-stroke"
+ width={outlineHandleSize}
+ x={-handleOffset}
+ y={-handleOffset}
+ />
+ <Interactive.Rect
+ fill="white"
+ height={outlineHandleSize}
+ stroke="#0d99ff"
+ strokeWidth={outlineStrokeWidth}
+ vectorEffect="non-scaling-stroke"
+ width={outlineHandleSize}
+ x={outlineWidth - handleOffset}
+ y={-handleOffset}
+ />
+ <Interactive.Rect
+ fill="white"
+ height={outlineHandleSize}
+ stroke="#0d99ff"
+ strokeWidth={outlineStrokeWidth}
+ vectorEffect="non-scaling-stroke"
+ width={outlineHandleSize}
+ x={-handleOffset}
+ y={outlineHeight - handleOffset}
+ />
+ <Interactive.Rect
+ fill="white"
+ height={outlineHandleSize}
+ stroke="#0d99ff"
+ strokeWidth={outlineStrokeWidth}
+ vectorEffect="non-scaling-stroke"
+ width={outlineHandleSize}
+ x={outlineWidth - handleOffset}
+ y={outlineHeight - handleOffset}
+ />
+ </Interactive.Svg>
+ );
+};
+
+export const TemplateRecorderEndcard: React.FC<{
+ readonly frame?: number;
+}> = ({frame}) => {
return (
<AbsoluteFill className="justify-center items-center">
<ExtrudeDiv
@@ -289,10 +373,11 @@ export const TemplateRecorderEndcard: React.FC = () => {
translate: '-36.3px 0px',
}}
>
- <TemplateRecorderEndcardFace />
+ <TemplateRecorderEndcardFace frame={frame} />
</Interactive.Div>
</Interactive.Div>
</ExtrudeDiv>
+ <FlatSelectionOutline />
</AbsoluteFill>
);
};
@@ -304,8 +389,8 @@ export const TemplateRecorderEndcardComposition: React.FC = () => {
component={TemplateRecorderEndcard}
durationInFrames={200}
fps={30}
- width={1080}
- height={1620}
+ width={canvasWidth}
+ height={canvasHeight}
/>
);
};
diff --git a/packages/brand/src/HomepageAssets/center.ts b/packages/brand/src/HomepageAssets/center.ts
new file mode 100644
index 0000000000..a609ee8502
--- /dev/null
+++ b/packages/brand/src/HomepageAssets/center.ts
@@ -0,0 +1,14 @@
+import {getBoundingBox, translatePath} from '@remotion/paths';
+
+export const centerPath = (path: string) => {
+ const bBox = getBoundingBox(path);
+ const buttonWidth = bBox.x2 - bBox.x1;
+ const buttonHeight = bBox.y2 - bBox.y1;
+
+ const centeredButton = translatePath(
+ path,
+ -buttonWidth / 2,
+ -buttonHeight / 2,
+ );
+ return centeredButton;
+};
diff --git a/packages/brand/src/Root.tsx b/packages/brand/src/Root.tsx
index 0ba4a4f90c..b9b21941db 100644
--- a/packages/brand/src/Root.tsx
+++ b/packages/brand/src/Root.tsx
@@ -4,6 +4,12 @@ import {AnimatedLogo} from './animated-logo/AnimatedLogo';
import {AnimatedLogoStringer} from './animated-logo/AnimatedLogoStinger';
import {AnimatedMaster} from './animated-logo/AnimatedMaster';
import {ExplodingLogo} from './animated-logo/ExplodingLogo';
+import {
+ ApplicationRenderButton,
+ ApplicationSimpleApp,
+ ApplicationVideoEditor,
+ Applications,
+} from './Applications';
import {Banner} from './Brand/Banner';
import {Comp} from './Brand/Composition';
import {TriangleDemo} from './Brand/TriangleToSquare';
@@ -17,7 +23,7 @@ import {
whatIsRemotionCalculateMetadata,
whatIsRemotionSchema,
} from './Compose/WhatIsRemotion';
-import {DesignSystems} from './DesignSystems';
+import {DesignSystems, designSystemsDurationInFrames} from './DesignSystems';
import {
DocsPagesShowcase,
INSTAGRAM_POST_HEIGHT,
@@ -240,7 +246,39 @@ export const RemotionRoot: React.FC = () => {
<Composition
id="DesignSystems"
component={DesignSystems}
- durationInFrames={150}
+ durationInFrames={designSystemsDurationInFrames}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="ApplicationSimpleApp"
+ component={ApplicationSimpleApp}
+ durationInFrames={240}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="ApplicationVideoEditor"
+ component={ApplicationVideoEditor}
+ durationInFrames={240}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="ApplicationRenderButton"
+ component={ApplicationRenderButton}
+ durationInFrames={240}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="Applications"
+ component={Applications}
+ durationInFrames={180}
fps={30}
width={1080}
height={1080}
diff --git a/packages/docs/static/img/applications.mp4 b/packages/docs/static/img/applications.mp4
new file mode 100644
index 0000000000..5bc6a2a60a
Binary files /dev/null and b/packages/docs/static/img/applications.mp4 differ
diff --git a/packages/docs/static/img/applications.webm b/packages/docs/static/img/applications.webm
new file mode 100644
index 0000000000..b6bd462119
Binary files /dev/null and b/packages/docs/static/img/applications.webm differ
diff --git a/packages/docs/static/img/design-systems.mp4 b/packages/docs/static/img/design-systems.mp4
new file mode 100644
index 0000000000..e482b4af59
Binary files /dev/null and b/packages/docs/static/img/design-systems.mp4 differ
diff --git a/packages/docs/static/img/design-systems.webm b/packages/docs/static/img/design-systems.webm
new file mode 100644
index 0000000000..17bab5c256
Binary files /dev/null and b/packages/docs/static/img/design-systems.webm differ
diff --git a/packages/docs/static/img/render-progress.mp4 b/packages/docs/static/img/render-progress.mp4
index b38cdee797..800d854fc4 100644
Binary files a/packages/docs/static/img/render-progress.mp4 and b/packages/docs/static/img/render-progress.mp4 differ
diff --git a/packages/docs/static/img/render-progress.webm b/packages/docs/static/img/render-progress.webm
index 6a75507e5f..e037b77b87 100644
Binary files a/packages/docs/static/img/render-progress.webm and b/packages/docs/static/img/render-progress.webm differ
diff --git a/packages/promo-pages/public/img/applications.mp4 b/packages/promo-pages/public/img/applications.mp4
new file mode 100644
index 0000000000..5bc6a2a60a
Binary files /dev/null and b/packages/promo-pages/public/img/applications.mp4 differ
diff --git a/packages/promo-pages/public/img/applications.webm b/packages/promo-pages/public/img/applications.webm
new file mode 100644
index 0000000000..b6bd462119
Binary files /dev/null and b/packages/promo-pages/public/img/applications.webm differ
diff --git a/packages/promo-pages/public/img/design-systems.mp4 b/packages/promo-pages/public/img/design-systems.mp4
new file mode 100644
index 0000000000..e482b4af59
Binary files /dev/null and b/packages/promo-pages/public/img/design-systems.mp4 differ
diff --git a/packages/promo-pages/public/img/design-systems.webm b/packages/promo-pages/public/img/design-systems.webm
new file mode 100644
index 0000000000..17bab5c256
Binary files /dev/null and b/packages/promo-pages/public/img/design-systems.webm differ
diff --git a/packages/promo-pages/public/img/render-progress.mp4 b/packages/promo-pages/public/img/render-progress.mp4
index b38cdee797..800d854fc4 100644
Binary files a/packages/promo-pages/public/img/render-progress.mp4 and b/packages/promo-pages/public/img/render-progress.mp4 differ
diff --git a/packages/promo-pages/public/img/render-progress.webm b/packages/promo-pages/public/img/render-progress.webm
index 6a75507e5f..e037b77b87 100644
Binary files a/packages/promo-pages/public/img/render-progress.webm and b/packages/promo-pages/public/img/render-progress.webm differ
diff --git a/packages/promo-pages/server.ts b/packages/promo-pages/server.ts
index 92cf4a9736..616218fcf4 100644
--- a/packages/promo-pages/server.ts
+++ b/packages/promo-pages/server.ts
@@ -5,28 +5,53 @@ import promptsSubmit from './prompts-submit.html';
import prompts from './prompts.html';
import team from './team.html';
-const server = serve({
- routes: {
- '/': homepage,
- '/about': team,
- '/prompts': prompts,
- '/prompts/show': promptsShow,
- '/prompts/submit': promptsSubmit,
- },
- development: true,
- async fetch(req) {
+const startingPort = 3000;
+const maxPortAttempts = 100;
+
+const startServer = () => {
+ for (let port = startingPort; port < startingPort + maxPortAttempts; port++) {
try {
- const url = new URL(req.url);
- const file = Bun.file(`./public${url.pathname}`);
- const exists = await file.exists();
- if (!exists) {
- return new Response('Not Found', {status: 404});
+ return serve({
+ port,
+ routes: {
+ '/': homepage,
+ '/about': team,
+ '/prompts': prompts,
+ '/prompts/show': promptsShow,
+ '/prompts/submit': promptsSubmit,
+ },
+ development: true,
+ async fetch(req) {
+ try {
+ const url = new URL(req.url);
+ const file = Bun.file(`./public${url.pathname}`);
+ const exists = await file.exists();
+ if (!exists) {
+ return new Response('Not Found', {status: 404});
+ }
+ return new Response(file);
+ } catch (e) {
+ return new Response('Server Error', {status: 500});
+ }
+ },
+ });
+ } catch (error) {
+ if (!(error instanceof Error)) {
+ throw error;
+ }
+
+ const codedError = error as Error & {code: string};
+ if (codedError.code !== 'EADDRINUSE') {
+ throw error;
}
- return new Response(file);
- } catch (e) {
- return new Response('Server Error', {status: 500});
}
- },
-});
+ }
+
+ throw new Error(
+ `Could not find a free port between ${startingPort} and ${startingPort + maxPortAttempts - 1}.`,
+ );
+};
+
+const server = startServer();
console.log(`Listening on ${server.url}`);
diff --git a/packages/promo-pages/src/components/Homepage.tsx b/packages/promo-pages/src/components/Homepage.tsx
index ec47e407d8..3ff1c499a7 100644
--- a/packages/promo-pages/src/components/Homepage.tsx
+++ b/packages/promo-pages/src/components/Homepage.tsx
@@ -1,7 +1,6 @@
'use client';
import React from 'react';
-import AutomationsSection from './homepage/AutomationsSection';
import {BackgroundAnimation} from './homepage/BackgroundAnimation';
import CommunityStats from './homepage/CommunityStats';
import {Demo} from './homepage/Demo';
@@ -53,12 +52,42 @@ export const NewLanding: React.FC<{
</div>
<br />
<br />
- <br />
- <div className="pt-6 md:pt-8">
- <AutomationsSection />
+ <div className={makeVideosRowClassName}>
+ <MakeVideosProgrammatically
+ title="Design systems"
+ description="Create a library of animated assets for your organization."
+ videoSrc="/img/design-systems.webm"
+ fallbackVideoSrc="/img/design-systems.mp4"
+ links={[
+ {label: 'Motion design systems', href: '/design-systems'},
+ ]}
+ />
+ <MakeVideosAgentically
+ title="Batch rendering"
+ description="Render millions of videos on your own infrastructure."
+ links={[
+ {
+ label: 'Server-side rendering',
+ href: '/docs/compare-ssr',
+ },
+ {
+ label: 'Client-side rendering',
+ href: '/docs/client-side-rendering',
+ },
+ ]}
+ />
+ <MakeVideosInteractively
+ title="Applications"
+ description="Publish a simple tool or a complex video editor."
+ videoSrc="/img/applications.webm"
+ fallbackVideoSrc="/img/applications.mp4"
+ links={[
+ {label: 'Player', href: '/docs/player'},
+ {label: 'Editor Starter', href: '/editor-starter'},
+ ]}
+ />
</div>
- <br />
- <br />
+
<Demo />
<br />
<br />
diff --git a/packages/promo-pages/src/components/homepage/MakeVideosAgentically.tsx b/packages/promo-pages/src/components/homepage/MakeVideosAgentically.tsx
index ac3f1de48d..26f7dfed42 100644
--- a/packages/promo-pages/src/components/homepage/MakeVideosAgentically.tsx
+++ b/packages/promo-pages/src/components/homepage/MakeVideosAgentically.tsx
@@ -1,5 +1,6 @@
import React, {useEffect, useRef} from 'react';
import {MakeVideosLinks, type MakeVideosLink} from './MakeVideosLinks';
+import {useTransparentVideoSource} from './use-transparent-video-source';
export const MakeVideosAgentically: React.FC<{
readonly title?: React.ReactNode;
@@ -28,6 +29,7 @@ export const MakeVideosAgentically: React.FC<{
}) => {
const ref = useRef<HTMLDivElement>(null);
const videoRef = useRef<HTMLVideoElement>(null);
+ const src = useTransparentVideoSource({fallbackVideoSrc, videoSrc});
useEffect(() => {
const {current} = ref;
@@ -56,6 +58,7 @@ export const MakeVideosAgentically: React.FC<{
{showVideo ? (
<video
ref={videoRef}
+ src={src}
muted
autoPlay
playsInline
@@ -69,10 +72,7 @@ export const MakeVideosAgentically: React.FC<{
overflow: 'hidden',
}}
className="cursor-default! relative object-contain"
- >
- <source src={fallbackVideoSrc} type="video/mp4" />
- <source src={videoSrc} type="video/webm" />
- </video>
+ />
) : null}
</div>
<div className="font-brand">
diff --git a/packages/promo-pages/src/components/homepage/MakeVideosInteractively.tsx b/packages/promo-pages/src/components/homepage/MakeVideosInteractively.tsx
index 2c2e3735f8..f5b26f3c04 100644
--- a/packages/promo-pages/src/components/homepage/MakeVideosInteractively.tsx
+++ b/packages/promo-pages/src/components/homepage/MakeVideosInteractively.tsx
@@ -1,5 +1,6 @@
import React, {useRef} from 'react';
import {MakeVideosLinks, type MakeVideosLink} from './MakeVideosLinks';
+import {useTransparentVideoSource} from './use-transparent-video-source';
export const MakeVideosInteractively: React.FC<{
readonly title?: React.ReactNode;
@@ -24,6 +25,7 @@ export const MakeVideosInteractively: React.FC<{
fallbackVideoSrc = '/img/editing-safari.mp4',
}) => {
const ref = useRef<HTMLDivElement>(null);
+ const src = useTransparentVideoSource({fallbackVideoSrc, videoSrc});
return (
<div
@@ -35,6 +37,7 @@ export const MakeVideosInteractively: React.FC<{
<div className="flex aspect-square w-full items-start">
{showVideo ? (
<video
+ src={src}
autoPlay
muted
playsInline
@@ -48,10 +51,7 @@ export const MakeVideosInteractively: React.FC<{
overflow: 'hidden',
}}
className="object-contain"
- >
- <source src={fallbackVideoSrc} type="video/mp4" />
- <source src={videoSrc} type="video/webm" />
- </video>
+ />
) : null}
</div>
<div className="font-brand">
diff --git a/packages/promo-pages/src/components/homepage/MakeVideosProgrammatically.tsx b/packages/promo-pages/src/components/homepage/MakeVideosProgrammatically.tsx
index cc4689591f..f0acad3b2c 100644
--- a/packages/promo-pages/src/components/homepage/MakeVideosProgrammatically.tsx
+++ b/packages/promo-pages/src/components/homepage/MakeVideosProgrammatically.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import {MakeVideosLinks, type MakeVideosLink} from './MakeVideosLinks';
+import {useTransparentVideoSource} from './use-transparent-video-source';
export const MakeVideosProgrammatically: React.FC<{
readonly title?: React.ReactNode;
@@ -23,21 +24,21 @@ export const MakeVideosProgrammatically: React.FC<{
videoSrc = '/img/what-is-remotion.webm',
fallbackVideoSrc = '/img/what-is-remotion.mp4',
}) => {
+ const src = useTransparentVideoSource({fallbackVideoSrc, videoSrc});
+
return (
<div className={'flex min-w-0 basis-0 flex-col flex-1'}>
<div className="flex aspect-square w-full items-start">
{showVideo ? (
<video
+ src={src}
muted
autoPlay
playsInline
loop
preload="metadata"
className="relative max-h-full max-w-full cursor-default! object-contain lg:mb-0 lg:mt-0"
- >
- <source src={fallbackVideoSrc} type="video/mp4" />
- <source src={videoSrc} type="video/webm" />
- </video>
+ />
) : null}
</div>
<div className="font-brand">
diff --git a/packages/promo-pages/src/components/homepage/use-transparent-video-source.ts b/packages/promo-pages/src/components/homepage/use-transparent-video-source.ts
new file mode 100644
index 0000000000..3db597c146
--- /dev/null
+++ b/packages/promo-pages/src/components/homepage/use-transparent-video-source.ts
@@ -0,0 +1,18 @@
+import {useEffect, useState} from 'react';
+import {isWebkit} from './IfYouKnowReact';
+
+export const useTransparentVideoSource = ({
+ fallbackVideoSrc,
+ videoSrc,
+}: {
+ readonly fallbackVideoSrc: string;
+ readonly videoSrc: string;
+}) => {
+ const [src, setSrc] = useState(videoSrc);
+
+ useEffect(() => {
+ setSrc(isWebkit() ? fallbackVideoSrc : videoSrc);
+ }, [fallbackVideoSrc, videoSrc]);
+
+ return src;
+};