@remotion/renderer 4.0.115 → 4.0.117
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/browser/BrowserFetcher.js +1 -1
- package/dist/browser/BrowserPage.js +3 -3
- package/dist/browser/Connection.js +1 -1
- package/dist/client.d.ts +533 -56
- package/dist/compositor/payloads.d.ts +1 -0
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/ffmpeg-args.js +10 -2
- package/dist/get-compositions.d.ts +1 -7
- package/dist/get-compositions.js +2 -2
- package/dist/get-local-browser-executable.js +1 -1
- package/dist/index.d.ts +118 -38
- package/dist/index.js +0 -2
- package/dist/logger.d.ts +2 -6
- package/dist/logger.js +5 -23
- package/dist/offthread-video-server.d.ts +1 -0
- package/dist/offthread-video-server.js +12 -3
- package/dist/options/index.d.ts +66 -9
- package/dist/options/index.js +8 -0
- package/dist/options/options-map.d.ts +429 -9
- package/dist/options/options-map.js +33 -0
- package/dist/options/repro.d.ts +1 -4
- package/dist/options/repro.js +1 -1
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/print-useful-error-message.d.ts +2 -1
- package/dist/print-useful-error-message.js +29 -29
- package/dist/provide-screenshot.d.ts +0 -1
- package/dist/puppeteer-screenshot.d.ts +0 -1
- package/dist/render-frames.d.ts +0 -4
- package/dist/render-frames.js +1 -1
- package/dist/render-media.d.ts +0 -5
- package/dist/render-media.js +2 -2
- package/dist/render-still.d.ts +0 -4
- package/dist/render-still.js +2 -3
- package/dist/repro.js +6 -6
- package/dist/screenshot-dom-element.d.ts +0 -1
- package/dist/screenshot-task.d.ts +0 -1
- package/dist/select-composition.d.ts +0 -5
- package/dist/take-frame-and-compose.d.ts +0 -1
- package/dist/wrap-with-error-handling.js +1 -1
- package/package.json +9 -9
|
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
|
|
|
4
4
|
filters: PreprocessedAudioTrack[];
|
|
5
5
|
downloadMap: DownloadMap;
|
|
6
6
|
}) => Promise<{
|
|
7
|
-
complexFilterFlag: [
|
|
7
|
+
complexFilterFlag: [
|
|
8
|
+
string,
|
|
9
|
+
string
|
|
10
|
+
] | null;
|
|
8
11
|
cleanup: () => void;
|
|
9
12
|
}>;
|
package/dist/ffmpeg-args.js
CHANGED
|
@@ -35,7 +35,11 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
|
|
|
35
35
|
['-color_primaries:v', 'bt709'],
|
|
36
36
|
['-color_trc:v', 'bt709'],
|
|
37
37
|
['-color_range', 'tv'],
|
|
38
|
-
hasPreencoded
|
|
38
|
+
hasPreencoded
|
|
39
|
+
? []
|
|
40
|
+
: // https://www.canva.dev/blog/engineering/a-journey-through-colour-space-with-ffmpeg/
|
|
41
|
+
// "Color range" section
|
|
42
|
+
['-vf', 'zscale=matrix=709:matrixin=709:range=limited'],
|
|
39
43
|
]
|
|
40
44
|
: colorSpace === 'bt2020-ncl'
|
|
41
45
|
? [
|
|
@@ -45,7 +49,11 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
|
|
|
45
49
|
['-color_range', 'tv'],
|
|
46
50
|
hasPreencoded
|
|
47
51
|
? []
|
|
48
|
-
: [
|
|
52
|
+
: [
|
|
53
|
+
'-vf',
|
|
54
|
+
// ChatGPT: Therefore, just like BT.709, BT.2020 also uses the limited range where the digital code value for black is at 16,16,16 and not 0,0,0 in an 8-bit video system.
|
|
55
|
+
'zscale=matrix=2020_ncl:matrixin=2020_ncl:range=limited',
|
|
56
|
+
],
|
|
49
57
|
]
|
|
50
58
|
: [];
|
|
51
59
|
return [
|
|
@@ -2,7 +2,6 @@ import type { VideoConfig } from 'remotion/no-react';
|
|
|
2
2
|
import type { BrowserExecutable } from './browser-executable';
|
|
3
3
|
import type { BrowserLog } from './browser-log';
|
|
4
4
|
import type { HeadlessBrowser } from './browser/Browser';
|
|
5
|
-
import { type LogLevel } from './log-level';
|
|
6
5
|
import type { ChromiumOptions } from './open-browser';
|
|
7
6
|
import type { ToOptions } from './options/option';
|
|
8
7
|
import type { optionsMap } from './options/options-map';
|
|
@@ -13,12 +12,10 @@ type InternalGetCompositionsOptions = {
|
|
|
13
12
|
puppeteerInstance: HeadlessBrowser | undefined;
|
|
14
13
|
onBrowserLog: null | ((log: BrowserLog) => void);
|
|
15
14
|
browserExecutable: BrowserExecutable | null;
|
|
16
|
-
timeoutInMilliseconds: number;
|
|
17
15
|
chromiumOptions: ChromiumOptions;
|
|
18
16
|
port: number | null;
|
|
19
17
|
server: RemotionServer | undefined;
|
|
20
18
|
indent: boolean;
|
|
21
|
-
logLevel: LogLevel;
|
|
22
19
|
serveUrlOrWebpackUrl: string;
|
|
23
20
|
} & ToOptions<typeof optionsMap.getCompositions>;
|
|
24
21
|
export type GetCompositionsOptions = {
|
|
@@ -27,12 +24,9 @@ export type GetCompositionsOptions = {
|
|
|
27
24
|
puppeteerInstance?: HeadlessBrowser;
|
|
28
25
|
onBrowserLog?: (log: BrowserLog) => void;
|
|
29
26
|
browserExecutable?: BrowserExecutable;
|
|
30
|
-
timeoutInMilliseconds?: number;
|
|
31
27
|
chromiumOptions?: ChromiumOptions;
|
|
32
28
|
port?: number | null;
|
|
33
|
-
|
|
34
|
-
offthreadVideoCacheSizeInBytes?: number | null;
|
|
35
|
-
};
|
|
29
|
+
} & Partial<ToOptions<typeof optionsMap.getCompositions>>;
|
|
36
30
|
export declare const internalGetCompositions: (args_0: InternalGetCompositionsOptions) => Promise<VideoConfig[]>;
|
|
37
31
|
/**
|
|
38
32
|
* @description Gets the compositions defined in a Remotion project based on a Webpack bundle.
|
package/dist/get-compositions.js
CHANGED
|
@@ -6,7 +6,6 @@ const TimeoutSettings_1 = require("./browser/TimeoutSettings");
|
|
|
6
6
|
const handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
7
7
|
const find_closest_package_json_1 = require("./find-closest-package-json");
|
|
8
8
|
const get_browser_instance_1 = require("./get-browser-instance");
|
|
9
|
-
const logger_1 = require("./logger");
|
|
10
9
|
const prepare_server_1 = require("./prepare-server");
|
|
11
10
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
12
11
|
const seek_to_frame_1 = require("./seek-to-frame");
|
|
@@ -124,6 +123,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
|
|
|
124
123
|
timeoutInMilliseconds,
|
|
125
124
|
indent,
|
|
126
125
|
logLevel,
|
|
126
|
+
offthreadVideoCacheSizeInBytes,
|
|
127
127
|
});
|
|
128
128
|
})
|
|
129
129
|
.then((comp) => {
|
|
@@ -166,7 +166,7 @@ const getCompositions = (serveUrlOrWebpackUrl, config) => {
|
|
|
166
166
|
serveUrlOrWebpackUrl,
|
|
167
167
|
server: undefined,
|
|
168
168
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT,
|
|
169
|
-
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel :
|
|
169
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
170
170
|
offthreadVideoCacheSizeInBytes: (_a = config === null || config === void 0 ? void 0 : config.offthreadVideoCacheSizeInBytes) !== null && _a !== void 0 ? _a : null,
|
|
171
171
|
});
|
|
172
172
|
};
|
|
@@ -71,7 +71,7 @@ const getBrowserStatus = (browserExecutablePath) => {
|
|
|
71
71
|
const ensureLocalBrowser = async ({ indent, logLevel, preferredBrowserExecutable, }) => {
|
|
72
72
|
const status = getBrowserStatus(preferredBrowserExecutable);
|
|
73
73
|
if (status.type === 'no-browser') {
|
|
74
|
-
logger_1.Log.
|
|
74
|
+
logger_1.Log.info({ indent, logLevel }, 'No local browser could be found. Downloading Thorium https://www.remotion.dev/docs/miscellaneous/thorium-browser');
|
|
75
75
|
await (0, BrowserFetcher_1.downloadBrowser)({ indent, logLevel });
|
|
76
76
|
}
|
|
77
77
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -66,10 +66,10 @@ export declare const RenderInternals: {
|
|
|
66
66
|
width: number;
|
|
67
67
|
height: number;
|
|
68
68
|
scale: number;
|
|
69
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
69
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
70
70
|
wantsImageSequence: boolean;
|
|
71
71
|
}) => void;
|
|
72
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
72
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
|
|
73
73
|
tmpDir: (str: string) => string;
|
|
74
74
|
deleteDirectory: (directory: string) => void;
|
|
75
75
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -126,7 +126,7 @@ export declare const RenderInternals: {
|
|
|
126
126
|
};
|
|
127
127
|
registerErrorSymbolicationLock: () => number;
|
|
128
128
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
129
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
129
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
130
130
|
mimeContentType: typeof mimeContentType;
|
|
131
131
|
mimeLookup: typeof mimeLookup;
|
|
132
132
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -140,11 +140,11 @@ export declare const RenderInternals: {
|
|
|
140
140
|
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
141
141
|
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
142
142
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
143
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
143
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
144
144
|
validateJpegQuality: (q: unknown) => void;
|
|
145
145
|
DEFAULT_TIMEOUT: number;
|
|
146
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
147
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
146
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
147
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
148
148
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
149
149
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
150
150
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -161,10 +161,10 @@ export declare const RenderInternals: {
|
|
|
161
161
|
output: string;
|
|
162
162
|
onProgress: (p: number) => void;
|
|
163
163
|
numberOfFrames: number;
|
|
164
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
164
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
165
165
|
fps: number;
|
|
166
166
|
numberOfGifLoops: number | null;
|
|
167
|
-
audioCodec: "
|
|
167
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
168
168
|
audioBitrate: string | null;
|
|
169
169
|
indent: boolean;
|
|
170
170
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -172,19 +172,19 @@ export declare const RenderInternals: {
|
|
|
172
172
|
getMinConcurrency: () => number;
|
|
173
173
|
getMaxConcurrency: () => number;
|
|
174
174
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
175
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
175
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
176
176
|
preferLossless: boolean;
|
|
177
|
-
}) => "
|
|
177
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
178
178
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
179
179
|
defaultFileExtensionMap: {
|
|
180
180
|
h264: {
|
|
181
181
|
default: import("./file-extensions").FileExtension;
|
|
182
182
|
forAudioCodec: {
|
|
183
|
-
|
|
183
|
+
aac: {
|
|
184
184
|
possible: import("./file-extensions").FileExtension[];
|
|
185
185
|
default: import("./file-extensions").FileExtension;
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
mp3: {
|
|
188
188
|
possible: import("./file-extensions").FileExtension[];
|
|
189
189
|
default: import("./file-extensions").FileExtension;
|
|
190
190
|
};
|
|
@@ -210,11 +210,11 @@ export declare const RenderInternals: {
|
|
|
210
210
|
vp8: {
|
|
211
211
|
default: import("./file-extensions").FileExtension;
|
|
212
212
|
forAudioCodec: {
|
|
213
|
-
|
|
213
|
+
opus: {
|
|
214
214
|
possible: import("./file-extensions").FileExtension[];
|
|
215
215
|
default: import("./file-extensions").FileExtension;
|
|
216
216
|
};
|
|
217
|
-
|
|
217
|
+
"pcm-16": {
|
|
218
218
|
possible: import("./file-extensions").FileExtension[];
|
|
219
219
|
default: import("./file-extensions").FileExtension;
|
|
220
220
|
};
|
|
@@ -223,20 +223,20 @@ export declare const RenderInternals: {
|
|
|
223
223
|
vp9: {
|
|
224
224
|
default: import("./file-extensions").FileExtension;
|
|
225
225
|
forAudioCodec: {
|
|
226
|
-
|
|
226
|
+
opus: {
|
|
227
227
|
possible: import("./file-extensions").FileExtension[];
|
|
228
228
|
default: import("./file-extensions").FileExtension;
|
|
229
229
|
};
|
|
230
|
-
|
|
230
|
+
"pcm-16": {
|
|
231
231
|
possible: import("./file-extensions").FileExtension[];
|
|
232
232
|
default: import("./file-extensions").FileExtension;
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
|
-
|
|
236
|
+
prores: {
|
|
237
237
|
default: import("./file-extensions").FileExtension;
|
|
238
238
|
forAudioCodec: {
|
|
239
|
-
|
|
239
|
+
aac: {
|
|
240
240
|
possible: import("./file-extensions").FileExtension[];
|
|
241
241
|
default: import("./file-extensions").FileExtension;
|
|
242
242
|
};
|
|
@@ -259,22 +259,22 @@ export declare const RenderInternals: {
|
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
|
-
|
|
262
|
+
mp3: {
|
|
263
263
|
default: import("./file-extensions").FileExtension;
|
|
264
264
|
forAudioCodec: {
|
|
265
|
+
mp3: {
|
|
266
|
+
possible: import("./file-extensions").FileExtension[];
|
|
267
|
+
default: import("./file-extensions").FileExtension;
|
|
268
|
+
};
|
|
265
269
|
"pcm-16": {
|
|
266
270
|
possible: import("./file-extensions").FileExtension[];
|
|
267
271
|
default: import("./file-extensions").FileExtension;
|
|
268
272
|
};
|
|
269
273
|
};
|
|
270
274
|
};
|
|
271
|
-
|
|
275
|
+
wav: {
|
|
272
276
|
default: import("./file-extensions").FileExtension;
|
|
273
277
|
forAudioCodec: {
|
|
274
|
-
aac: {
|
|
275
|
-
possible: import("./file-extensions").FileExtension[];
|
|
276
|
-
default: import("./file-extensions").FileExtension;
|
|
277
|
-
};
|
|
278
278
|
"pcm-16": {
|
|
279
279
|
possible: import("./file-extensions").FileExtension[];
|
|
280
280
|
default: import("./file-extensions").FileExtension;
|
|
@@ -311,8 +311,8 @@ export declare const RenderInternals: {
|
|
|
311
311
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
312
312
|
readonly wav: readonly ["pcm-16"];
|
|
313
313
|
};
|
|
314
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
315
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
314
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
|
|
315
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
316
316
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
317
317
|
callFf: ({ args, bin, indent, logLevel, options, }: {
|
|
318
318
|
bin: "ffmpeg" | "ffprobe";
|
|
@@ -380,16 +380,12 @@ export declare const RenderInternals: {
|
|
|
380
380
|
verbose: (options: import("./logger").LogOptions & {
|
|
381
381
|
tag?: string | undefined;
|
|
382
382
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
383
|
-
info: (message?: any, ...optionalParams: any[]) => void;
|
|
384
|
-
infoAdvanced: (options: import("./logger").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
383
|
+
info: (options: import("./logger").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
385
384
|
warn: (options: import("./logger").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
386
|
-
error: (
|
|
387
|
-
errorAdvanced: (options: import("./logger").LogOptions & {
|
|
385
|
+
error: (options: import("./logger").LogOptions & {
|
|
388
386
|
tag?: string | undefined;
|
|
389
387
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
390
388
|
};
|
|
391
|
-
getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
392
|
-
setLogLevel: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
393
389
|
INDENT_TOKEN: string;
|
|
394
390
|
isColorSupported: () => boolean;
|
|
395
391
|
HeadlessBrowser: typeof HeadlessBrowser;
|
|
@@ -430,14 +426,12 @@ export declare const RenderInternals: {
|
|
|
430
426
|
overwrite: boolean;
|
|
431
427
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
432
428
|
onBrowserLog: ((log: import("./browser-log").BrowserLog) => void) | null;
|
|
433
|
-
timeoutInMilliseconds: number;
|
|
434
429
|
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
435
430
|
scale: number;
|
|
436
431
|
onDownload: import("./assets/download-and-map-assets-to-file").RenderMediaOnDownload | null;
|
|
437
432
|
cancelSignal: import("./make-cancel-signal").CancelSignal | null;
|
|
438
433
|
indent: boolean;
|
|
439
434
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
440
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
441
435
|
serveUrl: string;
|
|
442
436
|
port: number | null;
|
|
443
437
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
@@ -475,6 +469,36 @@ export declare const RenderInternals: {
|
|
|
475
469
|
value: number;
|
|
476
470
|
};
|
|
477
471
|
};
|
|
472
|
+
readonly logLevel: {
|
|
473
|
+
cliFlag: "log";
|
|
474
|
+
name: string;
|
|
475
|
+
ssrName: string;
|
|
476
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
477
|
+
docLink: string;
|
|
478
|
+
getValue: ({ commandLine }: {
|
|
479
|
+
commandLine: Record<string, unknown>;
|
|
480
|
+
}) => {
|
|
481
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
482
|
+
source: string;
|
|
483
|
+
};
|
|
484
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
485
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
486
|
+
};
|
|
487
|
+
readonly timeoutInMilliseconds: {
|
|
488
|
+
name: string;
|
|
489
|
+
cliFlag: "timeout";
|
|
490
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
491
|
+
ssrName: "timeoutInMilliseconds";
|
|
492
|
+
docLink: string;
|
|
493
|
+
type: number;
|
|
494
|
+
getValue: ({ commandLine }: {
|
|
495
|
+
commandLine: Record<string, unknown>;
|
|
496
|
+
}) => {
|
|
497
|
+
source: string;
|
|
498
|
+
value: number;
|
|
499
|
+
};
|
|
500
|
+
setConfig: (value: number) => void;
|
|
501
|
+
};
|
|
478
502
|
}>) => Promise<{
|
|
479
503
|
buffer: Buffer | null;
|
|
480
504
|
}>;
|
|
@@ -493,12 +517,10 @@ export declare const RenderInternals: {
|
|
|
493
517
|
puppeteerInstance: HeadlessBrowser | undefined;
|
|
494
518
|
onBrowserLog: ((log: import("./browser-log").BrowserLog) => void) | null;
|
|
495
519
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
496
|
-
timeoutInMilliseconds: number;
|
|
497
520
|
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
498
521
|
port: number | null;
|
|
499
522
|
indent: boolean;
|
|
500
523
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
501
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
502
524
|
serveUrl: string;
|
|
503
525
|
id: string;
|
|
504
526
|
} & import("./options/option").ToOptions<{
|
|
@@ -520,6 +542,36 @@ export declare const RenderInternals: {
|
|
|
520
542
|
};
|
|
521
543
|
setConfig: (size: number | null) => void;
|
|
522
544
|
};
|
|
545
|
+
readonly logLevel: {
|
|
546
|
+
cliFlag: "log";
|
|
547
|
+
name: string;
|
|
548
|
+
ssrName: string;
|
|
549
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
550
|
+
docLink: string;
|
|
551
|
+
getValue: ({ commandLine }: {
|
|
552
|
+
commandLine: Record<string, unknown>;
|
|
553
|
+
}) => {
|
|
554
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
555
|
+
source: string;
|
|
556
|
+
};
|
|
557
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
558
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
559
|
+
};
|
|
560
|
+
readonly timeoutInMilliseconds: {
|
|
561
|
+
name: string;
|
|
562
|
+
cliFlag: "timeout";
|
|
563
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
564
|
+
ssrName: "timeoutInMilliseconds";
|
|
565
|
+
docLink: string;
|
|
566
|
+
type: number;
|
|
567
|
+
getValue: ({ commandLine }: {
|
|
568
|
+
commandLine: Record<string, unknown>;
|
|
569
|
+
}) => {
|
|
570
|
+
source: string;
|
|
571
|
+
value: number;
|
|
572
|
+
};
|
|
573
|
+
setConfig: (value: number) => void;
|
|
574
|
+
};
|
|
523
575
|
}>) => Promise<{
|
|
524
576
|
metadata: import("remotion").VideoConfig;
|
|
525
577
|
propsSize: number;
|
|
@@ -530,12 +582,10 @@ export declare const RenderInternals: {
|
|
|
530
582
|
puppeteerInstance: HeadlessBrowser | undefined;
|
|
531
583
|
onBrowserLog: ((log: import("./browser-log").BrowserLog) => void) | null;
|
|
532
584
|
browserExecutable: import("./browser-executable").BrowserExecutable;
|
|
533
|
-
timeoutInMilliseconds: number;
|
|
534
585
|
chromiumOptions: import("./open-browser").ChromiumOptions;
|
|
535
586
|
port: number | null;
|
|
536
587
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
537
588
|
indent: boolean;
|
|
538
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
539
589
|
serveUrlOrWebpackUrl: string;
|
|
540
590
|
} & import("./options/option").ToOptions<{
|
|
541
591
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -556,6 +606,36 @@ export declare const RenderInternals: {
|
|
|
556
606
|
};
|
|
557
607
|
setConfig: (size: number | null) => void;
|
|
558
608
|
};
|
|
609
|
+
readonly logLevel: {
|
|
610
|
+
cliFlag: "log";
|
|
611
|
+
name: string;
|
|
612
|
+
ssrName: string;
|
|
613
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
614
|
+
docLink: string;
|
|
615
|
+
getValue: ({ commandLine }: {
|
|
616
|
+
commandLine: Record<string, unknown>;
|
|
617
|
+
}) => {
|
|
618
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
619
|
+
source: string;
|
|
620
|
+
};
|
|
621
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
622
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
623
|
+
};
|
|
624
|
+
readonly timeoutInMilliseconds: {
|
|
625
|
+
name: string;
|
|
626
|
+
cliFlag: "timeout";
|
|
627
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
628
|
+
ssrName: "timeoutInMilliseconds";
|
|
629
|
+
docLink: string;
|
|
630
|
+
type: number;
|
|
631
|
+
getValue: ({ commandLine }: {
|
|
632
|
+
commandLine: Record<string, unknown>;
|
|
633
|
+
}) => {
|
|
634
|
+
source: string;
|
|
635
|
+
value: number;
|
|
636
|
+
};
|
|
637
|
+
setConfig: (value: number) => void;
|
|
638
|
+
};
|
|
559
639
|
}>) => Promise<import("remotion").VideoConfig[]>;
|
|
560
640
|
internalRenderFrames: (args_0: import("./render-frames").InternalRenderFramesOptions) => Promise<import("./types").RenderFramesOutput>;
|
|
561
641
|
internalRenderMedia: (args_0: import("./render-media").InternalRenderMediaOptions) => Promise<{
|
package/dist/index.js
CHANGED
|
@@ -178,8 +178,6 @@ exports.RenderInternals = {
|
|
|
178
178
|
DEFAULT_JPEG_QUALITY: jpeg_quality_1.DEFAULT_JPEG_QUALITY,
|
|
179
179
|
chalk: chalk_1.chalk,
|
|
180
180
|
Log: logger_1.Log,
|
|
181
|
-
getLogLevel: logger_1.getLogLevel,
|
|
182
|
-
setLogLevel: logger_1.setLogLevel,
|
|
183
181
|
INDENT_TOKEN: logger_1.INDENT_TOKEN,
|
|
184
182
|
isColorSupported: is_color_supported_1.isColorSupported,
|
|
185
183
|
HeadlessBrowser: Browser_1.HeadlessBrowser,
|
package/dist/logger.d.ts
CHANGED
|
@@ -11,12 +11,8 @@ export declare const verboseTag: (str: string) => string;
|
|
|
11
11
|
export declare const secondverboseTag: (str: string) => string;
|
|
12
12
|
export declare const Log: {
|
|
13
13
|
verbose: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
14
|
-
info: (message?: any, ...optionalParams: any[]) => void;
|
|
15
|
-
infoAdvanced: (options: LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
14
|
+
info: (options: LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
16
15
|
warn: (options: LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
17
|
-
error: (message?: any, ...optionalParams: any[]) => void;
|
|
18
|
-
errorAdvanced: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
16
|
+
error: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
19
17
|
};
|
|
20
|
-
export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
21
|
-
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
22
18
|
export {};
|
package/dist/logger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Log = exports.secondverboseTag = exports.verboseTag = exports.INDENT_TOKEN = void 0;
|
|
4
4
|
const chalk_1 = require("./chalk");
|
|
5
5
|
const is_color_supported_1 = require("./chalk/is-color-supported");
|
|
6
6
|
const log_level_1 = require("./log-level");
|
|
@@ -27,10 +27,7 @@ exports.Log = {
|
|
|
27
27
|
.concat(args.map((a) => chalk_1.chalk.gray(a))));
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
info: (...args) => {
|
|
31
|
-
exports.Log.infoAdvanced({ indent: false, logLevel: (0, exports.getLogLevel)() }, ...args);
|
|
32
|
-
},
|
|
33
|
-
infoAdvanced: (options, ...args) => {
|
|
30
|
+
info: (options, ...args) => {
|
|
34
31
|
(0, repro_1.writeInRepro)('info', ...args);
|
|
35
32
|
return console.log(...[options.indent ? exports.INDENT_TOKEN : null].filter(truthy_1.truthy).concat(args));
|
|
36
33
|
},
|
|
@@ -42,16 +39,10 @@ exports.Log = {
|
|
|
42
39
|
.concat(args.map((a) => chalk_1.chalk.yellow(a))));
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
|
-
error: (...args) => {
|
|
46
|
-
(0, repro_1.writeInRepro)('error', ...args);
|
|
47
|
-
if ((0, log_level_1.isEqualOrBelowLogLevel)((0, exports.getLogLevel)(), 'error')) {
|
|
48
|
-
return console.error(...args.map((a) => chalk_1.chalk.red(a)));
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
errorAdvanced: (options, ...args) => {
|
|
42
|
+
error: (options, ...args) => {
|
|
52
43
|
(0, repro_1.writeInRepro)('error', ...args);
|
|
53
|
-
if ((0, log_level_1.isEqualOrBelowLogLevel)(
|
|
54
|
-
return console.
|
|
44
|
+
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'error')) {
|
|
45
|
+
return console.error(...[
|
|
55
46
|
options.indent ? exports.INDENT_TOKEN : null,
|
|
56
47
|
options.tag ? (0, exports.verboseTag)(options.tag) : null,
|
|
57
48
|
]
|
|
@@ -60,12 +51,3 @@ exports.Log = {
|
|
|
60
51
|
}
|
|
61
52
|
},
|
|
62
53
|
};
|
|
63
|
-
let logLevel = 'info';
|
|
64
|
-
const getLogLevel = () => {
|
|
65
|
-
return logLevel;
|
|
66
|
-
};
|
|
67
|
-
exports.getLogLevel = getLogLevel;
|
|
68
|
-
const setLogLevel = (newLogLevel) => {
|
|
69
|
-
logLevel = newLogLevel;
|
|
70
|
-
};
|
|
71
|
-
exports.setLogLevel = setLogLevel;
|
|
@@ -6,6 +6,7 @@ export declare const extractUrlAndSourceFromUrl: (url: string) => {
|
|
|
6
6
|
src: string;
|
|
7
7
|
time: number;
|
|
8
8
|
transparent: boolean;
|
|
9
|
+
toneMapped: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const startOffthreadVideoServer: ({ downloadMap, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, }: {
|
|
11
12
|
downloadMap: DownloadMap;
|
|
@@ -23,10 +23,15 @@ const extractUrlAndSourceFromUrl = (url) => {
|
|
|
23
23
|
throw new Error('Did not get `time` parameter');
|
|
24
24
|
}
|
|
25
25
|
const transparent = params.get('transparent');
|
|
26
|
+
const toneMapped = params.get('toneMapped');
|
|
27
|
+
if (!toneMapped) {
|
|
28
|
+
throw new Error('Did not get `toneMapped` parameter');
|
|
29
|
+
}
|
|
26
30
|
return {
|
|
27
31
|
src,
|
|
28
32
|
time: parseFloat(time),
|
|
29
33
|
transparent: transparent === 'true',
|
|
34
|
+
toneMapped: toneMapped === 'true',
|
|
30
35
|
};
|
|
31
36
|
};
|
|
32
37
|
exports.extractUrlAndSourceFromUrl = extractUrlAndSourceFromUrl;
|
|
@@ -61,7 +66,7 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
61
66
|
response.end();
|
|
62
67
|
return;
|
|
63
68
|
}
|
|
64
|
-
const { src, time, transparent } = (0, exports.extractUrlAndSourceFromUrl)(req.url);
|
|
69
|
+
const { src, time, transparent, toneMapped } = (0, exports.extractUrlAndSourceFromUrl)(req.url);
|
|
65
70
|
response.setHeader('access-control-allow-origin', '*');
|
|
66
71
|
if (transparent) {
|
|
67
72
|
response.setHeader('content-type', `image/png`);
|
|
@@ -96,12 +101,16 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
extractStart = Date.now();
|
|
99
|
-
|
|
104
|
+
compositor
|
|
105
|
+
.executeCommand('ExtractFrame', {
|
|
100
106
|
src: to,
|
|
101
107
|
original_src: src,
|
|
102
108
|
time,
|
|
103
109
|
transparent,
|
|
104
|
-
|
|
110
|
+
tone_mapped: toneMapped,
|
|
111
|
+
})
|
|
112
|
+
.then(resolve)
|
|
113
|
+
.catch(reject);
|
|
105
114
|
});
|
|
106
115
|
})
|
|
107
116
|
.then((readable) => {
|