@remotion/renderer 4.0.251 → 4.0.252
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/client.d.ts +2 -2
- package/dist/get-codec-name.d.ts +1 -1
- package/dist/get-video-metadata.d.ts +3 -0
- package/dist/get-video-metadata.js +3 -0
- package/dist/index.d.ts +3 -3
- package/dist/open-browser.js +1 -0
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +2 -2
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/serve-handler/index.js +2 -2
- package/dist/set-props-and-env.js +6 -17
- package/ensure-browser.mjs +2 -0
- package/eslint.config.mjs +0 -9
- package/package.json +12 -12
package/dist/client.d.ts
CHANGED
|
@@ -394,7 +394,7 @@ export declare const BrowserSafeApis: {
|
|
|
394
394
|
webhookCustomDataOption: {
|
|
395
395
|
name: string;
|
|
396
396
|
cliFlag: "webhook-custom-data";
|
|
397
|
-
description: (type: "
|
|
397
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
398
398
|
ssrName: "customData";
|
|
399
399
|
docLink: string;
|
|
400
400
|
type: Record<string, unknown> | null;
|
|
@@ -807,7 +807,7 @@ export declare const BrowserSafeApis: {
|
|
|
807
807
|
metadataOption: {
|
|
808
808
|
name: string;
|
|
809
809
|
cliFlag: "metadata";
|
|
810
|
-
description: (mode: "
|
|
810
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
811
811
|
docLink: string;
|
|
812
812
|
type: import("./options/metadata").Metadata;
|
|
813
813
|
getValue: ({ commandLine }: {
|
package/dist/get-codec-name.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const hasSpecifiedUnsupportedHardwareQualifySettings: ({ encoding
|
|
|
9
9
|
encodingMaxRate: string | null;
|
|
10
10
|
encodingBufferSize: string | null;
|
|
11
11
|
crf: unknown;
|
|
12
|
-
}) => "
|
|
12
|
+
}) => "encodingMaxRate" | "encodingBufferSize" | "crf" | null;
|
|
13
13
|
export declare const getCodecName: ({ codec, encodingMaxRate, encodingBufferSize, crf, hardwareAcceleration, logLevel, indent, }: {
|
|
14
14
|
codec: Codec;
|
|
15
15
|
hardwareAcceleration: HardwareAccelerationOption;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { VideoMetadata } from './compositor/payloads';
|
|
2
2
|
import type { LogLevel } from './log-level';
|
|
3
3
|
export { VideoMetadata } from './compositor/payloads';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `parseMedia()` instead: https://www.remotion.dev/docs/media-parser/parse-media
|
|
6
|
+
*/
|
|
4
7
|
export declare const getVideoMetadata: (videoSource: string, options?: {
|
|
5
8
|
logLevel?: LogLevel;
|
|
6
9
|
binariesDirectory?: string | null;
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getVideoMetadata = void 0;
|
|
4
4
|
const node_path_1 = require("node:path");
|
|
5
5
|
const compositor_1 = require("./compositor/compositor");
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `parseMedia()` instead: https://www.remotion.dev/docs/media-parser/parse-media
|
|
8
|
+
*/
|
|
6
9
|
const getVideoMetadata = async (videoSource, options) => {
|
|
7
10
|
var _a, _b;
|
|
8
11
|
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ export declare const RenderInternals: {
|
|
|
140
140
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
141
141
|
DEFAULT_BROWSER: "chrome";
|
|
142
142
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
143
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
143
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
144
144
|
validateOpenGlRenderer: (option: unknown) => import("./options/gl").OpenGlRenderer | null;
|
|
145
145
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
146
146
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
@@ -353,8 +353,8 @@ export declare const RenderInternals: {
|
|
|
353
353
|
}) => execa.ExecaChildProcess<string>;
|
|
354
354
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
355
355
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
356
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
357
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
356
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
357
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
358
358
|
DEFAULT_JPEG_QUALITY: number;
|
|
359
359
|
chalk: {
|
|
360
360
|
enabled: () => boolean;
|
package/dist/open-browser.js
CHANGED
|
@@ -96,6 +96,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
|
|
|
96
96
|
'--no-proxy-server',
|
|
97
97
|
"--proxy-server='direct://'",
|
|
98
98
|
'--proxy-bypass-list=*',
|
|
99
|
+
'--force-gpu-mem-available-mb=4096',
|
|
99
100
|
'--disable-hang-monitor',
|
|
100
101
|
'--disable-extensions',
|
|
101
102
|
'--allow-chrome-scheme-url',
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
package/dist/options/index.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ export declare const allOptions: {
|
|
|
171
171
|
webhookCustomDataOption: {
|
|
172
172
|
name: string;
|
|
173
173
|
cliFlag: "webhook-custom-data";
|
|
174
|
-
description: (type: "
|
|
174
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
175
175
|
ssrName: "customData";
|
|
176
176
|
docLink: string;
|
|
177
177
|
type: Record<string, unknown> | null;
|
|
@@ -584,7 +584,7 @@ export declare const allOptions: {
|
|
|
584
584
|
metadataOption: {
|
|
585
585
|
name: string;
|
|
586
586
|
cliFlag: "metadata";
|
|
587
|
-
description: (mode: "
|
|
587
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
588
588
|
docLink: string;
|
|
589
589
|
type: import("./metadata").Metadata;
|
|
590
590
|
getValue: ({ commandLine }: {
|
|
@@ -2,7 +2,7 @@ export type Metadata = Record<string, string>;
|
|
|
2
2
|
export declare const metadataOption: {
|
|
3
3
|
name: string;
|
|
4
4
|
cliFlag: "metadata";
|
|
5
|
-
description: (mode: "
|
|
5
|
+
description: (mode: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Metadata;
|
|
8
8
|
getValue: ({ commandLine }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const webhookCustomDataOption: {
|
|
2
2
|
name: string;
|
|
3
3
|
cliFlag: "webhook-custom-data";
|
|
4
|
-
description: (type: "
|
|
4
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
ssrName: "customData";
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Record<string, unknown> | null;
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.serveHandler = void 0;
|
|
7
7
|
const node_fs_1 = require("node:fs");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const node_url_1 = __importDefault(require("node:url"));
|
|
10
9
|
const mime_types_1 = require("../mime-types");
|
|
11
10
|
// Packages
|
|
12
11
|
const is_path_inside_1 = require("./is-path-inside");
|
|
@@ -78,7 +77,8 @@ const serveHandler = async (request, response, config) => {
|
|
|
78
77
|
const current = node_path_1.default.resolve(cwd, config.public);
|
|
79
78
|
let relativePath = null;
|
|
80
79
|
try {
|
|
81
|
-
|
|
80
|
+
const parsedUrl = new URL(request.url, `http://${request.headers.host}`);
|
|
81
|
+
relativePath = decodeURIComponent(parsedUrl.pathname);
|
|
82
82
|
}
|
|
83
83
|
catch (_a) {
|
|
84
84
|
return sendError('/', response, {
|
|
@@ -27,30 +27,19 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
27
27
|
}
|
|
28
28
|
window.process.env.NODE_ENV = 'production';
|
|
29
29
|
}, actualTimeout);
|
|
30
|
-
await page.evaluateOnNewDocument((input) => {
|
|
31
|
-
window.remotion_inputProps = input;
|
|
32
|
-
}, serializedInputPropsWithCustomSchema);
|
|
33
30
|
if (envVariables) {
|
|
34
31
|
await page.evaluateOnNewDocument((input) => {
|
|
35
32
|
window.remotion_envVariables = input;
|
|
36
33
|
}, JSON.stringify(envVariables));
|
|
37
34
|
}
|
|
38
|
-
await page.evaluateOnNewDocument((key) => {
|
|
35
|
+
await page.evaluateOnNewDocument((input, key, port, audEnabled, vidEnabled, level) => {
|
|
36
|
+
window.remotion_inputProps = input;
|
|
39
37
|
window.remotion_initialFrame = key;
|
|
40
|
-
}, initialFrame);
|
|
41
|
-
await page.evaluateOnNewDocument(() => {
|
|
42
38
|
window.remotion_attempt = 1;
|
|
43
|
-
});
|
|
44
|
-
await page.evaluateOnNewDocument((port) => {
|
|
45
39
|
window.remotion_proxyPort = port;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
window.
|
|
49
|
-
}, audioEnabled);
|
|
50
|
-
await page.evaluateOnNewDocument((enabled) => {
|
|
51
|
-
window.remotion_videoEnabled = enabled;
|
|
52
|
-
}, videoEnabled);
|
|
53
|
-
await page.evaluateOnNewDocument(() => {
|
|
40
|
+
window.remotion_audioEnabled = audEnabled;
|
|
41
|
+
window.remotion_videoEnabled = vidEnabled;
|
|
42
|
+
window.remotion_logLevel = level;
|
|
54
43
|
window.alert = (message) => {
|
|
55
44
|
if (message) {
|
|
56
45
|
window.window.remotion_cancelledError = new Error(`alert("${message}") was called. It cannot be called in a headless browser.`).stack;
|
|
@@ -68,7 +57,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
68
57
|
}
|
|
69
58
|
return false;
|
|
70
59
|
};
|
|
71
|
-
});
|
|
60
|
+
}, serializedInputPropsWithCustomSchema, initialFrame, proxyPort, audioEnabled, videoEnabled, logLevel);
|
|
72
61
|
const retry = async () => {
|
|
73
62
|
await new Promise((resolve) => {
|
|
74
63
|
setTimeout(() => {
|
package/ensure-browser.mjs
CHANGED
|
@@ -3165,6 +3165,8 @@ var downloadBrowser = async ({
|
|
|
3165
3165
|
if (fs3.existsSync(chromeLinuxFolder)) {
|
|
3166
3166
|
fs3.renameSync(chromeLinuxFolder, path3.join(outputPath, "chrome-headless-shell-linux-arm64"));
|
|
3167
3167
|
}
|
|
3168
|
+
} catch (err) {
|
|
3169
|
+
return Promise.reject(err);
|
|
3168
3170
|
} finally {
|
|
3169
3171
|
if (await existsAsync(archivePath)) {
|
|
3170
3172
|
await unlinkAsync(archivePath);
|
package/eslint.config.mjs
CHANGED
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.
|
|
6
|
+
"version": "4.0.252",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"
|
|
21
|
+
"@remotion/streaming": "4.0.252",
|
|
22
|
+
"remotion": "4.0.252"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "19.0.0",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.14.0",
|
|
36
|
-
"@remotion/example-videos": "4.0.
|
|
37
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
36
|
+
"@remotion/example-videos": "4.0.252",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.252"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-
|
|
41
|
-
"@remotion/compositor-
|
|
42
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
46
|
-
"@remotion/compositor-
|
|
40
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.252",
|
|
41
|
+
"@remotion/compositor-darwin-arm64": "4.0.252",
|
|
42
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.252",
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.252",
|
|
44
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.252",
|
|
45
|
+
"@remotion/compositor-linux-x64-musl": "4.0.252",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.252"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|