@remotion/renderer 4.0.134 → 4.0.136
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.
- package/dist/browser/BrowserFetcher.js +15 -16
- package/dist/check-version-requirements.js +6 -1
- package/dist/client.d.ts +3 -3
- package/dist/compositor/get-executable-path.js +10 -1
- package/dist/index.d.ts +2 -2
- package/dist/open-browser.js +1 -1
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +3 -3
- package/dist/stringify-ffmpeg-filter.d.ts +5 -0
- package/dist/stringify-ffmpeg-filter.js +9 -5
- package/package.json +9 -9
|
@@ -53,12 +53,12 @@ const download_file_1 = require("../assets/download-file");
|
|
|
53
53
|
const logger_1 = require("../logger");
|
|
54
54
|
const get_download_destination_1 = require("./get-download-destination");
|
|
55
55
|
const downloadURLs = {
|
|
56
|
-
linux: 'https://
|
|
57
|
-
mac: 'https://
|
|
58
|
-
|
|
59
|
-
win64: 'https://
|
|
56
|
+
linux: 'https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.86/linux64/chrome-headless-shell-linux64.zip',
|
|
57
|
+
'mac-x64': 'https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.86/mac-x64/chrome-headless-shell-mac-x64.zip',
|
|
58
|
+
'mac-arm64': 'https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.86/mac-arm64/chrome-headless-shell-mac-arm64.zip',
|
|
59
|
+
win64: 'https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.86/win64/chrome-headless-shell-win64.zip',
|
|
60
60
|
};
|
|
61
|
-
function
|
|
61
|
+
function getChromeDownloadUrl(platform) {
|
|
62
62
|
return downloadURLs[platform];
|
|
63
63
|
}
|
|
64
64
|
const readdirAsync = fs.promises.readdir;
|
|
@@ -76,7 +76,7 @@ const getPlatform = () => {
|
|
|
76
76
|
const platform = os.platform();
|
|
77
77
|
switch (platform) {
|
|
78
78
|
case 'darwin':
|
|
79
|
-
return os.arch() === 'arm64' ? '
|
|
79
|
+
return os.arch() === 'arm64' ? 'mac-arm64' : 'mac-x64';
|
|
80
80
|
case 'linux':
|
|
81
81
|
return 'linux';
|
|
82
82
|
case 'win32':
|
|
@@ -85,13 +85,13 @@ const getPlatform = () => {
|
|
|
85
85
|
(0, assert_1.assert)(false, 'Unsupported platform: ' + platform);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
const destination = '.
|
|
88
|
+
const destination = '.chrome_headless_shell';
|
|
89
89
|
const getDownloadsFolder = () => {
|
|
90
90
|
return path.join((0, get_download_destination_1.getDownloadsCacheDir)(), destination);
|
|
91
91
|
};
|
|
92
92
|
const downloadBrowser = async (options) => {
|
|
93
93
|
const platform = getPlatform();
|
|
94
|
-
const downloadURL =
|
|
94
|
+
const downloadURL = getChromeDownloadUrl(platform);
|
|
95
95
|
const fileName = downloadURL.split('/').pop();
|
|
96
96
|
(0, assert_1.assert)(fileName, `A malformed download URL was found: ${downloadURL}.`);
|
|
97
97
|
const downloadsFolder = getDownloadsFolder();
|
|
@@ -120,7 +120,7 @@ const downloadBrowser = async (options) => {
|
|
|
120
120
|
onProgress: (progress) => {
|
|
121
121
|
if (progress.downloaded > lastProgress + 10000000) {
|
|
122
122
|
lastProgress = progress.downloaded;
|
|
123
|
-
logger_1.Log.info({ indent: options.indent, logLevel: options.logLevel }, `Downloading
|
|
123
|
+
logger_1.Log.info({ indent: options.indent, logLevel: options.logLevel }, `Downloading Chrome Headless Shell - ${toMegabytes(progress.downloaded)}/${toMegabytes(progress.totalSize)}`);
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
indent: options.indent,
|
|
@@ -145,14 +145,13 @@ const getExecutablePath = () => {
|
|
|
145
145
|
const downloadsFolder = getDownloadsFolder();
|
|
146
146
|
const platform = getPlatform();
|
|
147
147
|
const folderPath = getFolderPath(downloadsFolder, platform);
|
|
148
|
-
if (platform === 'mac' ||
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return path.join(folderPath, 'thorium');
|
|
148
|
+
if (platform === 'mac-x64' ||
|
|
149
|
+
platform === 'mac-arm64' ||
|
|
150
|
+
platform === 'linux') {
|
|
151
|
+
return path.join(folderPath, `chrome-headless-shell-${platform}`, 'chrome-headless-shell');
|
|
153
152
|
}
|
|
154
153
|
if (platform === 'win64') {
|
|
155
|
-
return path.join(folderPath,
|
|
154
|
+
return path.join(folderPath, `chrome-headless-shell-${platform}`, 'chrome-headless-shell.exe');
|
|
156
155
|
}
|
|
157
156
|
throw new Error('Can not download browser for platform: ' + platform);
|
|
158
157
|
};
|
|
@@ -161,7 +160,7 @@ const getRevisionInfo = () => {
|
|
|
161
160
|
const downloadsFolder = getDownloadsFolder();
|
|
162
161
|
const platform = getPlatform();
|
|
163
162
|
const folderPath = getFolderPath(downloadsFolder, platform);
|
|
164
|
-
const url =
|
|
163
|
+
const url = getChromeDownloadUrl(platform);
|
|
165
164
|
const local = fs.existsSync(folderPath);
|
|
166
165
|
return {
|
|
167
166
|
executablePath,
|
|
@@ -38,8 +38,13 @@ exports.gLibCErrorMessage = gLibCErrorMessage;
|
|
|
38
38
|
const checkLibCRequirement = (logLevel, indent) => {
|
|
39
39
|
const { report } = process;
|
|
40
40
|
if (report) {
|
|
41
|
+
const rep = report.getReport();
|
|
42
|
+
if (typeof rep === 'string') {
|
|
43
|
+
logger_1.Log.warn({ logLevel, indent }, 'Bun limitation: process.report.getReport() ' + rep);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
41
46
|
// @ts-expect-error no types
|
|
42
|
-
const { glibcVersionRuntime } =
|
|
47
|
+
const { glibcVersionRuntime } = rep.header;
|
|
43
48
|
if (!glibcVersionRuntime) {
|
|
44
49
|
return;
|
|
45
50
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -464,19 +464,19 @@ export declare const BrowserSafeApis: {
|
|
|
464
464
|
cliFlag: "gl";
|
|
465
465
|
docLink: string;
|
|
466
466
|
name: string;
|
|
467
|
-
type: "
|
|
467
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
468
468
|
ssrName: string;
|
|
469
469
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
470
470
|
getValue: ({ commandLine }: {
|
|
471
471
|
commandLine: Record<string, unknown>;
|
|
472
472
|
}) => {
|
|
473
|
-
value: "
|
|
473
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
474
474
|
source: string;
|
|
475
475
|
} | {
|
|
476
476
|
value: null;
|
|
477
477
|
source: string;
|
|
478
478
|
};
|
|
479
|
-
setConfig: (value: "
|
|
479
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
480
480
|
};
|
|
481
481
|
enableLambdaInsights: {
|
|
482
482
|
name: string;
|
|
@@ -9,6 +9,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
9
9
|
const logger_1 = require("../logger");
|
|
10
10
|
let warned = false;
|
|
11
11
|
function isMusl({ indent, logLevel, }) {
|
|
12
|
+
var _a;
|
|
12
13
|
// @ts-expect-error bun no types
|
|
13
14
|
if (!process.report && typeof Bun !== 'undefined') {
|
|
14
15
|
if (!warned) {
|
|
@@ -17,8 +18,16 @@ function isMusl({ indent, logLevel, }) {
|
|
|
17
18
|
warned = true;
|
|
18
19
|
return false;
|
|
19
20
|
}
|
|
21
|
+
const report = (_a = process.report) === null || _a === void 0 ? void 0 : _a.getReport();
|
|
22
|
+
if (report && typeof report === 'string') {
|
|
23
|
+
if (!warned) {
|
|
24
|
+
logger_1.Log.warn({ indent, logLevel }, 'Bun limitation: Could not determine if your Windows is using musl or glibc. Assuming glibc.');
|
|
25
|
+
}
|
|
26
|
+
warned = true;
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
20
29
|
// @ts-expect-error no types
|
|
21
|
-
const { glibcVersionRuntime } =
|
|
30
|
+
const { glibcVersionRuntime } = report.header;
|
|
22
31
|
return !glibcVersionRuntime;
|
|
23
32
|
}
|
|
24
33
|
exports.isMusl = isMusl;
|
package/dist/index.d.ts
CHANGED
|
@@ -142,8 +142,8 @@ export declare const RenderInternals: {
|
|
|
142
142
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
143
143
|
DEFAULT_BROWSER: "chrome";
|
|
144
144
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
145
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
146
|
-
validateOpenGlRenderer: (option: unknown) => "
|
|
145
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
146
|
+
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
147
147
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
148
148
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
149
149
|
validateJpegQuality: (q: unknown) => void;
|
package/dist/open-browser.js
CHANGED
|
@@ -94,7 +94,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
|
|
|
94
94
|
'--enable-blink-features=IdleDetection',
|
|
95
95
|
'--export-tagged-pdf',
|
|
96
96
|
'--intensive-wake-up-throttling-policy=0',
|
|
97
|
-
((_c = chromiumOptions.headless) !== null && _c !== void 0 ? _c : true) ? '--headless' : null,
|
|
97
|
+
((_c = chromiumOptions.headless) !== null && _c !== void 0 ? _c : true) ? '--headless=old' : null,
|
|
98
98
|
'--no-sandbox',
|
|
99
99
|
'--disable-setuid-sandbox',
|
|
100
100
|
...customGlRenderer,
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
2
2
|
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const getChromiumOpenGlRenderer: () => "
|
|
4
|
+
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
5
5
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
6
6
|
export declare const glOption: {
|
|
7
7
|
cliFlag: "gl";
|
|
8
8
|
docLink: string;
|
|
9
9
|
name: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
11
11
|
ssrName: string;
|
|
12
12
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
getValue: ({ commandLine }: {
|
|
14
14
|
commandLine: Record<string, unknown>;
|
|
15
15
|
}) => {
|
|
16
|
-
value: "
|
|
16
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
17
17
|
source: string;
|
|
18
18
|
} | {
|
|
19
19
|
value: null;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -245,19 +245,19 @@ export declare const allOptions: {
|
|
|
245
245
|
cliFlag: "gl";
|
|
246
246
|
docLink: string;
|
|
247
247
|
name: string;
|
|
248
|
-
type: "
|
|
248
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
249
249
|
ssrName: string;
|
|
250
250
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
251
251
|
getValue: ({ commandLine }: {
|
|
252
252
|
commandLine: Record<string, unknown>;
|
|
253
253
|
}) => {
|
|
254
|
-
value: "
|
|
254
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
255
255
|
source: string;
|
|
256
256
|
} | {
|
|
257
257
|
value: null;
|
|
258
258
|
source: string;
|
|
259
259
|
};
|
|
260
|
-
setConfig: (value: "
|
|
260
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
261
261
|
};
|
|
262
262
|
enableLambdaInsights: {
|
|
263
263
|
name: string;
|
|
@@ -6,6 +6,11 @@ export type ProcessedTrack = {
|
|
|
6
6
|
pad_start: string | null;
|
|
7
7
|
pad_end: string | null;
|
|
8
8
|
};
|
|
9
|
+
export declare const getActualTrimLeft: ({ asset, fps, trimLeftOffset, }: {
|
|
10
|
+
asset: MediaAsset;
|
|
11
|
+
fps: number;
|
|
12
|
+
trimLeftOffset: number;
|
|
13
|
+
}) => number;
|
|
9
14
|
export declare const stringifyFfmpegFilter: ({ channels, volume, fps, assetDuration, chunkLengthInSeconds, forSeamlessAacConcatenation, trimLeftOffset, trimRightOffset, asset, }: {
|
|
10
15
|
channels: number;
|
|
11
16
|
volume: AssetVolume;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringifyFfmpegFilter = void 0;
|
|
3
|
+
exports.stringifyFfmpegFilter = exports.getActualTrimLeft = void 0;
|
|
4
4
|
const calculate_atempo_1 = require("./assets/calculate-atempo");
|
|
5
5
|
const ffmpeg_volume_expression_1 = require("./assets/ffmpeg-volume-expression");
|
|
6
6
|
const sample_rate_1 = require("./sample-rate");
|
|
@@ -14,13 +14,15 @@ const stringifyTrim = (trim) => {
|
|
|
14
14
|
}
|
|
15
15
|
return asString;
|
|
16
16
|
};
|
|
17
|
+
const getActualTrimLeft = ({ asset, fps, trimLeftOffset, }) => asset.trimLeft / fps + trimLeftOffset;
|
|
18
|
+
exports.getActualTrimLeft = getActualTrimLeft;
|
|
17
19
|
const trimAndSetTempo = ({ forSeamlessAacConcatenation, assetDuration, asset, trimLeftOffset, trimRightOffset, fps, }) => {
|
|
18
20
|
// If we need seamless AAC stitching, we need to apply the tempo filter first
|
|
19
21
|
// because the atempo filter is not frame-perfect. It creates a small offset
|
|
20
22
|
// and the offset needs to be the same for all audio tracks, before processing it further.
|
|
21
23
|
// This also affects the trimLeft and trimRight values, as they need to be adjusted.
|
|
22
24
|
if (forSeamlessAacConcatenation) {
|
|
23
|
-
const trimLeft =
|
|
25
|
+
const trimLeft = (0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset });
|
|
24
26
|
const trimRight = trimLeft + (asset.duration / fps + trimRightOffset);
|
|
25
27
|
const trimRightOrAssetDuration = assetDuration
|
|
26
28
|
? Math.min(trimRight, assetDuration / asset.playbackRate)
|
|
@@ -46,7 +48,7 @@ const trimAndSetTempo = ({ forSeamlessAacConcatenation, assetDuration, asset, tr
|
|
|
46
48
|
// Otherwise, we first trim and then apply playback rate, as then the atempo
|
|
47
49
|
// filter needs to do less work.
|
|
48
50
|
if (!forSeamlessAacConcatenation) {
|
|
49
|
-
const trimLeft =
|
|
51
|
+
const trimLeft = (0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset });
|
|
50
52
|
const trimRight = (trimLeft + asset.duration / fps) * asset.playbackRate;
|
|
51
53
|
const trimRightOrAssetDuration = assetDuration
|
|
52
54
|
? Math.min(trimRight, assetDuration)
|
|
@@ -67,9 +69,11 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
67
69
|
if (channels === 0) {
|
|
68
70
|
return null;
|
|
69
71
|
}
|
|
70
|
-
const { toneFrequency, startInVideo,
|
|
72
|
+
const { toneFrequency, startInVideo, playbackRate } = asset;
|
|
71
73
|
const startInVideoSeconds = startInVideo / fps;
|
|
72
|
-
if (assetDuration &&
|
|
74
|
+
if (assetDuration &&
|
|
75
|
+
(0, exports.getActualTrimLeft)({ asset, fps, trimLeftOffset }) >=
|
|
76
|
+
assetDuration / playbackRate) {
|
|
73
77
|
return null;
|
|
74
78
|
}
|
|
75
79
|
if (toneFrequency !== null && (toneFrequency <= 0 || toneFrequency > 2)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.136",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.136"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-arm64-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-x64-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.136",
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "4.0.136",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.136",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.136",
|
|
47
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.136",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.136",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.136"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|