@remotion/renderer 4.0.528 → 4.0.530
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 +19 -0
- package/dist/client.js +2 -0
- package/dist/esm/client.mjs +901 -859
- package/dist/esm/index.mjs +24 -10
- package/dist/esm/pure.mjs +2 -1
- package/dist/ffmpeg-args.d.ts +3 -1
- package/dist/ffmpeg-args.js +14 -2
- package/dist/get-extension-of-filename.js +4 -1
- package/dist/options/canvas-tabs.d.ts +18 -0
- package/dist/options/canvas-tabs.js +38 -0
- package/dist/options/index.d.ts +18 -0
- package/dist/options/index.js +2 -0
- package/dist/options/sidebar-tabs.d.ts +18 -0
- package/dist/options/sidebar-tabs.js +38 -0
- package/dist/prespawn-ffmpeg.js +4 -0
- package/dist/puppeteer-evaluate.js +3 -1
- package/dist/render-media.js +3 -3
- package/dist/stitch-frames-to-video.js +4 -0
- package/package.json +13 -13
package/dist/esm/index.mjs
CHANGED
|
@@ -18238,7 +18238,9 @@ async function puppeteerEvaluateWithCatch({
|
|
|
18238
18238
|
`)),
|
|
18239
18239
|
chunk: null
|
|
18240
18240
|
});
|
|
18241
|
-
page.close()
|
|
18241
|
+
page.close().catch(() => {
|
|
18242
|
+
return;
|
|
18243
|
+
});
|
|
18242
18244
|
throw err;
|
|
18243
18245
|
}
|
|
18244
18246
|
return { size, value: valueFromRemoteObject2(remoteObject) };
|
|
@@ -19270,7 +19272,8 @@ var getExtensionOfFilename = (filename) => {
|
|
|
19270
19272
|
if (filename === null) {
|
|
19271
19273
|
return null;
|
|
19272
19274
|
}
|
|
19273
|
-
const
|
|
19275
|
+
const segments = pathNormalize(filename).split(/[/\\]/);
|
|
19276
|
+
const filenameArr = segments[segments.length - 1].split(".");
|
|
19274
19277
|
const hasExtension = filenameArr.length >= 2;
|
|
19275
19278
|
const filenameArrLength = filenameArr.length;
|
|
19276
19279
|
const extension = hasExtension ? filenameArr[filenameArrLength - 1] : null;
|
|
@@ -21960,7 +21963,9 @@ var firstEncodingStepOnly = ({
|
|
|
21960
21963
|
encodingMaxRate,
|
|
21961
21964
|
encodingBufferSize,
|
|
21962
21965
|
hardwareAcceleration,
|
|
21963
|
-
hardwareAccelerated
|
|
21966
|
+
hardwareAccelerated,
|
|
21967
|
+
cpuCount,
|
|
21968
|
+
lambdaMemoryInBytes
|
|
21964
21969
|
}) => {
|
|
21965
21970
|
if (hasPreencoded || codec === "gif") {
|
|
21966
21971
|
return [];
|
|
@@ -21970,6 +21975,7 @@ var firstEncodingStepOnly = ({
|
|
|
21970
21975
|
proResProfileName ? ["-profile:v", proResProfileName] : null,
|
|
21971
21976
|
["-pix_fmt", pixelFormat],
|
|
21972
21977
|
pixelFormat === "yuva420p" ? ["-auto-alt-ref", "0"] : null,
|
|
21978
|
+
codec === "vp9" && (cpuCount > 2 || lambdaMemoryInBytes !== null && lambdaMemoryInBytes >= 2048 * 1024 * 1024) ? ["-row-mt", "1"] : null,
|
|
21973
21979
|
x264Preset ? ["-preset", x264Preset] : null,
|
|
21974
21980
|
gopSize === null ? null : ["-g", String(gopSize)],
|
|
21975
21981
|
["-video_track_timescale", "90000"],
|
|
@@ -21998,7 +22004,9 @@ var generateFfmpegArgs = ({
|
|
|
21998
22004
|
colorSpace,
|
|
21999
22005
|
hardwareAcceleration,
|
|
22000
22006
|
indent,
|
|
22001
|
-
logLevel
|
|
22007
|
+
logLevel,
|
|
22008
|
+
cpuCount,
|
|
22009
|
+
lambdaMemoryInBytes
|
|
22002
22010
|
}) => {
|
|
22003
22011
|
const encoderSettings = getCodecName({
|
|
22004
22012
|
codec,
|
|
@@ -22054,7 +22062,9 @@ var generateFfmpegArgs = ({
|
|
|
22054
22062
|
x264Preset,
|
|
22055
22063
|
gopSize,
|
|
22056
22064
|
hardwareAcceleration,
|
|
22057
|
-
hardwareAccelerated
|
|
22065
|
+
hardwareAccelerated,
|
|
22066
|
+
cpuCount,
|
|
22067
|
+
lambdaMemoryInBytes
|
|
22058
22068
|
})
|
|
22059
22069
|
].filter(truthy);
|
|
22060
22070
|
};
|
|
@@ -22264,7 +22274,9 @@ var prespawnFfmpeg = (options2) => {
|
|
|
22264
22274
|
colorSpace: options2.colorSpace,
|
|
22265
22275
|
hardwareAcceleration: resolvedHardwareAcceleration,
|
|
22266
22276
|
indent: options2.indent,
|
|
22267
|
-
logLevel: options2.logLevel
|
|
22277
|
+
logLevel: options2.logLevel,
|
|
22278
|
+
cpuCount: getCpuCount(),
|
|
22279
|
+
lambdaMemoryInBytes: getMaxLambdaMemory()
|
|
22268
22280
|
}),
|
|
22269
22281
|
"-y",
|
|
22270
22282
|
options2.outputLocation
|
|
@@ -23772,7 +23784,9 @@ var innerStitchFramesToVideo = async ({
|
|
|
23772
23784
|
colorSpace,
|
|
23773
23785
|
hardwareAcceleration: resolvedHardwareAcceleration,
|
|
23774
23786
|
indent,
|
|
23775
|
-
logLevel
|
|
23787
|
+
logLevel,
|
|
23788
|
+
cpuCount: getCpuCount(),
|
|
23789
|
+
lambdaMemoryInBytes: getMaxLambdaMemory()
|
|
23776
23790
|
}),
|
|
23777
23791
|
["-map_metadata", "-1"],
|
|
23778
23792
|
...makeMetadataArgs(metadata ?? {}),
|
|
@@ -24400,12 +24414,12 @@ var internalRenderMediaRaw = ({
|
|
|
24400
24414
|
let timeOfLastFrame = Date.now();
|
|
24401
24415
|
const renderFramesProc = internalRenderFrames({
|
|
24402
24416
|
composition,
|
|
24403
|
-
onFrameUpdate: (frame, frameIndex) => {
|
|
24417
|
+
onFrameUpdate: (frame, frameIndex, timeToRenderInMilliseconds) => {
|
|
24404
24418
|
renderedFrames = frame;
|
|
24405
24419
|
const now = Date.now();
|
|
24406
|
-
const
|
|
24420
|
+
const timeSinceLastFrame = now - timeOfLastFrame;
|
|
24407
24421
|
timeOfLastFrame = now;
|
|
24408
|
-
recentFrameTimings.push(
|
|
24422
|
+
recentFrameTimings.push(timeSinceLastFrame);
|
|
24409
24423
|
if (recentFrameTimings.length > MAX_RECENT_FRAME_TIMINGS) {
|
|
24410
24424
|
recentFrameTimings.shift();
|
|
24411
24425
|
}
|
package/dist/esm/pure.mjs
CHANGED
|
@@ -303,7 +303,8 @@ var getExtensionOfFilename = (filename) => {
|
|
|
303
303
|
if (filename === null) {
|
|
304
304
|
return null;
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const segments = pathNormalize(filename).split(/[/\\]/);
|
|
307
|
+
const filenameArr = segments[segments.length - 1].split(".");
|
|
307
308
|
const hasExtension = filenameArr.length >= 2;
|
|
308
309
|
const filenameArrLength = filenameArr.length;
|
|
309
310
|
const extension = hasExtension ? filenameArr[filenameArrLength - 1] : null;
|
package/dist/ffmpeg-args.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const generateFfmpegArgs: ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, colorSpace, hardwareAcceleration, indent, logLevel, }: {
|
|
1
|
+
export declare const generateFfmpegArgs: ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, colorSpace, hardwareAcceleration, indent, logLevel, cpuCount, lambdaMemoryInBytes, }: {
|
|
2
2
|
hasPreencoded: boolean;
|
|
3
3
|
proResProfileName: string | null;
|
|
4
4
|
pixelFormat: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le";
|
|
@@ -13,4 +13,6 @@ export declare const generateFfmpegArgs: ({ hasPreencoded, proResProfileName, pi
|
|
|
13
13
|
hardwareAcceleration: "disable" | "if-possible" | "required";
|
|
14
14
|
indent: boolean;
|
|
15
15
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
16
|
+
cpuCount: number;
|
|
17
|
+
lambdaMemoryInBytes: number | null;
|
|
16
18
|
}) => string[][];
|
package/dist/ffmpeg-args.js
CHANGED
|
@@ -7,7 +7,7 @@ const logger_1 = require("./logger");
|
|
|
7
7
|
const color_space_1 = require("./options/color-space");
|
|
8
8
|
const gop_size_1 = require("./options/gop-size");
|
|
9
9
|
const truthy_1 = require("./truthy");
|
|
10
|
-
const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, hardwareAcceleration, hardwareAccelerated, }) => {
|
|
10
|
+
const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, hardwareAcceleration, hardwareAccelerated, cpuCount, lambdaMemoryInBytes, }) => {
|
|
11
11
|
if (hasPreencoded || codec === 'gif') {
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
@@ -18,6 +18,16 @@ const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat,
|
|
|
18
18
|
// Without explicitly disabling auto-alt-ref,
|
|
19
19
|
// transparent WebM generation doesn't work
|
|
20
20
|
pixelFormat === 'yuva420p' ? ['-auto-alt-ref', '0'] : null,
|
|
21
|
+
// Without row-based multithreading, libvpx only splits VP9 work by
|
|
22
|
+
// tile columns (4 at 1080p), which leaves most cores idle. It is slower
|
|
23
|
+
// with 2 CPUs outside Lambda. On Lambda, it is faster with the default
|
|
24
|
+
// 2048 MB allocation even though only 2 CPUs are reported.
|
|
25
|
+
codec === 'vp9' &&
|
|
26
|
+
(cpuCount > 2 ||
|
|
27
|
+
(lambdaMemoryInBytes !== null &&
|
|
28
|
+
lambdaMemoryInBytes >= 2048 * 1024 * 1024))
|
|
29
|
+
? ['-row-mt', '1']
|
|
30
|
+
: null,
|
|
21
31
|
x264Preset ? ['-preset', x264Preset] : null,
|
|
22
32
|
gopSize === null ? null : ['-g', String(gopSize)],
|
|
23
33
|
// Apply a fixed a timescale across all environments:
|
|
@@ -34,7 +44,7 @@ const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat,
|
|
|
34
44
|
}),
|
|
35
45
|
].filter(truthy_1.truthy);
|
|
36
46
|
};
|
|
37
|
-
const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, colorSpace, hardwareAcceleration, indent, logLevel, }) => {
|
|
47
|
+
const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, gopSize, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, colorSpace, hardwareAcceleration, indent, logLevel, cpuCount, lambdaMemoryInBytes, }) => {
|
|
38
48
|
const encoderSettings = (0, get_codec_name_1.getCodecName)({
|
|
39
49
|
codec,
|
|
40
50
|
encodingMaxRate,
|
|
@@ -103,6 +113,8 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
|
|
|
103
113
|
gopSize,
|
|
104
114
|
hardwareAcceleration,
|
|
105
115
|
hardwareAccelerated,
|
|
116
|
+
cpuCount,
|
|
117
|
+
lambdaMemoryInBytes,
|
|
106
118
|
}),
|
|
107
119
|
].filter(truthy_1.truthy);
|
|
108
120
|
};
|
|
@@ -6,7 +6,10 @@ const getExtensionOfFilename = (filename) => {
|
|
|
6
6
|
if (filename === null) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
// Only the last path segment can have an extension: the dots in
|
|
10
|
+
// `my.project/frames` or `../frames` belong to folders.
|
|
11
|
+
const segments = (0, path_normalize_1.pathNormalize)(filename).split(/[/\\]/);
|
|
12
|
+
const filenameArr = segments[segments.length - 1].split('.');
|
|
10
13
|
const hasExtension = filenameArr.length >= 2;
|
|
11
14
|
const filenameArrLength = filenameArr.length;
|
|
12
15
|
const extension = hasExtension ? filenameArr[filenameArrLength - 1] : null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const canvasTabsOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "disable-canvas-tabs";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
type: boolean;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: boolean;
|
|
12
|
+
source: string;
|
|
13
|
+
};
|
|
14
|
+
setConfig(value: boolean): void;
|
|
15
|
+
getConfigValue: () => boolean | null;
|
|
16
|
+
reset: () => void;
|
|
17
|
+
id: "disable-canvas-tabs";
|
|
18
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canvasTabsOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let canvasTabsEnabled = true;
|
|
6
|
+
let configuredCanvasTabsEnabled = null;
|
|
7
|
+
const cliFlag = 'disable-canvas-tabs';
|
|
8
|
+
exports.canvasTabsOption = {
|
|
9
|
+
name: 'Disable or enable Studio canvas tabs',
|
|
10
|
+
cliFlag,
|
|
11
|
+
description: () => jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Enable or disable the tabs above the Studio canvas." }),
|
|
12
|
+
ssrName: null,
|
|
13
|
+
docLink: 'https://www.remotion.dev/docs/config#setcanvastabsenabled',
|
|
14
|
+
type: false,
|
|
15
|
+
getValue: ({ commandLine }) => {
|
|
16
|
+
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
|
|
17
|
+
canvasTabsEnabled = commandLine[cliFlag] === false;
|
|
18
|
+
return {
|
|
19
|
+
value: canvasTabsEnabled,
|
|
20
|
+
source: 'cli',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
value: canvasTabsEnabled,
|
|
25
|
+
source: 'config',
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
setConfig(value) {
|
|
29
|
+
canvasTabsEnabled = value;
|
|
30
|
+
configuredCanvasTabsEnabled = value;
|
|
31
|
+
},
|
|
32
|
+
getConfigValue: () => configuredCanvasTabsEnabled,
|
|
33
|
+
reset: () => {
|
|
34
|
+
canvasTabsEnabled = true;
|
|
35
|
+
configuredCanvasTabsEnabled = null;
|
|
36
|
+
},
|
|
37
|
+
id: cliFlag,
|
|
38
|
+
};
|
package/dist/options/index.d.ts
CHANGED
|
@@ -1190,6 +1190,24 @@ export declare const allOptions: {
|
|
|
1190
1190
|
reset: () => void;
|
|
1191
1191
|
id: "disable-keyboard-shortcuts";
|
|
1192
1192
|
};
|
|
1193
|
+
canvasTabsOption: {
|
|
1194
|
+
name: string;
|
|
1195
|
+
cliFlag: "disable-canvas-tabs";
|
|
1196
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1197
|
+
ssrName: null;
|
|
1198
|
+
docLink: string;
|
|
1199
|
+
type: boolean;
|
|
1200
|
+
getValue: ({ commandLine }: {
|
|
1201
|
+
commandLine: Record<string, unknown>;
|
|
1202
|
+
}) => {
|
|
1203
|
+
value: boolean;
|
|
1204
|
+
source: string;
|
|
1205
|
+
};
|
|
1206
|
+
setConfig(value: boolean): void;
|
|
1207
|
+
getConfigValue: () => boolean | null;
|
|
1208
|
+
reset: () => void;
|
|
1209
|
+
id: "disable-canvas-tabs";
|
|
1210
|
+
};
|
|
1193
1211
|
framesOption: {
|
|
1194
1212
|
name: string;
|
|
1195
1213
|
cliFlag: "frames";
|
package/dist/options/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const binaries_directory_1 = require("./binaries-directory");
|
|
|
12
12
|
const browser_1 = require("./browser");
|
|
13
13
|
const browser_executable_1 = require("./browser-executable");
|
|
14
14
|
const bundle_cache_1 = require("./bundle-cache");
|
|
15
|
+
const canvas_tabs_1 = require("./canvas-tabs");
|
|
15
16
|
const chrome_mode_1 = require("./chrome-mode");
|
|
16
17
|
const color_space_1 = require("./color-space");
|
|
17
18
|
const concurrency_1 = require("./concurrency");
|
|
@@ -167,6 +168,7 @@ exports.allOptions = {
|
|
|
167
168
|
askAIOption: ask_ai_1.askAIOption,
|
|
168
169
|
interactivityOption: interactivity_1.interactivityOption,
|
|
169
170
|
keyboardShortcutsOption: keyboard_shortcuts_1.keyboardShortcutsOption,
|
|
171
|
+
canvasTabsOption: canvas_tabs_1.canvasTabsOption,
|
|
170
172
|
framesOption: frames_1.framesOption,
|
|
171
173
|
forceNewStudioOption: force_new_studio_1.forceNewStudioOption,
|
|
172
174
|
experimentalKeepAudioContextAliveOption: experimental_keep_audio_context_alive_1.experimentalKeepAudioContextAliveOption,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const sidebarTabsOption: {
|
|
2
|
+
name: string;
|
|
3
|
+
cliFlag: "disable-sidebar-tabs";
|
|
4
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ssrName: null;
|
|
6
|
+
docLink: string;
|
|
7
|
+
type: boolean;
|
|
8
|
+
getValue: ({ commandLine }: {
|
|
9
|
+
commandLine: Record<string, unknown>;
|
|
10
|
+
}) => {
|
|
11
|
+
value: boolean;
|
|
12
|
+
source: string;
|
|
13
|
+
};
|
|
14
|
+
setConfig(value: boolean): void;
|
|
15
|
+
getConfigValue: () => boolean | null;
|
|
16
|
+
reset: () => void;
|
|
17
|
+
id: "disable-sidebar-tabs";
|
|
18
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sidebarTabsOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
let sidebarTabsEnabled = true;
|
|
6
|
+
let configuredSidebarTabsEnabled = null;
|
|
7
|
+
const cliFlag = 'disable-sidebar-tabs';
|
|
8
|
+
exports.sidebarTabsOption = {
|
|
9
|
+
name: 'Disable or enable Studio sidebar tabs',
|
|
10
|
+
cliFlag,
|
|
11
|
+
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Enable or disable the tabs at the top of the Studio sidebars." })),
|
|
12
|
+
ssrName: null,
|
|
13
|
+
docLink: 'https://www.remotion.dev/docs/config#setsidebartabsenabled',
|
|
14
|
+
type: false,
|
|
15
|
+
getValue: ({ commandLine }) => {
|
|
16
|
+
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
|
|
17
|
+
sidebarTabsEnabled = commandLine[cliFlag] === false;
|
|
18
|
+
return {
|
|
19
|
+
value: sidebarTabsEnabled,
|
|
20
|
+
source: 'cli',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
value: sidebarTabsEnabled,
|
|
25
|
+
source: 'config',
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
setConfig(value) {
|
|
29
|
+
sidebarTabsEnabled = value;
|
|
30
|
+
configuredSidebarTabsEnabled = value;
|
|
31
|
+
},
|
|
32
|
+
getConfigValue: () => configuredSidebarTabsEnabled,
|
|
33
|
+
reset: () => {
|
|
34
|
+
sidebarTabsEnabled = true;
|
|
35
|
+
configuredSidebarTabsEnabled = null;
|
|
36
|
+
},
|
|
37
|
+
id: cliFlag,
|
|
38
|
+
};
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -4,8 +4,10 @@ exports.prespawnFfmpeg = void 0;
|
|
|
4
4
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
5
5
|
const codec_1 = require("./codec");
|
|
6
6
|
const ffmpeg_args_1 = require("./ffmpeg-args");
|
|
7
|
+
const get_cpu_count_1 = require("./get-cpu-count");
|
|
7
8
|
const get_prores_profile_name_1 = require("./get-prores-profile-name");
|
|
8
9
|
const logger_1 = require("./logger");
|
|
10
|
+
const from_lambda_env_1 = require("./memory/from-lambda-env");
|
|
9
11
|
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
10
12
|
const pixel_format_1 = require("./pixel-format");
|
|
11
13
|
const probe_encoder_1 = require("./probe-encoder");
|
|
@@ -66,6 +68,8 @@ const prespawnFfmpeg = (options) => {
|
|
|
66
68
|
hardwareAcceleration: resolvedHardwareAcceleration,
|
|
67
69
|
indent: options.indent,
|
|
68
70
|
logLevel: options.logLevel,
|
|
71
|
+
cpuCount: (0, get_cpu_count_1.getCpuCount)(),
|
|
72
|
+
lambdaMemoryInBytes: (0, from_lambda_env_1.getMaxLambdaMemory)(),
|
|
69
73
|
}),
|
|
70
74
|
'-y',
|
|
71
75
|
options.outputLocation,
|
|
@@ -109,7 +109,9 @@ async function puppeteerEvaluateWithCatch({ page, pageFunction, frame, args, })
|
|
|
109
109
|
stackFrame: (0, parse_browser_error_stack_1.parseStack)(((_e = exceptionDetails.exception) === null || _e === void 0 ? void 0 : _e.description).split('\n')),
|
|
110
110
|
chunk: null,
|
|
111
111
|
});
|
|
112
|
-
page
|
|
112
|
+
// The browser may get closed before the page is, which rejects
|
|
113
|
+
// this with "Target closed". Unhandled, that ends the process.
|
|
114
|
+
page.close().catch(() => undefined);
|
|
113
115
|
throw err;
|
|
114
116
|
}
|
|
115
117
|
return { size, value: valueFromRemoteObject(remoteObject) };
|
package/dist/render-media.js
CHANGED
|
@@ -325,13 +325,13 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, gopSize, crf, compo
|
|
|
325
325
|
let timeOfLastFrame = Date.now();
|
|
326
326
|
const renderFramesProc = (0, render_frames_1.internalRenderFrames)({
|
|
327
327
|
composition,
|
|
328
|
-
onFrameUpdate: (frame, frameIndex) => {
|
|
328
|
+
onFrameUpdate: (frame, frameIndex, timeToRenderInMilliseconds) => {
|
|
329
329
|
renderedFrames = frame;
|
|
330
330
|
const now = Date.now();
|
|
331
|
-
const
|
|
331
|
+
const timeSinceLastFrame = now - timeOfLastFrame;
|
|
332
332
|
timeOfLastFrame = now;
|
|
333
333
|
// Track recent frame timings (at most 50)
|
|
334
|
-
recentFrameTimings.push(
|
|
334
|
+
recentFrameTimings.push(timeSinceLastFrame);
|
|
335
335
|
if (recentFrameTimings.length > MAX_RECENT_FRAME_TIMINGS) {
|
|
336
336
|
recentFrameTimings.shift();
|
|
337
337
|
}
|
|
@@ -18,6 +18,7 @@ const delete_directory_1 = require("./delete-directory");
|
|
|
18
18
|
const ffmpeg_args_1 = require("./ffmpeg-args");
|
|
19
19
|
const finalize_fast_start_1 = require("./finalize-fast-start");
|
|
20
20
|
const find_closest_package_json_1 = require("./find-closest-package-json");
|
|
21
|
+
const get_cpu_count_1 = require("./get-cpu-count");
|
|
21
22
|
const get_extension_from_codec_1 = require("./get-extension-from-codec");
|
|
22
23
|
const get_extension_of_filename_1 = require("./get-extension-of-filename");
|
|
23
24
|
const get_fast_start_muxer_1 = require("./get-fast-start-muxer");
|
|
@@ -25,6 +26,7 @@ const get_prores_profile_name_1 = require("./get-prores-profile-name");
|
|
|
25
26
|
const logger_1 = require("./logger");
|
|
26
27
|
const make_cancel_signal_1 = require("./make-cancel-signal");
|
|
27
28
|
const make_metadata_args_1 = require("./make-metadata-args");
|
|
29
|
+
const from_lambda_env_1 = require("./memory/from-lambda-env");
|
|
28
30
|
const audio_codec_1 = require("./options/audio-codec");
|
|
29
31
|
const color_space_1 = require("./options/color-space");
|
|
30
32
|
const gop_size_1 = require("./options/gop-size");
|
|
@@ -241,6 +243,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec:
|
|
|
241
243
|
hardwareAcceleration: resolvedHardwareAcceleration,
|
|
242
244
|
indent,
|
|
243
245
|
logLevel,
|
|
246
|
+
cpuCount: (0, get_cpu_count_1.getCpuCount)(),
|
|
247
|
+
lambdaMemoryInBytes: (0, from_lambda_env_1.getMaxLambdaMemory)(),
|
|
244
248
|
}),
|
|
245
249
|
// Ignore metadata that may come from remote media
|
|
246
250
|
['-map_metadata', '-1'],
|
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.530",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
|
-
"remotion": "4.0.
|
|
26
|
-
"@remotion/streaming": "4.0.
|
|
25
|
+
"remotion": "4.0.530",
|
|
26
|
+
"@remotion/streaming": "4.0.530",
|
|
27
27
|
"source-map": "0.8.0",
|
|
28
28
|
"ws": "8.21.0",
|
|
29
|
-
"@remotion/licensing": "4.0.
|
|
29
|
+
"@remotion/licensing": "4.0.530"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.8.0",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"react-dom": "19.2.3",
|
|
41
41
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
42
42
|
"@types/ws": "8.5.10",
|
|
43
|
-
"@remotion/example-videos": "4.0.
|
|
44
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
43
|
+
"@remotion/example-videos": "4.0.530",
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.530",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@types/node": "20.12.14"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
50
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
55
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
49
|
+
"@remotion/compositor-darwin-arm64": "4.0.530",
|
|
50
|
+
"@remotion/compositor-darwin-x64": "4.0.530",
|
|
51
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.530",
|
|
52
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.530",
|
|
53
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.530",
|
|
54
|
+
"@remotion/compositor-linux-x64-musl": "4.0.530",
|
|
55
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.530"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"remotion",
|