@remotion/renderer 4.0.29 → 4.0.31
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/call-ffmpeg.js +1 -1
- package/dist/client.d.ts +23 -23
- 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 +24 -24
- package/dist/offthread-video-server.js +1 -1
- package/dist/options/color-space.d.ts +1 -1
- 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/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/dist/call-ffmpeg.js
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const BrowserSafeApis: {
|
|
3
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
3
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
4
4
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
6
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
9
9
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
10
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
11
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
@@ -79,10 +79,10 @@ export declare const BrowserSafeApis: {
|
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
prores: {
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
forAudioCodec: {
|
|
85
|
-
|
|
85
|
+
aac: {
|
|
86
86
|
possible: import("./file-extensions").FileExtension[];
|
|
87
87
|
default: import("./file-extensions").FileExtension;
|
|
88
88
|
};
|
|
@@ -92,10 +92,10 @@ export declare const BrowserSafeApis: {
|
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
-
|
|
95
|
+
mp3: {
|
|
96
96
|
default: import("./file-extensions").FileExtension;
|
|
97
97
|
forAudioCodec: {
|
|
98
|
-
|
|
98
|
+
mp3: {
|
|
99
99
|
possible: import("./file-extensions").FileExtension[];
|
|
100
100
|
default: import("./file-extensions").FileExtension;
|
|
101
101
|
};
|
|
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
aac: {
|
|
109
109
|
default: import("./file-extensions").FileExtension;
|
|
110
110
|
forAudioCodec: {
|
|
111
|
+
aac: {
|
|
112
|
+
possible: import("./file-extensions").FileExtension[];
|
|
113
|
+
default: import("./file-extensions").FileExtension;
|
|
114
|
+
};
|
|
111
115
|
"pcm-16": {
|
|
112
116
|
possible: import("./file-extensions").FileExtension[];
|
|
113
117
|
default: import("./file-extensions").FileExtension;
|
|
114
118
|
};
|
|
115
119
|
};
|
|
116
120
|
};
|
|
117
|
-
|
|
121
|
+
wav: {
|
|
118
122
|
default: import("./file-extensions").FileExtension;
|
|
119
123
|
forAudioCodec: {
|
|
120
|
-
aac: {
|
|
121
|
-
possible: import("./file-extensions").FileExtension[];
|
|
122
|
-
default: import("./file-extensions").FileExtension;
|
|
123
|
-
};
|
|
124
124
|
"pcm-16": {
|
|
125
125
|
possible: import("./file-extensions").FileExtension[];
|
|
126
126
|
default: import("./file-extensions").FileExtension;
|
|
@@ -162,6 +162,10 @@ export declare const BrowserSafeApis: {
|
|
|
162
162
|
compressed: "pcm-16" | "opus" | null;
|
|
163
163
|
lossless: "pcm-16" | "opus" | null;
|
|
164
164
|
};
|
|
165
|
+
prores: {
|
|
166
|
+
compressed: "aac" | "pcm-16" | null;
|
|
167
|
+
lossless: "aac" | "pcm-16" | null;
|
|
168
|
+
};
|
|
165
169
|
mp3: {
|
|
166
170
|
compressed: "mp3" | "pcm-16" | null;
|
|
167
171
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -174,10 +178,6 @@ export declare const BrowserSafeApis: {
|
|
|
174
178
|
compressed: "pcm-16" | null;
|
|
175
179
|
lossless: "pcm-16" | null;
|
|
176
180
|
};
|
|
177
|
-
prores: {
|
|
178
|
-
compressed: "aac" | "pcm-16" | null;
|
|
179
|
-
lossless: "aac" | "pcm-16" | null;
|
|
180
|
-
};
|
|
181
181
|
"h264-mkv": {
|
|
182
182
|
compressed: "mp3" | "pcm-16" | null;
|
|
183
183
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -187,8 +187,8 @@ export declare const BrowserSafeApis: {
|
|
|
187
187
|
lossless: null;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
191
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
190
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">;
|
|
191
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
192
192
|
codec: T_1;
|
|
193
193
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
194
194
|
extension: string;
|
|
@@ -281,7 +281,7 @@ export declare const BrowserSafeApis: {
|
|
|
281
281
|
description: () => JSX.Element;
|
|
282
282
|
docLink: string;
|
|
283
283
|
ssrName: string;
|
|
284
|
-
type: "
|
|
284
|
+
type: "bt709" | "default";
|
|
285
285
|
};
|
|
286
286
|
};
|
|
287
287
|
validColorSpaces: readonly ["default", "bt709"];
|
|
@@ -367,6 +367,6 @@ export declare const BrowserSafeApis: {
|
|
|
367
367
|
type: number | null;
|
|
368
368
|
}];
|
|
369
369
|
};
|
|
370
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
371
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
370
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
371
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
372
372
|
};
|
|
@@ -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
|
@@ -60,9 +60,9 @@ export declare const RenderInternals: {
|
|
|
60
60
|
width: number;
|
|
61
61
|
height: number;
|
|
62
62
|
scale: number;
|
|
63
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
63
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
|
|
64
64
|
}) => void;
|
|
65
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
65
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
66
66
|
tmpDir: (str: string) => string;
|
|
67
67
|
deleteDirectory: (directory: string) => void;
|
|
68
68
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -112,7 +112,7 @@ export declare const RenderInternals: {
|
|
|
112
112
|
};
|
|
113
113
|
registerErrorSymbolicationLock: () => number;
|
|
114
114
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
115
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
115
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
116
116
|
mimeContentType: typeof mimeContentType;
|
|
117
117
|
mimeLookup: typeof mimeLookup;
|
|
118
118
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -123,14 +123,14 @@ export declare const RenderInternals: {
|
|
|
123
123
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
124
124
|
DEFAULT_BROWSER: "chrome";
|
|
125
125
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
126
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
127
|
-
validateOpenGlRenderer: (option: "
|
|
126
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
127
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
128
128
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
129
129
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
130
130
|
validateJpegQuality: (q: number | undefined) => void;
|
|
131
131
|
DEFAULT_TIMEOUT: number;
|
|
132
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
133
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
132
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
|
|
133
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
134
134
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
135
135
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
136
136
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -147,7 +147,7 @@ export declare const RenderInternals: {
|
|
|
147
147
|
output: string;
|
|
148
148
|
onProgress: (p: number) => void;
|
|
149
149
|
numberOfFrames: number;
|
|
150
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
150
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
|
|
151
151
|
fps: number;
|
|
152
152
|
numberOfGifLoops: number | null;
|
|
153
153
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
@@ -155,7 +155,7 @@ export declare const RenderInternals: {
|
|
|
155
155
|
getMinConcurrency: () => number;
|
|
156
156
|
getMaxConcurrency: () => any;
|
|
157
157
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
158
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
158
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif";
|
|
159
159
|
preferLossless: boolean;
|
|
160
160
|
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
161
161
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
@@ -216,10 +216,10 @@ export declare const RenderInternals: {
|
|
|
216
216
|
};
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
|
-
|
|
219
|
+
prores: {
|
|
220
220
|
default: import("./file-extensions").FileExtension;
|
|
221
221
|
forAudioCodec: {
|
|
222
|
-
|
|
222
|
+
aac: {
|
|
223
223
|
possible: import("./file-extensions").FileExtension[];
|
|
224
224
|
default: import("./file-extensions").FileExtension;
|
|
225
225
|
};
|
|
@@ -229,10 +229,10 @@ export declare const RenderInternals: {
|
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
231
|
};
|
|
232
|
-
|
|
232
|
+
mp3: {
|
|
233
233
|
default: import("./file-extensions").FileExtension;
|
|
234
234
|
forAudioCodec: {
|
|
235
|
-
|
|
235
|
+
mp3: {
|
|
236
236
|
possible: import("./file-extensions").FileExtension[];
|
|
237
237
|
default: import("./file-extensions").FileExtension;
|
|
238
238
|
};
|
|
@@ -242,22 +242,22 @@ export declare const RenderInternals: {
|
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
aac: {
|
|
246
246
|
default: import("./file-extensions").FileExtension;
|
|
247
247
|
forAudioCodec: {
|
|
248
|
+
aac: {
|
|
249
|
+
possible: import("./file-extensions").FileExtension[];
|
|
250
|
+
default: import("./file-extensions").FileExtension;
|
|
251
|
+
};
|
|
248
252
|
"pcm-16": {
|
|
249
253
|
possible: import("./file-extensions").FileExtension[];
|
|
250
254
|
default: import("./file-extensions").FileExtension;
|
|
251
255
|
};
|
|
252
256
|
};
|
|
253
257
|
};
|
|
254
|
-
|
|
258
|
+
wav: {
|
|
255
259
|
default: import("./file-extensions").FileExtension;
|
|
256
260
|
forAudioCodec: {
|
|
257
|
-
aac: {
|
|
258
|
-
possible: import("./file-extensions").FileExtension[];
|
|
259
|
-
default: import("./file-extensions").FileExtension;
|
|
260
|
-
};
|
|
261
261
|
"pcm-16": {
|
|
262
262
|
possible: import("./file-extensions").FileExtension[];
|
|
263
263
|
default: import("./file-extensions").FileExtension;
|
|
@@ -294,8 +294,8 @@ export declare const RenderInternals: {
|
|
|
294
294
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
295
295
|
readonly wav: readonly ["pcm-16"];
|
|
296
296
|
};
|
|
297
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
298
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
297
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif")[]>;
|
|
298
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "mp3" | "aac" | "wav" | "h264-mkv" | "gif">;
|
|
299
299
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
300
300
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
301
301
|
dynamicLibraryPathOptions: () => {
|
|
@@ -312,8 +312,8 @@ export declare const RenderInternals: {
|
|
|
312
312
|
};
|
|
313
313
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
314
314
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
315
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
316
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
315
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
316
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
|
|
317
317
|
DEFAULT_JPEG_QUALITY: number;
|
|
318
318
|
chalk: {
|
|
319
319
|
enabled: () => boolean;
|
|
@@ -426,7 +426,7 @@ export declare const RenderInternals: {
|
|
|
426
426
|
frame: number;
|
|
427
427
|
serializedInputPropsWithCustomSchema: string;
|
|
428
428
|
serializedResolvedPropsWithCustomSchema: string;
|
|
429
|
-
imageFormat: "
|
|
429
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
430
430
|
jpegQuality: number;
|
|
431
431
|
puppeteerInstance: HeadlessBrowser | null;
|
|
432
432
|
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,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,
|
|
@@ -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.31",
|
|
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.31"
|
|
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-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-linux-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.31",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.31",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.31",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.31",
|
|
47
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.31",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.31",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.31"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|