@remotion/renderer 4.0.30 → 4.0.32
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 +16 -1
- package/dist/client.js +4 -0
- package/dist/compositor/compositor.d.ts +5 -2
- package/dist/compositor/compositor.js +2 -16
- package/dist/compositor/payloads.d.ts +1 -1
- package/dist/copy-to-clipboard.js +5 -1
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-silent-parts.js +5 -1
- package/dist/get-video-metadata.js +5 -1
- package/dist/index.d.ts +5 -7
- package/dist/offthread-video-server.js +1 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/delete-after.d.ts +8 -0
- package/dist/options/delete-after.js +14 -0
- package/dist/options/folder-expiry.d.ts +8 -0
- package/dist/options/folder-expiry.js +14 -0
- package/dist/options/render-expiry-days.d.ts +8 -0
- package/dist/options/render-expiry-days.js +14 -0
- package/dist/presets-profile.d.ts +7 -0
- package/dist/presets-profile.js +27 -0
- package/dist/print-useful-error-message.js +10 -2
- package/dist/render-media.js +2 -0
- package/dist/select-composition.d.ts +4 -0
- package/dist/select-composition.js +3 -4
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const BrowserSafeApis: {
|
|
3
2
|
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
4
3
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
@@ -283,6 +282,22 @@ export declare const BrowserSafeApis: {
|
|
|
283
282
|
ssrName: string;
|
|
284
283
|
type: "default" | "bt709";
|
|
285
284
|
};
|
|
285
|
+
deleteAfterOption: {
|
|
286
|
+
name: string;
|
|
287
|
+
cliFlag: "delete-after";
|
|
288
|
+
description: () => JSX.Element;
|
|
289
|
+
ssrName: "deleteAfter";
|
|
290
|
+
docLink: string;
|
|
291
|
+
type: string | null;
|
|
292
|
+
};
|
|
293
|
+
folderExpiryOption: {
|
|
294
|
+
name: string;
|
|
295
|
+
cliFlag: "enable-folder-expiry";
|
|
296
|
+
description: () => JSX.Element;
|
|
297
|
+
ssrName: "enableFolderExpiry";
|
|
298
|
+
docLink: string;
|
|
299
|
+
type: boolean | null;
|
|
300
|
+
};
|
|
286
301
|
};
|
|
287
302
|
validColorSpaces: readonly ["default", "bt709"];
|
|
288
303
|
optionsMap: {
|
package/dist/client.js
CHANGED
|
@@ -11,7 +11,9 @@ const is_audio_codec_1 = require("./is-audio-codec");
|
|
|
11
11
|
const audio_bitrate_1 = require("./options/audio-bitrate");
|
|
12
12
|
const color_space_1 = require("./options/color-space");
|
|
13
13
|
const crf_2 = require("./options/crf");
|
|
14
|
+
const delete_after_1 = require("./options/delete-after");
|
|
14
15
|
const enforce_audio_1 = require("./options/enforce-audio");
|
|
16
|
+
const folder_expiry_1 = require("./options/folder-expiry");
|
|
15
17
|
const jpeg_quality_1 = require("./options/jpeg-quality");
|
|
16
18
|
const mute_1 = require("./options/mute");
|
|
17
19
|
const offthreadvideo_cache_size_1 = require("./options/offthreadvideo-cache-size");
|
|
@@ -52,6 +54,8 @@ exports.BrowserSafeApis = {
|
|
|
52
54
|
offthreadVideoCacheSizeInBytesOption: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
53
55
|
webhookCustomDataOption: webhook_custom_data_1.webhookCustomDataOption,
|
|
54
56
|
colorSpaceOption: color_space_1.colorSpaceOption,
|
|
57
|
+
deleteAfterOption: delete_after_1.deleteAfterOption,
|
|
58
|
+
folderExpiryOption: folder_expiry_1.folderExpiryOption,
|
|
55
59
|
},
|
|
56
60
|
validColorSpaces: color_space_1.validColorSpaces,
|
|
57
61
|
optionsMap: options_map_1.optionsMap,
|
|
@@ -7,6 +7,9 @@ export type Compositor = {
|
|
|
7
7
|
waitForDone: () => Promise<void>;
|
|
8
8
|
pid: number | null;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
10
|
+
export declare const startLongRunningCompositor: ({ maximumFrameCacheItemsInBytes, logLevel, indent, }: {
|
|
11
|
+
maximumFrameCacheItemsInBytes: number | null;
|
|
12
|
+
logLevel: LogLevel;
|
|
13
|
+
indent: boolean;
|
|
14
|
+
}) => Compositor;
|
|
12
15
|
export declare const startCompositor: <T extends keyof CompositorCommand>(type: T, payload: CompositorCommand[T], logLevel: LogLevel, indent: boolean) => Compositor;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.startCompositor = exports.startLongRunningCompositor =
|
|
3
|
+
exports.startCompositor = exports.startLongRunningCompositor = void 0;
|
|
7
4
|
const node_child_process_1 = require("node:child_process");
|
|
8
5
|
const node_fs_1 = require("node:fs");
|
|
9
|
-
const node_os_1 = __importDefault(require("node:os"));
|
|
10
6
|
const call_ffmpeg_1 = require("../call-ffmpeg");
|
|
11
7
|
const get_concurrency_1 = require("../get-concurrency");
|
|
12
8
|
const log_level_1 = require("../log-level");
|
|
@@ -14,17 +10,7 @@ const logger_1 = require("../logger");
|
|
|
14
10
|
const compose_1 = require("./compose");
|
|
15
11
|
const get_executable_path_1 = require("./get-executable-path");
|
|
16
12
|
const make_nonce_1 = require("./make-nonce");
|
|
17
|
-
const
|
|
18
|
-
const freeMemory = node_os_1.default.freemem();
|
|
19
|
-
// Assuming only half the available memory should be used
|
|
20
|
-
const max = freeMemory / 2;
|
|
21
|
-
// Never store more than 2000 MB
|
|
22
|
-
// But 240MB is needed even if it's going to swap
|
|
23
|
-
return Math.max(mbToBytes(240), Math.min(max, mbToBytes(2000)));
|
|
24
|
-
};
|
|
25
|
-
exports.getIdealMaximumFrameCacheSizeInBytes = getIdealMaximumFrameCacheSizeInBytes;
|
|
26
|
-
const mbToBytes = (mb) => mb * 1024 * 1024;
|
|
27
|
-
const startLongRunningCompositor = (maximumFrameCacheItemsInBytes, logLevel, indent) => {
|
|
13
|
+
const startLongRunningCompositor = ({ maximumFrameCacheItemsInBytes, logLevel, indent, }) => {
|
|
28
14
|
return (0, exports.startCompositor)('StartLongRunningProcess', {
|
|
29
15
|
concurrency: (0, get_concurrency_1.getActualConcurrency)(null),
|
|
30
16
|
maximum_frame_cache_size_in_bytes: maximumFrameCacheItemsInBytes,
|
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.copyImageToClipboard = void 0;
|
|
4
4
|
const compositor_1 = require("./compositor/compositor");
|
|
5
5
|
const copyImageToClipboard = async (src, logLevel) => {
|
|
6
|
-
const compositor = (0, compositor_1.startLongRunningCompositor)(
|
|
6
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
7
|
+
maximumFrameCacheItemsInBytes: null,
|
|
8
|
+
logLevel,
|
|
9
|
+
indent: false,
|
|
10
|
+
});
|
|
7
11
|
await compositor.executeCommand('CopyImageToClipboard', {
|
|
8
12
|
src,
|
|
9
13
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/get-silent-parts.js
CHANGED
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSilentParts = void 0;
|
|
4
4
|
const compositor_1 = require("./compositor/compositor");
|
|
5
5
|
const getSilentParts = async ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }) => {
|
|
6
|
-
const compositor = (0, compositor_1.startLongRunningCompositor)(
|
|
6
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
7
|
+
maximumFrameCacheItemsInBytes: null,
|
|
8
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
9
|
+
indent: false,
|
|
10
|
+
});
|
|
7
11
|
const minDurationInSeconds = passedMinDuration !== null && passedMinDuration !== void 0 ? passedMinDuration : 1;
|
|
8
12
|
if (typeof minDurationInSeconds !== 'number') {
|
|
9
13
|
throw new Error(`minDurationInSeconds must be a number, but was ${minDurationInSeconds}`);
|
|
@@ -4,7 +4,11 @@ exports.getVideoMetadata = void 0;
|
|
|
4
4
|
const compositor_1 = require("./compositor/compositor");
|
|
5
5
|
const getVideoMetadata = async (videoSource, options) => {
|
|
6
6
|
var _a;
|
|
7
|
-
const compositor = (0, compositor_1.startLongRunningCompositor)(
|
|
7
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
8
|
+
maximumFrameCacheItemsInBytes: null,
|
|
9
|
+
logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
10
|
+
indent: false,
|
|
11
|
+
});
|
|
8
12
|
const metadataResponse = await compositor.executeCommand('GetVideoMetadata', {
|
|
9
13
|
src: videoSource,
|
|
10
14
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import execa from 'execa';
|
|
4
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
5
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -123,8 +121,8 @@ export declare const RenderInternals: {
|
|
|
123
121
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
124
122
|
DEFAULT_BROWSER: "chrome";
|
|
125
123
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
126
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
127
|
-
validateOpenGlRenderer: (option: "
|
|
124
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
125
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
128
126
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
129
127
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
130
128
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -312,8 +310,8 @@ export declare const RenderInternals: {
|
|
|
312
310
|
};
|
|
313
311
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
314
312
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
315
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
316
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
313
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
314
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
317
315
|
DEFAULT_JPEG_QUALITY: number;
|
|
318
316
|
chalk: {
|
|
319
317
|
enabled: () => boolean;
|
|
@@ -426,7 +424,7 @@ export declare const RenderInternals: {
|
|
|
426
424
|
frame: number;
|
|
427
425
|
serializedInputPropsWithCustomSchema: string;
|
|
428
426
|
serializedResolvedPropsWithCustomSchema: string;
|
|
429
|
-
imageFormat: "
|
|
427
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
430
428
|
jpegQuality: number;
|
|
431
429
|
puppeteerInstance: HeadlessBrowser | null;
|
|
432
430
|
envVariables: Record<string, string>;
|
|
@@ -35,7 +35,7 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
35
35
|
(0, offthreadvideo_cache_size_1.validateOffthreadVideoCacheSizeInBytes)(offthreadVideoCacheSizeInBytes);
|
|
36
36
|
const compositor = (0, compositor_1.startCompositor)('StartLongRunningProcess', {
|
|
37
37
|
concurrency,
|
|
38
|
-
maximum_frame_cache_size_in_bytes: offthreadVideoCacheSizeInBytes
|
|
38
|
+
maximum_frame_cache_size_in_bytes: offthreadVideoCacheSizeInBytes,
|
|
39
39
|
verbose: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
|
|
40
40
|
}, logLevel, indent);
|
|
41
41
|
return {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteAfterOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.deleteAfterOption = {
|
|
6
|
+
name: 'Lambda render expiration',
|
|
7
|
+
cliFlag: 'delete-after',
|
|
8
|
+
description: () => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
|
|
10
|
+
},
|
|
11
|
+
ssrName: 'deleteAfter',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/lambda/autodelete',
|
|
13
|
+
type: '',
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.folderExpiryOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.folderExpiryOption = {
|
|
6
|
+
name: 'Lambda render expiration',
|
|
7
|
+
cliFlag: 'enable-folder-expiry',
|
|
8
|
+
description: () => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["When deploying sites, enable or disable S3 Lifecycle policies which allow for renders to auto-delete after a certain time. Default is", ' ', (0, jsx_runtime_1.jsx)("code", { children: "null" }), ", which does not change any lifecycle policies of the S3 bucket. See: ", (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "Lambda autodelete" }), "."] }));
|
|
10
|
+
},
|
|
11
|
+
ssrName: 'enableFolderExpiry',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/lambda/autodelete',
|
|
13
|
+
type: false,
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteAfterOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.deleteAfterOption = {
|
|
6
|
+
name: 'Render expiry days',
|
|
7
|
+
cliFlag: 'delete-after',
|
|
8
|
+
description: () => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
|
|
10
|
+
},
|
|
11
|
+
ssrName: 'deleteAfter',
|
|
12
|
+
docLink: 'https://www.remotion.dev/docs/autodelete',
|
|
13
|
+
type: 0,
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Codec } from './codec';
|
|
2
|
+
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
+
export type x264Preset = typeof x264PresetOptions[number];
|
|
4
|
+
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
+
codec: Codec;
|
|
6
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
7
|
+
}) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
+
exports.x264PresetOptions = [
|
|
5
|
+
'ultrafast',
|
|
6
|
+
'superfast',
|
|
7
|
+
'veryfast',
|
|
8
|
+
'faster',
|
|
9
|
+
'fast',
|
|
10
|
+
'medium',
|
|
11
|
+
'slow',
|
|
12
|
+
'slower',
|
|
13
|
+
'veryslow',
|
|
14
|
+
'placebo',
|
|
15
|
+
];
|
|
16
|
+
const validateSelectedCodecAndPresetCombination = ({ codec, x264Preset, }) => {
|
|
17
|
+
if (typeof x264Preset !== 'undefined' && codec !== 'h264') {
|
|
18
|
+
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
+
}
|
|
20
|
+
if (x264Preset !== undefined &&
|
|
21
|
+
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
22
|
+
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
23
|
+
.map((p) => `"${p}"`)
|
|
24
|
+
.join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|
|
@@ -5,7 +5,7 @@ const truthy_1 = require("./truthy");
|
|
|
5
5
|
const alreadyPrinted = [];
|
|
6
6
|
// Don't use Log.info() here, as BrowserSafeApis need tto be
|
|
7
7
|
const printUsefulErrorMessage = (err) => {
|
|
8
|
-
var _a;
|
|
8
|
+
var _a, _b;
|
|
9
9
|
if (alreadyPrinted.includes(err)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -27,6 +27,14 @@ const printUsefulErrorMessage = (err) => {
|
|
|
27
27
|
console.log();
|
|
28
28
|
console.log('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
|
|
29
29
|
}
|
|
30
|
+
if (err.message.includes('Member must have value less than or equal to 3008')) {
|
|
31
|
+
console.log();
|
|
32
|
+
console.log('💡 This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card.');
|
|
33
|
+
}
|
|
34
|
+
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.')) {
|
|
35
|
+
console.log();
|
|
36
|
+
console.log('💡 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit');
|
|
37
|
+
}
|
|
30
38
|
if (err.message.includes('Error creating WebGL context')) {
|
|
31
39
|
console.log();
|
|
32
40
|
console.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
@@ -37,7 +45,7 @@ const printUsefulErrorMessage = (err) => {
|
|
|
37
45
|
console.log('💡 Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl');
|
|
38
46
|
}
|
|
39
47
|
if (err.message.includes('Minified React error #306')) {
|
|
40
|
-
const componentName = (
|
|
48
|
+
const componentName = (_b = err.message.match(/<\w+>/)) === null || _b === void 0 ? void 0 : _b[0];
|
|
41
49
|
console.log([
|
|
42
50
|
'💡 This error indicates that the component',
|
|
43
51
|
componentName ? `(${componentName})` : null,
|
package/dist/render-media.js
CHANGED
|
@@ -316,6 +316,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
316
316
|
.then(([{ assetsInfo }]) => {
|
|
317
317
|
renderedDoneIn = Date.now() - renderStart;
|
|
318
318
|
callUpdate();
|
|
319
|
+
logger_1.Log.verboseAdvanced({ indent, logLevel }, 'Rendering frames done in', renderedDoneIn + 'ms');
|
|
319
320
|
if (absoluteOutputLocation) {
|
|
320
321
|
(0, ensure_output_directory_1.ensureOutputDirectory)(absoluteOutputLocation);
|
|
321
322
|
}
|
|
@@ -367,6 +368,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
367
368
|
encodedFrames = (0, get_duration_from_frame_range_1.getFramesToRender)(realFrameRange, everyNthFrame).length;
|
|
368
369
|
encodedDoneIn = Date.now() - stitchStart;
|
|
369
370
|
callUpdate();
|
|
371
|
+
logger_1.Log.verboseAdvanced({ indent, logLevel }, 'Stitching done in', encodedDoneIn + 'ms');
|
|
370
372
|
slowestFrames.sort((a, b) => b.time - a.time);
|
|
371
373
|
const result = {
|
|
372
374
|
buffer,
|
|
@@ -31,7 +31,11 @@ export type SelectCompositionOptions = {
|
|
|
31
31
|
timeoutInMilliseconds?: number;
|
|
32
32
|
chromiumOptions?: ChromiumOptions;
|
|
33
33
|
port?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use `logLevel` instead.
|
|
36
|
+
*/
|
|
34
37
|
verbose?: boolean;
|
|
38
|
+
logLevel?: LogLevel;
|
|
35
39
|
offthreadVideoCacheSizeInBytes?: number | null;
|
|
36
40
|
serveUrl: string;
|
|
37
41
|
id: string;
|
|
@@ -156,8 +156,7 @@ exports.internalSelectComposition = (0, wrap_with_error_handling_1.wrapWithError
|
|
|
156
156
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
|
|
157
157
|
*/
|
|
158
158
|
const selectComposition = async (options) => {
|
|
159
|
-
|
|
160
|
-
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, } = options;
|
|
159
|
+
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel, offthreadVideoCacheSizeInBytes, } = options;
|
|
161
160
|
const data = await (0, exports.internalSelectComposition)({
|
|
162
161
|
id,
|
|
163
162
|
serveUrl,
|
|
@@ -173,10 +172,10 @@ const selectComposition = async (options) => {
|
|
|
173
172
|
port: port !== null && port !== void 0 ? port : null,
|
|
174
173
|
puppeteerInstance,
|
|
175
174
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
|
|
176
|
-
logLevel: verbose ? 'verbose' : 'info',
|
|
175
|
+
logLevel: (logLevel !== null && logLevel !== void 0 ? logLevel : verbose) ? 'verbose' : 'info',
|
|
177
176
|
indent: false,
|
|
178
177
|
server: undefined,
|
|
179
|
-
offthreadVideoCacheSizeInBytes:
|
|
178
|
+
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
180
179
|
});
|
|
181
180
|
return data.metadata;
|
|
182
181
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.32",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.32"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
44
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.32",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.32",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.32",
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.32",
|
|
47
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.32",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.32",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.32"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|