Skip to content

🎥 Make videos programmatically with React

first draft

Patric Salvisbergfda9e3487f65
diff --git a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar
index 5c3bd72940..b3a339a492 100644
Binary files a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar and b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar differ
diff --git a/packages/docs/components/LandingPage/CompanyPricing.tsx b/packages/docs/components/LandingPage/CompanyPricing.tsx
new file mode 100644
index 0000000000..3ab0a046a8
--- /dev/null
+++ b/packages/docs/components/LandingPage/CompanyPricing.tsx
@@ -0,0 +1,79 @@
+import React, { useMemo } from "react";
+import { Counter } from "./Counter";
+import styles from "./pricing.module.css";
+import { PricingBulletPoint } from "./PricingBulletPoint";
+
+const SEAT_PRICE = 25;
+const RENDER_UNIT_PRICE = 10;
+
+const textUnitWrapper: React.CSSProperties = {
+ display: "flex",
+ flexDirection: "column",
+};
+
+export const CompanyPricing: React.FC = () => {
+ const [devSeatCount, setDevSeatCount] = React.useState(1);
+ const [cloudUnitCount, setCloudUnitCount] = React.useState(1);
+
+ const totalPrice = useMemo(() => {
+ return Math.max(
+ 100,
+ devSeatCount * SEAT_PRICE + cloudUnitCount * RENDER_UNIT_PRICE,
+ );
+ }, [cloudUnitCount, devSeatCount]);
+
+ const rendersPerMonth = useMemo(() => {
+ return cloudUnitCount * 2000;
+ }, [cloudUnitCount]);
+
+ return (
+ <div className={styles.pricingcontainer}>
+ <div className={styles.text}>For companies of 4+ people</div>
+ <h2 className={styles.pricingtitle}>Company license</h2>
+ <PricingBulletPoint text="Everything in free" checked />
+ <PricingBulletPoint text="Prioritized Support" checked />
+ <div style={{ height: 30 }} />
+ <div className={styles.rowcontainer}>
+ <div style={textUnitWrapper}>
+ <div className={styles.boldtext}>Developer Seat</div>
+ <div className={styles.description}>
+ Number of developers working with Remotion
+ </div>
+ </div>
+ <div style={{ flex: 3 }} />
+ <Counter count={devSeatCount} setCount={setDevSeatCount} />
+ <div style={{ flex: 1 }} />
+ <div className={styles.pricetag}>${SEAT_PRICE}</div>
+ </div>
+ <div style={{ height: 14 }} />
+ <div className={styles.rowcontainer}>
+ <div style={textUnitWrapper}>
+ <div className={styles.boldtext}>Cloud Rendering Units</div>
+ <div className={styles.description}>
+ Allows for {rendersPerMonth} self-hosted renders per month
+ </div>
+ </div>
+ <div style={{ flex: 3 }} />
+ <Counter count={cloudUnitCount} setCount={setCloudUnitCount} />
+ <div style={{ flex: 1 }} />
+ <div className={styles.pricetag}>${RENDER_UNIT_PRICE}</div>
+ </div>
+ <div style={{ height: 20 }} />
+ <div
+ className={styles.rowContainer}
+ style={{ justifyContent: "flex-end" }}
+ >
+ <div style={{ ...textUnitWrapper, alignItems: "flex-end" }}>
+ <div className={styles.pricetag}>${totalPrice}/mo</div>
+ {totalPrice <= 100 ? (
+ <div className={styles.descriptionsmall} style={{ height: 24 }}>
+ The minimum is $100 per month
+ </div>
+ ) : (
+ <div style={{ height: 24 }} />
+ )}
+ </div>
+ </div>
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/Counter.tsx b/packages/docs/components/LandingPage/Counter.tsx
new file mode 100644
index 0000000000..5b9e272d35
--- /dev/null
+++ b/packages/docs/components/LandingPage/Counter.tsx
@@ -0,0 +1,78 @@
+import type { SetStateAction } from "react";
+import React from "react";
+import styles from "./pricing.module.css";
+
+const triangle = (
+ <svg
+ width="12px"
+ height="7px"
+ viewBox="0 0 12 7"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ d="M7.17096 0.475588C6.73198 0.0764969 6.01906 0.0764969 5.58007 0.475588L1.08483 4.56228C0.761737 4.85601 0.666915 5.29341 0.84251 5.67654C1.01811 6.05966 1.42549 6.3087 1.88203 6.3087H10.8725C11.3255 6.3087 11.7364 6.05966 11.912 5.67654C12.0876 5.29341 11.9893 4.85601 11.6697 4.56228L7.17448 0.475588H7.17096Z"
+ fill="#EAEAEA"
+ />
+ </svg>
+);
+
+const container: React.CSSProperties = {
+ display: "flex",
+ flexDirection: "row",
+ justifyContent: "flex-end",
+ alignItems: "center",
+ border: "1px solid #EAEAEA",
+ borderRadius: 4,
+ width: 90,
+ height: 42,
+ overflow: "hidden",
+};
+
+const buttonContainer: React.CSSProperties = {
+ display: "flex",
+ width: 30,
+ padding: 2,
+ height: 20,
+ justifyContent: "center",
+ alignItems: "center",
+ backgroundColor: "inherit",
+ cursor: "pointer",
+ border: "none",
+};
+
+export const Counter: React.FC<{
+ count: number;
+ setCount: React.Dispatch<SetStateAction<number>>;
+}> = ({ count, setCount }) => {
+ return (
+ <div style={container}>
+ <div className={styles.pricetag}>{count}</div>
+ <div style={{ display: "flex", flexDirection: "column", marginLeft: 10 }}>
+ <button
+ type="button"
+ style={{
+ ...buttonContainer,
+ borderLeft: "1px solid #EAEAEA",
+ borderBottom: "1px solid #EAEAEA",
+ }}
+ onClick={() => setCount((c) => Math.max(1, c + 1))}
+ >
+ {triangle}
+ </button>
+ <button
+ type="button"
+ style={{
+ transform: "rotate(180deg)",
+ ...buttonContainer,
+ borderRight: "1px solid #EAEAEA",
+ borderLeft: "none",
+ }}
+ onClick={() => setCount((c) => Math.max(1, c - 1))}
+ >
+ {triangle}
+ </button>
+ </div>
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/EnterpriseLicense.tsx b/packages/docs/components/LandingPage/EnterpriseLicense.tsx
new file mode 100644
index 0000000000..7a51f87335
--- /dev/null
+++ b/packages/docs/components/LandingPage/EnterpriseLicense.tsx
@@ -0,0 +1,47 @@
+import React from "react";
+import styles from "./pricing.module.css";
+import { PricingBulletPoint } from "./PricingBulletPoint";
+
+const textUnitWrapper: React.CSSProperties = {
+ display: "flex",
+ flexDirection: "column",
+};
+
+export const EnterpriseLicense: React.FC = () => {
+ return (
+ <div className={styles.pricingcontainer}>
+ <div className={styles.text}>For advanced needs</div>
+ <h2 className={styles.pricingtitle}>Enterprise license</h2>
+ <PricingBulletPoint text="Custom terms and pricing" checked />
+ <PricingBulletPoint text="Remotion fills out compliance forms" checked />
+ <PricingBulletPoint text="Prioritized feature requests" checked />
+ <PricingBulletPoint text="Private support" checked />
+ <div style={{ height: 30 }} />
+ <div
+ className={styles.rowcontainer}
+ style={{ justifyContent: "flex-end" }}
+ >
+ <div
+ style={{
+ ...textUnitWrapper,
+ alignItems: "flex-end",
+ }}
+ >
+ <div
+ className={styles.pricetag}
+ style={{
+ justifyContent: "flex-end",
+ fontSize: 30,
+ lineHeight: 1.4,
+ }}
+ >
+ Contact us
+ </div>
+ <div className={styles.descriptionsmall}>
+ Starting at $500 per month
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/FreePricing2.tsx b/packages/docs/components/LandingPage/FreePricing2.tsx
new file mode 100644
index 0000000000..7cf1d08154
--- /dev/null
+++ b/packages/docs/components/LandingPage/FreePricing2.tsx
@@ -0,0 +1,18 @@
+import React from "react";
+import styles from "./pricing.module.css";
+import { PricingBulletPoint } from "./PricingBulletPoint";
+
+export const FreePricing2: React.FC = () => {
+ return (
+ <div className={styles.pricingcontainer}>
+ <div className={styles.text}>
+ For individuals and companies of up to 3
+ </div>
+ <h2 className={styles.pricingtitle}>Free forever</h2>
+ <PricingBulletPoint text="Unlimited videos" checked />
+ <PricingBulletPoint text="Comercial use allowed" checked />
+ <PricingBulletPoint text="Cloud rendering allowed(self-hosted)" checked />
+ <PricingBulletPoint text="Upgrade when your team grows" checked={false} />
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/Pricing.tsx b/packages/docs/components/LandingPage/Pricing.tsx
new file mode 100644
index 0000000000..7f08ccc58e
--- /dev/null
+++ b/packages/docs/components/LandingPage/Pricing.tsx
@@ -0,0 +1,14 @@
+import React from "react";
+import { CompanyPricing } from "./CompanyPricing";
+import { EnterpriseLicense } from "./EnterpriseLicense";
+import { FreePricing2 } from "./FreePricing2";
+
+export const Pricing: React.FC = () => {
+ return (
+ <div style={{ display: "flex", flexDirection: "column", gap: 20 }}>
+ <FreePricing2 />
+ <CompanyPricing />
+ <EnterpriseLicense />
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/PricingBulletPoint.tsx b/packages/docs/components/LandingPage/PricingBulletPoint.tsx
new file mode 100644
index 0000000000..9907cbf8bb
--- /dev/null
+++ b/packages/docs/components/LandingPage/PricingBulletPoint.tsx
@@ -0,0 +1,44 @@
+import React from "react";
+import styles from "./pricing.module.css";
+
+const container: React.CSSProperties = {
+ display: "flex",
+ flexDirection: "row",
+ alignItems: "center",
+ gap: "10px",
+};
+
+const greyCircle: React.CSSProperties = {
+ width: 20,
+ height: 20,
+ borderRadius: 10,
+ backgroundColor: "#EAEAEA",
+};
+
+export const PricingBulletPoint: React.FC<{
+ text: string;
+ checked: boolean;
+}> = ({ text, checked }) => {
+ const checkmarkSVG = (
+ <svg
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <circle cx="10" cy="10" r="10" fill="#0B84F3" />
+ <path
+ d="M14.7908 7.20505C15.0697 7.47844 15.0697 7.92243 14.7908 8.19583L9.07711 13.795C8.79813 14.0683 8.34505 14.0683 8.06606 13.795L5.20924 10.9954C4.93025 10.722 4.93025 10.278 5.20924 10.0046C5.48823 9.73121 5.9413 9.73121 6.22029 10.0046L8.5727 12.3077L13.7819 7.20505C14.0609 6.93165 14.514 6.93165 14.793 7.20505H14.7908Z"
+ fill="white"
+ />
+ </svg>
+ );
+
+ return (
+ <div style={container}>
+ {checked ? checkmarkSVG : <div style={greyCircle} />}
+ <div className={styles.text}>{text} </div>
+ </div>
+ );
+};
diff --git a/packages/docs/components/LandingPage/pricing.module.css b/packages/docs/components/LandingPage/pricing.module.css
index e3e2536f4f..748be74279 100644
--- a/packages/docs/components/LandingPage/pricing.module.css
+++ b/packages/docs/components/LandingPage/pricing.module.css
@@ -2,6 +2,7 @@
font-size: 2.5em;
font-weight: 700;
line-height: 1.1;
+ font-family: "GTPlanar", sans-serif;
}
.mp4 {
@@ -9,7 +10,47 @@
}
.pricingcontainer {
- text-align: center;
+ display: flex;
+ flex-direction: column;
+ border: 5px solid black;
+ border-radius: 5px;
+ padding: 20px 26px;
+}
+
+.text {
+ font-family: "GTPlanar", sans-serif;
+ font-size: 19px;
+}
+
+.pricetag {
+ font-family: "GTPlanar", sans-serif;
+ font-size: 24px;
+ font-weight: 500;
+}
+
+.boldtext {
+ margin: 0;
+ padding: 0;
+ font-family: "GTPlanar", sans-serif;
+ font-size: 19px;
+ font-weight: 700;
+ line-height: 1;
+}
+
+.description {
+ margin: 0;
+ padding: 0;
+ font-family: "GTPlanar", sans-serif;
+ font-size: 15px;
+ color: #666666;
+ min-width: 330px;
+}
+.descriptionsmall {
+ margin: 0;
+ padding: 0;
+ font-family: "GTPlanar", sans-serif;
+ font-size: 14px;
+ color: #666666;
}
.pricingrow {
@@ -101,6 +142,12 @@
flex-direction: row;
}
+.rowcontainer {
+ display: flex;
+ flex-direction: row;
+ margin-bottom: 12;
+}
+
.doublepanelsingle {
flex: 1;
min-height: 400px;
@@ -131,6 +178,9 @@
}
@media screen and (max-width: 900px) {
+ .description {
+ min-width: 200px;
+ }
.pricingcontainer {
text-align: left;
}
diff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsx
index 27f61087f6..ae7115627e 100644
--- a/packages/docs/src/pages/index.tsx
+++ b/packages/docs/src/pages/index.tsx
@@ -5,9 +5,9 @@ import { VideoApps } from "../../components/LambdaSplash/VideoApps";
import { VideoAppsTitle } from "../../components/LambdaSplash/VideoAppsTitle";
import { BackgroundAnimation } from "../../components/LandingPage/BackgroundAnimation";
import { LightningFastEditor } from "../../components/LandingPage/editor";
-import { FreePricing } from "../../components/LandingPage/FreePricing";
import { IfYouKnowReact } from "../../components/LandingPage/if-you-know-react";
import { Parametrize } from "../../components/LandingPage/parametrize";
+import { Pricing } from "../../components/LandingPage/Pricing";
import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";
import { WriteInReact } from "../../components/LandingPage/WriteInReact";
import styles from "./landing.module.css";
@@ -57,7 +57,7 @@ const NewLanding: React.FC = () => {
<VideoApps active="remotion" />
<br />
<br />
- <FreePricing />
+ <Pricing />
</div>
</div>
</Layout>