@remotion/renderer 4.0.249 → 4.0.251
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/assets/get-audio-channels.js +9 -2
- package/dist/browser/BrowserFetcher.js +3 -0
- package/dist/browser/BrowserRunner.js +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/create-ffmpeg-complex-filter.d.ts +1 -0
- package/dist/create-ffmpeg-complex-filter.js +6 -1
- package/dist/index.d.ts +4 -1
- package/dist/log-level.d.ts +1 -1
- package/dist/log-level.js +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.js +15 -0
- package/dist/merge-audio-track.js +3 -1
- package/dist/options/log-level.js +1 -1
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +1 -1
- package/ensure-browser.mjs +14 -1
- package/package.json +12 -12
|
@@ -8,7 +8,10 @@ const getAudioChannelsAndDurationWithoutCache = async ({ src, indent, logLevel,
|
|
|
8
8
|
const args = [
|
|
9
9
|
['-v', 'error'],
|
|
10
10
|
['-select_streams', 'a:0'],
|
|
11
|
-
[
|
|
11
|
+
[
|
|
12
|
+
'-show_entries',
|
|
13
|
+
'stream=channels:stream=start_time:format=duration:format=format_name',
|
|
14
|
+
],
|
|
12
15
|
['-of', 'default=nw=1'],
|
|
13
16
|
[src],
|
|
14
17
|
]
|
|
@@ -26,10 +29,14 @@ const getAudioChannelsAndDurationWithoutCache = async ({ src, indent, logLevel,
|
|
|
26
29
|
const channels = task.stdout.match(/channels=([0-9]+)/);
|
|
27
30
|
const duration = task.stdout.match(/duration=([0-9.]+)/);
|
|
28
31
|
const startTime = task.stdout.match(/start_time=([0-9.]+)/);
|
|
32
|
+
const container = task.stdout.match(/format_name=([a-zA-Z0-9.]+)/);
|
|
33
|
+
const isMP3 = container ? container[1] === 'mp3' : false;
|
|
29
34
|
const result = {
|
|
30
35
|
channels: channels ? parseInt(channels[1], 10) : 0,
|
|
31
36
|
duration: duration ? parseFloat(duration[1]) : null,
|
|
32
|
-
|
|
37
|
+
// We ignore the start time for MP3 because that is an inherent encoder thing
|
|
38
|
+
// not in the sense that we want
|
|
39
|
+
startTime: startTime ? (isMP3 ? 0 : parseFloat(startTime[1])) : null,
|
|
33
40
|
};
|
|
34
41
|
return result;
|
|
35
42
|
}
|
|
@@ -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
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -2493,7 +2493,7 @@ export declare const BrowserSafeApis: {
|
|
|
2493
2493
|
};
|
|
2494
2494
|
codecSupportsCrf: (codec: import("./codec").Codec) => boolean;
|
|
2495
2495
|
codecSupportsVideoBitrate: (codec: import("./codec").Codec) => boolean;
|
|
2496
|
-
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
2496
|
+
logLevels: readonly ["trace", "verbose", "info", "warn", "error"];
|
|
2497
2497
|
getOutputCodecOrUndefined: () => import("./codec").CodecOrUndefined;
|
|
2498
2498
|
getExtensionFromAudioCodec: (audioCodec: import("./options/audio-codec").AudioCodec) => "mp3" | "aac" | "wav" | "opus";
|
|
2499
2499
|
validChromeModeOptions: readonly ["headless-shell", "chrome-for-testing"];
|
|
@@ -5,7 +5,11 @@ const create_ffmpeg_merge_filter_1 = require("./create-ffmpeg-merge-filter");
|
|
|
5
5
|
const ffmpeg_filter_file_1 = require("./ffmpeg-filter-file");
|
|
6
6
|
const createFfmpegComplexFilter = async ({ filters, downloadMap, }) => {
|
|
7
7
|
if (filters.length === 0) {
|
|
8
|
-
return {
|
|
8
|
+
return {
|
|
9
|
+
complexFilterFlag: null,
|
|
10
|
+
cleanup: () => undefined,
|
|
11
|
+
complexFilter: null,
|
|
12
|
+
};
|
|
9
13
|
}
|
|
10
14
|
const complexFilter = (0, create_ffmpeg_merge_filter_1.createFfmpegMergeFilter)({
|
|
11
15
|
inputs: filters,
|
|
@@ -14,6 +18,7 @@ const createFfmpegComplexFilter = async ({ filters, downloadMap, }) => {
|
|
|
14
18
|
return {
|
|
15
19
|
complexFilterFlag: ['-filter_complex_script', file],
|
|
16
20
|
cleanup,
|
|
21
|
+
complexFilter,
|
|
17
22
|
};
|
|
18
23
|
};
|
|
19
24
|
exports.createFfmpegComplexFilter = createFfmpegComplexFilter;
|
package/dist/index.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export declare const RenderInternals: {
|
|
|
147
147
|
validateJpegQuality: (q: unknown) => void;
|
|
148
148
|
DEFAULT_TIMEOUT: number;
|
|
149
149
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
150
|
-
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
150
|
+
logLevels: readonly ["trace", "verbose", "info", "warn", "error"];
|
|
151
151
|
isEqualOrBelowLogLevel: (currentLevel: import("./log-level").LogLevel, level: import("./log-level").LogLevel) => boolean;
|
|
152
152
|
isValidLogLevel: (level: string) => boolean;
|
|
153
153
|
perf: typeof perf;
|
|
@@ -407,6 +407,9 @@ export declare const RenderInternals: {
|
|
|
407
407
|
bgWhiteBright: (str: string) => string;
|
|
408
408
|
};
|
|
409
409
|
Log: {
|
|
410
|
+
trace: (options: import("./logger").LogOptions & {
|
|
411
|
+
tag?: string;
|
|
412
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
410
413
|
verbose: (options: import("./logger").LogOptions & {
|
|
411
414
|
tag?: string;
|
|
412
415
|
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
package/dist/log-level.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
1
|
+
export declare const logLevels: readonly ["trace", "verbose", "info", "warn", "error"];
|
|
2
2
|
export type LogLevel = (typeof logLevels)[number];
|
|
3
3
|
export declare const isValidLogLevel: (level: string) => boolean;
|
|
4
4
|
export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
|
package/dist/log-level.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isEqualOrBelowLogLevel = exports.isValidLogLevel = exports.logLevels = void 0;
|
|
4
|
-
exports.logLevels = ['verbose', 'info', 'warn', 'error'];
|
|
4
|
+
exports.logLevels = ['trace', 'verbose', 'info', 'warn', 'error'];
|
|
5
5
|
const getNumberForLogLevel = (level) => {
|
|
6
6
|
return exports.logLevels.indexOf(level);
|
|
7
7
|
};
|
package/dist/logger.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type VerboseLogOptions = LogOptions & {
|
|
|
10
10
|
export declare const verboseTag: (str: string) => string;
|
|
11
11
|
export declare const secondverboseTag: (str: string) => string;
|
|
12
12
|
export declare const Log: {
|
|
13
|
+
trace: (options: VerboseLogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
13
14
|
verbose: (options: VerboseLogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
14
15
|
info: (options: LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
15
16
|
warn: (options: LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
package/dist/logger.js
CHANGED
|
@@ -17,6 +17,21 @@ const secondverboseTag = (str) => {
|
|
|
17
17
|
};
|
|
18
18
|
exports.secondverboseTag = secondverboseTag;
|
|
19
19
|
exports.Log = {
|
|
20
|
+
trace: (options, ...args) => {
|
|
21
|
+
(0, repro_1.writeInRepro)('trace', ...args);
|
|
22
|
+
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'trace')) {
|
|
23
|
+
if (args.length === 0) {
|
|
24
|
+
// Lambda will print "undefined" otherwise
|
|
25
|
+
return process.stdout.write('\n');
|
|
26
|
+
}
|
|
27
|
+
return console.log(...[
|
|
28
|
+
options.indent ? exports.INDENT_TOKEN : null,
|
|
29
|
+
options.tag ? (0, exports.verboseTag)(options.tag) : null,
|
|
30
|
+
]
|
|
31
|
+
.filter(truthy_1.truthy)
|
|
32
|
+
.concat(args.map((a) => chalk_1.chalk.gray(a))));
|
|
33
|
+
}
|
|
34
|
+
},
|
|
20
35
|
verbose: (options, ...args) => {
|
|
21
36
|
(0, repro_1.writeInRepro)('verbose', ...args);
|
|
22
37
|
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'verbose')) {
|
|
@@ -11,6 +11,7 @@ const create_ffmpeg_complex_filter_1 = require("./create-ffmpeg-complex-filter")
|
|
|
11
11
|
const create_ffmpeg_merge_filter_1 = require("./create-ffmpeg-merge-filter");
|
|
12
12
|
const create_silent_audio_1 = require("./create-silent-audio");
|
|
13
13
|
const delete_directory_1 = require("./delete-directory");
|
|
14
|
+
const logger_1 = require("./logger");
|
|
14
15
|
const p_limit_1 = require("./p-limit");
|
|
15
16
|
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
16
17
|
const tmp_dir_1 = require("./tmp-dir");
|
|
@@ -90,7 +91,7 @@ const mergeAudioTrackUnlimited = async ({ outName, files, downloadMap, remotionR
|
|
|
90
91
|
(0, delete_directory_1.deleteDirectory)(tempPath);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
|
-
const { complexFilterFlag: mergeFilter, cleanup } = await (0, create_ffmpeg_complex_filter_1.createFfmpegComplexFilter)({
|
|
94
|
+
const { complexFilterFlag: mergeFilter, cleanup, complexFilter, } = await (0, create_ffmpeg_complex_filter_1.createFfmpegComplexFilter)({
|
|
94
95
|
filters: files,
|
|
95
96
|
downloadMap,
|
|
96
97
|
});
|
|
@@ -104,6 +105,7 @@ const mergeAudioTrackUnlimited = async ({ outName, files, downloadMap, remotionR
|
|
|
104
105
|
]
|
|
105
106
|
.filter(truthy_1.truthy)
|
|
106
107
|
.flat(2);
|
|
108
|
+
logger_1.Log.verbose({ indent, logLevel }, `Merging audio tracks`, 'Command:', `ffmpeg ${args.join(' ')}`, 'Complex filter script:', complexFilter);
|
|
107
109
|
const task = (0, call_ffmpeg_1.callFf)({
|
|
108
110
|
bin: 'ffmpeg',
|
|
109
111
|
args,
|
|
@@ -9,7 +9,7 @@ exports.logLevelOption = {
|
|
|
9
9
|
cliFlag,
|
|
10
10
|
name: 'Log Level',
|
|
11
11
|
ssrName: 'logLevel',
|
|
12
|
-
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["One of ", (0, jsx_runtime_1.jsx)("code", { children: "
|
|
12
|
+
description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["One of ", (0, jsx_runtime_1.jsx)("code", { children: "trace" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "verbose" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "info" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "warn" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "error" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " Determines how much info is being logged to the console.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), " Default ", (0, jsx_runtime_1.jsx)("code", { children: "info" }), "."] })),
|
|
13
13
|
docLink: 'https://www.remotion.dev/docs/troubleshooting/debug-failed-render',
|
|
14
14
|
getValue: ({ commandLine }) => {
|
|
15
15
|
if (commandLine[cliFlag]) {
|
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,
|
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")) {
|
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.251",
|
|
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
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.251",
|
|
22
|
+
"@remotion/streaming": "4.0.251"
|
|
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.251",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.251"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-
|
|
41
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
42
|
-
"@remotion/compositor-
|
|
43
|
-
"@remotion/compositor-linux-
|
|
44
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-x64-
|
|
46
|
-
"@remotion/compositor-
|
|
40
|
+
"@remotion/compositor-darwin-x64": "4.0.251",
|
|
41
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.251",
|
|
42
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.251",
|
|
43
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.251",
|
|
44
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.251",
|
|
45
|
+
"@remotion/compositor-linux-x64-musl": "4.0.251",
|
|
46
|
+
"@remotion/compositor-darwin-arm64": "4.0.251"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|