@remotion/renderer 4.0.250 → 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/browser/BrowserFetcher.js +3 -0
- package/dist/browser/BrowserRunner.js +1 -0
- package/dist/get-video-metadata.d.ts +3 -0
- package/dist/get-video-metadata.js +3 -0
- package/dist/open-browser.js +1 -0
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +1 -1
- package/dist/serve-handler/index.js +2 -2
- package/dist/set-props-and-env.js +6 -17
- package/ensure-browser.mjs +16 -1
- package/eslint.config.mjs +0 -9
- package/package.json +12 -12
|
@@ -146,6 +146,9 @@ const downloadBrowser = async ({ logLevel, indent, onProgress, version, chromeMo
|
|
|
146
146
|
fs.renameSync(chromeLinuxFolder, path.join(outputPath, 'chrome-headless-shell-linux-arm64'));
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
return Promise.reject(err);
|
|
151
|
+
}
|
|
149
152
|
finally {
|
|
150
153
|
if (await existsAsync(archivePath)) {
|
|
151
154
|
await unlinkAsync(archivePath);
|
|
@@ -100,6 +100,7 @@ const makeBrowserRunner = async ({ executablePath, processArguments, userDataDir
|
|
|
100
100
|
// Killing the process group can fail due e.g. to missing permissions.
|
|
101
101
|
// Let's kill the process via Node API. This delays killing of all child
|
|
102
102
|
// processes of `this.proc` until the main Node.js process dies.
|
|
103
|
+
logger_1.Log.verbose({ indent, logLevel }, `Could not kill browser process group ${processGroupId}. Killing process via Node.js API`);
|
|
103
104
|
proc.kill('SIGKILL');
|
|
104
105
|
}
|
|
105
106
|
}
|
|
@@ -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/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/render-media.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type InternalRenderMediaOptions = {
|
|
|
55
55
|
port: number | null;
|
|
56
56
|
cancelSignal: CancelSignal | undefined;
|
|
57
57
|
browserExecutable: BrowserExecutable | null;
|
|
58
|
-
onCtrlCExit: (fn: () => void) => void;
|
|
58
|
+
onCtrlCExit: (label: string, fn: () => void) => void;
|
|
59
59
|
indent: boolean;
|
|
60
60
|
server: RemotionServer | undefined;
|
|
61
61
|
preferLossless: boolean;
|
package/dist/render-media.js
CHANGED
|
@@ -169,7 +169,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
169
169
|
? node_path_1.default.join(workingDir, 'pre-encode.' + (0, get_extension_from_codec_1.getFileExtensionFromCodec)(codec, audioCodec))
|
|
170
170
|
: null;
|
|
171
171
|
if (onCtrlCExit && workingDir) {
|
|
172
|
-
onCtrlCExit(() => (0, delete_directory_1.deleteDirectory)(workingDir));
|
|
172
|
+
onCtrlCExit(`Delete ${workingDir}`, () => (0, delete_directory_1.deleteDirectory)(workingDir));
|
|
173
173
|
}
|
|
174
174
|
(0, validate_even_dimensions_with_codec_1.validateEvenDimensionsWithCodec)({
|
|
175
175
|
codec,
|
|
@@ -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
|
@@ -2710,7 +2710,7 @@ var chalk = (() => {
|
|
|
2710
2710
|
})();
|
|
2711
2711
|
|
|
2712
2712
|
// src/log-level.ts
|
|
2713
|
-
var logLevels = ["verbose", "info", "warn", "error"];
|
|
2713
|
+
var logLevels = ["trace", "verbose", "info", "warn", "error"];
|
|
2714
2714
|
var getNumberForLogLevel = (level) => {
|
|
2715
2715
|
return logLevels.indexOf(level);
|
|
2716
2716
|
};
|
|
@@ -2745,6 +2745,19 @@ var verboseTag = (str) => {
|
|
|
2745
2745
|
return isColorSupported() ? chalk.bgBlack(` ${str} `) : `[${str}]`;
|
|
2746
2746
|
};
|
|
2747
2747
|
var Log = {
|
|
2748
|
+
trace: (options, ...args) => {
|
|
2749
|
+
writeInRepro("trace", ...args);
|
|
2750
|
+
if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
|
|
2751
|
+
if (args.length === 0) {
|
|
2752
|
+
return process.stdout.write(`
|
|
2753
|
+
`);
|
|
2754
|
+
}
|
|
2755
|
+
return console.log(...[
|
|
2756
|
+
options.indent ? INDENT_TOKEN : null,
|
|
2757
|
+
options.tag ? verboseTag(options.tag) : null
|
|
2758
|
+
].filter(truthy).concat(args.map((a) => chalk.gray(a))));
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2748
2761
|
verbose: (options, ...args) => {
|
|
2749
2762
|
writeInRepro("verbose", ...args);
|
|
2750
2763
|
if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
|
|
@@ -3152,6 +3165,8 @@ var downloadBrowser = async ({
|
|
|
3152
3165
|
if (fs3.existsSync(chromeLinuxFolder)) {
|
|
3153
3166
|
fs3.renameSync(chromeLinuxFolder, path3.join(outputPath, "chrome-headless-shell-linux-arm64"));
|
|
3154
3167
|
}
|
|
3168
|
+
} catch (err) {
|
|
3169
|
+
return Promise.reject(err);
|
|
3155
3170
|
} finally {
|
|
3156
3171
|
if (await existsAsync(archivePath)) {
|
|
3157
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-darwin-
|
|
42
|
-
"@remotion/compositor-linux-arm64-
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-linux-
|
|
45
|
-
"@remotion/compositor-linux-x64-
|
|
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",
|