@remotion/renderer 4.0.539 → 4.0.540
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/assets/download-and-map-assets-to-file.js +16 -3
- package/dist/assets/download-file.js +9 -2
- package/dist/assets/download-map.d.ts +1 -1
- package/dist/assets/read-file.d.ts +1 -1
- package/dist/assets/read-file.js +6 -5
- package/dist/browser/BrowserFetcher.js +4 -1
- package/dist/browser/BrowserPage.js +27 -8
- package/dist/browser/NetworkManager.js +6 -1
- package/dist/browser/devtools-commands.d.ts +6 -1
- package/dist/browser/get-chrome-download-url.d.ts +1 -1
- package/dist/browser/get-chrome-download-url.js +4 -1
- package/dist/check-version-requirements.js +6 -6
- package/dist/client.d.ts +459 -238
- package/dist/esm/client.mjs +349 -310
- package/dist/esm/index.mjs +306 -261
- package/dist/get-compositions.js +6 -3
- package/dist/index.d.ts +113 -41
- package/dist/index.js +4 -2
- package/dist/make-page.d.ts +3 -1
- package/dist/make-page.js +2 -1
- package/dist/options/allow-html-in-canvas.d.ts +1 -1
- package/dist/options/api-key.d.ts +1 -1
- package/dist/options/ask-ai.d.ts +1 -1
- package/dist/options/ask-ai.js +1 -1
- package/dist/options/audio-bitrate.d.ts +1 -1
- package/dist/options/beep-on-finish.d.ts +1 -1
- package/dist/options/benchmark-concurrencies.d.ts +1 -1
- package/dist/options/binaries-directory.d.ts +1 -1
- package/dist/options/browser-executable.d.ts +1 -1
- package/dist/options/browser-executable.js +1 -1
- package/dist/options/browser.d.ts +1 -1
- package/dist/options/bundle-cache.d.ts +1 -1
- package/dist/options/canvas-tabs.d.ts +1 -1
- package/dist/options/chrome-mode.d.ts +1 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/concurrency.d.ts +1 -1
- package/dist/options/config.d.ts +1 -1
- package/dist/options/crf.d.ts +1 -1
- package/dist/options/crf.js +1 -1
- package/dist/options/cross-site-isolation.d.ts +1 -1
- package/dist/options/cross-site-isolation.js +2 -2
- package/dist/options/dark-mode.d.ts +1 -1
- package/dist/options/default-coding-agent.d.ts +1 -1
- package/dist/options/default-editor.d.ts +1 -1
- package/dist/options/default-premount-in-seconds.d.ts +1 -1
- package/dist/options/delete-after.d.ts +1 -1
- package/dist/options/disable-git-source.d.ts +2 -2
- package/dist/options/disable-shared-memory-capture.d.ts +1 -1
- package/dist/options/disable-web-security.d.ts +1 -1
- package/dist/options/disallow-parallel-encoding.d.ts +1 -1
- package/dist/options/enable-cancellation.d.ts +1 -1
- package/dist/options/enable-lambda-insights.d.ts +1 -1
- package/dist/options/enable-lambda-insights.js +2 -2
- package/dist/options/enable-multiprocess-on-linux.d.ts +1 -1
- package/dist/options/enable-multiprocess-on-linux.js +2 -2
- package/dist/options/encoding-buffer-size.d.ts +1 -1
- package/dist/options/encoding-max-rate.d.ts +1 -1
- package/dist/options/enforce-audio.d.ts +1 -1
- package/dist/options/env-file.d.ts +1 -1
- package/dist/options/every-nth-frame.d.ts +1 -1
- package/dist/options/experimental-keep-audio-context-alive.d.ts +1 -1
- package/dist/options/folder-expiry.d.ts +1 -1
- package/dist/options/folder-expiry.js +1 -1
- package/dist/options/for-seamless-aac-concatenation.d.ts +1 -1
- package/dist/options/force-new-studio.d.ts +1 -1
- package/dist/options/frames.d.ts +1 -1
- package/dist/options/gl.d.ts +1 -1
- package/dist/options/gop-size.d.ts +1 -1
- package/dist/options/headless.d.ts +1 -1
- package/dist/options/ignore-certificate-errors.d.ts +1 -1
- package/dist/options/image-sequence-pattern.d.ts +1 -1
- package/dist/options/image-sequence.d.ts +1 -1
- package/dist/options/index.d.ts +119 -102
- package/dist/options/index.js +2 -0
- package/dist/options/interactivity.d.ts +1 -1
- package/dist/options/ipv4.d.ts +1 -1
- package/dist/options/is-production.d.ts +1 -1
- package/dist/options/jpeg-quality.d.ts +1 -1
- package/dist/options/keyboard-shortcuts.d.ts +1 -1
- package/dist/options/latency-hint.d.ts +1 -1
- package/dist/options/license-key.d.ts +1 -1
- package/dist/options/log-level.d.ts +1 -1
- package/dist/options/metadata.d.ts +1 -1
- package/dist/options/mute.d.ts +1 -1
- package/dist/options/no-open.d.ts +1 -1
- package/dist/options/number-of-gif-loops.d.ts +1 -1
- package/dist/options/number-of-shared-audio-tags.d.ts +1 -1
- package/dist/options/offthreadvideo-cache-size.d.ts +1 -1
- package/dist/options/offthreadvideo-threads.d.ts +1 -1
- package/dist/options/on-browser-download.d.ts +1 -1
- package/dist/options/options-map.d.ts +340 -136
- package/dist/options/options-map.js +13 -0
- package/dist/options/out-dir.d.ts +1 -1
- package/dist/options/override-duration.d.ts +1 -1
- package/dist/options/override-fps.d.ts +1 -1
- package/dist/options/override-height.d.ts +1 -1
- package/dist/options/override-width.d.ts +1 -1
- package/dist/options/overwrite.d.ts +1 -1
- package/dist/options/package-manager.d.ts +1 -1
- package/dist/options/pixel-format.d.ts +1 -1
- package/dist/options/port.d.ts +1 -1
- package/dist/options/prefer-lossless.d.ts +1 -1
- package/dist/options/preferred-effect-backend.d.ts +18 -0
- package/dist/options/preferred-effect-backend.js +28 -0
- package/dist/options/preserve-pitch-on-playback.d.ts +1 -1
- package/dist/options/preview-sample-rate.d.ts +1 -1
- package/dist/options/props.d.ts +1 -1
- package/dist/options/prores-profile.d.ts +1 -1
- package/dist/options/public-dir.d.ts +1 -1
- package/dist/options/public-license-key.d.ts +1 -1
- package/dist/options/public-path.d.ts +1 -1
- package/dist/options/repro.d.ts +1 -1
- package/dist/options/rspack.d.ts +1 -1
- package/dist/options/runs.d.ts +1 -1
- package/dist/options/sample-rate.d.ts +1 -1
- package/dist/options/scale.d.ts +1 -1
- package/dist/options/sequence-activity-limit.d.ts +1 -1
- package/dist/options/show-layer-frame-numbers.d.ts +1 -1
- package/dist/options/show-premounting.d.ts +1 -1
- package/dist/options/skip-skills.d.ts +1 -1
- package/dist/options/still-frame.d.ts +1 -1
- package/dist/options/still-image-format.d.ts +1 -1
- package/dist/options/throw-if-site-exists.d.ts +2 -2
- package/dist/options/timeout.d.ts +1 -1
- package/dist/options/user-agent.d.ts +1 -1
- package/dist/options/version-flag.d.ts +1 -1
- package/dist/options/video-bitrate.d.ts +1 -1
- package/dist/options/video-cache-size.d.ts +1 -1
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/options/video-image-format.d.ts +1 -1
- package/dist/options/webhook-custom-data.d.ts +1 -1
- package/dist/options/webpack-poll.d.ts +1 -1
- package/dist/options/x264-preset.d.ts +1 -1
- package/dist/render-frames.js +6 -3
- package/dist/render-media.d.ts +1 -1
- package/dist/render-media.js +4 -2
- package/dist/render-still.js +6 -2
- package/dist/select-composition.js +6 -3
- package/dist/set-props-and-env.d.ts +2 -0
- package/dist/set-props-and-env.js +8 -3
- package/dist/stringify-ffmpeg-filter.js +6 -2
- package/dist/symbolicate-stacktrace.js +1 -1
- package/dist/validate-selected-frames.d.ts +4 -4
- package/dist/validate-selected-frames.js +2 -31
- package/package.json +15 -15
- package/dist/options/experimental-client-side-rendering.d.ts +0 -16
- package/dist/options/experimental-client-side-rendering.js +0 -30
- package/dist/options/experimental-sequence-activity-limit.d.ts +0 -19
- package/dist/options/experimental-sequence-activity-limit.js +0 -40
- package/dist/options/experimental-sequence-activity.d.ts +0 -19
- package/dist/options/experimental-sequence-activity.js +0 -38
- package/dist/options/experimental-tracks.d.ts +0 -19
- package/dist/options/experimental-tracks.js +0 -43
- package/dist/prestitcher-memory-usage.d.ts +0 -13
- package/dist/prestitcher-memory-usage.js +0 -33
- package/dist/render-partitions.d.ts +0 -7
- package/dist/render-partitions.js +0 -50
package/dist/render-media.js
CHANGED
|
@@ -56,7 +56,7 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
|
56
56
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
57
57
|
const SLOWEST_FRAME_COUNT = 10;
|
|
58
58
|
const MAX_RECENT_FRAME_TIMINGS = 150;
|
|
59
|
-
const internalRenderMediaRaw = async ({ proResProfile, x264Preset, gopSize, crf, composition: compositionWithPossibleUnevenDimensions, serializedInputPropsWithCustomSchema, pixelFormat: userPixelFormat, 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, disableSharedMemoryCapture, 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, offthreadVideoThreads, mediaCacheSizeInBytes, onLog, licenseKey, isProduction, sampleRate, }) => {
|
|
59
|
+
const internalRenderMediaRaw = async ({ proResProfile, x264Preset, gopSize, crf, composition: compositionWithPossibleUnevenDimensions, serializedInputPropsWithCustomSchema, pixelFormat: userPixelFormat, 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, disableSharedMemoryCapture, 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, offthreadVideoThreads, mediaCacheSizeInBytes, preferredEffectBackend, onLog, licenseKey, isProduction, sampleRate, }) => {
|
|
60
60
|
var _a, _b;
|
|
61
61
|
const pixelFormat = (_a = userPixelFormat !== null && userPixelFormat !== void 0 ? userPixelFormat : compositionWithPossibleUnevenDimensions.defaultPixelFormat) !== null && _a !== void 0 ? _a : pixel_format_1.DEFAULT_PIXEL_FORMAT;
|
|
62
62
|
if (repro) {
|
|
@@ -491,6 +491,7 @@ const internalRenderMediaRaw = async ({ proResProfile, x264Preset, gopSize, crf,
|
|
|
491
491
|
chromeMode,
|
|
492
492
|
imageSequencePattern: null,
|
|
493
493
|
mediaCacheSizeInBytes,
|
|
494
|
+
preferredEffectBackend,
|
|
494
495
|
onLog,
|
|
495
496
|
sampleRate,
|
|
496
497
|
});
|
|
@@ -671,7 +672,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
671
672
|
* @description Render a video or an audio programmatically.
|
|
672
673
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
673
674
|
*/
|
|
674
|
-
const renderMedia = ({ proResProfile, x264Preset, gopSize, 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, disableSharedMemoryCapture, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, isProduction, sampleRate, ...apiKeyOrLicenseKey }) => {
|
|
675
|
+
const renderMedia = ({ proResProfile, x264Preset, gopSize, 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, disableSharedMemoryCapture, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, onBrowserDownload, onArtifact, metadata, hardwareAcceleration, chromeMode, offthreadVideoThreads, compositionStart, mediaCacheSizeInBytes, preferredEffectBackend, isProduction, sampleRate, ...apiKeyOrLicenseKey }) => {
|
|
675
676
|
var _a, _b, _c, _d;
|
|
676
677
|
const indent = false;
|
|
677
678
|
const logLevel = verbose || dumpBrowserLogs ? 'verbose' : (passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info');
|
|
@@ -765,6 +766,7 @@ const renderMedia = ({ proResProfile, x264Preset, gopSize, crf, composition, inp
|
|
|
765
766
|
hardwareAcceleration: hardwareAcceleration !== null && hardwareAcceleration !== void 0 ? hardwareAcceleration : 'disable',
|
|
766
767
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
767
768
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
769
|
+
preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
|
|
768
770
|
licenseKey: effectiveLicenseKey,
|
|
769
771
|
onLog: default_on_log_1.defaultOnLog,
|
|
770
772
|
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : null,
|
package/dist/render-still.js
CHANGED
|
@@ -68,7 +68,7 @@ const validate_1 = require("./validate");
|
|
|
68
68
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
69
69
|
const validate_scale_1 = require("./validate-scale");
|
|
70
70
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
71
|
-
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, mediaCacheSizeInBytes, onLog, }) => {
|
|
71
|
+
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, mediaCacheSizeInBytes, preferredEffectBackend, onLog, }) => {
|
|
72
72
|
var _a;
|
|
73
73
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
74
74
|
(0, validate_1.validateDimension)(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
@@ -137,8 +137,10 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
137
137
|
onError: errorCallback,
|
|
138
138
|
frame: null,
|
|
139
139
|
});
|
|
140
|
+
page.on('error', errorCallback);
|
|
140
141
|
const cleanup = async () => {
|
|
141
142
|
cleanUpJSException();
|
|
143
|
+
page.off('error', errorCallback);
|
|
142
144
|
if (puppeteerInstance) {
|
|
143
145
|
await page.close();
|
|
144
146
|
}
|
|
@@ -167,6 +169,7 @@ const innerRenderStill = async ({ composition, imageFormat = image_format_1.DEFA
|
|
|
167
169
|
onServeUrlVisited: () => undefined,
|
|
168
170
|
isMainTab: true,
|
|
169
171
|
mediaCacheSizeInBytes,
|
|
172
|
+
preferredEffectBackend,
|
|
170
173
|
initialMemoryAvailable: (0, get_available_memory_1.getAvailableMemory)(logLevel),
|
|
171
174
|
darkMode: (_a = chromiumOptions.darkMode) !== null && _a !== void 0 ? _a : false,
|
|
172
175
|
sampleRate: 48000,
|
|
@@ -337,7 +340,7 @@ exports.internalRenderStill = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
337
340
|
*/
|
|
338
341
|
const renderStill = (options) => {
|
|
339
342
|
var _a, _b, _c;
|
|
340
|
-
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, offthreadVideoThreads, mediaCacheSizeInBytes, isProduction, ...apiKeyOrLicenseKey } = options;
|
|
343
|
+
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, offthreadVideoThreads, mediaCacheSizeInBytes, preferredEffectBackend, isProduction, ...apiKeyOrLicenseKey } = options;
|
|
341
344
|
if (typeof jpegQuality !== 'undefined' && imageFormat !== 'jpeg') {
|
|
342
345
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
343
346
|
}
|
|
@@ -403,6 +406,7 @@ const renderStill = (options) => {
|
|
|
403
406
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
404
407
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
405
408
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
409
|
+
preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
|
|
406
410
|
licenseKey: effectiveLicenseKey,
|
|
407
411
|
onLog: default_on_log_1.defaultOnLog,
|
|
408
412
|
isProduction: isProduction !== null && isProduction !== void 0 ? isProduction : null,
|
|
@@ -16,7 +16,7 @@ const seek_to_frame_1 = require("./seek-to-frame");
|
|
|
16
16
|
const set_props_and_env_1 = require("./set-props-and-env");
|
|
17
17
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
18
18
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
19
|
-
const innerSelectComposition = async ({ page, serializedInputPropsWithCustomSchema, envVariables, serveUrl, timeoutInMilliseconds, port, id, indent, logLevel, onServeUrlVisited, mediaCacheSizeInBytes, chromiumOptions, }) => {
|
|
19
|
+
const innerSelectComposition = async ({ page, serializedInputPropsWithCustomSchema, envVariables, serveUrl, timeoutInMilliseconds, port, id, indent, logLevel, onServeUrlVisited, mediaCacheSizeInBytes, preferredEffectBackend, chromiumOptions, }) => {
|
|
20
20
|
var _a;
|
|
21
21
|
(0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
|
|
22
22
|
await (0, set_props_and_env_1.setPropsAndEnv)({
|
|
@@ -35,6 +35,7 @@ const innerSelectComposition = async ({ page, serializedInputPropsWithCustomSche
|
|
|
35
35
|
onServeUrlVisited,
|
|
36
36
|
isMainTab: true,
|
|
37
37
|
mediaCacheSizeInBytes,
|
|
38
|
+
preferredEffectBackend,
|
|
38
39
|
initialMemoryAvailable: (0, get_available_memory_1.getAvailableMemory)(logLevel),
|
|
39
40
|
darkMode: (_a = chromiumOptions.darkMode) !== null && _a !== void 0 ? _a : false,
|
|
40
41
|
sampleRate: 48000,
|
|
@@ -100,7 +101,7 @@ const innerSelectComposition = async ({ page, serializedInputPropsWithCustomSche
|
|
|
100
101
|
};
|
|
101
102
|
const internalSelectCompositionRaw = async (options) => {
|
|
102
103
|
const cleanup = [];
|
|
103
|
-
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onServeUrlVisited, chromeMode, mediaCacheSizeInBytes, } = options;
|
|
104
|
+
const { puppeteerInstance, browserExecutable, chromiumOptions, serveUrl: serveUrlOrWebpackUrl, logLevel, indent, port, envVariables, id, serializedInputPropsWithCustomSchema, onBrowserLog, server, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, onServeUrlVisited, chromeMode, mediaCacheSizeInBytes, preferredEffectBackend, } = options;
|
|
104
105
|
const [{ page, cleanupPage }, serverUsed] = await Promise.all([
|
|
105
106
|
(0, get_browser_instance_1.getPageAndCleanupFn)({
|
|
106
107
|
passedInInstance: puppeteerInstance,
|
|
@@ -162,6 +163,7 @@ const internalSelectCompositionRaw = async (options) => {
|
|
|
162
163
|
onServeUrlVisited,
|
|
163
164
|
chromeMode,
|
|
164
165
|
mediaCacheSizeInBytes,
|
|
166
|
+
preferredEffectBackend,
|
|
165
167
|
})
|
|
166
168
|
.then((data) => {
|
|
167
169
|
return resolve(data);
|
|
@@ -187,7 +189,7 @@ exports.internalSelectComposition = (0, wrap_with_error_handling_1.wrapWithError
|
|
|
187
189
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/select-composition)
|
|
188
190
|
*/
|
|
189
191
|
const selectComposition = async (options) => {
|
|
190
|
-
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, } = options;
|
|
192
|
+
const { id, serveUrl, browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, verbose, logLevel: passedLogLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, preferredEffectBackend, } = options;
|
|
191
193
|
const indent = false;
|
|
192
194
|
const logLevel = passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : (verbose ? 'verbose' : 'info');
|
|
193
195
|
const data = await (0, exports.internalSelectComposition)({
|
|
@@ -219,6 +221,7 @@ const selectComposition = async (options) => {
|
|
|
219
221
|
chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
|
|
220
222
|
offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
|
|
221
223
|
mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
|
|
224
|
+
preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
|
|
222
225
|
});
|
|
223
226
|
return data.metadata;
|
|
224
227
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PreferredEffectBackend } from 'remotion';
|
|
1
2
|
import type { Page } from './browser/BrowserPage';
|
|
2
3
|
import type { LogLevel } from './log-level';
|
|
3
4
|
type SetPropsAndEnv = {
|
|
@@ -17,6 +18,7 @@ type SetPropsAndEnv = {
|
|
|
17
18
|
onServeUrlVisited: () => void;
|
|
18
19
|
isMainTab: boolean;
|
|
19
20
|
mediaCacheSizeInBytes: number | null;
|
|
21
|
+
preferredEffectBackend: PreferredEffectBackend;
|
|
20
22
|
initialMemoryAvailable: number | null;
|
|
21
23
|
sampleRate: number;
|
|
22
24
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setPropsAndEnv = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
4
5
|
const version_1 = require("remotion/version");
|
|
5
6
|
const TimeoutSettings_1 = require("./browser/TimeoutSettings");
|
|
6
7
|
const goto_page_or_throw_1 = require("./goto-page-or-throw");
|
|
@@ -10,16 +11,19 @@ const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
|
|
|
10
11
|
const redirect_status_codes_1 = require("./redirect-status-codes");
|
|
11
12
|
const truthy_1 = require("./truthy");
|
|
12
13
|
const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
|
|
13
|
-
const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, onServeUrlVisited, isMainTab, mediaCacheSizeInBytes, initialMemoryAvailable, darkMode, sampleRate, }) => {
|
|
14
|
+
const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVariables, page, serveUrl, initialFrame, timeoutInMilliseconds, proxyPort, retriesRemaining, audioEnabled, videoEnabled, indent, logLevel, onServeUrlVisited, isMainTab, mediaCacheSizeInBytes, preferredEffectBackend, initialMemoryAvailable, darkMode, sampleRate, }) => {
|
|
15
|
+
no_react_1.NoReactInternals.validatePreferredEffectBackend(preferredEffectBackend);
|
|
14
16
|
(0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
|
|
15
17
|
const actualTimeout = timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : TimeoutSettings_1.DEFAULT_TIMEOUT;
|
|
16
18
|
page.setDefaultTimeout(actualTimeout);
|
|
17
19
|
page.setDefaultNavigationTimeout(actualTimeout);
|
|
18
20
|
const urlToVisit = (0, normalize_serve_url_1.normalizeServeUrl)(serveUrl);
|
|
19
|
-
await page.evaluateOnNewDocument((timeout, mainTab, cacheSizeInBytes, initMemoryAvailable, sRate) => {
|
|
21
|
+
await page.evaluateOnNewDocument((timeout, mainTab, cacheSizeInBytes, effectBackend, disableWebGpuEffects, initMemoryAvailable, sRate) => {
|
|
20
22
|
window.remotion_puppeteerTimeout = timeout;
|
|
21
23
|
window.remotion_isMainTab = mainTab;
|
|
22
24
|
window.remotion_mediaCacheSizeInBytes = cacheSizeInBytes;
|
|
25
|
+
window.remotion_preferredEffectBackend = effectBackend;
|
|
26
|
+
window.remotion_disableWebGpuEffects = disableWebGpuEffects;
|
|
23
27
|
window.remotion_initialMemoryAvailable = initMemoryAvailable;
|
|
24
28
|
window.remotion_sampleRate = sRate;
|
|
25
29
|
// To make useRemotionEnvironment() work
|
|
@@ -31,7 +35,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
31
35
|
window.process.env = {};
|
|
32
36
|
}
|
|
33
37
|
window.process.env.NODE_ENV = 'production';
|
|
34
|
-
}, actualTimeout, isMainTab, mediaCacheSizeInBytes, initialMemoryAvailable, sampleRate);
|
|
38
|
+
}, actualTimeout, isMainTab, mediaCacheSizeInBytes, preferredEffectBackend, Boolean(process.env.AWS_LAMBDA_FUNCTION_NAME), initialMemoryAvailable, sampleRate);
|
|
35
39
|
await page.evaluateOnNewDocument('window.remotion_broadcastChannel = new BroadcastChannel("remotion-video-frame-extraction")');
|
|
36
40
|
if (envVariables) {
|
|
37
41
|
await page.evaluateOnNewDocument((input) => {
|
|
@@ -89,6 +93,7 @@ const innerSetPropsAndEnv = async ({ serializedInputPropsWithCustomSchema, envVa
|
|
|
89
93
|
onServeUrlVisited,
|
|
90
94
|
isMainTab,
|
|
91
95
|
mediaCacheSizeInBytes,
|
|
96
|
+
preferredEffectBackend,
|
|
92
97
|
initialMemoryAvailable,
|
|
93
98
|
darkMode,
|
|
94
99
|
sampleRate,
|
|
@@ -88,6 +88,9 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
88
88
|
// For later assets, remove that time from the silence before the asset instead.
|
|
89
89
|
const assetTrimLeftOffset = startInVideo === 0 ? trimLeftOffset : 0;
|
|
90
90
|
const startInChunkSeconds = startInVideo === 0 ? 0 : startInVideoSeconds - trimLeftOffset;
|
|
91
|
+
const capturedFrameCount = Math.round((chunkLengthInSeconds + trimLeftOffset - trimRightOffset) * fps);
|
|
92
|
+
// Only assets present on the last captured frame need the chunk's trailing trim.
|
|
93
|
+
const assetTrimRightOffset = startInVideo + asset.duration >= capturedFrameCount ? trimRightOffset : 0;
|
|
91
94
|
const { trimLeft, maxTrim } = (0, seamless_aac_trim_1.getActualTrimLeft)({
|
|
92
95
|
trimLeft: asset.trimLeft,
|
|
93
96
|
fps,
|
|
@@ -106,7 +109,7 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
106
109
|
const { actualTrimLeft, audibleDuration, filter: trimAndTempoFilter, } = trimAndSetTempo({
|
|
107
110
|
assetDuration,
|
|
108
111
|
trimLeftOffset: assetTrimLeftOffset,
|
|
109
|
-
trimRightOffset,
|
|
112
|
+
trimRightOffset: assetTrimRightOffset,
|
|
110
113
|
asset,
|
|
111
114
|
fps,
|
|
112
115
|
indent,
|
|
@@ -150,10 +153,11 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
150
153
|
// This should be fine because FFMPEG documentation states:
|
|
151
154
|
// "Unused delays will be silently ignored."
|
|
152
155
|
// https://ffmpeg.org/ffmpeg-filters.html#adelay
|
|
156
|
+
// Use samples so adjacent AAC chunks place the waveform at the same offset.
|
|
153
157
|
padStart === 0
|
|
154
158
|
? null
|
|
155
159
|
: `adelay=${new Array(channels + 1)
|
|
156
|
-
.fill((padStart *
|
|
160
|
+
.fill(`${Math.round(padStart * sampleRate)}S`)
|
|
157
161
|
.join('|')}`,
|
|
158
162
|
actualTrimLeft,
|
|
159
163
|
};
|
|
@@ -62,7 +62,7 @@ const getSourceMap = (filePath, fileContents, type) => {
|
|
|
62
62
|
return (0, exports.getSourceMapFromRemoteUrl)(url);
|
|
63
63
|
};
|
|
64
64
|
const fetchUrl = async (url) => {
|
|
65
|
-
const { request, response } = await (0, read_file_1.readFile)(url);
|
|
65
|
+
const { request, response } = await (0, read_file_1.readFile)(url, null);
|
|
66
66
|
return new Promise((resolve, reject) => {
|
|
67
67
|
let downloaded = '';
|
|
68
68
|
response.on('data', (d) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
import { NoReactInternals } from 'remotion/no-react';
|
|
2
|
+
export declare const { validateSelectedFrames, }: {
|
|
3
|
+
validateSelectedFrames: typeof NoReactInternals.validateSelectedFrames;
|
|
4
|
+
};
|
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateSelectedFrames = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
throw new TypeError('The `frames` option must be an array of frame numbers.');
|
|
7
|
-
}
|
|
8
|
-
if (frames.length === 0) {
|
|
9
|
-
throw new TypeError('The `frames` option must contain at least one frame.');
|
|
10
|
-
}
|
|
11
|
-
for (const frame of frames) {
|
|
12
|
-
if (typeof frame !== 'number') {
|
|
13
|
-
throw new TypeError(`The \`frames\` option must contain only numbers, but got ${typeof frame}.`);
|
|
14
|
-
}
|
|
15
|
-
if (!Number.isFinite(frame)) {
|
|
16
|
-
throw new TypeError(`The \`frames\` option must contain only finite numbers, but got ${frame}.`);
|
|
17
|
-
}
|
|
18
|
-
if (!Number.isInteger(frame)) {
|
|
19
|
-
throw new TypeError(`The \`frames\` option must contain only integers, but got ${frame}.`);
|
|
20
|
-
}
|
|
21
|
-
if (frame < 0) {
|
|
22
|
-
throw new TypeError(`The \`frames\` option must contain only non-negative numbers, but got ${frame}.`);
|
|
23
|
-
}
|
|
24
|
-
if (durationInFrames !== null && frame >= durationInFrames) {
|
|
25
|
-
throw new RangeError(`Frame ${frame} is out of range, must be between 0 and ${durationInFrames - 1}.`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const uniqueFrames = new Set(frames);
|
|
29
|
-
if (uniqueFrames.size !== frames.length) {
|
|
30
|
-
throw new TypeError('The `frames` option must not contain duplicate frames.');
|
|
31
|
-
}
|
|
32
|
-
return [...frames].sort((a, b) => a - b);
|
|
33
|
-
};
|
|
34
|
-
exports.validateSelectedFrames = validateSelectedFrames;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
({ validateSelectedFrames: exports.validateSelectedFrames } = no_react_1.NoReactInternals);
|
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.540",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
|
-
"remotion": "4.0.
|
|
26
|
-
"@remotion/streaming": "4.0.
|
|
25
|
+
"remotion": "4.0.540",
|
|
26
|
+
"@remotion/streaming": "4.0.540",
|
|
27
27
|
"source-map": "0.8.0",
|
|
28
28
|
"ws": "8.21.0",
|
|
29
|
-
"@remotion/licensing": "4.0.
|
|
29
|
+
"@remotion/licensing": "4.0.540"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.8.0",
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
"@testing-library/dom": "10.4.0",
|
|
37
37
|
"@testing-library/react": "16.1.0",
|
|
38
38
|
"@happy-dom/global-registrator": "14.5.1",
|
|
39
|
-
"react": "19.
|
|
40
|
-
"react-dom": "19.
|
|
39
|
+
"react": "19.3.1",
|
|
40
|
+
"react-dom": "19.3.1",
|
|
41
41
|
"typescript": "7.1.0-beta",
|
|
42
42
|
"@types/ws": "8.5.10",
|
|
43
|
-
"@remotion/example-videos": "4.0.
|
|
44
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
43
|
+
"@remotion/example-videos": "4.0.540",
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.540",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@types/node": "20.12.14",
|
|
47
47
|
"@types/pngjs": "6.0.5",
|
|
48
48
|
"pngjs": "7.0.0"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
52
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
55
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
56
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
57
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
51
|
+
"@remotion/compositor-darwin-arm64": "4.0.540",
|
|
52
|
+
"@remotion/compositor-darwin-x64": "4.0.540",
|
|
53
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.540",
|
|
54
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.540",
|
|
55
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.540",
|
|
56
|
+
"@remotion/compositor-linux-x64-musl": "4.0.540",
|
|
57
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.540"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"remotion",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const experimentalClientSideRenderingOption: {
|
|
2
|
-
name: string;
|
|
3
|
-
cliFlag: "enable-experimental-client-side-rendering";
|
|
4
|
-
description: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
ssrName: null;
|
|
6
|
-
docLink: string;
|
|
7
|
-
type: boolean;
|
|
8
|
-
getValue: ({ commandLine }: {
|
|
9
|
-
commandLine: Record<string, unknown>;
|
|
10
|
-
}) => {
|
|
11
|
-
value: boolean;
|
|
12
|
-
source: string;
|
|
13
|
-
};
|
|
14
|
-
setConfig(value: boolean): void;
|
|
15
|
-
id: "enable-experimental-client-side-rendering";
|
|
16
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimentalClientSideRenderingOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
let experimentalClientSideRenderingEnabled = false;
|
|
6
|
-
const cliFlag = 'enable-experimental-client-side-rendering';
|
|
7
|
-
exports.experimentalClientSideRenderingOption = {
|
|
8
|
-
name: 'Enable Experimental Client-Side Rendering',
|
|
9
|
-
cliFlag,
|
|
10
|
-
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Enable WIP client-side rendering in the Remotion Studio. See https://www.remotion.dev/docs/client-side-rendering/ for notes." })),
|
|
11
|
-
ssrName: null,
|
|
12
|
-
docLink: 'https://www.remotion.dev/docs/client-side-rendering',
|
|
13
|
-
type: false,
|
|
14
|
-
getValue: ({ commandLine }) => {
|
|
15
|
-
if (commandLine[cliFlag] !== null) {
|
|
16
|
-
return {
|
|
17
|
-
value: commandLine[cliFlag],
|
|
18
|
-
source: 'cli',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
value: experimentalClientSideRenderingEnabled,
|
|
23
|
-
source: 'config',
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
setConfig(value) {
|
|
27
|
-
experimentalClientSideRenderingEnabled = value;
|
|
28
|
-
},
|
|
29
|
-
id: cliFlag,
|
|
30
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const experimentalSequenceActivityLimitOption: {
|
|
2
|
-
name: string;
|
|
3
|
-
addedIn: string;
|
|
4
|
-
cliFlag: "experimental-sequence-activity-limit";
|
|
5
|
-
id: "experimental-sequence-activity-limit";
|
|
6
|
-
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
ssrName: null;
|
|
8
|
-
docLink: string;
|
|
9
|
-
type: number;
|
|
10
|
-
getValue: ({ commandLine }: {
|
|
11
|
-
commandLine: Record<string, unknown>;
|
|
12
|
-
}) => {
|
|
13
|
-
value: number;
|
|
14
|
-
source: string;
|
|
15
|
-
};
|
|
16
|
-
setConfig(value: number): void;
|
|
17
|
-
getConfigValue: () => number | null;
|
|
18
|
-
reset: () => void;
|
|
19
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimentalSequenceActivityLimitOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const no_react_1 = require("remotion/no-react");
|
|
6
|
-
let configuredLimit = null;
|
|
7
|
-
const cliFlag = 'experimental-sequence-activity-limit';
|
|
8
|
-
exports.experimentalSequenceActivityLimitOption = {
|
|
9
|
-
name: 'Experimental hidden Sequence Activity limit',
|
|
10
|
-
addedIn: '4.0.535',
|
|
11
|
-
cliFlag,
|
|
12
|
-
id: cliFlag,
|
|
13
|
-
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Limit nearby hidden scenes discovered by experimental Sequence Activity in the Remotion Studio, including nested sequences and their ancestors. Visible, premounted, and postmounted scenes always render. Defaults to 20. Must be a safe integer of at least -1. Set to 0 to disable hidden discovery, or -1 for unlimited discovery without admission delays. Only applies when experimental Sequence Activity is enabled. Does not affect rendering." })),
|
|
14
|
-
ssrName: null,
|
|
15
|
-
docLink: 'https://www.remotion.dev/docs/options/experimental-sequence-activity-limit',
|
|
16
|
-
type: 0,
|
|
17
|
-
getValue: ({ commandLine }) => {
|
|
18
|
-
if (commandLine[cliFlag] !== undefined) {
|
|
19
|
-
const value = commandLine[cliFlag];
|
|
20
|
-
if (!Number.isSafeInteger(value) || value < -1) {
|
|
21
|
-
throw new Error('Sequence Activity limit must be a safe integer of at least -1.');
|
|
22
|
-
}
|
|
23
|
-
return { value: value, source: 'cli' };
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
value: configuredLimit !== null && configuredLimit !== void 0 ? configuredLimit : no_react_1.NoReactInternals.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
|
|
27
|
-
source: 'config',
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
setConfig(value) {
|
|
31
|
-
if (!Number.isSafeInteger(value) || value < -1) {
|
|
32
|
-
throw new Error('Sequence Activity limit must be a safe integer of at least -1.');
|
|
33
|
-
}
|
|
34
|
-
configuredLimit = value;
|
|
35
|
-
},
|
|
36
|
-
getConfigValue: () => configuredLimit,
|
|
37
|
-
reset: () => {
|
|
38
|
-
configuredLimit = null;
|
|
39
|
-
},
|
|
40
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const experimentalSequenceActivityOption: {
|
|
2
|
-
name: string;
|
|
3
|
-
addedIn: string;
|
|
4
|
-
cliFlag: "experimental-sequence-activity";
|
|
5
|
-
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
ssrName: null;
|
|
7
|
-
docLink: string;
|
|
8
|
-
type: boolean;
|
|
9
|
-
getValue: ({ commandLine }: {
|
|
10
|
-
commandLine: Record<string, unknown>;
|
|
11
|
-
}) => {
|
|
12
|
-
value: boolean;
|
|
13
|
-
source: string;
|
|
14
|
-
};
|
|
15
|
-
setConfig(value: boolean): void;
|
|
16
|
-
getConfigValue: () => boolean | null;
|
|
17
|
-
reset: () => void;
|
|
18
|
-
id: "experimental-sequence-activity";
|
|
19
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimentalSequenceActivityOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
let experimentalSequenceActivityEnabled = false;
|
|
6
|
-
let configuredExperimentalSequenceActivityEnabled = null;
|
|
7
|
-
const cliFlag = 'experimental-sequence-activity';
|
|
8
|
-
exports.experimentalSequenceActivityOption = {
|
|
9
|
-
name: 'Enable experimental Sequence Activity',
|
|
10
|
-
addedIn: '4.0.535',
|
|
11
|
-
cliFlag,
|
|
12
|
-
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Discover layers in nearby hidden scenes in the Remotion Studio before they become visible. This experimental feature may use more CPU. Disabled by default. Does not affect rendering." })),
|
|
13
|
-
ssrName: null,
|
|
14
|
-
docLink: 'https://www.remotion.dev/docs/options/experimental-sequence-activity',
|
|
15
|
-
type: false,
|
|
16
|
-
getValue: ({ commandLine }) => {
|
|
17
|
-
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
|
|
18
|
-
return {
|
|
19
|
-
value: commandLine[cliFlag],
|
|
20
|
-
source: 'cli',
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
value: experimentalSequenceActivityEnabled,
|
|
25
|
-
source: 'config',
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
setConfig(value) {
|
|
29
|
-
experimentalSequenceActivityEnabled = value;
|
|
30
|
-
configuredExperimentalSequenceActivityEnabled = value;
|
|
31
|
-
},
|
|
32
|
-
getConfigValue: () => configuredExperimentalSequenceActivityEnabled,
|
|
33
|
-
reset: () => {
|
|
34
|
-
experimentalSequenceActivityEnabled = false;
|
|
35
|
-
configuredExperimentalSequenceActivityEnabled = null;
|
|
36
|
-
},
|
|
37
|
-
id: cliFlag,
|
|
38
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const experimentalTracksOption: {
|
|
2
|
-
name: string;
|
|
3
|
-
addedIn: string;
|
|
4
|
-
cliFlag: "experimental-tracks";
|
|
5
|
-
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
ssrName: null;
|
|
7
|
-
docLink: string;
|
|
8
|
-
type: boolean;
|
|
9
|
-
getValue: ({ commandLine }: {
|
|
10
|
-
commandLine: Record<string, unknown>;
|
|
11
|
-
}) => {
|
|
12
|
-
value: boolean;
|
|
13
|
-
source: string;
|
|
14
|
-
};
|
|
15
|
-
setConfig(value: boolean): void;
|
|
16
|
-
getConfigValue: () => boolean | null;
|
|
17
|
-
reset: () => void;
|
|
18
|
-
id: "experimental-tracks";
|
|
19
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.experimentalTracksOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
let experimentalTracksEnabled = false;
|
|
6
|
-
let configuredExperimentalTracksEnabled = null;
|
|
7
|
-
const cliFlag = 'experimental-tracks';
|
|
8
|
-
exports.experimentalTracksOption = {
|
|
9
|
-
name: 'Enable experimental timeline tracks',
|
|
10
|
-
addedIn: '4.0.534',
|
|
11
|
-
cliFlag,
|
|
12
|
-
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Enable experimental timeline tracks in the Remotion Studio. Group clips from ",
|
|
13
|
-
jsx_runtime_1.jsx("code", { children: '<Track>' }),
|
|
14
|
-
", ",
|
|
15
|
-
jsx_runtime_1.jsx("code", { children: '<Series>' }),
|
|
16
|
-
" and", ' ', jsx_runtime_1.jsx("code", { children: '<TransitionSeries>' }),
|
|
17
|
-
" on shared rows, with overlays on additional rows. Disabled by default."] })),
|
|
18
|
-
ssrName: null,
|
|
19
|
-
docLink: 'https://www.remotion.dev/docs/options/experimental-tracks',
|
|
20
|
-
type: false,
|
|
21
|
-
getValue: ({ commandLine }) => {
|
|
22
|
-
if (commandLine[cliFlag] !== undefined && commandLine[cliFlag] !== null) {
|
|
23
|
-
return {
|
|
24
|
-
value: commandLine[cliFlag],
|
|
25
|
-
source: 'cli',
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
value: experimentalTracksEnabled,
|
|
30
|
-
source: 'config',
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
setConfig(value) {
|
|
34
|
-
experimentalTracksEnabled = value;
|
|
35
|
-
configuredExperimentalTracksEnabled = value;
|
|
36
|
-
},
|
|
37
|
-
getConfigValue: () => configuredExperimentalTracksEnabled,
|
|
38
|
-
reset: () => {
|
|
39
|
-
experimentalTracksEnabled = false;
|
|
40
|
-
configuredExperimentalTracksEnabled = null;
|
|
41
|
-
},
|
|
42
|
-
id: cliFlag,
|
|
43
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const hasEnoughMemoryForParallelEncoding: ({ freeMemory, estimatedUsage, }: {
|
|
2
|
-
freeMemory: number;
|
|
3
|
-
estimatedUsage: number;
|
|
4
|
-
}) => boolean;
|
|
5
|
-
export declare const shouldUseParallelEncoding: ({ width, height, logLevel, }: {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
9
|
-
}) => {
|
|
10
|
-
hasEnoughMemory: boolean;
|
|
11
|
-
freeMemory: number;
|
|
12
|
-
estimatedUsage: number;
|
|
13
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldUseParallelEncoding = exports.hasEnoughMemoryForParallelEncoding = void 0;
|
|
4
|
-
const get_available_memory_1 = require("./memory/get-available-memory");
|
|
5
|
-
const MINIMUM_MEMORY_LEFT = 2000000000;
|
|
6
|
-
const hasEnoughMemoryForParallelEncoding = ({ freeMemory, estimatedUsage, }) => {
|
|
7
|
-
return freeMemory - estimatedUsage > MINIMUM_MEMORY_LEFT;
|
|
8
|
-
};
|
|
9
|
-
exports.hasEnoughMemoryForParallelEncoding = hasEnoughMemoryForParallelEncoding;
|
|
10
|
-
const estimateMemoryUsageForPrestitcher = ({ width, height, }) => {
|
|
11
|
-
// Empirically we detected that per 1 million pixels, FFMPEG uses around 1GB of memory, relatively independent of
|
|
12
|
-
// the duration of the video.
|
|
13
|
-
const memoryUsageFor4K = 1000000000;
|
|
14
|
-
const memoryUsageOfPixel = memoryUsageFor4K / 1000000;
|
|
15
|
-
return memoryUsageOfPixel * width * height;
|
|
16
|
-
};
|
|
17
|
-
const shouldUseParallelEncoding = ({ width, height, logLevel, }) => {
|
|
18
|
-
const freeMemory = (0, get_available_memory_1.getAvailableMemory)(logLevel);
|
|
19
|
-
const estimatedUsage = estimateMemoryUsageForPrestitcher({
|
|
20
|
-
height,
|
|
21
|
-
width,
|
|
22
|
-
});
|
|
23
|
-
const hasEnoughMemory = (0, exports.hasEnoughMemoryForParallelEncoding)({
|
|
24
|
-
estimatedUsage,
|
|
25
|
-
freeMemory,
|
|
26
|
-
});
|
|
27
|
-
return {
|
|
28
|
-
hasEnoughMemory,
|
|
29
|
-
freeMemory,
|
|
30
|
-
estimatedUsage,
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
exports.shouldUseParallelEncoding = shouldUseParallelEncoding;
|