@remotion/renderer 4.0.249 → 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 +3 -3
- package/dist/create-ffmpeg-complex-filter.d.ts +1 -0
- package/dist/create-ffmpeg-complex-filter.js +6 -1
- package/dist/get-codec-name.d.ts +1 -1
- package/dist/index.d.ts +7 -4
- 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/gl.d.ts +1 -1
- package/dist/options/index.d.ts +2 -2
- package/dist/options/log-level.js +1 -1
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -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
|
}
|
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 }: {
|
|
@@ -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/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;
|
package/dist/index.d.ts
CHANGED
|
@@ -140,14 +140,14 @@ 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";
|
|
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;
|
|
@@ -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;
|
|
@@ -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/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 }: {
|
|
@@ -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]) {
|
|
@@ -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;
|
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-arm64": "4.0.
|
|
41
|
-
"@remotion/compositor-
|
|
42
|
-
"@remotion/compositor-
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
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",
|