@remotion/renderer 4.0.245 → 4.0.247
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.d.ts +4 -2
- package/dist/browser/BrowserFetcher.js +41 -18
- package/dist/browser/browser-download-progress-bar.js +13 -3
- package/dist/client.d.ts +150 -2
- package/dist/client.js +2 -0
- package/dist/ensure-browser.d.ts +2 -3
- package/dist/ensure-browser.js +9 -13
- package/dist/get-browser-instance.d.ts +3 -1
- package/dist/get-browser-instance.js +2 -1
- package/dist/get-codec-name.d.ts +1 -1
- package/dist/get-compositions.js +5 -2
- package/dist/get-local-browser-executable.d.ts +3 -1
- package/dist/get-local-browser-executable.js +4 -8
- package/dist/index.d.ts +123 -6
- package/dist/open-browser.d.ts +6 -5
- package/dist/open-browser.js +12 -3
- package/dist/options/chrome-mode.d.ts +17 -0
- package/dist/options/chrome-mode.js +46 -0
- package/dist/options/index.d.ts +17 -2
- package/dist/options/index.js +2 -0
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/on-browser-download.d.ts +4 -1
- package/dist/options/options-map.d.ts +132 -0
- package/dist/options/options-map.js +12 -0
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/render-frames.js +5 -2
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +9 -3
- package/dist/render-still.js +9 -3
- package/dist/select-composition.js +5 -2
- package/dist/serve-static.js +8 -1
- package/dist/test-gpu.d.ts +3 -1
- package/dist/test-gpu.js +2 -1
- package/package.json +12 -12
- package/dist/get-local-browser.d.ts +0 -1
- package/dist/get-local-browser.js +0 -19
|
@@ -4,6 +4,7 @@ exports.optionsMap = void 0;
|
|
|
4
4
|
const audio_bitrate_1 = require("./audio-bitrate");
|
|
5
5
|
const audio_codec_1 = require("./audio-codec");
|
|
6
6
|
const binaries_directory_1 = require("./binaries-directory");
|
|
7
|
+
const chrome_mode_1 = require("./chrome-mode");
|
|
7
8
|
const color_space_1 = require("./color-space");
|
|
8
9
|
const crf_1 = require("./crf");
|
|
9
10
|
const delete_after_1 = require("./delete-after");
|
|
@@ -49,6 +50,7 @@ exports.optionsMap = {
|
|
|
49
50
|
audioCodec: audio_codec_1.audioCodecOption,
|
|
50
51
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
51
52
|
hardwareAcceleration: hardware_acceleration_1.hardwareAccelerationOption,
|
|
53
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
52
54
|
},
|
|
53
55
|
stitchFramesToVideo: {
|
|
54
56
|
separateAudioTo: separate_audio_1.separateAudioOption,
|
|
@@ -61,6 +63,7 @@ exports.optionsMap = {
|
|
|
61
63
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
62
64
|
binariesDirectory: binaries_directory_1.binariesDirectoryOption,
|
|
63
65
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
66
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
64
67
|
},
|
|
65
68
|
getCompositions: {
|
|
66
69
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
@@ -68,6 +71,7 @@ exports.optionsMap = {
|
|
|
68
71
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
69
72
|
binariesDirectory: binaries_directory_1.binariesDirectoryOption,
|
|
70
73
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
74
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
71
75
|
},
|
|
72
76
|
selectComposition: {
|
|
73
77
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
@@ -75,6 +79,7 @@ exports.optionsMap = {
|
|
|
75
79
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
76
80
|
binariesDirectory: binaries_directory_1.binariesDirectoryOption,
|
|
77
81
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
82
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
78
83
|
},
|
|
79
84
|
renderFrames: {
|
|
80
85
|
forSeamlessAacConcatenation: for_seamless_aac_concatenation_1.forSeamlessAacConcatenationOption,
|
|
@@ -84,6 +89,7 @@ exports.optionsMap = {
|
|
|
84
89
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
85
90
|
binariesDirectory: binaries_directory_1.binariesDirectoryOption,
|
|
86
91
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
92
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
87
93
|
},
|
|
88
94
|
renderMediaOnLambda: {
|
|
89
95
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
@@ -141,6 +147,12 @@ exports.optionsMap = {
|
|
|
141
147
|
ensureBrowser: {
|
|
142
148
|
logLevel: log_level_1.logLevelOption,
|
|
143
149
|
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
150
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
151
|
+
},
|
|
152
|
+
openBrowser: {
|
|
153
|
+
logLevel: log_level_1.logLevelOption,
|
|
154
|
+
onBrowserDownload: on_browser_download_1.onBrowserDownloadOption,
|
|
155
|
+
chromeMode: chrome_mode_1.chromeModeOption,
|
|
144
156
|
},
|
|
145
157
|
deploySiteLambda: {
|
|
146
158
|
logLevel: log_level_1.logLevelOption,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const webhookCustomDataOption: {
|
|
2
2
|
name: string;
|
|
3
3
|
cliFlag: "webhook-custom-data";
|
|
4
|
-
description: (type: "
|
|
4
|
+
description: (type: "ssr" | "cli") => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
ssrName: "customData";
|
|
6
6
|
docLink: string;
|
|
7
7
|
type: Record<string, unknown> | null;
|
package/dist/render-frames.js
CHANGED
|
@@ -413,7 +413,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
413
413
|
frameCount: framesToRender.length,
|
|
414
414
|
};
|
|
415
415
|
};
|
|
416
|
-
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, }) => {
|
|
416
|
+
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, chromeMode, }) => {
|
|
417
417
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
418
418
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
419
419
|
(0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
@@ -432,6 +432,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
|
|
|
432
432
|
viewport: null,
|
|
433
433
|
logLevel,
|
|
434
434
|
onBrowserDownload,
|
|
435
|
+
chromeMode,
|
|
435
436
|
});
|
|
436
437
|
const browserInstance = puppeteerInstance !== null && puppeteerInstance !== void 0 ? puppeteerInstance : makeBrowser();
|
|
437
438
|
const resolvedConcurrency = (0, get_concurrency_1.resolveConcurrency)(concurrency);
|
|
@@ -507,6 +508,7 @@ const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOpti
|
|
|
507
508
|
compositionStart,
|
|
508
509
|
onBrowserDownload,
|
|
509
510
|
onArtifact,
|
|
511
|
+
chromeMode,
|
|
510
512
|
});
|
|
511
513
|
}),
|
|
512
514
|
])
|
|
@@ -555,7 +557,7 @@ exports.internalRenderFrames = (0, wrap_with_error_handling_1.wrapWithErrorHandl
|
|
|
555
557
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-frames)
|
|
556
558
|
*/
|
|
557
559
|
const renderFrames = (options) => {
|
|
558
|
-
const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onArtifact, } = options;
|
|
560
|
+
const { composition, inputProps, onFrameUpdate, onStart, outputDir, serveUrl, browserExecutable, cancelSignal, chromiumOptions, concurrency, dumpBrowserLogs, envVariables, everyNthFrame, frameRange, imageFormat, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, } = options;
|
|
559
561
|
if (!composition) {
|
|
560
562
|
throw new Error('No `composition` option has been specified for renderFrames()');
|
|
561
563
|
}
|
|
@@ -610,6 +612,7 @@ const renderFrames = (options) => {
|
|
|
610
612
|
forSeamlessAacConcatenation: false,
|
|
611
613
|
onBrowserDownload: onBrowserDownload !== null && onBrowserDownload !== void 0 ? onBrowserDownload : (0, browser_download_progress_bar_1.defaultBrowserDownloadProgress)({ indent, logLevel, api: 'renderFrames()' }),
|
|
612
614
|
onArtifact: onArtifact !== null && onArtifact !== void 0 ? onArtifact : null,
|
|
615
|
+
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
613
616
|
});
|
|
614
617
|
};
|
|
615
618
|
exports.renderFrames = renderFrames;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -128,5 +128,5 @@ type RenderMediaResult = {
|
|
|
128
128
|
slowestFrames: SlowFrame[];
|
|
129
129
|
};
|
|
130
130
|
export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) => Promise<RenderMediaResult>;
|
|
131
|
-
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
131
|
+
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
132
132
|
export {};
|
package/dist/render-media.js
CHANGED
|
@@ -50,7 +50,7 @@ const validate_scale_1 = require("./validate-scale");
|
|
|
50
50
|
const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
51
51
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
52
52
|
const SLOWEST_FRAME_COUNT = 10;
|
|
53
|
-
const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, }) => {
|
|
53
|
+
const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, compositionStart, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, }) => {
|
|
54
54
|
if (repro) {
|
|
55
55
|
(0, repro_1.enableRepro)({
|
|
56
56
|
serveUrl,
|
|
@@ -361,6 +361,7 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
361
361
|
forSeamlessAacConcatenation,
|
|
362
362
|
onBrowserDownload,
|
|
363
363
|
onArtifact,
|
|
364
|
+
chromeMode,
|
|
364
365
|
});
|
|
365
366
|
return renderFramesProc;
|
|
366
367
|
})
|
|
@@ -505,7 +506,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
505
506
|
* @description Render a video or an audio programmatically.
|
|
506
507
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
507
508
|
*/
|
|
508
|
-
const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, }) => {
|
|
509
|
+
const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, }) => {
|
|
509
510
|
var _a, _b;
|
|
510
511
|
const indent = false;
|
|
511
512
|
const logLevel = verbose || dumpBrowserLogs ? 'verbose' : (passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info');
|
|
@@ -570,12 +571,17 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
|
|
|
570
571
|
binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
|
|
571
572
|
separateAudioTo: separateAudioTo !== null && separateAudioTo !== void 0 ? separateAudioTo : null,
|
|
572
573
|
forSeamlessAacConcatenation: forSeamlessAacConcatenation !== null && forSeamlessAacConcatenation !== void 0 ? forSeamlessAacConcatenation : false,
|
|
573
|
-
onBrowserDownload: onBrowserDownload !== null && onBrowserDownload !== void 0 ? onBrowserDownload : (0, browser_download_progress_bar_1.defaultBrowserDownloadProgress)({
|
|
574
|
+
onBrowserDownload: onBrowserDownload !== null && onBrowserDownload !== void 0 ? onBrowserDownload : (0, browser_download_progress_bar_1.defaultBrowserDownloadProgress)({
|
|
575
|
+
indent,
|
|
576
|
+
logLevel,
|
|
577
|
+
api: 'renderMedia()',
|
|
578
|
+
}),
|
|
574
579
|
onArtifact: onArtifact !== null && onArtifact !== void 0 ? onArtifact : null,
|
|
575
580
|
metadata: metadata !== null && metadata !== void 0 ? metadata : null,
|
|
576
581
|
// TODO: In the future, introduce this as a public API when launching the distributed rendering API
|
|
577
582
|
compositionStart: 0,
|
|
578
583
|
hardwareAcceleration: hardwareAcceleration !== null && hardwareAcceleration !== void 0 ? hardwareAcceleration : 'disable',
|
|
584
|
+
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
579
585
|
});
|
|
580
586
|
};
|
|
581
587
|
exports.renderMedia = renderMedia;
|
package/dist/render-still.js
CHANGED
|
@@ -53,7 +53,7 @@ const validate_1 = require("./validate");
|
|
|
53
53
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
54
54
|
const validate_scale_1 = require("./validate-scale");
|
|
55
55
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
56
|
-
const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFAULT_STILL_IMAGE_FORMAT, serveUrl, puppeteerInstance, onError, serializedInputPropsWithCustomSchema, envVariables, output, frame = 0, overwrite, browserExecutable, timeoutInMilliseconds, chromiumOptions, scale, proxyPort, cancelSignal, jpegQuality, onBrowserLog, sourceMapGetter, logLevel, indent, serializedResolvedPropsWithCustomSchema, onBrowserDownload, onArtifact, }) => {
|
|
56
|
+
const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFAULT_STILL_IMAGE_FORMAT, serveUrl, puppeteerInstance, onError, serializedInputPropsWithCustomSchema, envVariables, output, frame = 0, overwrite, browserExecutable, timeoutInMilliseconds, chromiumOptions, scale, proxyPort, cancelSignal, jpegQuality, onBrowserLog, sourceMapGetter, logLevel, indent, serializedResolvedPropsWithCustomSchema, onBrowserDownload, onArtifact, chromeMode, }) => {
|
|
57
57
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
58
58
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
59
59
|
(0, validate_1.validateFps)(composition.fps, 'in the `config` object of `renderStill()`', false);
|
|
@@ -97,6 +97,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
97
97
|
viewport: null,
|
|
98
98
|
logLevel,
|
|
99
99
|
onBrowserDownload,
|
|
100
|
+
chromeMode,
|
|
100
101
|
}));
|
|
101
102
|
const page = await browserInstance.newPage(sourceMapGetter, logLevel, indent);
|
|
102
103
|
await page.setViewport({
|
|
@@ -270,7 +271,7 @@ exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
270
271
|
*/
|
|
271
272
|
const renderStill = (options) => {
|
|
272
273
|
var _a, _b;
|
|
273
|
-
const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel: passedLogLevel, binariesDirectory, onBrowserDownload, onArtifact, } = options;
|
|
274
|
+
const { composition, serveUrl, browserExecutable, cancelSignal, chromiumOptions, dumpBrowserLogs, envVariables, frame, imageFormat, inputProps, jpegQuality, onBrowserLog, onDownload, output, overwrite, port, puppeteerInstance, scale, timeoutInMilliseconds, verbose, quality, offthreadVideoCacheSizeInBytes, logLevel: passedLogLevel, binariesDirectory, onBrowserDownload, onArtifact, chromeMode, } = options;
|
|
274
275
|
if (typeof jpegQuality !== 'undefined' && imageFormat !== 'jpeg') {
|
|
275
276
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
276
277
|
}
|
|
@@ -312,8 +313,13 @@ const renderStill = (options) => {
|
|
|
312
313
|
}).serializedString,
|
|
313
314
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
314
315
|
binariesDirectory: binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : null,
|
|
315
|
-
onBrowserDownload: onBrowserDownload !== null && onBrowserDownload !== void 0 ? onBrowserDownload : (0, browser_download_progress_bar_1.defaultBrowserDownloadProgress)({
|
|
316
|
+
onBrowserDownload: onBrowserDownload !== null && onBrowserDownload !== void 0 ? onBrowserDownload : (0, browser_download_progress_bar_1.defaultBrowserDownloadProgress)({
|
|
317
|
+
indent,
|
|
318
|
+
logLevel,
|
|
319
|
+
api: 'renderStill()',
|
|
320
|
+
}),
|
|
316
321
|
onArtifact: onArtifact !== null && onArtifact !== void 0 ? onArtifact : null,
|
|
322
|
+
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
317
323
|
});
|
|
318
324
|
};
|
|
319
325
|
exports.renderStill = renderStill;
|
|
@@ -96,7 +96,7 @@ const innerSelectComposition = async ({ page, onBrowserLog, serializedInputProps
|
|
|
96
96
|
};
|
|
97
97
|
const internalSelectCompositionRaw = async (options) => {
|
|
98
98
|
const cleanup = [];
|
|
99
|
-
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onServeUrlVisited, } = options;
|
|
99
|
+
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onServeUrlVisited, chromeMode, } = options;
|
|
100
100
|
const [{ page, cleanupPage }, serverUsed] = await Promise.all([
|
|
101
101
|
(0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
102
102
|
passedInInstance: puppeteerInstance,
|
|
@@ -106,6 +106,7 @@ const internalSelectCompositionRaw = async (options) => {
|
|
|
106
106
|
indent,
|
|
107
107
|
logLevel,
|
|
108
108
|
onBrowserDownload,
|
|
109
|
+
chromeMode,
|
|
109
110
|
}),
|
|
110
111
|
(0, prepare_server_1.makeOrReuseServer)(options.server, {
|
|
111
112
|
webpackConfigOrServeUrl: serveUrlOrWebpackUrl,
|
|
@@ -152,6 +153,7 @@ const internalSelectCompositionRaw = async (options) => {
|
|
|
152
153
|
binariesDirectory,
|
|
153
154
|
onBrowserDownload,
|
|
154
155
|
onServeUrlVisited,
|
|
156
|
+
chromeMode,
|
|
155
157
|
})
|
|
156
158
|
.then((data) => {
|
|
157
159
|
return resolve(data);
|
|
@@ -177,7 +179,7 @@ exports.internalSelectComposition = (0, wrap_with_error_handling_1.wrapWithError
|
|
|
177
179
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
|
|
178
180
|
*/
|
|
179
181
|
const selectComposition = async (options) => {
|
|
180
|
-
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, } = options;
|
|
182
|
+
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, } = options;
|
|
181
183
|
const indent = false;
|
|
182
184
|
const logLevel = (passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : verbose) ? 'verbose' : 'info';
|
|
183
185
|
const data = await (0, exports.internalSelectComposition)({
|
|
@@ -206,6 +208,7 @@ const selectComposition = async (options) => {
|
|
|
206
208
|
api: 'selectComposition()',
|
|
207
209
|
}),
|
|
208
210
|
onServeUrlVisited: () => undefined,
|
|
211
|
+
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
209
212
|
});
|
|
210
213
|
return data.metadata;
|
|
211
214
|
};
|
package/dist/serve-static.js
CHANGED
|
@@ -39,7 +39,14 @@ const serveStatic = async (path, options) => {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
server.on('connection', (conn) => {
|
|
42
|
-
|
|
42
|
+
let key;
|
|
43
|
+
// Bun 1.0.43 fails on this
|
|
44
|
+
try {
|
|
45
|
+
key = conn.remoteAddress + ':' + conn.remotePort;
|
|
46
|
+
}
|
|
47
|
+
catch (_a) {
|
|
48
|
+
key = ':';
|
|
49
|
+
}
|
|
43
50
|
connections[key] = conn;
|
|
44
51
|
conn.on('close', () => {
|
|
45
52
|
delete connections[key];
|
package/dist/test-gpu.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import type { BrowserExecutable } from './browser-executable';
|
|
2
2
|
import type { LogLevel } from './log-level';
|
|
3
3
|
import type { ChromiumOptions } from './open-browser';
|
|
4
|
+
import type { ChromeMode } from './options/chrome-mode';
|
|
4
5
|
import type { OnBrowserDownload } from './options/on-browser-download';
|
|
5
6
|
type Item = {
|
|
6
7
|
feature: string;
|
|
7
8
|
status: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, onBrowserDownload, }: {
|
|
10
|
+
export declare const getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, onBrowserDownload, chromeMode, }: {
|
|
10
11
|
browserExecutable: BrowserExecutable;
|
|
11
12
|
indent: boolean;
|
|
12
13
|
logLevel: LogLevel;
|
|
13
14
|
chromiumOptions: ChromiumOptions;
|
|
14
15
|
timeoutInMilliseconds: number;
|
|
15
16
|
onBrowserDownload: OnBrowserDownload;
|
|
17
|
+
chromeMode: ChromeMode;
|
|
16
18
|
}) => Promise<Item[]>;
|
|
17
19
|
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, timeoutInMilliseconds, onBrowserDownload, }) => {
|
|
6
|
+
const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel, chromiumOptions, timeoutInMilliseconds, onBrowserDownload, chromeMode, }) => {
|
|
7
7
|
const { page, cleanupPage: cleanup } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
8
8
|
passedInInstance: undefined,
|
|
9
9
|
browserExecutable,
|
|
@@ -12,6 +12,7 @@ const getChromiumGpuInformation = async ({ browserExecutable, indent, logLevel,
|
|
|
12
12
|
indent,
|
|
13
13
|
logLevel,
|
|
14
14
|
onBrowserDownload,
|
|
15
|
+
chromeMode,
|
|
15
16
|
});
|
|
16
17
|
await page.goto({ url: 'chrome://gpu', timeout: 12000 });
|
|
17
18
|
const { value } = await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.247",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.247",
|
|
22
|
+
"@remotion/streaming": "4.0.247"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "19.0.0",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.14.0",
|
|
36
|
-
"@remotion/
|
|
37
|
-
"@remotion/
|
|
36
|
+
"@remotion/eslint-config-internal": "4.0.247",
|
|
37
|
+
"@remotion/example-videos": "4.0.247"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
41
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
42
|
-
"@remotion/compositor-linux-arm64-
|
|
43
|
-
"@remotion/compositor-linux-
|
|
44
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
40
|
+
"@remotion/compositor-darwin-arm64": "4.0.247",
|
|
41
|
+
"@remotion/compositor-darwin-x64": "4.0.247",
|
|
42
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.247",
|
|
43
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.247",
|
|
44
|
+
"@remotion/compositor-linux-x64-musl": "4.0.247",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.247",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.247"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getLocalBrowser: () => null;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getLocalBrowser = void 0;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const getSearchPathsForProduct = () => {
|
|
9
|
-
return [];
|
|
10
|
-
};
|
|
11
|
-
const getLocalBrowser = () => {
|
|
12
|
-
for (const p of getSearchPathsForProduct()) {
|
|
13
|
-
if (fs_1.default.existsSync(p)) {
|
|
14
|
-
return p;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return null;
|
|
18
|
-
};
|
|
19
|
-
exports.getLocalBrowser = getLocalBrowser;
|