@remotion/renderer 4.0.248 → 4.0.250
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/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/open-browser.js +1 -0
- package/dist/options/log-level.js +1 -1
- package/ensure-browser.mjs +2 -2
- 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
|
}
|
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,
|
package/dist/open-browser.js
CHANGED
|
@@ -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/ensure-browser.mjs
CHANGED
|
@@ -3213,9 +3213,9 @@ var defaultBrowserDownloadProgress = ({
|
|
|
3213
3213
|
api
|
|
3214
3214
|
}) => ({ chromeMode }) => {
|
|
3215
3215
|
if (chromeMode === "chrome-for-testing") {
|
|
3216
|
-
Log.info({ indent, logLevel }, "Downloading Chrome for Testing https://www.remotion.dev/
|
|
3216
|
+
Log.info({ indent, logLevel }, "Downloading Chrome for Testing https://www.remotion.dev/chrome-for-testing");
|
|
3217
3217
|
} else {
|
|
3218
|
-
Log.info({ indent, logLevel }, "Downloading Chrome Headless Shell https://www.remotion.dev/
|
|
3218
|
+
Log.info({ indent, logLevel }, "Downloading Chrome Headless Shell https://www.remotion.dev/chrome-headless-shell");
|
|
3219
3219
|
}
|
|
3220
3220
|
Log.info({ indent, logLevel }, `Customize this behavior by adding a onBrowserDownload function to ${api}.`);
|
|
3221
3221
|
let lastProgress = 0;
|
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.250",
|
|
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.250",
|
|
22
|
+
"@remotion/streaming": "4.0.250"
|
|
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.250",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.250"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-
|
|
41
|
-
"@remotion/compositor-darwin-
|
|
42
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-linux-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-linux-x64-
|
|
40
|
+
"@remotion/compositor-darwin-arm64": "4.0.250",
|
|
41
|
+
"@remotion/compositor-darwin-x64": "4.0.250",
|
|
42
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.250",
|
|
43
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.250",
|
|
44
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.250",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.250",
|
|
46
|
+
"@remotion/compositor-linux-x64-musl": "4.0.250"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|