@remotion/renderer 4.0.419 → 4.0.420

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,14 +166,25 @@ const downloadBrowser = async ({ logLevel, indent, onProgress, version, chromeMo
166
166
  abortSignal: new AbortController().signal,
167
167
  });
168
168
  await (0, extract_zip_1.default)(archivePath, { dir: outputPath });
169
- const chromePath = path.join(outputPath, 'chrome-linux', 'chrome');
170
- const chromeHeadlessShellPath = path.join(outputPath, 'chrome-linux', 'chrome-headless-shell');
171
- if (fs.existsSync(chromePath)) {
172
- fs.renameSync(chromePath, chromeHeadlessShellPath);
173
- }
174
- const chromeLinuxFolder = path.join(outputPath, 'chrome-linux');
175
- if (fs.existsSync(chromeLinuxFolder)) {
176
- fs.renameSync(chromeLinuxFolder, path.join(outputPath, 'chrome-headless-shell-linux-arm64'));
169
+ const possibleSubdirs = [
170
+ 'chrome-linux',
171
+ 'chrome-headless-shell-linux64',
172
+ 'chromium-headless-shell-amazon-linux2023-arm64',
173
+ 'chromium-headless-shell-amazon-linux2023-x64',
174
+ ];
175
+ for (const subdir of possibleSubdirs) {
176
+ const chromeLinuxFolder = path.join(outputPath, subdir);
177
+ const chromePath = path.join(chromeLinuxFolder, 'chrome');
178
+ if (fs.existsSync(chromePath)) {
179
+ const chromeHeadlessShellPath = path.join(chromeLinuxFolder, 'chrome-headless-shell');
180
+ fs.renameSync(chromePath, chromeHeadlessShellPath);
181
+ }
182
+ if (fs.existsSync(chromeLinuxFolder)) {
183
+ const targetFolder = path.join(outputPath, 'chrome-headless-shell-' + platform);
184
+ if (chromeLinuxFolder !== targetFolder) {
185
+ fs.renameSync(chromeLinuxFolder, targetFolder);
186
+ }
187
+ }
177
188
  }
178
189
  }
179
190
  catch (err) {
@@ -212,7 +223,7 @@ const getExecutablePath = (chromeMode) => {
212
223
  if (chromeMode === 'headless-shell') {
213
224
  return path.join(folderPath, `chrome-headless-shell-${platform}`, platform === 'win64'
214
225
  ? 'chrome-headless-shell.exe'
215
- : platform === 'linux-arm64'
226
+ : platform === 'linux-arm64' || (0, get_chrome_download_url_1.isAmazonLinux2023)()
216
227
  ? 'headless_shell'
217
228
  : 'chrome-headless-shell');
218
229
  }
@@ -1,6 +1,7 @@
1
1
  import type { ChromeMode } from '../options/chrome-mode';
2
2
  export declare const TESTED_VERSION = "144.0.7559.20";
3
3
  export type Platform = 'linux64' | 'linux-arm64' | 'mac-x64' | 'mac-arm64' | 'win64';
4
+ export declare const isAmazonLinux2023: () => boolean;
4
5
  export declare const canUseRemotionMediaBinaries: () => boolean;
5
6
  export declare function getChromeDownloadUrl({ platform, version, chromeMode }: {
6
7
  platform: Platform;
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.logDownloadUrl = exports.canUseRemotionMediaBinaries = exports.TESTED_VERSION = void 0;
36
+ exports.logDownloadUrl = exports.canUseRemotionMediaBinaries = exports.isAmazonLinux2023 = exports.TESTED_VERSION = void 0;
37
37
  exports.getChromeDownloadUrl = getChromeDownloadUrl;
38
38
  const fs = __importStar(require("node:fs"));
39
39
  const os = __importStar(require("node:os"));
@@ -54,6 +54,7 @@ const isAmazonLinux2023 = () => {
54
54
  return false;
55
55
  }
56
56
  };
57
+ exports.isAmazonLinux2023 = isAmazonLinux2023;
57
58
  // remotion.media binaries are built on Ubuntu 24.04 which requires glibc 2.35+
58
59
  const MINIMUM_GLIBC_FOR_REMOTION_MEDIA = [2, 35];
59
60
  const getGlibcVersion = () => {
@@ -107,7 +108,7 @@ function getChromeDownloadUrl({ platform, version, chromeMode, }) {
107
108
  if (platform === 'linux-arm64') {
108
109
  // Amazon Linux 2023 on arm64 needs a special build.
109
110
  // This binary is compatible with older glibc (no 2.35 requirement).
110
- if (isAmazonLinux2023() && chromeMode === 'headless-shell' && !version) {
111
+ if ((0, exports.isAmazonLinux2023)() && chromeMode === 'headless-shell' && !version) {
111
112
  return 'https://remotion.media/chromium-headless-shell-amazon-linux-arm64-144.0.7559.20.zip';
112
113
  }
113
114
  if (chromeMode === 'chrome-for-testing') {
@@ -124,6 +125,11 @@ function getChromeDownloadUrl({ platform, version, chromeMode, }) {
124
125
  return `https://playwright.azureedge.net/builds/chromium/${PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
125
126
  }
126
127
  if (chromeMode === 'headless-shell') {
128
+ // Amazon Linux 2023 needs a special build.
129
+ // This binary is compatible with older glibc (no 2.35 requirement).
130
+ if ((0, exports.isAmazonLinux2023)() && platform === 'linux64' && !version) {
131
+ return `https://remotion.media/chromium-headless-shell-amazon-linux-x64-144.0.7559.20.zip`;
132
+ }
127
133
  if (platform === 'linux64' && version === null) {
128
134
  if ((0, exports.canUseRemotionMediaBinaries)()) {
129
135
  return `https://remotion.media/chromium-headless-shell-linux-x64-${exports.TESTED_VERSION}.zip?clearcache`;
@@ -4836,6 +4836,9 @@ function getChromeDownloadUrl({
4836
4836
  return `https://playwright.azureedge.net/builds/chromium/${PLAYWRIGHT_VERSION}/chromium-headless-shell-linux-arm64.zip`;
4837
4837
  }
4838
4838
  if (chromeMode === "headless-shell") {
4839
+ if (isAmazonLinux2023() && platform2 === "linux64" && !version) {
4840
+ return `https://remotion.media/chromium-headless-shell-amazon-linux-x64-144.0.7559.20.zip`;
4841
+ }
4839
4842
  if (platform2 === "linux64" && version === null) {
4840
4843
  if (canUseRemotionMediaBinaries()) {
4841
4844
  return `https://remotion.media/chromium-headless-shell-linux-x64-${TESTED_VERSION}.zip?clearcache`;
@@ -4990,14 +4993,25 @@ var downloadBrowser = async ({
4990
4993
  abortSignal: new AbortController().signal
4991
4994
  });
4992
4995
  await extractZip(archivePath, { dir: outputPath });
4993
- const chromePath = path8.join(outputPath, "chrome-linux", "chrome");
4994
- const chromeHeadlessShellPath = path8.join(outputPath, "chrome-linux", "chrome-headless-shell");
4995
- if (fs7.existsSync(chromePath)) {
4996
- fs7.renameSync(chromePath, chromeHeadlessShellPath);
4997
- }
4998
- const chromeLinuxFolder = path8.join(outputPath, "chrome-linux");
4999
- if (fs7.existsSync(chromeLinuxFolder)) {
5000
- fs7.renameSync(chromeLinuxFolder, path8.join(outputPath, "chrome-headless-shell-linux-arm64"));
4996
+ const possibleSubdirs = [
4997
+ "chrome-linux",
4998
+ "chrome-headless-shell-linux64",
4999
+ "chromium-headless-shell-amazon-linux2023-arm64",
5000
+ "chromium-headless-shell-amazon-linux2023-x64"
5001
+ ];
5002
+ for (const subdir of possibleSubdirs) {
5003
+ const chromeLinuxFolder = path8.join(outputPath, subdir);
5004
+ const chromePath = path8.join(chromeLinuxFolder, "chrome");
5005
+ if (fs7.existsSync(chromePath)) {
5006
+ const chromeHeadlessShellPath = path8.join(chromeLinuxFolder, "chrome-headless-shell");
5007
+ fs7.renameSync(chromePath, chromeHeadlessShellPath);
5008
+ }
5009
+ if (fs7.existsSync(chromeLinuxFolder)) {
5010
+ const targetFolder = path8.join(outputPath, "chrome-headless-shell-" + platform3);
5011
+ if (chromeLinuxFolder !== targetFolder) {
5012
+ fs7.renameSync(chromeLinuxFolder, targetFolder);
5013
+ }
5014
+ }
5001
5015
  }
5002
5016
  } catch (err) {
5003
5017
  return Promise.reject(err);
@@ -5031,7 +5045,7 @@ var getExecutablePath2 = (chromeMode) => {
5031
5045
  throw new Error("unsupported platform" + platform3);
5032
5046
  }
5033
5047
  if (chromeMode === "headless-shell") {
5034
- return path8.join(folderPath, `chrome-headless-shell-${platform3}`, platform3 === "win64" ? "chrome-headless-shell.exe" : platform3 === "linux-arm64" ? "headless_shell" : "chrome-headless-shell");
5048
+ return path8.join(folderPath, `chrome-headless-shell-${platform3}`, platform3 === "win64" ? "chrome-headless-shell.exe" : platform3 === "linux-arm64" || isAmazonLinux2023() ? "headless_shell" : "chrome-headless-shell");
5035
5049
  }
5036
5050
  throw new Error("unsupported chrome mode" + chromeMode);
5037
5051
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
4
4
  },
5
5
  "name": "@remotion/renderer",
6
- "version": "4.0.419",
6
+ "version": "4.0.420",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "dependencies": {
24
24
  "execa": "5.1.1",
25
25
  "extract-zip": "2.0.1",
26
- "remotion": "4.0.419",
27
- "@remotion/streaming": "4.0.419",
26
+ "remotion": "4.0.420",
27
+ "@remotion/streaming": "4.0.420",
28
28
  "source-map": "^0.8.0-beta.0",
29
29
  "ws": "8.17.1",
30
- "@remotion/licensing": "4.0.419"
30
+ "@remotion/licensing": "4.0.420"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",
@@ -41,19 +41,19 @@
41
41
  "react-dom": "19.2.3",
42
42
  "@typescript/native-preview": "7.0.0-dev.20260105.1",
43
43
  "@types/ws": "8.5.10",
44
- "@remotion/example-videos": "4.0.419",
45
- "@remotion/eslint-config-internal": "4.0.419",
44
+ "@remotion/example-videos": "4.0.420",
45
+ "@remotion/eslint-config-internal": "4.0.420",
46
46
  "eslint": "9.19.0",
47
47
  "@types/node": "20.12.14"
48
48
  },
49
49
  "optionalDependencies": {
50
- "@remotion/compositor-darwin-arm64": "4.0.419",
51
- "@remotion/compositor-darwin-x64": "4.0.419",
52
- "@remotion/compositor-linux-arm64-gnu": "4.0.419",
53
- "@remotion/compositor-linux-arm64-musl": "4.0.419",
54
- "@remotion/compositor-linux-x64-gnu": "4.0.419",
55
- "@remotion/compositor-linux-x64-musl": "4.0.419",
56
- "@remotion/compositor-win32-x64-msvc": "4.0.419"
50
+ "@remotion/compositor-darwin-arm64": "4.0.420",
51
+ "@remotion/compositor-darwin-x64": "4.0.420",
52
+ "@remotion/compositor-linux-arm64-gnu": "4.0.420",
53
+ "@remotion/compositor-linux-arm64-musl": "4.0.420",
54
+ "@remotion/compositor-linux-x64-gnu": "4.0.420",
55
+ "@remotion/compositor-linux-x64-musl": "4.0.420",
56
+ "@remotion/compositor-win32-x64-msvc": "4.0.420"
57
57
  },
58
58
  "keywords": [
59
59
  "remotion",