@remotion/renderer 4.0.72 → 4.0.74
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 +38 -38
- package/dist/create-ffmpeg-complex-filter.d.ts +1 -4
- package/dist/ffmpeg-args.js +1 -1
- package/dist/get-compositions.js +2 -0
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +36 -32
- package/dist/open-browser.js +4 -2
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/index.d.ts +2 -2
- package/dist/print-useful-error-message.js +32 -24
- package/dist/provide-screenshot.d.ts +3 -1
- package/dist/provide-screenshot.js +2 -1
- package/dist/puppeteer-evaluate.d.ts +2 -1
- package/dist/puppeteer-evaluate.js +3 -2
- package/dist/puppeteer-screenshot.d.ts +1 -0
- package/dist/render-frames.js +2 -0
- package/dist/render-media.js +1 -0
- package/dist/render-still.js +2 -0
- package/dist/screenshot-dom-element.d.ts +3 -1
- package/dist/screenshot-dom-element.js +3 -1
- package/dist/screenshot-task.d.ts +1 -0
- package/dist/seek-to-frame.js +3 -0
- package/dist/select-composition.js +2 -0
- package/dist/set-props-and-env.js +4 -0
- package/dist/stitch-frames-to-video.js +3 -0
- package/dist/take-frame-and-compose.d.ts +3 -1
- package/dist/take-frame-and-compose.js +4 -1
- package/dist/test-gpu.d.ts +2 -1
- package/dist/test-gpu.js +2 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
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" | "mp3" | "aac" | "wav" | "prores" | "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" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | 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"];
|
|
@@ -26,11 +26,11 @@ export declare const BrowserSafeApis: {
|
|
|
26
26
|
h264: {
|
|
27
27
|
default: import("./file-extensions").FileExtension;
|
|
28
28
|
forAudioCodec: {
|
|
29
|
-
|
|
29
|
+
mp3: {
|
|
30
30
|
possible: import("./file-extensions").FileExtension[];
|
|
31
31
|
default: import("./file-extensions").FileExtension;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
aac: {
|
|
34
34
|
possible: import("./file-extensions").FileExtension[];
|
|
35
35
|
default: import("./file-extensions").FileExtension;
|
|
36
36
|
};
|
|
@@ -56,11 +56,11 @@ export declare const BrowserSafeApis: {
|
|
|
56
56
|
vp8: {
|
|
57
57
|
default: import("./file-extensions").FileExtension;
|
|
58
58
|
forAudioCodec: {
|
|
59
|
-
|
|
59
|
+
"pcm-16": {
|
|
60
60
|
possible: import("./file-extensions").FileExtension[];
|
|
61
61
|
default: import("./file-extensions").FileExtension;
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
opus: {
|
|
64
64
|
possible: import("./file-extensions").FileExtension[];
|
|
65
65
|
default: import("./file-extensions").FileExtension;
|
|
66
66
|
};
|
|
@@ -69,20 +69,20 @@ export declare const BrowserSafeApis: {
|
|
|
69
69
|
vp9: {
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
forAudioCodec: {
|
|
72
|
-
|
|
72
|
+
"pcm-16": {
|
|
73
73
|
possible: import("./file-extensions").FileExtension[];
|
|
74
74
|
default: import("./file-extensions").FileExtension;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
opus: {
|
|
77
77
|
possible: import("./file-extensions").FileExtension[];
|
|
78
78
|
default: import("./file-extensions").FileExtension;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
mp3: {
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
forAudioCodec: {
|
|
85
|
-
|
|
85
|
+
mp3: {
|
|
86
86
|
possible: import("./file-extensions").FileExtension[];
|
|
87
87
|
default: import("./file-extensions").FileExtension;
|
|
88
88
|
};
|
|
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
wav: {
|
|
109
109
|
default: import("./file-extensions").FileExtension;
|
|
110
110
|
forAudioCodec: {
|
|
111
|
-
mp3: {
|
|
112
|
-
possible: import("./file-extensions").FileExtension[];
|
|
113
|
-
default: import("./file-extensions").FileExtension;
|
|
114
|
-
};
|
|
115
111
|
"pcm-16": {
|
|
116
112
|
possible: import("./file-extensions").FileExtension[];
|
|
117
113
|
default: import("./file-extensions").FileExtension;
|
|
118
114
|
};
|
|
119
115
|
};
|
|
120
116
|
};
|
|
121
|
-
|
|
117
|
+
prores: {
|
|
122
118
|
default: import("./file-extensions").FileExtension;
|
|
123
119
|
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;
|
|
@@ -147,37 +147,37 @@ export declare const BrowserSafeApis: {
|
|
|
147
147
|
};
|
|
148
148
|
defaultAudioCodecs: {
|
|
149
149
|
h264: {
|
|
150
|
-
compressed: "
|
|
151
|
-
lossless: "
|
|
150
|
+
compressed: "mp3" | "aac" | "pcm-16" | null;
|
|
151
|
+
lossless: "mp3" | "aac" | "pcm-16" | null;
|
|
152
152
|
};
|
|
153
153
|
h265: {
|
|
154
154
|
compressed: "aac" | "pcm-16" | null;
|
|
155
155
|
lossless: "aac" | "pcm-16" | null;
|
|
156
156
|
};
|
|
157
157
|
vp8: {
|
|
158
|
-
compressed: "
|
|
159
|
-
lossless: "
|
|
158
|
+
compressed: "pcm-16" | "opus" | null;
|
|
159
|
+
lossless: "pcm-16" | "opus" | null;
|
|
160
160
|
};
|
|
161
161
|
vp9: {
|
|
162
|
-
compressed: "
|
|
163
|
-
lossless: "
|
|
162
|
+
compressed: "pcm-16" | "opus" | null;
|
|
163
|
+
lossless: "pcm-16" | "opus" | null;
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
compressed: "
|
|
167
|
-
lossless: "
|
|
165
|
+
mp3: {
|
|
166
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
167
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
168
168
|
};
|
|
169
169
|
aac: {
|
|
170
170
|
compressed: "aac" | "pcm-16" | null;
|
|
171
171
|
lossless: "aac" | "pcm-16" | null;
|
|
172
172
|
};
|
|
173
|
-
mp3: {
|
|
174
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
175
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
176
|
-
};
|
|
177
173
|
wav: {
|
|
178
174
|
compressed: "pcm-16" | null;
|
|
179
175
|
lossless: "pcm-16" | null;
|
|
180
176
|
};
|
|
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,10 +187,10 @@ 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" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
191
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
192
192
|
codec: T_1;
|
|
193
|
-
audioCodec: "
|
|
193
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
194
194
|
extension: string;
|
|
195
195
|
preferLossless: boolean;
|
|
196
196
|
}) => void;
|
|
@@ -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: "default" | "bt709";
|
|
285
285
|
};
|
|
286
286
|
deleteAfterOption: {
|
|
287
287
|
name: string;
|
|
@@ -311,7 +311,7 @@ export declare const BrowserSafeApis: {
|
|
|
311
311
|
cliFlag: string;
|
|
312
312
|
docLink: string;
|
|
313
313
|
name: string;
|
|
314
|
-
type: "
|
|
314
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
315
315
|
ssrName: string;
|
|
316
316
|
description: () => JSX.Element;
|
|
317
317
|
};
|
|
@@ -407,6 +407,6 @@ export declare const BrowserSafeApis: {
|
|
|
407
407
|
type: number | null;
|
|
408
408
|
}];
|
|
409
409
|
};
|
|
410
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
411
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
410
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
411
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
412
412
|
};
|
|
@@ -4,9 +4,6 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
|
|
|
4
4
|
filters: PreprocessedAudioTrack[];
|
|
5
5
|
downloadMap: DownloadMap;
|
|
6
6
|
}) => Promise<{
|
|
7
|
-
complexFilterFlag: [
|
|
8
|
-
string,
|
|
9
|
-
string
|
|
10
|
-
] | null;
|
|
7
|
+
complexFilterFlag: [string, string] | null;
|
|
11
8
|
cleanup: () => void;
|
|
12
9
|
}>;
|
package/dist/ffmpeg-args.js
CHANGED
|
@@ -5,7 +5,7 @@ const crf_1 = require("./crf");
|
|
|
5
5
|
const get_codec_name_1 = require("./get-codec-name");
|
|
6
6
|
const truthy_1 = require("./truthy");
|
|
7
7
|
const firstEncodingStepOnly = ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, codec, crf, videoBitrate, }) => {
|
|
8
|
-
if (hasPreencoded) {
|
|
8
|
+
if (hasPreencoded || codec === 'gif') {
|
|
9
9
|
return [];
|
|
10
10
|
}
|
|
11
11
|
return [
|
package/dist/get-compositions.js
CHANGED
|
@@ -47,6 +47,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
47
47
|
},
|
|
48
48
|
frame: null,
|
|
49
49
|
args: [],
|
|
50
|
+
timeoutInMilliseconds,
|
|
50
51
|
});
|
|
51
52
|
await (0, seek_to_frame_1.waitForReady)({
|
|
52
53
|
page,
|
|
@@ -62,6 +63,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
|
|
|
62
63
|
frame: null,
|
|
63
64
|
page,
|
|
64
65
|
args: [],
|
|
66
|
+
timeoutInMilliseconds,
|
|
65
67
|
});
|
|
66
68
|
const res = result;
|
|
67
69
|
return res.map((r) => {
|
|
@@ -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" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
/// <reference types="node" />
|
|
1
4
|
import execa from 'execa';
|
|
2
5
|
import { HeadlessBrowser } from './browser/Browser';
|
|
3
6
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -64,10 +67,10 @@ export declare const RenderInternals: {
|
|
|
64
67
|
width: number;
|
|
65
68
|
height: number;
|
|
66
69
|
scale: number;
|
|
67
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
70
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
68
71
|
wantsImageSequence: boolean;
|
|
69
72
|
}) => void;
|
|
70
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
73
|
+
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;
|
|
71
74
|
tmpDir: (str: string) => string;
|
|
72
75
|
deleteDirectory: (directory: string) => void;
|
|
73
76
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -124,7 +127,7 @@ export declare const RenderInternals: {
|
|
|
124
127
|
};
|
|
125
128
|
registerErrorSymbolicationLock: () => number;
|
|
126
129
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
127
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
130
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
128
131
|
mimeContentType: typeof mimeContentType;
|
|
129
132
|
mimeLookup: typeof mimeLookup;
|
|
130
133
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -135,14 +138,14 @@ export declare const RenderInternals: {
|
|
|
135
138
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
136
139
|
DEFAULT_BROWSER: "chrome";
|
|
137
140
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
138
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
139
|
-
validateOpenGlRenderer: (option: "
|
|
141
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
142
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
140
143
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
141
144
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
142
145
|
validateJpegQuality: (q: number | undefined) => void;
|
|
143
146
|
DEFAULT_TIMEOUT: number;
|
|
144
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
145
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
147
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
148
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
146
149
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
147
150
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
148
151
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -159,10 +162,10 @@ export declare const RenderInternals: {
|
|
|
159
162
|
output: string;
|
|
160
163
|
onProgress: (p: number) => void;
|
|
161
164
|
numberOfFrames: number;
|
|
162
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
165
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
163
166
|
fps: number;
|
|
164
167
|
numberOfGifLoops: number | null;
|
|
165
|
-
audioCodec: "
|
|
168
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
166
169
|
audioBitrate: string | null;
|
|
167
170
|
indent: boolean;
|
|
168
171
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -170,19 +173,19 @@ export declare const RenderInternals: {
|
|
|
170
173
|
getMinConcurrency: () => number;
|
|
171
174
|
getMaxConcurrency: () => number;
|
|
172
175
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
173
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
176
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
174
177
|
preferLossless: boolean;
|
|
175
|
-
}) => "
|
|
178
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
176
179
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
177
180
|
defaultFileExtensionMap: {
|
|
178
181
|
h264: {
|
|
179
182
|
default: import("./file-extensions").FileExtension;
|
|
180
183
|
forAudioCodec: {
|
|
181
|
-
|
|
184
|
+
mp3: {
|
|
182
185
|
possible: import("./file-extensions").FileExtension[];
|
|
183
186
|
default: import("./file-extensions").FileExtension;
|
|
184
187
|
};
|
|
185
|
-
|
|
188
|
+
aac: {
|
|
186
189
|
possible: import("./file-extensions").FileExtension[];
|
|
187
190
|
default: import("./file-extensions").FileExtension;
|
|
188
191
|
};
|
|
@@ -208,11 +211,11 @@ export declare const RenderInternals: {
|
|
|
208
211
|
vp8: {
|
|
209
212
|
default: import("./file-extensions").FileExtension;
|
|
210
213
|
forAudioCodec: {
|
|
211
|
-
|
|
214
|
+
"pcm-16": {
|
|
212
215
|
possible: import("./file-extensions").FileExtension[];
|
|
213
216
|
default: import("./file-extensions").FileExtension;
|
|
214
217
|
};
|
|
215
|
-
|
|
218
|
+
opus: {
|
|
216
219
|
possible: import("./file-extensions").FileExtension[];
|
|
217
220
|
default: import("./file-extensions").FileExtension;
|
|
218
221
|
};
|
|
@@ -221,20 +224,20 @@ export declare const RenderInternals: {
|
|
|
221
224
|
vp9: {
|
|
222
225
|
default: import("./file-extensions").FileExtension;
|
|
223
226
|
forAudioCodec: {
|
|
224
|
-
|
|
227
|
+
"pcm-16": {
|
|
225
228
|
possible: import("./file-extensions").FileExtension[];
|
|
226
229
|
default: import("./file-extensions").FileExtension;
|
|
227
230
|
};
|
|
228
|
-
|
|
231
|
+
opus: {
|
|
229
232
|
possible: import("./file-extensions").FileExtension[];
|
|
230
233
|
default: import("./file-extensions").FileExtension;
|
|
231
234
|
};
|
|
232
235
|
};
|
|
233
236
|
};
|
|
234
|
-
|
|
237
|
+
mp3: {
|
|
235
238
|
default: import("./file-extensions").FileExtension;
|
|
236
239
|
forAudioCodec: {
|
|
237
|
-
|
|
240
|
+
mp3: {
|
|
238
241
|
possible: import("./file-extensions").FileExtension[];
|
|
239
242
|
default: import("./file-extensions").FileExtension;
|
|
240
243
|
};
|
|
@@ -257,22 +260,22 @@ export declare const RenderInternals: {
|
|
|
257
260
|
};
|
|
258
261
|
};
|
|
259
262
|
};
|
|
260
|
-
|
|
263
|
+
wav: {
|
|
261
264
|
default: import("./file-extensions").FileExtension;
|
|
262
265
|
forAudioCodec: {
|
|
263
|
-
mp3: {
|
|
264
|
-
possible: import("./file-extensions").FileExtension[];
|
|
265
|
-
default: import("./file-extensions").FileExtension;
|
|
266
|
-
};
|
|
267
266
|
"pcm-16": {
|
|
268
267
|
possible: import("./file-extensions").FileExtension[];
|
|
269
268
|
default: import("./file-extensions").FileExtension;
|
|
270
269
|
};
|
|
271
270
|
};
|
|
272
271
|
};
|
|
273
|
-
|
|
272
|
+
prores: {
|
|
274
273
|
default: import("./file-extensions").FileExtension;
|
|
275
274
|
forAudioCodec: {
|
|
275
|
+
aac: {
|
|
276
|
+
possible: import("./file-extensions").FileExtension[];
|
|
277
|
+
default: import("./file-extensions").FileExtension;
|
|
278
|
+
};
|
|
276
279
|
"pcm-16": {
|
|
277
280
|
possible: import("./file-extensions").FileExtension[];
|
|
278
281
|
default: import("./file-extensions").FileExtension;
|
|
@@ -309,9 +312,9 @@ export declare const RenderInternals: {
|
|
|
309
312
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
310
313
|
readonly wav: readonly ["pcm-16"];
|
|
311
314
|
};
|
|
312
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
313
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
314
|
-
getExecutablePath: (type: "
|
|
315
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
316
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
317
|
+
getExecutablePath: (type: "ffmpeg" | "ffprobe" | "compositor" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
315
318
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
316
319
|
dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
317
320
|
env: {
|
|
@@ -327,8 +330,8 @@ export declare const RenderInternals: {
|
|
|
327
330
|
};
|
|
328
331
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
329
332
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
330
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
331
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
333
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
334
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
332
335
|
DEFAULT_JPEG_QUALITY: number;
|
|
333
336
|
chalk: {
|
|
334
337
|
enabled: () => boolean;
|
|
@@ -427,7 +430,7 @@ export declare const RenderInternals: {
|
|
|
427
430
|
frame: number;
|
|
428
431
|
serializedInputPropsWithCustomSchema: string;
|
|
429
432
|
serializedResolvedPropsWithCustomSchema: string;
|
|
430
|
-
imageFormat: "
|
|
433
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
431
434
|
jpegQuality: number;
|
|
432
435
|
puppeteerInstance: HeadlessBrowser | null;
|
|
433
436
|
envVariables: Record<string, string>;
|
|
@@ -518,11 +521,12 @@ export declare const RenderInternals: {
|
|
|
518
521
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
519
522
|
copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
520
523
|
isIpV6Supported: (flattened: import("os").NetworkInterfaceInfo[]) => boolean;
|
|
521
|
-
getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
|
|
524
|
+
getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }: {
|
|
522
525
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
523
526
|
indent: boolean;
|
|
524
527
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
525
528
|
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
529
|
+
timeoutInMilliseconds: number;
|
|
526
530
|
}) => Promise<{
|
|
527
531
|
feature: string;
|
|
528
532
|
status: string;
|
package/dist/open-browser.js
CHANGED
|
@@ -5,6 +5,7 @@ const node_1 = require("./browser/node");
|
|
|
5
5
|
const get_local_browser_executable_1 = require("./get-local-browser-executable");
|
|
6
6
|
const get_video_threads_flag_1 = require("./get-video-threads-flag");
|
|
7
7
|
const log_level_1 = require("./log-level");
|
|
8
|
+
const logger_1 = require("./logger");
|
|
8
9
|
const gl_1 = require("./options/gl");
|
|
9
10
|
const getOpenGlRenderer = (option) => {
|
|
10
11
|
const renderer = option !== null && option !== void 0 ? option : gl_1.DEFAULT_OPENGL_RENDERER;
|
|
@@ -40,7 +41,7 @@ const killAllBrowsers = async () => {
|
|
|
40
41
|
};
|
|
41
42
|
exports.killAllBrowsers = killAllBrowsers;
|
|
42
43
|
const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions, forceDeviceScaleFactor, indent, viewport, logLevel, }) => {
|
|
43
|
-
var _a, _b;
|
|
44
|
+
var _a, _b, _c;
|
|
44
45
|
// @ts-expect-error Firefox
|
|
45
46
|
if (browser === 'firefox') {
|
|
46
47
|
throw new TypeError('Firefox supported is not yet turned on. Stay tuned for the future.');
|
|
@@ -52,6 +53,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
|
|
|
52
53
|
});
|
|
53
54
|
const executablePath = (0, get_local_browser_executable_1.getLocalBrowserExecutable)(browserExecutable);
|
|
54
55
|
const customGlRenderer = getOpenGlRenderer((_a = chromiumOptions.gl) !== null && _a !== void 0 ? _a : null);
|
|
56
|
+
logger_1.Log.verbose({ indent, logLevel, tag: 'openBrowser()' }, `Opening browser: gl = ${chromiumOptions.gl}, executable = ${executablePath}, enableMultiProcessOnLinux = ${(_b = chromiumOptions.enableMultiProcessOnLinux) !== null && _b !== void 0 ? _b : false}`);
|
|
55
57
|
const browserInstance = await node_1.puppeteer.launch({
|
|
56
58
|
executablePath,
|
|
57
59
|
dumpio: (0, log_level_1.isEqualOrBelowLogLevel)(logLevel, 'verbose'),
|
|
@@ -89,7 +91,7 @@ const internalOpenBrowser = async ({ browser, browserExecutable, chromiumOptions
|
|
|
89
91
|
'--enable-blink-features=IdleDetection',
|
|
90
92
|
'--export-tagged-pdf',
|
|
91
93
|
'--intensive-wake-up-throttling-policy=0',
|
|
92
|
-
((
|
|
94
|
+
((_c = chromiumOptions.headless) !== null && _c !== void 0 ? _c : true) ? '--headless' : null,
|
|
93
95
|
'--no-sandbox',
|
|
94
96
|
'--disable-setuid-sandbox',
|
|
95
97
|
...customGlRenderer,
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const glOption: {
|
|
|
4
4
|
cliFlag: string;
|
|
5
5
|
docLink: string;
|
|
6
6
|
name: string;
|
|
7
|
-
type: "
|
|
7
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
8
8
|
ssrName: string;
|
|
9
9
|
description: () => JSX.Element;
|
|
10
10
|
};
|
package/dist/options/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export declare const allOptions: {
|
|
|
86
86
|
description: () => JSX.Element;
|
|
87
87
|
docLink: string;
|
|
88
88
|
ssrName: string;
|
|
89
|
-
type: "
|
|
89
|
+
type: "default" | "bt709";
|
|
90
90
|
};
|
|
91
91
|
deleteAfterOption: {
|
|
92
92
|
name: string;
|
|
@@ -116,7 +116,7 @@ export declare const allOptions: {
|
|
|
116
116
|
cliFlag: string;
|
|
117
117
|
docLink: string;
|
|
118
118
|
name: string;
|
|
119
|
-
type: "
|
|
119
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
120
120
|
ssrName: string;
|
|
121
121
|
description: () => JSX.Element;
|
|
122
122
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printUsefulErrorMessage = void 0;
|
|
4
|
+
const logger_1 = require("./logger");
|
|
4
5
|
const truthy_1 = require("./truthy");
|
|
5
6
|
const alreadyPrinted = [];
|
|
6
7
|
// Don't use Log.info() here, as BrowserSafeApis need tto be
|
|
@@ -11,60 +12,67 @@ const printUsefulErrorMessage = (err) => {
|
|
|
11
12
|
}
|
|
12
13
|
alreadyPrinted.push(err);
|
|
13
14
|
if (err.message.includes('Could not play video with')) {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
logger_1.Log.info();
|
|
16
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
|
|
16
17
|
}
|
|
17
18
|
if (err.message.includes('A delayRender()') &&
|
|
18
19
|
err.message.includes('was called but not cleared after')) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
logger_1.Log.info();
|
|
21
|
+
if (err.message.includes('/proxy')) {
|
|
22
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/troubleshooting/delay-render-proxy');
|
|
23
|
+
}
|
|
24
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
|
|
21
25
|
}
|
|
22
26
|
if (err.message.includes('Target closed')) {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
logger_1.Log.info();
|
|
28
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
|
|
29
|
+
}
|
|
30
|
+
if (err.message.includes('Timed out evaluating')) {
|
|
31
|
+
logger_1.Log.info();
|
|
32
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/troubleshooting/timed-out-page-function');
|
|
25
33
|
}
|
|
26
34
|
if (err.message.includes('ENAMETOOLONG')) {
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
logger_1.Log.info();
|
|
36
|
+
logger_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
|
|
29
37
|
}
|
|
30
38
|
if (err.message.includes('Member must have value less than or equal to 3008')) {
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
logger_1.Log.info();
|
|
40
|
+
logger_1.Log.info('💡 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
41
|
}
|
|
34
42
|
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.')) {
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
logger_1.Log.info();
|
|
44
|
+
logger_1.Log.info('💡 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit');
|
|
37
45
|
}
|
|
38
46
|
if (err.message.includes('Error creating WebGL context')) {
|
|
39
|
-
|
|
47
|
+
logger_1.Log.info();
|
|
40
48
|
console.warn('💡 You might need to set the OpenGL renderer to "angle-egl", "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
41
49
|
console.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
42
50
|
}
|
|
43
51
|
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
logger_1.Log.info();
|
|
53
|
+
logger_1.Log.info('💡 Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl');
|
|
46
54
|
}
|
|
47
55
|
if (err.message.includes('Minified React error #306')) {
|
|
48
56
|
const componentName = (_b = err.message.match(/<\w+>/)) === null || _b === void 0 ? void 0 : _b[0];
|
|
49
|
-
|
|
57
|
+
logger_1.Log.info([
|
|
50
58
|
'💡 This error indicates that the component',
|
|
51
59
|
componentName ? `(${componentName})` : null,
|
|
52
60
|
'you are trying to render is not imported correctly.',
|
|
53
61
|
]
|
|
54
62
|
.filter(truthy_1.truthy)
|
|
55
63
|
.join(' '));
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
logger_1.Log.info();
|
|
65
|
+
logger_1.Log.info(' Check the root file and ensure that the component is not undefined.');
|
|
66
|
+
logger_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
|
|
67
|
+
logger_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
|
|
60
68
|
}
|
|
61
69
|
if (err.message.includes('GLIBC_')) {
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
logger_1.Log.info('💡 Remotion requires at least Libc 2.35.');
|
|
71
|
+
logger_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
|
|
64
72
|
}
|
|
65
73
|
if (err.message.includes('EBADF')) {
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
logger_1.Log.info('💡 This error might be fixed by changing your Node version:');
|
|
75
|
+
logger_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
|
|
68
76
|
}
|
|
69
77
|
};
|
|
70
78
|
exports.printUsefulErrorMessage = printUsefulErrorMessage;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { ClipRegion } from 'remotion/no-react';
|
|
2
3
|
import type { Page } from './browser/BrowserPage';
|
|
3
4
|
import type { StillImageFormat } from './image-format';
|
|
4
|
-
export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }: {
|
|
5
|
+
export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }: {
|
|
5
6
|
page: Page;
|
|
6
7
|
imageFormat: StillImageFormat;
|
|
7
8
|
jpegQuality: number | undefined;
|
|
@@ -12,4 +13,5 @@ export declare const provideScreenshot: ({ page, imageFormat, options, jpegQuali
|
|
|
12
13
|
height: number;
|
|
13
14
|
width: number;
|
|
14
15
|
clipRegion: ClipRegion | null;
|
|
16
|
+
timeoutInMilliseconds: number;
|
|
15
17
|
}) => Promise<Buffer>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.provideScreenshot = void 0;
|
|
4
4
|
const screenshot_dom_element_1 = require("./screenshot-dom-element");
|
|
5
|
-
const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, }) => {
|
|
5
|
+
const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, width, clipRegion, timeoutInMilliseconds, }) => {
|
|
6
6
|
return (0, screenshot_dom_element_1.screenshotDOMElement)({
|
|
7
7
|
page,
|
|
8
8
|
opts: {
|
|
@@ -13,6 +13,7 @@ const provideScreenshot = ({ page, imageFormat, options, jpegQuality, height, wi
|
|
|
13
13
|
height,
|
|
14
14
|
width,
|
|
15
15
|
clipRegion,
|
|
16
|
+
timeoutInMilliseconds,
|
|
16
17
|
});
|
|
17
18
|
};
|
|
18
19
|
exports.provideScreenshot = provideScreenshot;
|
|
@@ -4,8 +4,9 @@ type PuppeteerCatchOptions = {
|
|
|
4
4
|
pageFunction: Function;
|
|
5
5
|
frame: number | null;
|
|
6
6
|
args: unknown[];
|
|
7
|
+
timeoutInMilliseconds: number;
|
|
7
8
|
};
|
|
8
|
-
export declare function puppeteerEvaluateWithCatchAndTimeout<ReturnType>({ args, frame, page, pageFunction, }: PuppeteerCatchOptions): Promise<{
|
|
9
|
+
export declare function puppeteerEvaluateWithCatchAndTimeout<ReturnType>({ args, frame, page, pageFunction, timeoutInMilliseconds, }: PuppeteerCatchOptions): Promise<{
|
|
9
10
|
value: ReturnType;
|
|
10
11
|
size: number;
|
|
11
12
|
}>;
|
|
@@ -25,7 +25,7 @@ function valueFromRemoteObject(remoteObject) {
|
|
|
25
25
|
}
|
|
26
26
|
return remoteObject.value;
|
|
27
27
|
}
|
|
28
|
-
function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction, }) {
|
|
28
|
+
function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction, timeoutInMilliseconds, }) {
|
|
29
29
|
let timeout = null;
|
|
30
30
|
return Promise.race([
|
|
31
31
|
new Promise((_, reject) => {
|
|
@@ -34,13 +34,14 @@ function puppeteerEvaluateWithCatchAndTimeout({ args, frame, page, pageFunction,
|
|
|
34
34
|
// This means the page is not responding anymore
|
|
35
35
|
// This error message is retryable - sync it with packages/lambda/src/shared/is-flaky-error.ts
|
|
36
36
|
`Timed out evaluating page function "${pageFunction.toString()}"`));
|
|
37
|
-
},
|
|
37
|
+
}, timeoutInMilliseconds);
|
|
38
38
|
}),
|
|
39
39
|
puppeteerEvaluateWithCatch({
|
|
40
40
|
args,
|
|
41
41
|
frame,
|
|
42
42
|
page,
|
|
43
43
|
pageFunction,
|
|
44
|
+
timeoutInMilliseconds,
|
|
44
45
|
}),
|
|
45
46
|
]).then((data) => {
|
|
46
47
|
if (timeout !== null) {
|
package/dist/render-frames.js
CHANGED
|
@@ -109,6 +109,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
109
109
|
],
|
|
110
110
|
frame: null,
|
|
111
111
|
page,
|
|
112
|
+
timeoutInMilliseconds,
|
|
112
113
|
});
|
|
113
114
|
page.off('console', logCallback);
|
|
114
115
|
return page;
|
|
@@ -196,6 +197,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
196
197
|
downloadMap,
|
|
197
198
|
wantsBuffer: Boolean(onFrameBuffer),
|
|
198
199
|
compositor,
|
|
200
|
+
timeoutInMilliseconds,
|
|
199
201
|
});
|
|
200
202
|
if (onFrameBuffer) {
|
|
201
203
|
if (!buffer) {
|
package/dist/render-media.js
CHANGED
|
@@ -150,6 +150,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
150
150
|
wantsImageSequence: false,
|
|
151
151
|
});
|
|
152
152
|
const realFrameRange = (0, get_frame_to_render_1.getRealFrameRange)(composition.durationInFrames, frameRange);
|
|
153
|
+
logger_1.Log.verbose({ indent, logLevel, tag: 'renderMedia()' }, `Rendering frames ${realFrameRange.join('-')}`);
|
|
153
154
|
const callUpdate = () => {
|
|
154
155
|
const encoded = Math.round(0.8 * encodedFrames + 0.2 * muxedFrames);
|
|
155
156
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress({
|
package/dist/render-still.js
CHANGED
|
@@ -174,6 +174,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
174
174
|
],
|
|
175
175
|
frame: null,
|
|
176
176
|
page,
|
|
177
|
+
timeoutInMilliseconds,
|
|
177
178
|
});
|
|
178
179
|
await (0, seek_to_frame_1.seekToFrame)({
|
|
179
180
|
frame: stillFrame,
|
|
@@ -195,6 +196,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
195
196
|
wantsBuffer: !output,
|
|
196
197
|
compositor,
|
|
197
198
|
downloadMap,
|
|
199
|
+
timeoutInMilliseconds,
|
|
198
200
|
});
|
|
199
201
|
await cleanup();
|
|
200
202
|
return { buffer: output ? null : buffer };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { ClipRegion } from 'remotion/no-react';
|
|
2
3
|
import type { Page } from './browser/BrowserPage';
|
|
3
4
|
import type { StillImageFormat } from './image-format';
|
|
4
|
-
export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }: {
|
|
5
|
+
export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }: {
|
|
5
6
|
page: Page;
|
|
6
7
|
imageFormat: StillImageFormat;
|
|
7
8
|
jpegQuality: number | undefined;
|
|
@@ -11,4 +12,5 @@ export declare const screenshotDOMElement: ({ page, imageFormat, jpegQuality, op
|
|
|
11
12
|
height: number;
|
|
12
13
|
width: number;
|
|
13
14
|
clipRegion: ClipRegion | null;
|
|
15
|
+
timeoutInMilliseconds: number;
|
|
14
16
|
}) => Promise<Buffer>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.screenshotDOMElement = void 0;
|
|
4
4
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
5
5
|
const puppeteer_screenshot_1 = require("./puppeteer-screenshot");
|
|
6
|
-
const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, }) => {
|
|
6
|
+
const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, height, width, clipRegion, timeoutInMilliseconds, }) => {
|
|
7
7
|
const { path } = opts;
|
|
8
8
|
if (imageFormat === 'png' ||
|
|
9
9
|
imageFormat === 'pdf' ||
|
|
@@ -15,6 +15,7 @@ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, heig
|
|
|
15
15
|
args: [],
|
|
16
16
|
frame: null,
|
|
17
17
|
page,
|
|
18
|
+
timeoutInMilliseconds,
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
21
|
else {
|
|
@@ -25,6 +26,7 @@ const screenshotDOMElement = async ({ page, imageFormat, jpegQuality, opts, heig
|
|
|
25
26
|
args: [],
|
|
26
27
|
frame: null,
|
|
27
28
|
page,
|
|
29
|
+
timeoutInMilliseconds,
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
// @ts-expect-error
|
package/dist/seek-to-frame.js
CHANGED
|
@@ -16,6 +16,7 @@ const waitForReady = ({ page, timeoutInMilliseconds, frame, indent, logLevel, })
|
|
|
16
16
|
args: [],
|
|
17
17
|
frame: null,
|
|
18
18
|
page,
|
|
19
|
+
timeoutInMilliseconds,
|
|
19
20
|
}).then(({ value: val }) => {
|
|
20
21
|
if (typeof val !== 'string') {
|
|
21
22
|
reject(val);
|
|
@@ -73,6 +74,7 @@ const waitForReady = ({ page, timeoutInMilliseconds, frame, indent, logLevel, })
|
|
|
73
74
|
args: [],
|
|
74
75
|
frame,
|
|
75
76
|
page,
|
|
77
|
+
timeoutInMilliseconds,
|
|
76
78
|
})
|
|
77
79
|
.then((res) => {
|
|
78
80
|
reject(new Error(`Timeout exceeded rendering the component${frame ? ' at frame ' + frame : ''}. ${res.value ? `Open delayRender() handles: ${res.value}` : ''}`));
|
|
@@ -122,6 +124,7 @@ const seekToFrame = async ({ frame, page, composition, timeoutInMilliseconds, lo
|
|
|
122
124
|
args: [frame, composition],
|
|
123
125
|
frame,
|
|
124
126
|
page,
|
|
127
|
+
timeoutInMilliseconds,
|
|
125
128
|
});
|
|
126
129
|
await (0, exports.waitForReady)({ page, timeoutInMilliseconds, frame, indent, logLevel });
|
|
127
130
|
await page.evaluateHandle('document.fonts.ready');
|
|
@@ -47,6 +47,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
47
47
|
},
|
|
48
48
|
frame: null,
|
|
49
49
|
args: [],
|
|
50
|
+
timeoutInMilliseconds,
|
|
50
51
|
});
|
|
51
52
|
await (0, seek_to_frame_1.waitForReady)({
|
|
52
53
|
page,
|
|
@@ -68,6 +69,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
68
69
|
frame: null,
|
|
69
70
|
page,
|
|
70
71
|
args: [id],
|
|
72
|
+
timeoutInMilliseconds,
|
|
71
73
|
});
|
|
72
74
|
logger_1.Log.verbose({
|
|
73
75
|
indent,
|
|
@@ -78,6 +78,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
78
78
|
args: [],
|
|
79
79
|
frame: null,
|
|
80
80
|
page,
|
|
81
|
+
timeoutInMilliseconds: actualTimeout,
|
|
81
82
|
});
|
|
82
83
|
if (typeof isRemotionFn === 'undefined') {
|
|
83
84
|
const { value: body } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
@@ -87,6 +88,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
87
88
|
args: [],
|
|
88
89
|
frame: null,
|
|
89
90
|
page,
|
|
91
|
+
timeoutInMilliseconds: actualTimeout,
|
|
90
92
|
});
|
|
91
93
|
// AWS shakyness
|
|
92
94
|
if (body.includes('We encountered an internal error.')) {
|
|
@@ -108,6 +110,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
108
110
|
args: [],
|
|
109
111
|
frame: null,
|
|
110
112
|
page,
|
|
113
|
+
timeoutInMilliseconds: actualTimeout,
|
|
111
114
|
});
|
|
112
115
|
const { value: remotionVersion } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
113
116
|
pageFunction: () => {
|
|
@@ -116,6 +119,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
116
119
|
args: [],
|
|
117
120
|
frame: null,
|
|
118
121
|
page,
|
|
122
|
+
timeoutInMilliseconds: actualTimeout,
|
|
119
123
|
});
|
|
120
124
|
const requiredVersion = '10';
|
|
121
125
|
if (siteVersion !== requiredVersion) {
|
|
@@ -239,6 +239,9 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
239
239
|
['-s', `${width}x${height}`],
|
|
240
240
|
['-start_number', String(assetsInfo.firstFrameIndex)],
|
|
241
241
|
['-i', assetsInfo.imageSequenceName],
|
|
242
|
+
codec === 'gif'
|
|
243
|
+
? ['-filter_complex', 'split[v],palettegen,[v]paletteuse']
|
|
244
|
+
: null,
|
|
242
245
|
]),
|
|
243
246
|
audio ? ['-i', audio] : null,
|
|
244
247
|
numberOfGifLoops === null
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { TRenderAsset } from 'remotion/no-react';
|
|
2
3
|
import type { DownloadMap } from './assets/download-map';
|
|
3
4
|
import type { Page } from './browser/BrowserPage';
|
|
4
5
|
import type { Compositor } from './compositor/compositor';
|
|
5
6
|
import type { StillImageFormat, VideoImageFormat } from './image-format';
|
|
6
|
-
export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, }: {
|
|
7
|
+
export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }: {
|
|
7
8
|
freePage: Page;
|
|
8
9
|
imageFormat: VideoImageFormat | StillImageFormat;
|
|
9
10
|
jpegQuality: number | undefined;
|
|
@@ -15,6 +16,7 @@ export declare const takeFrameAndCompose: ({ freePage, imageFormat, jpegQuality,
|
|
|
15
16
|
downloadMap: DownloadMap;
|
|
16
17
|
wantsBuffer: boolean;
|
|
17
18
|
compositor: Compositor;
|
|
19
|
+
timeoutInMilliseconds: number;
|
|
18
20
|
}) => Promise<{
|
|
19
21
|
buffer: Buffer | null;
|
|
20
22
|
collectedAssets: TRenderAsset[];
|
|
@@ -10,7 +10,7 @@ const compose_1 = require("./compositor/compose");
|
|
|
10
10
|
const provide_screenshot_1 = require("./provide-screenshot");
|
|
11
11
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
12
12
|
const truthy_1 = require("./truthy");
|
|
13
|
-
const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, }) => {
|
|
13
|
+
const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame, width, height, output, scale, downloadMap, wantsBuffer, compositor, timeoutInMilliseconds, }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const [{ value: clipRegion }, { value: collectedAssets }] = await Promise.all([
|
|
16
16
|
(0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
@@ -23,6 +23,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
|
|
|
23
23
|
args: [],
|
|
24
24
|
frame,
|
|
25
25
|
page: freePage,
|
|
26
|
+
timeoutInMilliseconds,
|
|
26
27
|
}),
|
|
27
28
|
(0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
28
29
|
pageFunction: () => {
|
|
@@ -31,6 +32,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
|
|
|
31
32
|
args: [],
|
|
32
33
|
frame,
|
|
33
34
|
page: freePage,
|
|
35
|
+
timeoutInMilliseconds,
|
|
34
36
|
}),
|
|
35
37
|
]);
|
|
36
38
|
if (imageFormat === 'none') {
|
|
@@ -56,6 +58,7 @@ const takeFrameAndCompose = async ({ freePage, imageFormat, jpegQuality, frame,
|
|
|
56
58
|
height,
|
|
57
59
|
width,
|
|
58
60
|
clipRegion,
|
|
61
|
+
timeoutInMilliseconds,
|
|
59
62
|
});
|
|
60
63
|
if (shouldMakeBuffer) {
|
|
61
64
|
return { buffer: buf, collectedAssets };
|
package/dist/test-gpu.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ type Item = {
|
|
|
5
5
|
feature: string;
|
|
6
6
|
status: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
|
|
8
|
+
export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }: {
|
|
9
9
|
browserExecutable: BrowserExecutable;
|
|
10
10
|
indent: boolean;
|
|
11
11
|
logLevel: LogLevel;
|
|
12
12
|
chromiumOptions: ChromiumOptions;
|
|
13
|
+
timeoutInMilliseconds: number;
|
|
13
14
|
}) => Promise<Item[]>;
|
|
14
15
|
export {};
|
package/dist/test-gpu.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getChromiumGpuInformation = void 0;
|
|
4
4
|
const get_browser_instance_1 = require("./get-browser-instance");
|
|
5
5
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
6
|
-
const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, }) => {
|
|
6
|
+
const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, }) => {
|
|
7
7
|
const { page, cleanup } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
8
8
|
passedInInstance: undefined,
|
|
9
9
|
browserExecutable,
|
|
@@ -32,6 +32,7 @@ const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel,
|
|
|
32
32
|
frame: null,
|
|
33
33
|
args: [],
|
|
34
34
|
page,
|
|
35
|
+
timeoutInMilliseconds,
|
|
35
36
|
});
|
|
36
37
|
cleanup();
|
|
37
38
|
return value;
|
|
@@ -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" | "mp3" | "aac" | "wav" | "prores" | "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.74",
|
|
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.74"
|
|
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-
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.74",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.74",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.74",
|
|
46
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.74",
|
|
47
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.74",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.74",
|
|
49
|
+
"@remotion/compositor-linux-x64-musl": "4.0.74"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|