Skip to content

🎥 Make videos programmatically with React

update netlify URL

Jonny Burger7e3379b30025
diff --git a/packages/cli/src/cleanup-before-quit.ts b/packages/cli/src/cleanup-before-quit.ts
index 29311a1e45..f00371e4bc 100644
--- a/packages/cli/src/cleanup-before-quit.ts
+++ b/packages/cli/src/cleanup-before-quit.ts
@@ -3,9 +3,13 @@ import {Log} from './log';
const cleanupJobs: (() => void)[] = [];
export const cleanupBeforeQuit = () => {
+ Log.verbose('Cleaning up...');
+ const time = Date.now();
for (const job of cleanupJobs) {
job();
}
+
+ Log.verbose(`Cleanup done in ${Date.now() - time}ms`);
};
export const registerCleanupJob = (job: () => void) => {
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 fdce0569b6..0b9536255c 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://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 ec880cae05..db29688587 100644
--- a/packages/it-tests/src/ssr/cancel-renderframes.test.ts
+++ b/packages/it-tests/src/ssr/cancel-renderframes.test.ts
@@ -6,7 +6,7 @@ test("Should be able to cancel render", async () => {
const { cancel, cancelSignal } = makeCancelSignal();
const val = renderFrames({
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 a081f6969e..20642d6941 100644
--- a/packages/it-tests/src/ssr/cancel-rendermedia.test.ts
+++ b/packages/it-tests/src/ssr/cancel-rendermedia.test.ts
@@ -7,7 +7,7 @@ test("Should be able to cancel render", async () => {
const val = renderMedia({
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 a4416a57f8..628d5e7953 100644
--- a/packages/it-tests/src/ssr/cancel-renderstill.test.ts
+++ b/packages/it-tests/src/ssr/cancel-renderstill.test.ts
@@ -6,7 +6,7 @@ test("Should be able to cancel render", async () => {
const { cancel, cancelSignal } = makeCancelSignal();
const val = renderStill({
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 5c05f14d64..9a2dfb0d0f 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
@@ -6,7 +6,7 @@ test("Fatal error on frame 10 should yield correct error", async () => {
return renderMedia({
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 cf6490c9c2..d261ee666c 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://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
{
puppeteerInstance,
}
@@ -40,7 +40,7 @@ test("Legacy SSR way of rendering videos should still work", async () => {
inputProps: {},
onFrameUpdate: () => undefined,
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 abd3c64c73..d484f90fce 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://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
{
puppeteerInstance,
}
@@ -27,7 +27,7 @@ test("Render video with browser instance open", async () => {
outputLocation: outPath,
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
composition: reactSvg,
frameRange: [0, 2],
puppeteerInstance,
@@ -38,7 +38,7 @@ test("Render video with browser instance open", async () => {
test("Render video with browser instance not open", async () => {
const compositions = await getCompositions(
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/"
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -55,7 +55,7 @@ test("Render video with browser instance not open", async () => {
outputLocation: outPath,
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
composition: reactSvg,
frameRange: [0, 2],
});
@@ -73,7 +73,7 @@ test("should fail on invalid CRF", async () => {
outputLocation: outPath,
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
// @ts-expect-error
crf: "wrong",
config: {
@@ -98,7 +98,7 @@ test("should fail on invalid CRF", async () => {
test("Render video to a buffer", async () => {
const compositions = await getCompositions(
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/"
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -110,7 +110,7 @@ test("Render video to a buffer", async () => {
const { buffer } = await renderMedia({
codec: "h264",
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 1fb1176000..7c21d9f79f 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://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
{
puppeteerInstance,
}
@@ -35,7 +35,7 @@ test("Render video with browser instance open", async () => {
const { buffer } = await renderStill({
output: outPath,
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/",
composition: reactSvg,
puppeteerInstance,
});
@@ -45,7 +45,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://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/"
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/"
);
const reactSvg = compositions.find((c) => c.id === "react-svg");
@@ -61,7 +61,7 @@ test("Render still with browser instance not open and legacy webpack config", as
await renderStill({
output: outPath,
serveUrl:
- "https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/",
+ "https://64804c64f424474c4b192d49--sage-sable-226d60.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 c83037fc24..f10c392f73 100644
--- a/packages/lambda/src/test/integration/renders/gif.test.ts
+++ b/packages/lambda/src/test/integration/renders/gif.test.ts
@@ -35,7 +35,7 @@ test('Should make a distributed GIF', async () => {
{
type: LambdaRoutines.start,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.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 80762acea9..63030d60a8 100644
--- a/packages/lambda/src/test/integration/renders/other-bucket.test.ts
+++ b/packages/lambda/src/test/integration/renders/other-bucket.test.ts
@@ -34,7 +34,7 @@ test('Should be able to render to another bucket', async () => {
{
type: LambdaRoutines.start,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.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 2713ef06ae..63ed34c26a 100644
--- a/packages/lambda/src/test/integration/renders/silent-audio.test.ts
+++ b/packages/lambda/src/test/integration/renders/silent-audio.test.ts
@@ -34,7 +34,7 @@ test('Should add silent audio if there is no audio', async () => {
{
type: LambdaRoutines.start,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.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 9b46a4c0e1..2fc7d395d0 100644
--- a/packages/lambda/src/test/integration/renders/transparent-webm.test.ts
+++ b/packages/lambda/src/test/integration/renders/transparent-webm.test.ts
@@ -37,7 +37,7 @@ test('Should make a transparent video', async () => {
{
type: LambdaRoutines.start,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.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 1cfd42ed8d..37c16b1a87 100644
--- a/packages/lambda/src/test/integration/webhooks.test.ts
+++ b/packages/lambda/src/test/integration/webhooks.test.ts
@@ -70,7 +70,7 @@ describe('Webhooks', () => {
{
type: LambdaRoutines.start,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/',
chromiumOptions: {},
codec: 'h264',
composition: 'react-svg',
@@ -157,7 +157,7 @@ describe('Webhooks', () => {
{
type: LambdaRoutines.launch,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.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 7e198fc3e2..b7b8dd831f 100644
--- a/packages/renderer/src/test/render-still.test.ts
+++ b/packages/renderer/src/test/render-still.test.ts
@@ -17,7 +17,7 @@ test('Need to pass valid metadata', async () => {
frame: 0,
output: '/file/output.png',
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/',
downloadMap,
verbose: false,
indent: false,
@@ -39,7 +39,7 @@ test('Returns buffer in promise result', async () => {
},
frame: 0,
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/',
downloadMap,
verbose: false,
indent: false,
@@ -63,7 +63,7 @@ test('Need to pass valid metadata', async () => {
frame: 200,
output: '/file/output.png',
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/',
downloadMap,
verbose: false,
indent: false,
@@ -90,7 +90,7 @@ test('Catches invalid image format', () => {
frame: 200,
output: '/file/output.png',
serveUrl:
- 'https://64804302bfd41946b23d7b35--lovely-dieffenbachia-90a6f1.netlify.app/',
+ 'https://64804c64f424474c4b192d49--sage-sable-226d60.netlify.app/',
})
).rejects.toThrow(
/Image format should be one of: "png", "jpeg", "pdf", "webp"/