@remotion/renderer 4.1.0-alpha5 → 4.1.0-alpha7
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/BrowserPage.js +11 -0
- package/dist/browser/should-log-message.js +6 -0
- package/dist/compositor/compose.js +5 -0
- package/dist/compositor/compositor.js +3 -4
- package/dist/format-logs.js +6 -0
- package/dist/index.d.ts +19 -18
- package/dist/logger.js +7 -7
- package/dist/offthread-video-server.js +8 -0
- package/dist/options/crf.js +1 -1
- package/dist/options/video-codec.js +1 -1
- package/dist/render-frames.js +9 -4
- package/dist/render-media.js +7 -5
- package/dist/render-still.js +2 -3
- package/dist/seek-to-frame.d.ts +2 -1
- package/dist/seek-to-frame.js +4 -4
- package/dist/set-props-and-env.js +4 -3
- package/package.json +9 -9
|
@@ -40,6 +40,14 @@ const TaskQueue_1 = require("./TaskQueue");
|
|
|
40
40
|
const TimeoutSettings_1 = require("./TimeoutSettings");
|
|
41
41
|
const util_1 = require("./util");
|
|
42
42
|
const format_logs_1 = require("../format-logs");
|
|
43
|
+
const shouldHideWarning = (log) => {
|
|
44
|
+
// Mixed Content warnings caused by localhost should not be displayed
|
|
45
|
+
if (log.text.includes('Mixed Content:') &&
|
|
46
|
+
log.text.includes('http://localhost:')) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
};
|
|
43
51
|
class Page extends EventEmitter_1.EventEmitter {
|
|
44
52
|
static async _create({ client, target, defaultViewport, browser, sourcemapContext, logLevel, indent, }) {
|
|
45
53
|
const page = new Page({
|
|
@@ -106,6 +114,9 @@ class Page extends EventEmitter_1.EventEmitter {
|
|
|
106
114
|
this.on('console', (log) => {
|
|
107
115
|
var _a;
|
|
108
116
|
const { url, columnNumber, lineNumber } = log.location();
|
|
117
|
+
if (shouldHideWarning(log)) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
109
120
|
if ((url === null || url === void 0 ? void 0 : url.endsWith(remotion_1.Internals.bundleName)) &&
|
|
110
121
|
lineNumber &&
|
|
111
122
|
this.sourcemapContext) {
|
|
@@ -18,6 +18,12 @@ const shouldLogBrowserMessage = (message) => {
|
|
|
18
18
|
if (message.includes('Failed to send GpuControl.CreateCommandBuffer')) {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
+
if (message.includes('CreatePlatformSocket() failed: Address family not supported by protocol')) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (message.includes('Fontconfig error: No writable cache directories')) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
21
27
|
return true;
|
|
22
28
|
};
|
|
23
29
|
exports.shouldLogBrowserMessage = shouldLogBrowserMessage;
|
|
@@ -75,6 +75,11 @@ const callCompositor = (payload) => {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
if (child.stdin.closed) {
|
|
79
|
+
reject(new Error('Compositor stdin closed unexpectedly,' +
|
|
80
|
+
Buffer.concat(stderrChunks).toString('utf-8')));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
78
83
|
child.stdin.write(payload);
|
|
79
84
|
child.stdin.end();
|
|
80
85
|
});
|
|
@@ -19,9 +19,9 @@ const getIdealMaximumFrameCacheItems = () => {
|
|
|
19
19
|
// Assuming 1 frame is approximately 6MB
|
|
20
20
|
// Assuming only half the available memory should be used
|
|
21
21
|
const max = Math.floor(freeMemory / (1024 * 1024 * 6));
|
|
22
|
-
// Never store more than
|
|
23
|
-
// But
|
|
24
|
-
return Math.max(
|
|
22
|
+
// Never store more than 2000 frames
|
|
23
|
+
// But 500 is needed even if it's going to swap
|
|
24
|
+
return Math.max(500, Math.min(max, 2000));
|
|
25
25
|
};
|
|
26
26
|
exports.getIdealMaximumFrameCacheItems = getIdealMaximumFrameCacheItems;
|
|
27
27
|
const startLongRunningCompositor = (maximumFrameCacheItems, logLevel, indent) => {
|
|
@@ -206,7 +206,6 @@ const startCompositor = (type, payload, logLevel, indent) => {
|
|
|
206
206
|
params,
|
|
207
207
|
},
|
|
208
208
|
};
|
|
209
|
-
// TODO: Should have a way to error out a single task
|
|
210
209
|
child.stdin.write(JSON.stringify(composed) + '\n');
|
|
211
210
|
waiters.set(nonce, {
|
|
212
211
|
resolve: _resolve,
|
package/dist/format-logs.js
CHANGED
|
@@ -48,6 +48,9 @@ const formatObjectPreview = (preview) => {
|
|
|
48
48
|
return chalk_1.chalk.reset(`${property.name}: ${formatProperty(property)}`);
|
|
49
49
|
});
|
|
50
50
|
if (preview.subtype === 'array') {
|
|
51
|
+
if (preview.overflow) {
|
|
52
|
+
return chalk_1.chalk.reset(`[ ${preview.properties.map((p) => formatProperty(p)).join(', ')}, …]`);
|
|
53
|
+
}
|
|
51
54
|
return chalk_1.chalk.reset(`[ ${preview.properties.map((p) => formatProperty(p)).join(', ')} ]`);
|
|
52
55
|
}
|
|
53
56
|
if (preview.subtype === 'arraybuffer') {
|
|
@@ -104,6 +107,9 @@ const formatObjectPreview = (preview) => {
|
|
|
104
107
|
if (properties.length === 0) {
|
|
105
108
|
return chalk_1.chalk.reset('{}');
|
|
106
109
|
}
|
|
110
|
+
if (preview.overflow) {
|
|
111
|
+
return chalk_1.chalk.reset(`{ ${properties.join(', ')}, …}`);
|
|
112
|
+
}
|
|
107
113
|
return chalk_1.chalk.reset(`{ ${properties.join(', ')} }`);
|
|
108
114
|
}
|
|
109
115
|
return '';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import execa from 'execa';
|
|
2
3
|
import { HeadlessBrowser } from './browser/Browser';
|
|
3
4
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -42,7 +43,7 @@ export declare const RenderInternals: {
|
|
|
42
43
|
downloadMap: import("./assets/download-map").DownloadMap;
|
|
43
44
|
remotionRoot: string;
|
|
44
45
|
concurrency: number;
|
|
45
|
-
logLevel: "
|
|
46
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
46
47
|
indent: boolean;
|
|
47
48
|
}) => Promise<{
|
|
48
49
|
port: number;
|
|
@@ -113,8 +114,8 @@ export declare const RenderInternals: {
|
|
|
113
114
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
114
115
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
115
116
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
116
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
117
|
-
validateOpenGlRenderer: (option: "
|
|
117
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
118
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
118
119
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
119
120
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
120
121
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -122,7 +123,7 @@ export declare const RenderInternals: {
|
|
|
122
123
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
123
124
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
124
125
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
125
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
126
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
126
127
|
isValidLogLevel: (level: string) => boolean;
|
|
127
128
|
perf: typeof perf;
|
|
128
129
|
convertToPositiveFrameIndex: ({ frame, durationInFrames, }: {
|
|
@@ -299,8 +300,8 @@ export declare const RenderInternals: {
|
|
|
299
300
|
};
|
|
300
301
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
301
302
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
302
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
303
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
303
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
304
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
304
305
|
DEFAULT_JPEG_QUALITY: number;
|
|
305
306
|
chalk: {
|
|
306
307
|
enabled: () => boolean;
|
|
@@ -356,24 +357,24 @@ export declare const RenderInternals: {
|
|
|
356
357
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
357
358
|
verboseAdvanced: (options: {
|
|
358
359
|
indent: boolean;
|
|
359
|
-
logLevel: "
|
|
360
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
360
361
|
} & {
|
|
361
362
|
tag?: string | undefined;
|
|
362
363
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
363
364
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
364
365
|
infoAdvanced: (options: {
|
|
365
366
|
indent: boolean;
|
|
366
|
-
logLevel: "
|
|
367
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
367
368
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
368
369
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
369
370
|
warnAdvanced: (options: {
|
|
370
371
|
indent: boolean;
|
|
371
|
-
logLevel: "
|
|
372
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
372
373
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
373
374
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
374
375
|
};
|
|
375
|
-
getLogLevel: () => "
|
|
376
|
-
setLogLevel: (newLogLevel: "
|
|
376
|
+
getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
377
|
+
setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
|
|
377
378
|
INDENT_TOKEN: string;
|
|
378
379
|
isColorSupported: () => boolean;
|
|
379
380
|
HeadlessBrowser: typeof HeadlessBrowser;
|
|
@@ -382,7 +383,7 @@ export declare const RenderInternals: {
|
|
|
382
383
|
port: number | null;
|
|
383
384
|
remotionRoot: string;
|
|
384
385
|
concurrency: number;
|
|
385
|
-
logLevel: "
|
|
386
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
386
387
|
indent: boolean;
|
|
387
388
|
}) => Promise<import("./prepare-server").RemotionServer>;
|
|
388
389
|
makeOrReuseServer: (server: import("./prepare-server").RemotionServer | undefined, config: {
|
|
@@ -390,7 +391,7 @@ export declare const RenderInternals: {
|
|
|
390
391
|
port: number | null;
|
|
391
392
|
remotionRoot: string;
|
|
392
393
|
concurrency: number;
|
|
393
|
-
logLevel: "
|
|
394
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
394
395
|
indent: boolean;
|
|
395
396
|
}, { onDownload, onError, }: {
|
|
396
397
|
onError: (err: Error) => void;
|
|
@@ -404,7 +405,7 @@ export declare const RenderInternals: {
|
|
|
404
405
|
output: string | null;
|
|
405
406
|
frame: number;
|
|
406
407
|
inputProps: Record<string, unknown>;
|
|
407
|
-
imageFormat: "
|
|
408
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
408
409
|
jpegQuality: number;
|
|
409
410
|
puppeteerInstance: HeadlessBrowser | null;
|
|
410
411
|
envVariables: Record<string, string>;
|
|
@@ -418,7 +419,7 @@ export declare const RenderInternals: {
|
|
|
418
419
|
cancelSignal: import("./make-cancel-signal").CancelSignal | null;
|
|
419
420
|
indent: boolean;
|
|
420
421
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
421
|
-
logLevel: "
|
|
422
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
422
423
|
serveUrl: string;
|
|
423
424
|
port: number | null;
|
|
424
425
|
}) => Promise<{
|
|
@@ -431,7 +432,7 @@ export declare const RenderInternals: {
|
|
|
431
432
|
viewport: import("./browser/PuppeteerViewport").Viewport | null;
|
|
432
433
|
indent: boolean;
|
|
433
434
|
browser: import("./browser").Browser;
|
|
434
|
-
logLevel: "
|
|
435
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
435
436
|
}) => Promise<HeadlessBrowser>;
|
|
436
437
|
internalSelectComposition: (options: {
|
|
437
438
|
inputProps: Record<string, unknown>;
|
|
@@ -444,7 +445,7 @@ export declare const RenderInternals: {
|
|
|
444
445
|
port: number | null;
|
|
445
446
|
indent: boolean;
|
|
446
447
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
447
|
-
logLevel: "
|
|
448
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
448
449
|
serveUrl: string;
|
|
449
450
|
id: string;
|
|
450
451
|
}) => Promise<{
|
|
@@ -462,7 +463,7 @@ export declare const RenderInternals: {
|
|
|
462
463
|
port: number | null;
|
|
463
464
|
server: import("./prepare-server").RemotionServer | undefined;
|
|
464
465
|
indent: boolean;
|
|
465
|
-
logLevel: "
|
|
466
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
466
467
|
serveUrlOrWebpackUrl: string;
|
|
467
468
|
}) => Promise<import("remotion").VideoConfig[]>;
|
|
468
469
|
internalRenderFrames: ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, inputProps, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, }: import("./render-frames").InternalRenderFramesOptions) => Promise<import("./types").RenderFramesOutput>;
|
package/dist/logger.js
CHANGED
|
@@ -23,15 +23,16 @@ exports.Log = {
|
|
|
23
23
|
return console.log(...[
|
|
24
24
|
options.indent ? exports.INDENT_TOKEN : null,
|
|
25
25
|
options.tag ? (0, exports.verboseTag)(options.tag) : null,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
]
|
|
27
|
+
.filter(truthy_1.truthy)
|
|
28
|
+
.concat(args.map((a) => chalk_1.chalk.gray(a))));
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
info: (...args) => {
|
|
31
32
|
exports.Log.infoAdvanced({ indent: false, logLevel: (0, exports.getLogLevel)() }, ...args);
|
|
32
33
|
},
|
|
33
34
|
infoAdvanced: (options, ...args) => {
|
|
34
|
-
return console.log(...[options.indent ? exports.INDENT_TOKEN : null
|
|
35
|
+
return console.log(...[options.indent ? exports.INDENT_TOKEN : null].filter(truthy_1.truthy).concat(args));
|
|
35
36
|
},
|
|
36
37
|
warn: (...args) => {
|
|
37
38
|
if ((0, log_level_1.isEqualOrBelowLogLevel)((0, exports.getLogLevel)(), 'warn')) {
|
|
@@ -40,10 +41,9 @@ exports.Log = {
|
|
|
40
41
|
},
|
|
41
42
|
warnAdvanced: (options, ...args) => {
|
|
42
43
|
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'warn')) {
|
|
43
|
-
return console.warn(...[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
].filter(truthy_1.truthy));
|
|
44
|
+
return console.warn(...[options.indent ? chalk_1.chalk.yellow(exports.INDENT_TOKEN) : null]
|
|
45
|
+
.filter(truthy_1.truthy)
|
|
46
|
+
.concat(args.map((a) => chalk_1.chalk.yellow(a))));
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
error: (...args) => {
|
|
@@ -5,6 +5,7 @@ const node_url_1 = require("node:url");
|
|
|
5
5
|
const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
|
|
6
6
|
const compositor_1 = require("./compositor/compositor");
|
|
7
7
|
const log_level_1 = require("./log-level");
|
|
8
|
+
const logger_1 = require("./logger");
|
|
8
9
|
const extractUrlAndSourceFromUrl = (url) => {
|
|
9
10
|
const parsed = new URL(url, 'http://localhost');
|
|
10
11
|
const query = parsed.search;
|
|
@@ -68,8 +69,10 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
68
69
|
res.end();
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
72
|
+
let extractStart = Date.now();
|
|
71
73
|
(0, download_and_map_assets_to_file_1.downloadAsset)({ src, emitter: events, downloadMap })
|
|
72
74
|
.then((to) => {
|
|
75
|
+
extractStart = Date.now();
|
|
73
76
|
return compositor.executeCommand('ExtractFrame', {
|
|
74
77
|
input: to,
|
|
75
78
|
time,
|
|
@@ -77,6 +80,11 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
77
80
|
});
|
|
78
81
|
})
|
|
79
82
|
.then((readable) => {
|
|
83
|
+
const extractEnd = Date.now();
|
|
84
|
+
const timeToExtract = extractEnd - extractStart;
|
|
85
|
+
if (timeToExtract > 1000) {
|
|
86
|
+
logger_1.Log.verbose(`Took ${timeToExtract}ms to extract frame from ${src} at ${time}`);
|
|
87
|
+
}
|
|
80
88
|
if (!readable) {
|
|
81
89
|
throw new Error('no readable from ffmpeg');
|
|
82
90
|
}
|
package/dist/options/crf.js
CHANGED
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
exports.crfOption = {
|
|
6
6
|
name: 'CRF',
|
|
7
7
|
cliFlag: '--crf',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the
|
|
8
|
+
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the CRF (Constant Rate Factor). The lower the number, the better the quality, the higher the number, the smaller the file is \u2013 of course at the cost of quality." })),
|
|
9
9
|
ssrName: 'crf',
|
|
10
10
|
docLink: 'https://www.remotion.dev/docs/encoding/#controlling-quality-using-the-crf-setting',
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
exports.videoCodecOption = {
|
|
6
6
|
name: 'Codec',
|
|
7
7
|
cliFlag: '--codec',
|
|
8
|
-
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "H264 works well in most cases, sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM and ProRes support transparency." })),
|
|
8
|
+
description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "H264 works well in most cases, but sometimes it's worth going for a different codec. WebM achieves higher compression but is slower to render. WebM and ProRes support transparency." })),
|
|
9
9
|
ssrName: 'codec',
|
|
10
10
|
docLink: 'https://www.remotion.dev/docs/encoding/#choosing-a-codec',
|
|
11
11
|
};
|
package/dist/render-frames.js
CHANGED
|
@@ -133,7 +133,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, inputProps
|
|
|
133
133
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
|
134
134
|
stopped = true;
|
|
135
135
|
});
|
|
136
|
-
const renderFrameWithOptionToReject = async ({ frame, index, reject, width, height, }) => {
|
|
136
|
+
const renderFrameWithOptionToReject = async ({ frame, index, reject, width, height, compId, }) => {
|
|
137
137
|
const pool = await poolPromise;
|
|
138
138
|
const freePage = await pool.acquire();
|
|
139
139
|
if (stopped) {
|
|
@@ -149,7 +149,12 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, inputProps
|
|
|
149
149
|
frame,
|
|
150
150
|
});
|
|
151
151
|
freePage.on('error', errorCallbackOnFrame);
|
|
152
|
-
|
|
152
|
+
const startSeeking = Date.now();
|
|
153
|
+
await (0, seek_to_frame_1.seekToFrame)({ frame, page: freePage, composition: compId });
|
|
154
|
+
const timeToSeek = Date.now() - startSeeking;
|
|
155
|
+
if (timeToSeek > 1000) {
|
|
156
|
+
logger_1.Log.verbose(`Seeking to frame ${frame} took ${timeToSeek}ms`);
|
|
157
|
+
}
|
|
153
158
|
if (!outputDir && !onFrameBuffer && imageFormat !== 'none') {
|
|
154
159
|
throw new Error('Called renderFrames() without specifying either `outputDir` or `onFrameBuffer`');
|
|
155
160
|
}
|
|
@@ -210,6 +215,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, inputProps
|
|
|
210
215
|
reject,
|
|
211
216
|
width: composition.width,
|
|
212
217
|
height: composition.height,
|
|
218
|
+
compId: composition.id,
|
|
213
219
|
})
|
|
214
220
|
.then(() => {
|
|
215
221
|
resolve();
|
|
@@ -290,8 +296,7 @@ const internalRenderFrames = ({ browserExecutable, cancelSignal, chromiumOptions
|
|
|
290
296
|
remotion_1.Internals.validateDimension(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
291
297
|
remotion_1.Internals.validateDimension(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
292
298
|
remotion_1.Internals.validateFps(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
293
|
-
remotion_1.Internals.validateDurationInFrames({
|
|
294
|
-
durationInFrames: composition.durationInFrames,
|
|
299
|
+
remotion_1.Internals.validateDurationInFrames(composition.durationInFrames, {
|
|
295
300
|
component: 'in the `config` object passed to `renderFrames()`',
|
|
296
301
|
allowFloats: false,
|
|
297
302
|
});
|
package/dist/render-media.js
CHANGED
|
@@ -94,11 +94,13 @@ const internalRenderMedia = ({ proResProfile, crf, composition, inputProps, pixe
|
|
|
94
94
|
logLevel,
|
|
95
95
|
tag: 'renderMedia()',
|
|
96
96
|
}, 'Codec supports parallel rendering:', (0, can_use_parallel_encoding_1.canUseParallelEncoding)(codec));
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
if (disallowParallelEncoding) {
|
|
98
|
+
logger_1.Log.verboseAdvanced({
|
|
99
|
+
indent,
|
|
100
|
+
logLevel,
|
|
101
|
+
tag: 'renderMedia()',
|
|
102
|
+
}, 'User disallowed parallel encoding.');
|
|
103
|
+
}
|
|
102
104
|
if (parallelEncoding) {
|
|
103
105
|
logger_1.Log.verboseAdvanced({
|
|
104
106
|
indent,
|
package/dist/render-still.js
CHANGED
|
@@ -53,8 +53,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
53
53
|
remotion_1.Internals.validateDimension(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
54
54
|
remotion_1.Internals.validateDimension(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
55
55
|
remotion_1.Internals.validateFps(composition.fps, 'in the `config` object of `renderStill()`', false);
|
|
56
|
-
remotion_1.Internals.validateDurationInFrames({
|
|
57
|
-
durationInFrames: composition.durationInFrames,
|
|
56
|
+
remotion_1.Internals.validateDurationInFrames(composition.durationInFrames, {
|
|
58
57
|
component: 'in the `config` object passed to `renderStill()`',
|
|
59
58
|
allowFloats: false,
|
|
60
59
|
});
|
|
@@ -170,7 +169,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
170
169
|
frame: null,
|
|
171
170
|
page,
|
|
172
171
|
});
|
|
173
|
-
await (0, seek_to_frame_1.seekToFrame)({ frame: stillFrame, page });
|
|
172
|
+
await (0, seek_to_frame_1.seekToFrame)({ frame: stillFrame, page, composition: composition.id });
|
|
174
173
|
const { buffer } = await (0, take_frame_and_compose_1.takeFrameAndCompose)({
|
|
175
174
|
frame: stillFrame,
|
|
176
175
|
freePage: page,
|
package/dist/seek-to-frame.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Page } from './browser/BrowserPage';
|
|
2
2
|
export declare const waitForReady: (page: Page) => Promise<unknown>;
|
|
3
|
-
export declare const seekToFrame: ({ frame, page, }: {
|
|
3
|
+
export declare const seekToFrame: ({ frame, page, composition, }: {
|
|
4
4
|
frame: number;
|
|
5
|
+
composition: string;
|
|
5
6
|
page: Page;
|
|
6
7
|
}) => Promise<void>;
|
package/dist/seek-to-frame.js
CHANGED
|
@@ -48,13 +48,13 @@ const waitForReady = (page) => {
|
|
|
48
48
|
]);
|
|
49
49
|
};
|
|
50
50
|
exports.waitForReady = waitForReady;
|
|
51
|
-
const seekToFrame = async ({ frame, page, }) => {
|
|
51
|
+
const seekToFrame = async ({ frame, page, composition, }) => {
|
|
52
52
|
await (0, exports.waitForReady)(page);
|
|
53
53
|
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
|
54
|
-
pageFunction: (f) => {
|
|
55
|
-
window.remotion_setFrame(f);
|
|
54
|
+
pageFunction: (f, c) => {
|
|
55
|
+
window.remotion_setFrame(f, c);
|
|
56
56
|
},
|
|
57
|
-
args: [frame],
|
|
57
|
+
args: [frame, composition],
|
|
58
58
|
frame,
|
|
59
59
|
page,
|
|
60
60
|
});
|
|
@@ -7,6 +7,7 @@ const normalize_serve_url_1 = require("./normalize-serve-url");
|
|
|
7
7
|
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
8
8
|
const redirect_status_codes_1 = require("./redirect-status-codes");
|
|
9
9
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
10
|
+
const logger_1 = require("./logger");
|
|
10
11
|
const innerSetPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, }) => {
|
|
11
12
|
(0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
|
|
12
13
|
const actualTimeout = timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT;
|
|
@@ -97,16 +98,16 @@ const innerSetPropsAndEnv = async ({ inputProps, envVariables, page, serveUrl, i
|
|
|
97
98
|
frame: null,
|
|
98
99
|
page,
|
|
99
100
|
});
|
|
100
|
-
const requiredVersion = '
|
|
101
|
+
const requiredVersion = '7';
|
|
101
102
|
if (siteVersion !== requiredVersion) {
|
|
102
103
|
throw new Error(`Incompatible site: When visiting ${urlToVisit}, a bundle was found, but one that is not compatible with this version of Remotion. Found version: ${siteVersion} - Required version: ${requiredVersion}. To resolve this error, please bundle and deploy again.`);
|
|
103
104
|
}
|
|
104
105
|
if (remotionVersion !== version_1.VERSION && process.env.NODE_ENV !== 'test') {
|
|
105
106
|
if (remotionVersion) {
|
|
106
|
-
|
|
107
|
+
logger_1.Log.warn(`The site was bundled with version ${remotionVersion} of @remotion/bundler, while @remotion/renderer is on version ${version_1.VERSION}. You may not have the newest bugfixes and features. Re-bundle the site to fix this issue.`);
|
|
107
108
|
}
|
|
108
109
|
else {
|
|
109
|
-
|
|
110
|
+
logger_1.Log.warn(`The site was bundled with an old version of Remotion, while @remotion/renderer is on version ${version_1.VERSION}. You may not have the newest bugfixes and features. Re-bundle the site to fix this issue.`);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.1.0-
|
|
3
|
+
"version": "4.1.0-alpha7",
|
|
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.1.0-
|
|
21
|
+
"remotion": "4.1.0-alpha7"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"zod": "^3.21.4"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@remotion/compositor-darwin-arm64": "4.1.0-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-
|
|
50
|
-
"@remotion/compositor-
|
|
51
|
-
"@remotion/compositor-
|
|
45
|
+
"@remotion/compositor-darwin-arm64": "4.1.0-alpha7",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.1.0-alpha7",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.1.0-alpha7",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.1.0-alpha7",
|
|
49
|
+
"@remotion/compositor-linux-x64-musl": "4.1.0-alpha7",
|
|
50
|
+
"@remotion/compositor-darwin-x64": "4.1.0-alpha7",
|
|
51
|
+
"@remotion/compositor-linux-x64-gnu": "4.1.0-alpha7"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"remotion",
|