Skip to content

🎥 Make videos programmatically with React

Pin all browser downloads to Chromium 157 and update documentation

Jonny Burger797de33a3f81
diff --git a/.agents/skills/update-chrome-binaries-test-region/SKILL.md b/.agents/skills/update-chrome-binaries-test-region/SKILL.md
index 38d6dd8156..2e03cd4057 100644
--- a/.agents/skills/update-chrome-binaries-test-region/SKILL.md
+++ b/.agents/skills/update-chrome-binaries-test-region/SKILL.md
@@ -23,11 +23,11 @@ For the test phase (`--region=eu-central-1`), only `eu-central-1` is updated; ot
## Update Chrome references
-Ask the user for both the Chrome version, such as `149.0.7790.0`, and the corresponding Playwright revision. If the user does not provide the Playwright revision, look it up in `https://github.com/microsoft/playwright/blob/main/packages/playwright-core/browsers.json` by matching `browserVersion`.
+Use the Chrome version supplied by the user, such as `157.0.8080.0`. Default downloads no longer use a Playwright revision. Verify the same Chrome version is available for all supported platforms in [Google's Chrome for Testing download metadata](https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json). If an exact match is unavailable, choose the closest available version and keep its version/cache marker accurate. Explicit numeric Playwright revision overrides on Linux ARM64 remain supported.
Update:
-- `packages/renderer/src/browser/get-chrome-download-url.ts`: `TESTED_VERSION`, `PLAYWRIGHT_VERSION`, the trailing `// <version>` comment on the `PLAYWRIGHT_VERSION` line, and the two hard-coded `https://remotion.media/chromium-headless-shell-amazon-linux-{arm64,x64}-<version>.zip` URLs.
+- `packages/renderer/src/browser/get-chrome-download-url.ts`: `TESTED_VERSION`. The Remotion and Google CDN URLs use this version, including the Amazon Linux builds and Linux ARM64 fallbacks. Verify all five Remotion archives and both Google browser modes for Linux x64/ARM64, macOS x64/ARM64 and Windows x64. Check `BrowserFetcher.ts` executable paths against the archive layout when changing providers.
- Before changing URLs, verify the new binaries exist with `curl -sI` against the new hard-coded URLs and the templated `chromium-headless-shell-linux-{arm64,x64}-<version>.zip?clearcache` URLs that follow `TESTED_VERSION`. Continue only when all return HTTP 200; otherwise ask the user to upload the missing builds to `remotion.media`.
- `packages/lambda/src/admin/make-layer-public.ts`: the `Chromium <version>, compiled from source.` license string passed to `PublishLayerVersionCommand`.
- `packages/docs/docs/lambda/runtime.mdx`: prepend a new row to the "Chrome" version table for the next Remotion release. Determine the next version from `packages/core/package.json` and increment the patch.
diff --git a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx b/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
index 0299fcc3dd..4f6d855605 100644
--- a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
+++ b/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
@@ -89,7 +89,7 @@ HTML-in-canvas depends on Chromium flag `chrome://flags/#canvas-draw-element`, w
Use a recent Chrome or Chromium version with the flag enabled for full support. Compositions containing [`<HtmlInCanvas>`](/docs/remotion/html-in-canvas) use native capture in Chrome 157 or newer. Earlier versions use the built-in DOM composer.
-Nested HTML-in-canvas capture is currently intended for client-side rendering in your browser. Remotion's server-side browser is Chrome 149 and does not support nesting yet.
+Server-side rendering also supports nested `<HtmlInCanvas>` compositions from Remotion <AvailableFrom v="4.0.534" inline />, which bundles Chromium 157. See [nested HTML-in-canvas](/docs/html-in-canvas#nested-html-in-canvas).
## See also
diff --git a/packages/docs/docs/html-in-canvas-guide.mdx b/packages/docs/docs/html-in-canvas-guide.mdx
index 88cb08428b..533f54c758 100644
--- a/packages/docs/docs/html-in-canvas-guide.mdx
+++ b/packages/docs/docs/html-in-canvas-guide.mdx
@@ -108,7 +108,7 @@ From [`v4.0.455`](https://github.com/remotion-dev/remotion/releases/tag/v4.0.455
We compiled a version of Chrome and made it the default, and enabled the flag for you.
-Nested `<HtmlInCanvas>` components are currently intended for preview and client-side rendering. Remotion's server-side browser is Chrome 149, so server-side rendering does not support nesting yet.
+Nested `<HtmlInCanvas>` components are supported during server-side rendering from Remotion <AvailableFrom v="4.0.534" inline />, which uses Chromium 157.
If your effect uses a WebGL shader, pass [`--gl=angle`](/docs/gl-options) to make the render work:
@@ -144,7 +144,7 @@ This is opt-in. In Chrome versions earlier than 157, compositions containing [`<
## Nested HTML-in-canvas
-Nesting `<HtmlInCanvas>` components is supported for preview and client-side rendering in Chrome 157 or newer with HTML-in-canvas enabled. Use [`HtmlInCanvas.isNestingSupported()`](/docs/remotion/html-in-canvas#htmlincanvasisnestingsupported) to check at runtime. Older versions throw an error. Server-side rendering does not support nesting yet.
+Nesting `<HtmlInCanvas>` components is supported in Chrome 157 or newer with HTML-in-canvas enabled. Use [`HtmlInCanvas.isNestingSupported()`](/docs/remotion/html-in-canvas#htmlincanvasisnestingsupported) to check at runtime. Older versions throw an error. Server-side rendering supports nesting from Remotion <AvailableFrom v="4.0.534" inline />.
## See also
diff --git a/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx b/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx
index 4ced0bf7db..b2eaa03bf7 100644
--- a/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx
+++ b/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx
@@ -16,7 +16,7 @@ The following platforms are supported:
- macOS (x64 and arm64)
- Windows (x64)
- Linux x64 - [install the Linux dependencies](/docs/miscellaneous/linux-dependencies)
-- Linux arm64 - only for "Chrome Headless Shell"
+- Linux arm64 - Chrome Headless Shell and, from Remotion v4.0.534, Chrome for Testing
On Apple Silicon, the default Chrome Headless Shell requires macOS 13 or later from Remotion v4.0.534.
@@ -59,7 +59,7 @@ Chrome Headless Shell will download to this folder:
node_modules/.remotion/chrome-headless-shell/[platform]/chrome-headless-shell-[platform]
```
-An executable `./chrome-headless-shell` (`.\chrome-headless-shell.exe` on Windows) will be created.
+The executable is `chrome-headless-shell` (`chrome-headless-shell.exe` on Windows). Some Remotion builds use `headless_shell` instead. Use [`ensureBrowser()`](/docs/renderer/ensure-browser) to get the executable path.
<hr />
@@ -155,7 +155,18 @@ Remotion will download a well-tested Chrome version:
Upgrades may happen in a patch release and will be listed here.
-Linux ARM64 systems with glibc below 2.35 continue using the Playwright Chromium 149 fallback. The Amazon Linux 2023 build uses Chromium 157. Chrome for Testing on Linux ARM64 also continues using the Playwright build.
+From Remotion v4.0.534, all automatically downloaded browsers use Chrome 157.0.8080.0. The download source depends on the platform and mode:
+
+| Platform | Chrome Headless Shell | Chrome for Testing |
+| -------------------------------------- | ------------------------------- | ------------------ |
+| macOS ARM64 | Remotion build | Google CDN |
+| macOS x64 | Google CDN | Google CDN |
+| Windows x64 | Google CDN | Google CDN |
+| Linux x64 / ARM64, glibc 2.35 or newer | Remotion build | Google CDN |
+| Linux x64 / ARM64, older glibc | Google CDN | Google CDN |
+| Amazon Linux 2023 x64 / ARM64 | Remotion build for Amazon Linux | Google CDN |
+
+Google's [Chrome for Testing CDN](https://googlechromelabs.github.io/chrome-for-testing/) provides the same pinned version for platforms and modes without a Remotion build. Linux ARM64 no longer defaults to the older Playwright Chromium build.
## Shared-memory capture<AvailableFrom v="4.0.534" />
@@ -173,6 +184,8 @@ If you use the [`server-side rendering APIs`](/docs/ssr), use the callback in [`
If you are using [Remotion Lambda](/docs/lambda) or [Cloud Run](/docs/cloudrun), you don't need to worry about installing a browser - it is included in the runtime already.
+Cloud Run containers built with Remotion v4.0.534 use the Remotion Linux x64 build of Chromium 157.0.8080.0. Existing services keep the browser installed in their container until you redeploy them.
+
## Previous changes
### Added option to install Chrome for Testing (v4.0.247)
diff --git a/packages/docs/docs/motion-blur/html-in-canvas-motion-blur.mdx b/packages/docs/docs/motion-blur/html-in-canvas-motion-blur.mdx
index 3de02c5c4e..8f01e04e65 100644
--- a/packages/docs/docs/motion-blur/html-in-canvas-motion-blur.mdx
+++ b/packages/docs/docs/motion-blur/html-in-canvas-motion-blur.mdx
@@ -111,7 +111,7 @@ Samples outside the composition are clamped to its first or last frame.
Children of `<HtmlInCanvasMotionBlur>` can contain another [`<HtmlInCanvas>`](/docs/remotion/html-in-canvas) component, or vice versa, in Chrome 157 or newer with HTML-in-canvas enabled. Check [`HtmlInCanvas.isNestingSupported()`](/docs/remotion/html-in-canvas#htmlincanvasisnestingsupported) before nesting them.
-Nesting is currently intended for preview and client-side rendering. Remotion's server-side browser is Chrome 149 and does not support nesting yet.
+Server-side rendering supports nesting from Remotion <AvailableFrom v="4.0.534" inline />, which uses Chromium 157.
## Compatibility
diff --git a/packages/docs/docs/remotion/html-in-canvas.mdx b/packages/docs/docs/remotion/html-in-canvas.mdx
index 71adf8245c..1e5672f917 100644
--- a/packages/docs/docs/remotion/html-in-canvas.mdx
+++ b/packages/docs/docs/remotion/html-in-canvas.mdx
@@ -48,7 +48,7 @@ Return value: _boolean_
Returns `true` when HTML-in-canvas is enabled in Chrome or a Chromium-based browser version 157 or newer. Use it before nesting `<HtmlInCanvas>` components. Older versions throw an error when components are nested.
-Nested `<HtmlInCanvas>` components are currently intended for preview and client-side rendering. Remotion's server-side browser is Chrome 149, so this method returns `false` there.
+From Remotion <AvailableFrom v="4.0.534" inline />, the bundled server-side browser is Chromium 157, so this method also returns `true` during server-side rendering.
## Using WebGL and WebGPU during renders
@@ -850,7 +850,7 @@ const onPaint: HtmlInCanvasOnPaint = async ({canvas, elementImage}) => {
You can nest `<HtmlInCanvas>` components in Chrome 157 or newer when HTML-in-canvas is enabled. Check [`HtmlInCanvas.isNestingSupported()`](#htmlincanvasisnestingsupported) before rendering nested components. In older versions, nesting throws an error.
-Nested compositions are currently intended for preview and client-side rendering. Remotion's server-side browser is Chrome 149 and does not support nesting yet.
+Server-side rendering supports nested compositions from Remotion <AvailableFrom v="4.0.534" inline />, which uses Chromium 157.
## Compatibility
diff --git a/packages/docs/docs/renderer/ensure-browser.mdx b/packages/docs/docs/renderer/ensure-browser.mdx
index bf8fb7f49d..afc3c4dff0 100644
--- a/packages/docs/docs/renderer/ensure-browser.mdx
+++ b/packages/docs/docs/renderer/ensure-browser.mdx
@@ -9,6 +9,8 @@ crumb: '@remotion/renderer'
Ensures a browser is locally installed so a Remotion render can be executed.
+From Remotion v4.0.534, the default version is Chromium 157.0.8080.0 on every supported platform. See [browser versions and download sources](/docs/miscellaneous/chrome-headless-shell#version) for the platform breakdown.
+
```tsx twoslash title="Simple usage"
import {ensureBrowser} from '@remotion/renderer';
@@ -55,6 +57,8 @@ Pass the same path to any other API that supports the `browserExecutable` option
Specify a specific version of Chrome that should be used and hook into the download progress.
See the example below for the function signature.
+Passing a Chrome version downloads that version from Google's CDN, including on Linux ARM64. Pass `version: null` to use Remotion's recommended build for your platform.
+
```tsx twoslash title="init.ts"
import {ensureBrowser, OnBrowserDownload, DownloadBrowserProgressFn} from '@remotion/renderer';
diff --git a/packages/renderer/src/browser/BrowserFetcher.ts b/packages/renderer/src/browser/BrowserFetcher.ts
index 7038ae8836..41cb48b0a4 100644
--- a/packages/renderer/src/browser/BrowserFetcher.ts
+++ b/packages/renderer/src/browser/BrowserFetcher.ts
@@ -27,9 +27,7 @@ import {acquireBrowserDownloadLock} from './browser-download-lock';
import {extractZipArchive} from './extract-zip-archive';
import {
getChromeDownloadUrl,
- isAmazonLinux2023,
logDownloadUrl,
- PLAYWRIGHT_CHROMIUM_VERSION,
type Platform,
TESTED_VERSION,
} from './get-chrome-download-url';
@@ -98,8 +96,8 @@ export const getExpectedVersion = ({
// Remotion-patched builds get their own cache marker so an existing stock or
// older patched download of the same Chromium version is replaced once.
- // Remotion builds include the v3 shared-memory patch; the Playwright/Chrome
- // for Testing fallbacks are stock Chromium.
+ // Remotion builds include the v3 shared-memory patch; Google's CDN builds
+ // are stock Chromium.
const downloadUrl = getChromeDownloadUrl({
platform,
version: null,
@@ -112,10 +110,6 @@ export const getExpectedVersion = ({
return `${TESTED_VERSION}-remotion-v3`;
}
- if (downloadUrl.startsWith('https://playwright.azureedge.net/')) {
- return PLAYWRIGHT_CHROMIUM_VERSION;
- }
-
return TESTED_VERSION;
};
@@ -233,7 +227,7 @@ export const downloadBrowser = async ({
const chromeLinuxFolder = path.join(outputPath, subdir);
const chromePath = path.join(chromeLinuxFolder, 'chrome');
- if (fs.existsSync(chromePath)) {
+ if (chromeMode === 'headless-shell' && fs.existsSync(chromePath)) {
const chromeHeadlessShellPath = path.join(
chromeLinuxFolder,
'chrome-headless-shell',
@@ -245,7 +239,9 @@ export const downloadBrowser = async ({
if (fs.existsSync(chromeLinuxFolder)) {
const targetFolder = path.join(
outputPath,
- 'chrome-headless-shell-' + platform,
+ (chromeMode === 'headless-shell'
+ ? 'chrome-headless-shell-'
+ : 'chrome-') + platform,
);
if (chromeLinuxFolder !== targetFolder) {
@@ -293,20 +289,26 @@ const getExecutablePath = (chromeMode: ChromeMode) => {
return path.join(folderPath, 'chrome-win64', 'chrome.exe');
}
if (platform === 'linux64' || platform === 'linux-arm64') {
- return path.join(folderPath, 'chrome-linux64', 'chrome');
+ return path.join(folderPath, `chrome-${platform}`, 'chrome');
}
throw new Error('unsupported platform' + (platform satisfies never));
}
if (chromeMode === 'headless-shell') {
- return path.join(
+ const shellFolder = path.join(
folderPath,
`chrome-headless-shell-${platform}`,
+ );
+ const remotionExecutable = path.join(shellFolder, 'headless_shell');
+ if (fs.existsSync(remotionExecutable)) {
+ return remotionExecutable;
+ }
+
+ return path.join(
+ shellFolder,
platform === 'win64'
? 'chrome-headless-shell.exe'
- : platform === 'linux-arm64' || isAmazonLinux2023()
- ? 'headless_shell'
- : 'chrome-headless-shell',
+ : 'chrome-headless-shell',
);
}
diff --git a/packages/renderer/src/browser/get-chrome-download-url.ts b/packages/renderer/src/browser/get-chrome-download-url.ts
index 7883f3b4a8..d8162777cd 100644
--- a/packages/renderer/src/browser/get-chrome-download-url.ts
+++ b/packages/renderer/src/browser/get-chrome-download-url.ts
@@ -5,10 +5,6 @@ import {Log} from '../logger';
import type {ChromeMode} from '../options/chrome-mode';
export const TESTED_VERSION = '157.0.8080.0';
-// https://github.com/microsoft/playwright/blame/e76ca6cba40c26bf22c19cf37398d2b9da9ed465/packages/playwright-core/browsers.json
-// packages/playwright-core/browsers.json
-const PLAYWRIGHT_VERSION = '1421'; // 149.0.7790.0
-export const PLAYWRIGHT_CHROMIUM_VERSION = '149.0.7790.0';
export type Platform =
| 'linux64'
@@ -105,58 +101,38 @@ export function getChromeDownloadUrl({
version: string | null;
chromeMode: ChromeMode;
}): string {
- if (platform === 'linux-arm64') {
- // Amazon Linux 2023 on arm64 needs a special build.
- // This binary is compatible with older glibc (no 2.35 requirement).
- if (isAmazonLinux2023() && chromeMode === 'headless-shell' && !version) {
- return `https://remotion.media/chromium-headless-shell-amazon-linux-arm64-${TESTED_VERSION}.zip?clear`;
- }
-
- if (chromeMode === 'chrome-for-testing') {
- return `https://playwright.azureedge.net/builds/chromium/${version ?? PLAYWRIGHT_VERSION}/chromium-linux-arm64.zip`;
- }
-
- if (version) {
- return `https://playwright.azureedge.net/builds/chromium/${version}/chromium-headless-shell-linux-arm64.zip`;
- }
-
- // Regular arm64 binary requires glibc 2.35+
- if (canUseRemotionMediaBinaries()) {
- return `https://remotion.media/chromium-headless-shell-linux-arm64-${TESTED_VERSION}.zip?clear`;
- }
-
- // Fall back to Playwright for older glibc (non-Amazon Linux systems)
- return `https://playwright.azureedge.net/builds/chromium/${PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
+ // Preserve explicit Playwright revision overrides on Linux ARM64. Default
+ // downloads and Chrome version overrides use Google's CDN on every platform.
+ if (platform === 'linux-arm64' && version && /^\d+$/.test(version)) {
+ const archive =
+ chromeMode === 'chrome-for-testing'
+ ? 'chromium-linux-arm64'
+ : 'chromium-headless-shell-linux-arm64';
+ return `https://playwright.azureedge.net/builds/chromium/${version}/${archive}.zip`;
}
- if (chromeMode === 'headless-shell') {
- if (platform === 'mac-arm64' && version === null) {
+ if (chromeMode === 'headless-shell' && version === null) {
+ if (platform === 'mac-arm64') {
return `https://remotion.media/chromium-headless-shell-mac-arm64-${TESTED_VERSION}.zip?clear`;
}
- // Amazon Linux 2023 needs a special build.
- // This binary is compatible with older glibc (no 2.35 requirement).
- if (isAmazonLinux2023() && platform === 'linux64' && !version) {
- return `https://remotion.media/chromium-headless-shell-amazon-linux-x64-${TESTED_VERSION}.zip?clear`;
- }
+ if (platform === 'linux64' || platform === 'linux-arm64') {
+ const architecture = platform === 'linux64' ? 'x64' : 'arm64';
+ if (isAmazonLinux2023()) {
+ return `https://remotion.media/chromium-headless-shell-amazon-linux-${architecture}-${TESTED_VERSION}.zip?clear`;
+ }
- if (platform === 'linux64' && version === null) {
if (canUseRemotionMediaBinaries()) {
- return `https://remotion.media/chromium-headless-shell-linux-x64-${TESTED_VERSION}.zip?clear`;
+ return `https://remotion.media/chromium-headless-shell-linux-${architecture}-${TESTED_VERSION}.zip?clear`;
}
-
- // Fall back to Google's CDN for older glibc
- return `https://storage.googleapis.com/chrome-for-testing-public/${TESTED_VERSION}/${platform}/chrome-headless-shell-${platform}.zip`;
}
-
- return `https://storage.googleapis.com/chrome-for-testing-public/${
- version ?? TESTED_VERSION
- }/${platform}/chrome-headless-shell-${platform}.zip`;
}
+ const archive =
+ chromeMode === 'headless-shell' ? 'chrome-headless-shell' : 'chrome';
return `https://storage.googleapis.com/chrome-for-testing-public/${
version ?? TESTED_VERSION
- }/${platform}/chrome-${platform}.zip`;
+ }/${platform}/${archive}-${platform}.zip`;
}
export const logDownloadUrl = ({