@remotion/renderer 4.0.539 → 4.0.541
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 +10 -6
- 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/BrowserRunner.js +36 -10
- 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/collect-assets.js +1 -1
- package/dist/esm/client.mjs +349 -310
- package/dist/esm/index.mjs +348 -272
- 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/open-browser.js +2 -0
- 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/pool.js +3 -0
- package/dist/render-frame-and-retry-target-close.js +2 -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
|
@@ -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;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderPartitions = void 0;
|
|
4
|
-
const renderPartitions = ({ frames, concurrency, }) => {
|
|
5
|
-
const partitions = [];
|
|
6
|
-
let start = 0;
|
|
7
|
-
for (let i = 0; i < concurrency; i++) {
|
|
8
|
-
const end = start + Math.ceil((frames.length - start) / (concurrency - i));
|
|
9
|
-
partitions.push(frames.slice(start, end));
|
|
10
|
-
start = end;
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
partitions,
|
|
14
|
-
getNextFrame: (pageIndex) => {
|
|
15
|
-
if (partitions[pageIndex].length === 0) {
|
|
16
|
-
const partitionLengths = partitions.map((p) => p.length);
|
|
17
|
-
if (partitionLengths.every((p) => p === 0)) {
|
|
18
|
-
throw new Error('No more frames to render');
|
|
19
|
-
}
|
|
20
|
-
let longestRemainingPartitionIndex = -1;
|
|
21
|
-
for (let i = 0; i < partitions.length; i++) {
|
|
22
|
-
if (longestRemainingPartitionIndex === -1) {
|
|
23
|
-
longestRemainingPartitionIndex = i;
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
if (partitions[i].length >
|
|
27
|
-
partitions[longestRemainingPartitionIndex].length) {
|
|
28
|
-
longestRemainingPartitionIndex = i;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (longestRemainingPartitionIndex === -1) {
|
|
32
|
-
throw new Error('No more frames to render');
|
|
33
|
-
}
|
|
34
|
-
// Round up - let's say only one frame is left to render, we should take this one
|
|
35
|
-
const slicePoint = Math.ceil(partitions[longestRemainingPartitionIndex].length / 2) -
|
|
36
|
-
// but don't forget it's zero indexed :)
|
|
37
|
-
1;
|
|
38
|
-
partitions[pageIndex] =
|
|
39
|
-
partitions[longestRemainingPartitionIndex].slice(slicePoint);
|
|
40
|
-
partitions[longestRemainingPartitionIndex] = partitions[longestRemainingPartitionIndex].slice(0, slicePoint);
|
|
41
|
-
}
|
|
42
|
-
const value = partitions[pageIndex].shift();
|
|
43
|
-
if (value === undefined) {
|
|
44
|
-
throw new Error('No more frames to render');
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
exports.renderPartitions = renderPartitions;
|