Skip to content

🎥 Make videos programmatically with React

v10

Jonny Burgerffe4abfa1832
diff --git a/packages/example/testssr.mjs b/packages/example/testssr.mjs
index ab0aaaf9c3..dc969eac52 100644
--- a/packages/example/testssr.mjs
+++ b/packages/example/testssr.mjs
@@ -6,7 +6,7 @@ const serveUrl = await bundle({
entryPoint: 'src/index.ts',
webpackOverride,
});
-console.log('Bundled');
+console.log('Bundled', serveUrl);
const composition = await selectComposition({
id: 'react-svg',
diff --git a/packages/it-tests/src/ssr/cancel-after-success.test.ts b/packages/it-tests/src/ssr/cancel-after-success.test.ts
index 30dddfa11b..3ee0ce0118 100644
--- a/packages/it-tests/src/ssr/cancel-after-success.test.ts
+++ b/packages/it-tests/src/ssr/cancel-after-success.test.ts
@@ -9,7 +9,7 @@ test("Cancelling after success should not throw error", async () => {
await renderMedia({
codec: "h264",
serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: {
durationInFrames: 4,
fps: 30,
diff --git a/packages/it-tests/src/ssr/cancel-renderframes.test.ts b/packages/it-tests/src/ssr/cancel-renderframes.test.ts
index c1000b5073..2846de8aa4 100644
--- a/packages/it-tests/src/ssr/cancel-renderframes.test.ts
+++ b/packages/it-tests/src/ssr/cancel-renderframes.test.ts
@@ -5,8 +5,7 @@ test("Should be able to cancel render", async () => {
try {
const { cancel, cancelSignal } = makeCancelSignal();
const val = renderFrames({
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: {
durationInFrames: 1000000,
fps: 30,
diff --git a/packages/it-tests/src/ssr/cancel-rendermedia.test.ts b/packages/it-tests/src/ssr/cancel-rendermedia.test.ts
index 7b9e066a70..9319fffe61 100644
--- a/packages/it-tests/src/ssr/cancel-rendermedia.test.ts
+++ b/packages/it-tests/src/ssr/cancel-rendermedia.test.ts
@@ -6,8 +6,7 @@ test("Should be able to cancel render", async () => {
const { cancel, cancelSignal } = makeCancelSignal();
const val = renderMedia({
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: {
durationInFrames: 1000000,
fps: 30,
diff --git a/packages/it-tests/src/ssr/cancel-renderstill.test.ts b/packages/it-tests/src/ssr/cancel-renderstill.test.ts
index 8438112f36..d78f5aa1cd 100644
--- a/packages/it-tests/src/ssr/cancel-renderstill.test.ts
+++ b/packages/it-tests/src/ssr/cancel-renderstill.test.ts
@@ -5,8 +5,7 @@ test("Should be able to cancel render", async () => {
try {
const { cancel, cancelSignal } = makeCancelSignal();
const val = renderStill({
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: {
durationInFrames: 1000000,
fps: 30,
diff --git a/packages/it-tests/src/ssr/fatal-error-correct-error.test.ts b/packages/it-tests/src/ssr/fatal-error-correct-error.test.ts
index a1cbdaca17..03f81fbdd8 100644
--- a/packages/it-tests/src/ssr/fatal-error-correct-error.test.ts
+++ b/packages/it-tests/src/ssr/fatal-error-correct-error.test.ts
@@ -5,8 +5,7 @@ test("Fatal error on frame 10 should yield correct error", async () => {
await expect(() => {
return renderMedia({
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: {
durationInFrames: 1000000,
fps: 30,
diff --git a/packages/it-tests/src/ssr/render-frames.test.ts b/packages/it-tests/src/ssr/render-frames.test.ts
index db5b45d976..25bc7251d9 100644
--- a/packages/it-tests/src/ssr/render-frames.test.ts
+++ b/packages/it-tests/src/ssr/render-frames.test.ts
@@ -13,7 +13,7 @@ import { RenderInternals } from "@remotion/renderer";
test("Legacy SSR way of rendering videos should still work", async () => {
const puppeteerInstance = await openBrowser("chrome");
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ "https://loquacious-rabanadas-a2bd81.netlify.app/",
{
puppeteerInstance,
}
@@ -39,8 +39,7 @@ test("Legacy SSR way of rendering videos should still work", async () => {
imageFormat: "jpeg",
inputProps: {},
onFrameUpdate: () => undefined,
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
concurrency: null,
frameRange: [0, 10],
outputDir: framesDir,
diff --git a/packages/it-tests/src/ssr/render-media.test.ts b/packages/it-tests/src/ssr/render-media.test.ts
index afa7ede100..3d4a75dd94 100644
--- a/packages/it-tests/src/ssr/render-media.test.ts
+++ b/packages/it-tests/src/ssr/render-media.test.ts
@@ -7,7 +7,7 @@ import { expect, test } from "vitest";
test("Render video with browser instance open", async () => {
const puppeteerInstance = await openBrowser("chrome");
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ "https://loquacious-rabanadas-a2bd81.netlify.app/",
{
puppeteerInstance,
}
@@ -26,8 +26,7 @@ test("Render video with browser instance open", async () => {
await renderMedia({
outputLocation: outPath,
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: reactSvg,
frameRange: [0, 2],
puppeteerInstance,
@@ -38,7 +37,7 @@ test("Render video with browser instance open", async () => {
test("Render video with browser instance not open", async () => {
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/"
+ "https://loquacious-rabanadas-a2bd81.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -54,8 +53,7 @@ test("Render video with browser instance not open", async () => {
await renderMedia({
outputLocation: outPath,
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: reactSvg,
frameRange: [0, 2],
});
@@ -72,8 +70,7 @@ test("should fail on invalid CRF", async () => {
await renderMedia({
outputLocation: outPath,
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
// @ts-expect-error
crf: "wrong",
composition: {
@@ -100,7 +97,7 @@ test("should fail on invalid CRF", async () => {
test("Render video to a buffer", async () => {
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/"
+ "https://loquacious-rabanadas-a2bd81.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -111,8 +108,7 @@ test("Render video to a buffer", async () => {
const { buffer } = await renderMedia({
codec: "h264",
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: reactSvg,
frameRange: [0, 2],
});
diff --git a/packages/it-tests/src/ssr/render-still.test.ts b/packages/it-tests/src/ssr/render-still.test.ts
index 065f0fc04f..8351fc3f2d 100644
--- a/packages/it-tests/src/ssr/render-still.test.ts
+++ b/packages/it-tests/src/ssr/render-still.test.ts
@@ -16,7 +16,7 @@ afterEach(async () => {
test("Render video with browser instance open", async () => {
const puppeteerInstance = await openBrowser("chrome");
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ "https://loquacious-rabanadas-a2bd81.netlify.app/",
{
puppeteerInstance,
}
@@ -34,8 +34,7 @@ test("Render video with browser instance open", async () => {
const { buffer } = await renderStill({
output: outPath,
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: reactSvg,
puppeteerInstance,
});
@@ -45,7 +44,7 @@ test("Render video with browser instance open", async () => {
test("Render still with browser instance not open and legacy webpack config", async () => {
const compositions = await getCompositions(
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/"
+ "https://loquacious-rabanadas-a2bd81.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -60,8 +59,7 @@ test("Render still with browser instance not open and legacy webpack config", as
await renderStill({
output: outPath,
- serveUrl:
- "https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/",
+ serveUrl: "https://loquacious-rabanadas-a2bd81.netlify.app/",
composition: reactSvg,
});
expect(existsSync(outPath)).toBe(true);
diff --git a/packages/lambda/src/test/integration/renders/gif.test.ts b/packages/lambda/src/test/integration/renders/gif.test.ts
index 4b4dc75b43..71dff1deed 100644
--- a/packages/lambda/src/test/integration/renders/gif.test.ts
+++ b/packages/lambda/src/test/integration/renders/gif.test.ts
@@ -23,8 +23,7 @@ test('Should make a distributed GIF', async () => {
const res = await callLambda({
type: LambdaRoutines.start,
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'gif',
composition: 'framer',
diff --git a/packages/lambda/src/test/integration/renders/other-bucket.test.ts b/packages/lambda/src/test/integration/renders/other-bucket.test.ts
index 8b4a4bc067..509e3a21da 100644
--- a/packages/lambda/src/test/integration/renders/other-bucket.test.ts
+++ b/packages/lambda/src/test/integration/renders/other-bucket.test.ts
@@ -22,8 +22,7 @@ test('Should be able to render to another bucket', async () => {
const res = await callLambda({
type: LambdaRoutines.start,
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'h264',
composition: 'react-svg',
diff --git a/packages/lambda/src/test/integration/renders/silent-audio.test.ts b/packages/lambda/src/test/integration/renders/silent-audio.test.ts
index 399e317e15..411127431e 100644
--- a/packages/lambda/src/test/integration/renders/silent-audio.test.ts
+++ b/packages/lambda/src/test/integration/renders/silent-audio.test.ts
@@ -21,8 +21,7 @@ test('Should add silent audio if there is no audio', async () => {
const res = await callLambda({
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'h264',
composition: 'react-svg',
diff --git a/packages/lambda/src/test/integration/renders/transparent-webm.test.ts b/packages/lambda/src/test/integration/renders/transparent-webm.test.ts
index 7cbe4ec80f..0ce210dcf7 100644
--- a/packages/lambda/src/test/integration/renders/transparent-webm.test.ts
+++ b/packages/lambda/src/test/integration/renders/transparent-webm.test.ts
@@ -25,8 +25,7 @@ test('Should make a transparent video', async () => {
const res = await callLambda({
type: LambdaRoutines.start,
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'vp8',
composition: 'ten-frame-tester',
diff --git a/packages/lambda/src/test/integration/webhooks.test.ts b/packages/lambda/src/test/integration/webhooks.test.ts
index f9d93bf4d6..7005b57e0e 100644
--- a/packages/lambda/src/test/integration/webhooks.test.ts
+++ b/packages/lambda/src/test/integration/webhooks.test.ts
@@ -58,8 +58,7 @@ describe('Webhooks', () => {
const res = await callLambda({
type: LambdaRoutines.start,
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'h264',
composition: 'react-svg',
@@ -151,8 +150,7 @@ describe('Webhooks', () => {
region: 'us-east-1',
type: LambdaRoutines.launch,
payload: {
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
chromiumOptions: {},
codec: 'h264',
composition: 'react-svg',
diff --git a/packages/renderer/src/test/render-still.test.ts b/packages/renderer/src/test/render-still.test.ts
index 2f21bdb551..f658c77c7f 100644
--- a/packages/renderer/src/test/render-still.test.ts
+++ b/packages/renderer/src/test/render-still.test.ts
@@ -15,8 +15,7 @@ test('Need to pass valid metadata', async () => {
},
frame: 0,
output: '/file/output.png',
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
verbose: false,
})
).rejects.toThrow(/not be NaN, but is NaN/);
@@ -34,8 +33,7 @@ test('Returns buffer in promise result', async () => {
props: {},
},
frame: 0,
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
verbose: false,
});
expect(buffer?.length).toBeGreaterThan(1000);
@@ -55,8 +53,7 @@ test('Need to pass valid metadata', async () => {
},
frame: 200,
output: '/file/output.png',
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
verbose: false,
})
).rejects.toThrow(
@@ -80,8 +77,7 @@ test('Catches invalid image format', () => {
imageFormat: 'jjj',
frame: 200,
output: '/file/output.png',
- serveUrl:
- 'https://64bea5e14e10611ab1d786f5--vocal-fudge-fd27aa.netlify.app/',
+ serveUrl: 'https://loquacious-rabanadas-a2bd81.netlify.app/',
})
).rejects.toThrow(
/Image format should be one of: "png", "jpeg", "pdf", "webp"/