Skip to content

🎥 Make videos programmatically with React

chrome headless shell

Jonny Burger98642847e7b0
diff --git a/packages/docs/docs/miscellaneous/chrome-headless-shell.md b/packages/docs/docs/miscellaneous/chrome-headless-shell.md
deleted file mode 100644
index a3f221ed9f..0000000000
--- a/packages/docs/docs/miscellaneous/chrome-headless-shell.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-image: /generated/articles-docs-miscellaneous-chrome-headless-shell.png
-sidebar_label: Chromium Headless Shell
-title: Chrome Headless Shell
-crumb: "FAQ"
----
-
-Remotion will download [Chrome Headless Shell](https://developer.chrome.com/blog/chrome-headless-shell) if no local browser can be found and an API for rendering videos is used.
-
-The following platforms are supported:
-
-- Linux (x64)
-- Windows (x64)
-- macOS (x64 and arm64)
-
-If you don't want Chrome Headless Shell to get installed or your platform is not supported, you need to specify your own Chromium-based browser:
-
-- Using the [`setBrowserExecutable()`](/docs/config#setbrowserexecutable) option in the config file (for the CLI)
-- Using the [`browserExecutable`](/docs/renderer/render-media) option in [`renderMedia()`](/docs/renderer/render-media) and other SSR APIs
-
-In [Lambda](/docs/lambda) and [Cloud Run](/docs/cloudrun), a version of Chrome is already installed, so you don't need to do anything.
-
-## For versions v4.0.18 - v4.0.135
-
-In these versions, if no local browser can be found, an instance of [Thorium](https://thorium.rocks/) is downloaded.
-
-Thorium is a free and open-source browser forked off Chromium, which includes the codecs needed to render videos.
-
-## Versions before v4.0.18
-
-In previous versions, Remotion would download the free version of Chromium, which would not include codecs for the proprietary H.264 and H.265 codecs.
-This would often lead to problems when using the [`<Video>`](/docs/video) tag.
-
-## See also
-
-- [Media playback error](/docs/media-playback-error)
diff --git a/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx b/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx
new file mode 100644
index 0000000000..e727fb5e0a
--- /dev/null
+++ b/packages/docs/docs/miscellaneous/chrome-headless-shell.mdx
@@ -0,0 +1,89 @@
+---
+image: /generated/articles-docs-miscellaneous-chrome-headless-shell.png
+sidebar_label: Chromium Headless Shell
+title: Chrome Headless Shell
+crumb: "FAQ"
+---
+
+# Chrome Headless Shell<AvailableFrom v="4.0.137"/>
+
+Remotion will download [Chrome Headless Shell](https://developer.chrome.com/blog/chrome-headless-shell) if no local browser can be found and an API for rendering videos is used.
+
+## Supported platforms
+
+The following platforms are supported:
+
+- Linux (x64)
+- Windows (x64)
+- macOS (x64 and arm64)
+
+:::note
+[Remotion Lambda](/docs/lambda) is also support despite being arm64 on Linux.
+:::
+
+## Ensure a local browser is found
+
+// TODO: Add CLI variant
+
+Use [`ensureBrowser()`](/docs/renderer/ensure-browser) to ensure a local browser is found. This function will download Chrome Headless Shell if no local browser is found.
+
+## Bring your own binary
+
+If you don't want Chrome Headless Shell to get installed or your platform is not supported, you need to specify your own Chromium-based browser:
+
+- Using the [`setBrowserExecutable()`](/docs/config#setbrowserexecutable) option in the config file (for the CLI)
+- Using the [`browserExecutable`](/docs/renderer/render-media) option in [`renderMedia()`](/docs/renderer/render-media) and other SSR APIs
+
+In [Lambda](/docs/lambda) and [Cloud Run](/docs/cloudrun), a version of Chrome is already installed, so you don't need to do anything.
+
+:::note
+In a future version, Chrome will stop shipping the headless mode in their desktop browser and you will need to use the Chrome Headless Shell
+:::
+
+## Download location
+
+Chrome Headless Shell will download to
+
+```
+node_modules/.remotion/chrome-headless-shell/[platform]/chrome-headless-shell-[platform]
+```
+
+`platform` can be one of `mac-arm64`, `mac-x64`, `linux64` or `win64`.
+
+At this path, a folder with the necessary files will be created.
+An executable `./chrome-headless-shell` (`.\chrome-headless-shell.exe` on Windows) will be created.
+
+## Chrome vs. Chrome Headless Shell
+
+Chrome used to ship with a `--headless` flag, which we would use.
+
+As of Chrome 123, the headless mode is being split up into:
+
+- `--headless=old`, which is ideal for screenshotting (Remotion needs this)
+- `--headless=new`, which is for browser testing
+
+`--headless=old` will stop working in a future version of Chrome.
+
+Hence we encourage you to use Chrome Headless Shell to future-proof your Remotion application.
+
+## Chrome vs. Chromium
+
+Chromium is the open-source project that Chrome is based on. Some versions of Chromium don't the necessary codecs for the [`<Video >`](/docs/video) tag as well as for functions in [`@remotion/media-utils`](/docs/media-utils).
+
+This is why we recommend Chrome over Chromium.
+
+## Thorium (v4.0.18 - v4.0.135)
+
+In these versions, if no local browser can be found, an instance of [Thorium](https://thorium.rocks/) is downloaded.
+
+Thorium is a free and open-source browser forked off Chromium, which includes the codecs needed to render videos.
+
+## Chromium (before v4.0.18)
+
+In previous versions, Remotion would download the free version of Chromium, which would not include codecs for the proprietary H.264 and H.265 codecs.
+This would often lead to problems when using the [`<Video>`](/docs/video) tag.
+
+## See also
+
+- [`ensureBrowser()`](/docs/renderer/ensure-browser)
+- [Media playback error](/docs/media-playback-error)
diff --git a/packages/docs/docs/renderer/ensure-browser.mdx b/packages/docs/docs/renderer/ensure-browser.mdx
index 42c5934102..d4494efeb8 100644
--- a/packages/docs/docs/renderer/ensure-browser.mdx
+++ b/packages/docs/docs/renderer/ensure-browser.mdx
@@ -90,5 +90,8 @@ await ensureBrowser({
A promise with no value.
+## See also
+
- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/renderer/src/ensure-browser.ts)
+- [Chrome Headless Shell](/docs/miscellaneous/chrome-headless-shell)
- [Server-Side rendering](/docs/ssr)
diff --git a/packages/renderer/src/browser/BrowserFetcher.ts b/packages/renderer/src/browser/BrowserFetcher.ts
index 186a7643d2..00d380cff0 100644
--- a/packages/renderer/src/browser/BrowserFetcher.ts
+++ b/packages/renderer/src/browser/BrowserFetcher.ts
@@ -77,7 +77,7 @@ const getPlatform = (): Platform => {
}
};
-const destination = '.chrome_headless_shell';
+const destination = 'chrome-headless-shell';
const getDownloadsFolder = () => {
return path.join(getDownloadsCacheDir(), destination);