🎥 Make videos programmatically with React
Fix broken release
Jonny Burger3e9ef7a60a11
diff --git a/packages/bugs/api/[v].ts b/packages/bugs/api/[v].tsindex 96f9326217..3505402baa 100644--- a/packages/bugs/api/[v].ts+++ b/packages/bugs/api/[v].ts@@ -1,316 +1,322 @@// Keep in sync with packages/cli/src/editor/components/UpdateCheck.tsxtype Bug = {- title: string;- description: string;- link: string;- versions: string[];+ title: string;+ description: string;+ link: string;+ versions: string[];};export const bugs: Bug[] = [- {- title: "Lambda function may leak memory and crash",- description:- "The main function of the Lambda function leaks memory, which might require more RAM or cause the Lambda function to crash.",- link: "https://github.com/remotion-dev/remotion/pull/3983",- versions: [- "4.0.171",- "4.0.170",- "4.0.169",- "4.0.168",- "4.0.167",- "4.0.166",- "4.0.165",- ],- },- {- title: "Occasional infinite loop during rendering on Linux",- description:- "If using <OffthreadVideo>, the render could get stuck in an infinite loop.",- link: "https://github.com/remotion-dev/remotion/pull/3912",- versions: [- "4.0.155",- "4.0.154",- "4.0.153",- "4.0.152",- "4.0.151",- "4.0.150",- "4.0.149",- "4.0.148",- "4.0.147",- "4.0.146",- "4.0.145",- "4.0.144",- "4.0.143",- "4.0.142",- "4.0.141",- "4.0.140",- "4.0.139",- "4.0.138",- "4.0.137",- "4.0.136",- "4.0.135",- "4.0.134",- "4.0.133",- "4.0.132",- "4.0.131",- "4.0.130",- "4.0.129",- "4.0.128",- "4.0.127",- "4.0.126",- "4.0.125",- "4.0.124",- "4.0.123",- "4.0.122",- "4.0.121",- "4.0.120",- "4.0.119",- "4.0.118",- "4.0.117",- "4.0.116",- "4.0.115",- "4.0.114",- "4.0.113",- "4.0.112",- "4.0.111",- "4.0.110",- "4.0.109",- "4.0.108",- "4.0.107",- "4.0.106",- "4.0.105",- "4.0.104",- "4.0.103",- "4.0.102",- "4.0.101",- "4.0.100",- "4.0.99",- "4.0.98",- "4.0.97",- "4.0.96",- "4.0.95",- "4.0.94",- "4.0.93",- "4.0.92",- "4.0.91",- "4.0.90",- "4.0.89",- "4.0.88",- "4.0.87",- "4.0.86",- "4.0.85",- "4.0.84",- "4.0.83",- "4.0.82",- "4.0.81",- "4.0.80",- "4.0.79",- "4.0.78",- // continued until 4.0.0.. but old versions don't have bug notification system- ],- },- {- title: "Bad color mapping with OffthreadVideo",- description:- "Videos in the bt.709 color space are not properly mapped to the sRGB color space. Use v4.0.155 instead.",- link: "https://github.com/remotion-dev/remotion/issues/3850#issuecomment-2105628446",- versions: ["4.0.154"],- },- {- title: "@remotion/renderer import exception",- description:- "The @remotion/renderer package was compiled in a bad way and does not work.",- link: "https://github.com/remotion-dev/remotion/releases/tag/v4.0.151",- versions: ["4.0.152", "4.0.151"],- },- {- title: "Duplicate key warning",- description:- "Extraneous duplicate key warning in the console in this version.",- link: "https://github.com/remotion-dev/remotion/releases/tag/v4.0.150",- versions: ["4.0.149"],- },- {- title: "Slowdown with <TransitionSeries>",- description:- "All sequences were rendered all the time, slowing down the render and making it more crash-prone.",- link: "https://github.com/remotion-dev/remotion/pull/3736",- versions: ["4.0.140", "4.0.141", "4.0.142"],- },- {- title: "Audio issues on Lambda",- description:- "The new seamless audio concatenation feature does not produce clean audio in all cases.",- link: "https://github.com/remotion-dev/remotion/pull/3518",- versions: ["4.0.124"],- },- {- title: "Videos have bad colors during rendering",- description:- "Videos could become too dark when rendering by being tone-mapped when they should not. Upgrade to 4.0.118.",- link: "https://github.com/remotion-dev/remotion/pull/3518",- versions: ["4.0.117"],- },- {- title: "Every render now by default emits a repro.zip",- description:- "This was unintentional and has been removed. Upgrade to 4.0.116.",- link: "https://remotion.dev/changelog",- versions: ["4.0.115"],- },- {- title: "Video playback in Studio and Player is broken",- description:- "OffthreadVideo, Video and Audio tags are affected. Upgrade to 4.0.113.",- link: "https://remotion.dev/changelog",- versions: ["4.0.111", "4.0.112"],- },- {- title: "Remotion Lambda is broken",- description: "A render would not start on the Lambda. Upgrade to 4.0.99.",- link: "https://remotion.dev/changelog",- versions: ["4.0.98"],- },- {- title: "Too tight dependency on zod",- description:- "Remotion would require zod and @remotion/zod-types even though it should be optional.",- link: "https://remotion.dev/changelog",- versions: ["4.0.92", "4.0.93", "4.0.94", "4.0.95"],- },- {- title: "Broken release",- description: "Rendering may fail. Upgrade to 4.0.94.",- link: "https://remotion.dev/changelog",- versions: ["4.0.90", "4.0.91"],- },- {- title: "<Video> seeking breaks during rendering for some videos",- description: "A timeout would occur on some videos.",- link: "https://remotion.dev/changelog",- versions: ["4.0.86", "4.0.87", "4.0.88"],- },- {- title: "Lambda throws an undefined variable error",- description: "The publish script of this version was broken.",- link: "https://remotion.dev/changelog",- versions: ["4.0.73"],- },- {- title: "Subsequent Lambda renders become slow",- description: "A warm Lambda function would get slower over time.",- link: "https://github.com/remotion-dev/remotion/pull/3184",- versions: ["4.0.66", "4.0.67", "4.0.68", "4.0.69", "4.0.70"],- },- {- title: "<Player> does not render",- description: "The <Player> component does not render anything.",- link: "https://github.com/remotion-dev/remotion/issues/3128",- versions: ["4.0.63"],- },- {- title: "Slow rendering for long videos",- description: "A render could get progressively slower the longer it runs.",- link: "https://github.com/remotion-dev/remotion/pull/3106",- versions: [- "4.0.59",- "4.0.58",- "4.0.57",- "4.0.56",- "4.0.55",- "4.0.54",- "4.0.53",- "4.0.52",- "4.0.51",- "4.0.50",- "4.0.49",- "4.0.48",- "4.0.47",- "4.0.46",- "4.0.45",- "4.0.44",- "4.0.43",- "4.0.42",- "4.0.41",- "4.0.40",- "4.0.39",- "4.0.38",- "4.0.37",- "4.0.36",- "4.0.35",- "4.0.34",- "4.0.33", // Previous versions did not not have bug notification system- ],- },- {- title: "Broken Lambda",- description: "Lambda rendering fails with IPv6 error.",- link: "https://github.com/remotion-dev/remotion/pull/3019",- versions: ["4.0.49"],- },- {- title: "OffthreadVideo could crash",- description:- "On some videos, OffthreadVideo could crash without proper error handling.",- link: "https://github.com/remotion-dev/remotion/pull/2882",- versions: ["4.0.36", "4.0.37", "4.0.38"],- },- {- title: "Slow OffthreadVideo performance",- description:- "Without an explicit cache size, the OffthreadVideo component would run with no cache.",- link: "https://github.com/remotion-dev/remotion/pull/2882",- versions: ["4.0.33", "4.0.34", "4.0.35", "4.0.36"],- },- {- title: "<Thumbnail> component would crash",- description:- "<Thumbnail> component in a React app would crash if a <Sequence> was used.",- link: "https://github.com/remotion-dev/remotion/pull/2944",- versions: ["4.0.43", "4.0.42"],- },+ {+ title: 'Crash upon start.',+ description: 'Broken release - @remotion/renderer would throw an error.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.184'],+ },+ {+ title: 'Lambda function may leak memory and crash',+ description:+ 'The main function of the Lambda function leaks memory, which might require more RAM or cause the Lambda function to crash.',+ link: 'https://github.com/remotion-dev/remotion/pull/3983',+ versions: [+ '4.0.171',+ '4.0.170',+ '4.0.169',+ '4.0.168',+ '4.0.167',+ '4.0.166',+ '4.0.165',+ ],+ },+ {+ title: 'Occasional infinite loop during rendering on Linux',+ description:+ 'If using <OffthreadVideo>, the render could get stuck in an infinite loop.',+ link: 'https://github.com/remotion-dev/remotion/pull/3912',+ versions: [+ '4.0.155',+ '4.0.154',+ '4.0.153',+ '4.0.152',+ '4.0.151',+ '4.0.150',+ '4.0.149',+ '4.0.148',+ '4.0.147',+ '4.0.146',+ '4.0.145',+ '4.0.144',+ '4.0.143',+ '4.0.142',+ '4.0.141',+ '4.0.140',+ '4.0.139',+ '4.0.138',+ '4.0.137',+ '4.0.136',+ '4.0.135',+ '4.0.134',+ '4.0.133',+ '4.0.132',+ '4.0.131',+ '4.0.130',+ '4.0.129',+ '4.0.128',+ '4.0.127',+ '4.0.126',+ '4.0.125',+ '4.0.124',+ '4.0.123',+ '4.0.122',+ '4.0.121',+ '4.0.120',+ '4.0.119',+ '4.0.118',+ '4.0.117',+ '4.0.116',+ '4.0.115',+ '4.0.114',+ '4.0.113',+ '4.0.112',+ '4.0.111',+ '4.0.110',+ '4.0.109',+ '4.0.108',+ '4.0.107',+ '4.0.106',+ '4.0.105',+ '4.0.104',+ '4.0.103',+ '4.0.102',+ '4.0.101',+ '4.0.100',+ '4.0.99',+ '4.0.98',+ '4.0.97',+ '4.0.96',+ '4.0.95',+ '4.0.94',+ '4.0.93',+ '4.0.92',+ '4.0.91',+ '4.0.90',+ '4.0.89',+ '4.0.88',+ '4.0.87',+ '4.0.86',+ '4.0.85',+ '4.0.84',+ '4.0.83',+ '4.0.82',+ '4.0.81',+ '4.0.80',+ '4.0.79',+ '4.0.78',+ // continued until 4.0.0.. but old versions don't have bug notification system+ ],+ },+ {+ title: 'Bad color mapping with OffthreadVideo',+ description:+ 'Videos in the bt.709 color space are not properly mapped to the sRGB color space. Use v4.0.155 instead.',+ link: 'https://github.com/remotion-dev/remotion/issues/3850#issuecomment-2105628446',+ versions: ['4.0.154'],+ },+ {+ title: '@remotion/renderer import exception',+ description:+ 'The @remotion/renderer package was compiled in a bad way and does not work.',+ link: 'https://github.com/remotion-dev/remotion/releases/tag/v4.0.151',+ versions: ['4.0.152', '4.0.151'],+ },+ {+ title: 'Duplicate key warning',+ description:+ 'Extraneous duplicate key warning in the console in this version.',+ link: 'https://github.com/remotion-dev/remotion/releases/tag/v4.0.150',+ versions: ['4.0.149'],+ },+ {+ title: 'Slowdown with <TransitionSeries>',+ description:+ 'All sequences were rendered all the time, slowing down the render and making it more crash-prone.',+ link: 'https://github.com/remotion-dev/remotion/pull/3736',+ versions: ['4.0.140', '4.0.141', '4.0.142'],+ },+ {+ title: 'Audio issues on Lambda',+ description:+ 'The new seamless audio concatenation feature does not produce clean audio in all cases.',+ link: 'https://github.com/remotion-dev/remotion/pull/3518',+ versions: ['4.0.124'],+ },+ {+ title: 'Videos have bad colors during rendering',+ description:+ 'Videos could become too dark when rendering by being tone-mapped when they should not. Upgrade to 4.0.118.',+ link: 'https://github.com/remotion-dev/remotion/pull/3518',+ versions: ['4.0.117'],+ },+ {+ title: 'Every render now by default emits a repro.zip',+ description:+ 'This was unintentional and has been removed. Upgrade to 4.0.116.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.115'],+ },+ {+ title: 'Video playback in Studio and Player is broken',+ description:+ 'OffthreadVideo, Video and Audio tags are affected. Upgrade to 4.0.113.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.111', '4.0.112'],+ },+ {+ title: 'Remotion Lambda is broken',+ description: 'A render would not start on the Lambda. Upgrade to 4.0.99.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.98'],+ },+ {+ title: 'Too tight dependency on zod',+ description:+ 'Remotion would require zod and @remotion/zod-types even though it should be optional.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.92', '4.0.93', '4.0.94', '4.0.95'],+ },+ {+ title: 'Broken release',+ description: 'Rendering may fail. Upgrade to 4.0.94.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.90', '4.0.91'],+ },+ {+ title: '<Video> seeking breaks during rendering for some videos',+ description: 'A timeout would occur on some videos.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.86', '4.0.87', '4.0.88'],+ },+ {+ title: 'Lambda throws an undefined variable error',+ description: 'The publish script of this version was broken.',+ link: 'https://remotion.dev/changelog',+ versions: ['4.0.73'],+ },+ {+ title: 'Subsequent Lambda renders become slow',+ description: 'A warm Lambda function would get slower over time.',+ link: 'https://github.com/remotion-dev/remotion/pull/3184',+ versions: ['4.0.66', '4.0.67', '4.0.68', '4.0.69', '4.0.70'],+ },+ {+ title: '<Player> does not render',+ description: 'The <Player> component does not render anything.',+ link: 'https://github.com/remotion-dev/remotion/issues/3128',+ versions: ['4.0.63'],+ },+ {+ title: 'Slow rendering for long videos',+ description: 'A render could get progressively slower the longer it runs.',+ link: 'https://github.com/remotion-dev/remotion/pull/3106',+ versions: [+ '4.0.59',+ '4.0.58',+ '4.0.57',+ '4.0.56',+ '4.0.55',+ '4.0.54',+ '4.0.53',+ '4.0.52',+ '4.0.51',+ '4.0.50',+ '4.0.49',+ '4.0.48',+ '4.0.47',+ '4.0.46',+ '4.0.45',+ '4.0.44',+ '4.0.43',+ '4.0.42',+ '4.0.41',+ '4.0.40',+ '4.0.39',+ '4.0.38',+ '4.0.37',+ '4.0.36',+ '4.0.35',+ '4.0.34',+ '4.0.33', // Previous versions did not not have bug notification system+ ],+ },+ {+ title: 'Broken Lambda',+ description: 'Lambda rendering fails with IPv6 error.',+ link: 'https://github.com/remotion-dev/remotion/pull/3019',+ versions: ['4.0.49'],+ },+ {+ title: 'OffthreadVideo could crash',+ description:+ 'On some videos, OffthreadVideo could crash without proper error handling.',+ link: 'https://github.com/remotion-dev/remotion/pull/2882',+ versions: ['4.0.36', '4.0.37', '4.0.38'],+ },+ {+ title: 'Slow OffthreadVideo performance',+ description:+ 'Without an explicit cache size, the OffthreadVideo component would run with no cache.',+ link: 'https://github.com/remotion-dev/remotion/pull/2882',+ versions: ['4.0.33', '4.0.34', '4.0.35', '4.0.36'],+ },+ {+ title: '<Thumbnail> component would crash',+ description:+ '<Thumbnail> component in a React app would crash if a <Sequence> was used.',+ link: 'https://github.com/remotion-dev/remotion/pull/2944',+ versions: ['4.0.43', '4.0.42'],+ },];const getVersionBugs = (version: string) => {- const selectedVersionBugs = bugs.filter((bug) => {- return bug.versions.includes(version);- });- return selectedVersionBugs;+ const selectedVersionBugs = bugs.filter((bug) => {+ return bug.versions.includes(version);+ });+ return selectedVersionBugs;};export default async function handler(request: Request) {- if (request.method === "OPTIONS") {- return new Response(null, {- headers: {- "access-control-allow-origin": "*",- "access-control-allow-methods": "GET",- "access-control-allow-headers": "Content-Type",- },- });- }+ if (request.method === 'OPTIONS') {+ return new Response(null, {+ headers: {+ 'access-control-allow-origin': '*',+ 'access-control-allow-methods': 'GET',+ 'access-control-allow-headers': 'Content-Type',+ },+ });+ }- const urlParams = new URL(request.url).searchParams;+ const urlParams = new URL(request.url).searchParams;- const query = Object.fromEntries(urlParams);- const v = query["v"].replace("v", "") as string;+ const query = Object.fromEntries(urlParams);+ const v = query['v'].replace('v', '') as string;- const bugs = getVersionBugs(v);+ const bugs = getVersionBugs(v);- return new Response(- JSON.stringify({- version: v,- bugs,- }),- {- status: 200,- headers: {- "content-type": "application/json",- "access-control-allow-origin": "*",- },- }- );+ return new Response(+ JSON.stringify({+ version: v,+ bugs,+ }),+ {+ status: 200,+ headers: {+ 'content-type': 'application/json',+ 'access-control-allow-origin': '*',+ },+ },+ );}export const config = {- runtime: "edge",+ runtime: 'edge',};diff --git a/packages/renderer/src/test/example-videos.ts b/packages/renderer/src/example-videos.tssimilarity index 90%rename from packages/renderer/src/test/example-videos.tsrename to packages/renderer/src/example-videos.tsindex 6cfcd7813b..a47872d5c0 100644--- a/packages/renderer/src/test/example-videos.ts+++ b/packages/renderer/src/example-videos.ts@@ -1,7 +1,7 @@import path from 'node:path';-const examplePackage = path.join(__dirname, '..', '..', '..', 'example');-const docsPackage = path.join(__dirname, '..', '..', '..', 'docs');+const examplePackage = path.join(__dirname, '..', '..', 'example');+const docsPackage = path.join(__dirname, '..', '..', 'docs');export const exampleVideos = {bigBuckBunny: path.join(examplePackage, 'public/bigbuckbunny.mp4'),diff --git a/packages/renderer/src/index.ts b/packages/renderer/src/index.tsindex e3dcd77009..a51fc472f6 100644--- a/packages/renderer/src/index.ts+++ b/packages/renderer/src/index.ts@@ -137,6 +137,7 @@ import {killAllBrowsers} from './browser-instances';import {codecSupportsMedia} from './codec-supports-media';import {makeFileExecutableIfItIsNot} from './compositor/make-file-executable';import {internalEnsureBrowser} from './ensure-browser';+import {exampleVideos} from './example-videos';import type {AudioCodec} from './options/audio-codec';import {getDefaultAudioCodec,@@ -146,7 +147,6 @@ import {supportedAudioCodecs,} from './options/audio-codec';import {getShouldRenderAudio} from './render-has-audio';-import {exampleVideos} from './test/example-videos';import {toMegabytes} from './to-megabytes';import {validatePuppeteerTimeout} from './validate-puppeteer-timeout';import {validateBitrate} from './validate-videobitrate';diff --git a/packages/renderer/src/test/extract-audio.test.ts b/packages/renderer/src/test/extract-audio.test.tsindex 09c32c6131..bb034c446a 100644--- a/packages/renderer/src/test/extract-audio.test.ts+++ b/packages/renderer/src/test/extract-audio.test.ts@@ -1,7 +1,7 @@import {expect, test} from 'bun:test';import {unlinkSync} from 'node:fs';+import {exampleVideos} from '../example-videos';import {extractAudio} from '../extract-audio';-import {exampleVideos} from './example-videos';test('Should be able to extract the audio from a mp4 format video', async () => {const audioOutput = exampleVideos.bigBuckBunny.replace(diff --git a/packages/renderer/src/test/extract-frame-rust.test.ts b/packages/renderer/src/test/extract-frame-rust.test.tsindex c4f7a2ee6a..5eac7e7587 100644--- a/packages/renderer/src/test/extract-frame-rust.test.ts+++ b/packages/renderer/src/test/extract-frame-rust.test.ts@@ -1,7 +1,7 @@import {expect, test} from 'bun:test';import {interpolate} from 'remotion';import {startLongRunningCompositor} from '../compositor/compositor';-import {exampleVideos} from './example-videos';+import {exampleVideos} from '../example-videos';const BMP_HEADER_SIZE = 54;diff --git a/packages/renderer/src/test/get-silent-parts.test.ts b/packages/renderer/src/test/get-silent-parts.test.tsindex eb3314fbe9..cbe3a6b938 100644--- a/packages/renderer/src/test/get-silent-parts.test.ts+++ b/packages/renderer/src/test/get-silent-parts.test.ts@@ -1,7 +1,7 @@import {expect, test} from 'bun:test';import path from 'path';+import {exampleVideos} from '../example-videos';import {getSilentParts} from '../get-silent-parts';-import {exampleVideos} from './example-videos';test('Should be able to get the silences from a video', async () => {const {silentParts, audibleParts} = await getSilentParts({diff --git a/packages/renderer/src/test/rust-memory-usage.test.ts b/packages/renderer/src/test/rust-memory-usage.test.tsindex 35c03e6fc8..db52a9c39e 100644--- a/packages/renderer/src/test/rust-memory-usage.test.ts+++ b/packages/renderer/src/test/rust-memory-usage.test.ts@@ -1,7 +1,7 @@import {expect, test} from 'bun:test';import {execSync} from 'node:child_process';import {startLongRunningCompositor} from '../compositor/compositor';-import {exampleVideos} from './example-videos';+import {exampleVideos} from '../example-videos';test('Memory usage should be determined ', async () => {if (process.platform !== 'darwin') {