@remotion/renderer 4.0.534 → 4.0.536
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 +9 -4
- package/dist/client.d.ts +303 -7
- package/dist/combine-chunks.d.ts +2 -1
- package/dist/combine-chunks.js +81 -52
- package/dist/combine-video-streams.js +3 -0
- package/dist/compositor/get-executable-path.js +30 -15
- package/dist/ensure-browser.d.ts +3 -0
- package/dist/esm/client.mjs +727 -541
- package/dist/esm/index.mjs +409 -359
- package/dist/esm/pure.mjs +3 -1
- package/dist/get-video-threads-flag.js +5 -1
- package/dist/index.d.ts +47 -1
- package/dist/mime-db.js +5 -0
- package/dist/mux-video-and-audio.js +3 -0
- package/dist/options/allow-html-in-canvas.d.ts +1 -0
- package/dist/options/allow-html-in-canvas.js +1 -0
- package/dist/options/api-key.d.ts +1 -0
- package/dist/options/api-key.js +1 -0
- package/dist/options/ask-ai.d.ts +1 -0
- package/dist/options/ask-ai.js +1 -0
- package/dist/options/audio-bitrate.d.ts +1 -0
- package/dist/options/audio-bitrate.js +1 -0
- package/dist/options/audio-codec.d.ts +1 -0
- package/dist/options/audio-codec.js +1 -0
- package/dist/options/beep-on-finish.d.ts +1 -0
- package/dist/options/beep-on-finish.js +1 -0
- package/dist/options/benchmark-concurrencies.d.ts +1 -0
- package/dist/options/benchmark-concurrencies.js +1 -0
- package/dist/options/binaries-directory.d.ts +1 -0
- package/dist/options/binaries-directory.js +1 -0
- package/dist/options/browser-executable.d.ts +1 -0
- package/dist/options/browser-executable.js +1 -0
- package/dist/options/browser.d.ts +1 -0
- package/dist/options/browser.js +1 -0
- package/dist/options/bundle-cache.d.ts +1 -0
- package/dist/options/bundle-cache.js +1 -0
- package/dist/options/canvas-tabs.d.ts +1 -0
- package/dist/options/canvas-tabs.js +1 -0
- package/dist/options/chrome-mode.d.ts +1 -0
- package/dist/options/chrome-mode.js +1 -0
- package/dist/options/color-space.d.ts +1 -0
- package/dist/options/color-space.js +1 -0
- package/dist/options/concurrency.d.ts +1 -0
- package/dist/options/concurrency.js +1 -0
- package/dist/options/config.d.ts +1 -0
- package/dist/options/config.js +1 -0
- package/dist/options/crf.d.ts +1 -0
- package/dist/options/crf.js +1 -0
- package/dist/options/cross-site-isolation.d.ts +1 -0
- package/dist/options/cross-site-isolation.js +1 -0
- package/dist/options/dark-mode.d.ts +1 -0
- package/dist/options/dark-mode.js +1 -0
- package/dist/options/default-coding-agent.d.ts +1 -0
- package/dist/options/default-coding-agent.js +1 -0
- package/dist/options/default-editor.d.ts +1 -0
- package/dist/options/default-editor.js +1 -0
- package/dist/options/default-premount-in-seconds.d.ts +19 -0
- package/dist/options/default-premount-in-seconds.js +36 -0
- package/dist/options/delete-after.d.ts +1 -0
- package/dist/options/delete-after.js +1 -0
- package/dist/options/disable-git-source.d.ts +1 -0
- package/dist/options/disable-git-source.js +1 -0
- package/dist/options/disable-shared-memory-capture.d.ts +1 -0
- package/dist/options/disable-shared-memory-capture.js +1 -0
- package/dist/options/disable-web-security.d.ts +1 -0
- package/dist/options/disable-web-security.js +1 -0
- package/dist/options/disallow-parallel-encoding.d.ts +1 -0
- package/dist/options/disallow-parallel-encoding.js +1 -0
- package/dist/options/enable-cancellation.d.ts +1 -0
- package/dist/options/enable-cancellation.js +1 -0
- package/dist/options/enable-lambda-insights.d.ts +1 -0
- package/dist/options/enable-lambda-insights.js +1 -0
- package/dist/options/enable-multiprocess-on-linux.d.ts +1 -0
- package/dist/options/enable-multiprocess-on-linux.js +1 -0
- package/dist/options/encoding-buffer-size.d.ts +1 -0
- package/dist/options/encoding-buffer-size.js +1 -0
- package/dist/options/encoding-max-rate.d.ts +1 -0
- package/dist/options/encoding-max-rate.js +1 -0
- package/dist/options/enforce-audio.d.ts +1 -0
- package/dist/options/enforce-audio.js +1 -0
- package/dist/options/env-file.d.ts +1 -0
- package/dist/options/env-file.js +1 -0
- package/dist/options/every-nth-frame.d.ts +1 -0
- package/dist/options/every-nth-frame.js +1 -0
- package/dist/options/experimental-keep-audio-context-alive.d.ts +1 -0
- package/dist/options/experimental-keep-audio-context-alive.js +1 -0
- package/dist/options/experimental-sequence-activity-limit.d.ts +19 -0
- package/dist/options/experimental-sequence-activity-limit.js +40 -0
- package/dist/options/experimental-sequence-activity.d.ts +19 -0
- package/dist/options/experimental-sequence-activity.js +38 -0
- package/dist/options/experimental-tracks.d.ts +1 -0
- package/dist/options/experimental-tracks.js +1 -0
- package/dist/options/folder-expiry.d.ts +1 -0
- package/dist/options/folder-expiry.js +1 -0
- package/dist/options/for-seamless-aac-concatenation.d.ts +1 -0
- package/dist/options/for-seamless-aac-concatenation.js +1 -0
- package/dist/options/force-new-studio.d.ts +1 -0
- package/dist/options/force-new-studio.js +1 -0
- package/dist/options/frames.d.ts +1 -0
- package/dist/options/frames.js +1 -0
- package/dist/options/gl.d.ts +1 -0
- package/dist/options/gl.js +1 -0
- package/dist/options/gop-size.d.ts +1 -0
- package/dist/options/gop-size.js +1 -0
- package/dist/options/hardware-acceleration.d.ts +1 -0
- package/dist/options/hardware-acceleration.js +1 -0
- package/dist/options/headless.d.ts +1 -0
- package/dist/options/headless.js +1 -0
- package/dist/options/ignore-certificate-errors.d.ts +1 -0
- package/dist/options/ignore-certificate-errors.js +1 -0
- package/dist/options/image-sequence-pattern.d.ts +1 -0
- package/dist/options/image-sequence-pattern.js +1 -0
- package/dist/options/image-sequence.d.ts +1 -0
- package/dist/options/image-sequence.js +1 -0
- package/dist/options/index.d.ts +163 -7
- package/dist/options/index.js +8 -2
- package/dist/options/interactivity.d.ts +1 -0
- package/dist/options/interactivity.js +1 -0
- package/dist/options/ipv4.d.ts +1 -0
- package/dist/options/ipv4.js +1 -0
- package/dist/options/is-production.d.ts +1 -0
- package/dist/options/is-production.js +1 -0
- package/dist/options/jpeg-quality.d.ts +1 -0
- package/dist/options/jpeg-quality.js +1 -0
- package/dist/options/keyboard-shortcuts.d.ts +1 -0
- package/dist/options/keyboard-shortcuts.js +1 -0
- package/dist/options/latency-hint.d.ts +1 -0
- package/dist/options/latency-hint.js +1 -0
- package/dist/options/license-key.d.ts +1 -0
- package/dist/options/license-key.js +1 -0
- package/dist/options/log-level.d.ts +1 -0
- package/dist/options/log-level.js +1 -0
- package/dist/options/metadata.d.ts +1 -0
- package/dist/options/metadata.js +1 -0
- package/dist/options/mute.d.ts +1 -0
- package/dist/options/mute.js +1 -0
- package/dist/options/no-open.d.ts +1 -0
- package/dist/options/no-open.js +1 -0
- package/dist/options/number-of-gif-loops.d.ts +1 -0
- package/dist/options/number-of-gif-loops.js +1 -0
- package/dist/options/number-of-shared-audio-tags.d.ts +1 -0
- package/dist/options/number-of-shared-audio-tags.js +1 -0
- package/dist/options/offthreadvideo-cache-size.d.ts +1 -0
- package/dist/options/offthreadvideo-cache-size.js +1 -0
- package/dist/options/offthreadvideo-threads.d.ts +1 -0
- package/dist/options/offthreadvideo-threads.js +1 -0
- package/dist/options/on-browser-download.d.ts +1 -0
- package/dist/options/on-browser-download.js +1 -0
- package/dist/options/option.d.ts +1 -0
- package/dist/options/options-map.d.ts +140 -0
- package/dist/options/out-dir.d.ts +1 -0
- package/dist/options/out-dir.js +1 -0
- package/dist/options/override-duration.d.ts +1 -0
- package/dist/options/override-duration.js +1 -0
- package/dist/options/override-fps.d.ts +1 -0
- package/dist/options/override-fps.js +1 -0
- package/dist/options/override-height.d.ts +1 -0
- package/dist/options/override-height.js +1 -0
- package/dist/options/override-width.d.ts +1 -0
- package/dist/options/override-width.js +1 -0
- package/dist/options/overwrite.d.ts +1 -0
- package/dist/options/overwrite.js +1 -0
- package/dist/options/package-manager.d.ts +1 -0
- package/dist/options/package-manager.js +1 -0
- package/dist/options/pixel-format.d.ts +1 -0
- package/dist/options/pixel-format.js +1 -0
- package/dist/options/port.d.ts +1 -0
- package/dist/options/port.js +1 -0
- package/dist/options/prefer-lossless.d.ts +1 -0
- package/dist/options/prefer-lossless.js +1 -0
- package/dist/options/preview-sample-rate.d.ts +1 -0
- package/dist/options/preview-sample-rate.js +1 -0
- package/dist/options/props.d.ts +1 -0
- package/dist/options/props.js +1 -0
- package/dist/options/prores-profile.d.ts +1 -0
- package/dist/options/prores-profile.js +1 -0
- package/dist/options/public-dir.d.ts +1 -0
- package/dist/options/public-dir.js +1 -0
- package/dist/options/public-license-key.d.ts +1 -0
- package/dist/options/public-license-key.js +1 -0
- package/dist/options/public-path.d.ts +1 -0
- package/dist/options/public-path.js +1 -0
- package/dist/options/repro.d.ts +1 -0
- package/dist/options/repro.js +1 -0
- package/dist/options/rspack.d.ts +1 -0
- package/dist/options/rspack.js +1 -0
- package/dist/options/runs.d.ts +1 -0
- package/dist/options/runs.js +1 -0
- package/dist/options/sample-rate.d.ts +1 -0
- package/dist/options/sample-rate.js +1 -0
- package/dist/options/scale.d.ts +1 -0
- package/dist/options/scale.js +1 -0
- package/dist/options/separate-audio.d.ts +1 -0
- package/dist/options/separate-audio.js +2 -1
- package/dist/options/sequence-activity-limit.d.ts +19 -0
- package/dist/options/sequence-activity-limit.js +44 -0
- package/dist/options/show-layer-frame-numbers.d.ts +19 -0
- package/dist/options/show-layer-frame-numbers.js +34 -0
- package/dist/options/{experimental-client-side-rendering.d.ts → show-premounting.d.ts} +6 -3
- package/dist/options/show-premounting.js +33 -0
- package/dist/options/skip-skills.d.ts +1 -0
- package/dist/options/skip-skills.js +1 -0
- package/dist/options/still-frame.d.ts +1 -0
- package/dist/options/still-frame.js +1 -0
- package/dist/options/still-image-format.d.ts +1 -0
- package/dist/options/still-image-format.js +1 -0
- package/dist/options/throw-if-site-exists.d.ts +1 -0
- package/dist/options/throw-if-site-exists.js +1 -0
- package/dist/options/timeout.d.ts +1 -0
- package/dist/options/timeout.js +1 -0
- package/dist/options/user-agent.d.ts +1 -0
- package/dist/options/user-agent.js +1 -0
- package/dist/options/version-flag.d.ts +1 -0
- package/dist/options/version-flag.js +1 -0
- package/dist/options/video-bitrate.d.ts +1 -0
- package/dist/options/video-bitrate.js +1 -0
- package/dist/options/video-cache-size.d.ts +1 -0
- package/dist/options/video-cache-size.js +1 -0
- package/dist/options/video-codec.d.ts +1 -0
- package/dist/options/video-codec.js +1 -0
- package/dist/options/video-image-format.d.ts +1 -0
- package/dist/options/video-image-format.js +1 -0
- package/dist/options/webhook-custom-data.d.ts +1 -0
- package/dist/options/webhook-custom-data.js +1 -0
- package/dist/options/webpack-poll.d.ts +1 -0
- package/dist/options/webpack-poll.js +1 -0
- package/dist/options/x264-preset.d.ts +1 -0
- package/dist/options/x264-preset.js +1 -0
- package/dist/prespawn-ffmpeg.js +10 -5
- package/dist/stringify-ffmpeg-filter.js +8 -4
- package/package.json +16 -14
- package/dist/options/experimental-client-side-rendering.js +0 -30
- 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/options/timeout.js
CHANGED
|
@@ -13,6 +13,7 @@ const validate = (value) => {
|
|
|
13
13
|
const cliFlag = 'timeout';
|
|
14
14
|
exports.delayRenderTimeoutInMillisecondsOption = {
|
|
15
15
|
name: 'delayRender() timeout',
|
|
16
|
+
addedIn: '2.6.3',
|
|
16
17
|
cliFlag,
|
|
17
18
|
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["A number describing how long the render may take to resolve all", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.dev/docs/delay-render", children: jsx_runtime_1.jsx("code", { children: "delayRender()" }) }), ' ', "calls", ' ', jsx_runtime_1.jsx("a", { style: { fontSize: 'inherit' }, href: "https://remotion.dev/docs/timeout", children: "before it times out" }),
|
|
18
19
|
". Default: ",
|
|
@@ -6,6 +6,7 @@ let userAgent = null;
|
|
|
6
6
|
const cliFlag = 'user-agent';
|
|
7
7
|
exports.userAgentOption = {
|
|
8
8
|
name: 'User agent',
|
|
9
|
+
addedIn: '3.3.83',
|
|
9
10
|
cliFlag,
|
|
10
11
|
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Lets you set a custom user agent that the headless Chrome browser assumes." })),
|
|
11
12
|
ssrName: 'userAgent',
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const cliFlag = 'version';
|
|
6
6
|
exports.versionFlagOption = {
|
|
7
7
|
name: 'Version',
|
|
8
|
+
addedIn: '4.0.15',
|
|
8
9
|
cliFlag,
|
|
9
10
|
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Install a specific version. Also enables downgrading to an older version." })),
|
|
10
11
|
ssrName: null,
|
|
@@ -6,6 +6,7 @@ let videoBitrate = null;
|
|
|
6
6
|
const cliFlag = 'video-bitrate';
|
|
7
7
|
exports.videoBitrateOption = {
|
|
8
8
|
name: 'Video Bitrate',
|
|
9
|
+
addedIn: '3.2.32',
|
|
9
10
|
cliFlag,
|
|
10
11
|
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Specify the target bitrate for the generated video. The syntax for FFmpeg", "'", "s",
|
|
11
12
|
jsx_runtime_1.jsx("code", { children: "-b:v" }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const getMediaCacheSizeInBytes: () => number | null;
|
|
2
2
|
export declare const mediaCacheSizeInBytesOption: {
|
|
3
3
|
name: string;
|
|
4
|
+
addedIn: string;
|
|
4
5
|
cliFlag: "media-cache-size-in-bytes";
|
|
5
6
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
ssrName: "mediaCacheSizeInBytes";
|
|
@@ -10,6 +10,7 @@ exports.getMediaCacheSizeInBytes = getMediaCacheSizeInBytes;
|
|
|
10
10
|
const cliFlag = 'media-cache-size-in-bytes';
|
|
11
11
|
exports.mediaCacheSizeInBytesOption = {
|
|
12
12
|
name: '@remotion/media cache size',
|
|
13
|
+
addedIn: '4.0.352',
|
|
13
14
|
cliFlag,
|
|
14
15
|
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Specify the memory budget for decoded media cached by", ' ', jsx_runtime_1.jsx("code", { children: "<Video>" }),
|
|
15
16
|
" and ",
|
|
@@ -2,6 +2,7 @@ import type { CodecOrUndefined } from '../codec';
|
|
|
2
2
|
export declare const getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
3
3
|
export declare const videoCodecOption: {
|
|
4
4
|
name: string;
|
|
5
|
+
addedIn: string;
|
|
5
6
|
cliFlag: "codec";
|
|
6
7
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
ssrName: string;
|
|
@@ -34,6 +34,7 @@ const deriveCodecsFromFilename = (extension) => {
|
|
|
34
34
|
const cliFlag = 'codec';
|
|
35
35
|
exports.videoCodecOption = {
|
|
36
36
|
name: 'Codec',
|
|
37
|
+
addedIn: '1.4.0',
|
|
37
38
|
cliFlag,
|
|
38
39
|
description: () => (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, GIF and ProRes support transparency." })),
|
|
39
40
|
ssrName: 'codec',
|
|
@@ -8,6 +8,7 @@ let currentVideoImageFormat = null;
|
|
|
8
8
|
const cliFlag = 'image-format';
|
|
9
9
|
exports.videoImageFormatOption = {
|
|
10
10
|
name: 'Video Image Format',
|
|
11
|
+
addedIn: '1.4.0',
|
|
11
12
|
cliFlag,
|
|
12
13
|
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["The image format to use when rendering frames for a video. Must be one of", ' ', image_format_1.validVideoImageFormats.map((f) => `"${f}"`).join(', '), ". Default:", ' ', jsx_runtime_1.jsx("code", { children: "\"jpeg\"" }),
|
|
13
14
|
". JPEG is faster, but does not support transparency.",
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const cliFlag = 'webhook-custom-data';
|
|
6
6
|
exports.webhookCustomDataOption = {
|
|
7
7
|
name: 'Webhook custom data',
|
|
8
|
+
addedIn: '4.0.25',
|
|
8
9
|
cliFlag,
|
|
9
10
|
description: (type) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Pass up to 1,024 bytes of a JSON-serializable object to the webhook. This data will be included in the webhook payload.", ' ', type === 'cli'
|
|
10
11
|
? 'Alternatively, pass a file path pointing to a JSON file'
|
|
@@ -6,6 +6,7 @@ const cliFlag = 'webpack-poll';
|
|
|
6
6
|
let webpackPolling = null;
|
|
7
7
|
exports.webpackPollOption = {
|
|
8
8
|
name: 'Webpack Polling',
|
|
9
|
+
addedIn: '3.3.11',
|
|
9
10
|
cliFlag,
|
|
10
11
|
description: () => (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: "Enables Webpack polling instead of the file system event listeners for hot reloading. This is useful if you are inside a virtual machine or have a remote file system. Pass a value in milliseconds." })),
|
|
11
12
|
ssrName: null,
|
|
@@ -6,6 +6,7 @@ export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Pr
|
|
|
6
6
|
}) => void;
|
|
7
7
|
export declare const x264Option: {
|
|
8
8
|
name: string;
|
|
9
|
+
addedIn: string;
|
|
9
10
|
cliFlag: "x264-preset";
|
|
10
11
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
ssrName: "x264Preset";
|
|
@@ -34,6 +34,7 @@ const cliFlag = 'x264-preset';
|
|
|
34
34
|
const DEFAULT_PRESET = 'medium';
|
|
35
35
|
exports.x264Option = {
|
|
36
36
|
name: 'x264 Preset',
|
|
37
|
+
addedIn: '4.0.22',
|
|
37
38
|
cliFlag,
|
|
38
39
|
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Sets a x264 preset profile. Only applies to videos rendered with", ' ', jsx_runtime_1.jsx("code", { children: "h264" }),
|
|
39
40
|
" codec.",
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -134,8 +134,8 @@ const prespawnFfmpeg = (options) => {
|
|
|
134
134
|
['-f', 'remotionshm'],
|
|
135
135
|
['-video_size', `${options.width}x${options.height}`],
|
|
136
136
|
['-framerate', fpsAsFraction(options.fps)],
|
|
137
|
-
['-control_fd', '
|
|
138
|
-
['-ack_fd', '
|
|
137
|
+
['-control_fd', '0'],
|
|
138
|
+
['-ack_fd', '1'],
|
|
139
139
|
options.remotionSharedMemoryPoolDirectory === null
|
|
140
140
|
? null
|
|
141
141
|
: ['-pool_dir', options.remotionSharedMemoryPoolDirectory],
|
|
@@ -179,13 +179,18 @@ const prespawnFfmpeg = (options) => {
|
|
|
179
179
|
binariesDirectory: options.binariesDirectory,
|
|
180
180
|
cancelSignal: options.signal,
|
|
181
181
|
options: options.inputMode === 'remotion-shared-memory'
|
|
182
|
-
? {
|
|
182
|
+
? {
|
|
183
|
+
// Older Bun versions can double-close extra stdio FDs. Use
|
|
184
|
+
// stdin/stdout for the protocol and consume ACKs without buffering.
|
|
185
|
+
stdio: 'pipe',
|
|
186
|
+
buffer: false,
|
|
187
|
+
}
|
|
183
188
|
: undefined,
|
|
184
189
|
});
|
|
185
190
|
const remotionSharedMemory = options.inputMode === 'remotion-shared-memory'
|
|
186
191
|
? (0, remotion_shared_memory_ffmpeg_1.createRemotionSharedMemoryFfmpegBridge)({
|
|
187
|
-
control: task.
|
|
188
|
-
acknowledgements: task.
|
|
192
|
+
control: task.stdin,
|
|
193
|
+
acknowledgements: task.stdout,
|
|
189
194
|
})
|
|
190
195
|
: null;
|
|
191
196
|
let ffmpegOutput = '';
|
|
@@ -67,10 +67,14 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
67
67
|
}
|
|
68
68
|
const { toneFrequency, startInVideo } = asset;
|
|
69
69
|
const startInVideoSeconds = startInVideo / fps;
|
|
70
|
+
// A chunk's leading trim only cuts into assets already playing at its start.
|
|
71
|
+
// For later assets, remove that time from the silence before the asset instead.
|
|
72
|
+
const assetTrimLeftOffset = startInVideo === 0 ? trimLeftOffset : 0;
|
|
73
|
+
const startInChunkSeconds = startInVideo === 0 ? 0 : startInVideoSeconds - trimLeftOffset;
|
|
70
74
|
const { trimLeft, maxTrim } = (0, seamless_aac_trim_1.getActualTrimLeft)({
|
|
71
75
|
trimLeft: asset.trimLeft,
|
|
72
76
|
fps,
|
|
73
|
-
trimLeftOffset,
|
|
77
|
+
trimLeftOffset: assetTrimLeftOffset,
|
|
74
78
|
seamless: forSeamlessAacConcatenation,
|
|
75
79
|
assetDuration,
|
|
76
80
|
audioStartFrame: asset.audioStartFrame,
|
|
@@ -84,7 +88,7 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
84
88
|
}
|
|
85
89
|
const { actualTrimLeft, audibleDuration, filter: trimAndTempoFilter, } = trimAndSetTempo({
|
|
86
90
|
assetDuration,
|
|
87
|
-
trimLeftOffset,
|
|
91
|
+
trimLeftOffset: assetTrimLeftOffset,
|
|
88
92
|
trimRightOffset,
|
|
89
93
|
asset,
|
|
90
94
|
fps,
|
|
@@ -96,8 +100,8 @@ const stringifyFfmpegFilter = ({ channels, volume, fps, assetDuration, chunkLeng
|
|
|
96
100
|
fps,
|
|
97
101
|
trimLeft: actualTrimLeft,
|
|
98
102
|
});
|
|
99
|
-
const padAtEnd = chunkLengthInSeconds - audibleDuration -
|
|
100
|
-
const padStart =
|
|
103
|
+
const padAtEnd = chunkLengthInSeconds - audibleDuration - startInChunkSeconds;
|
|
104
|
+
const padStart = startInChunkSeconds +
|
|
101
105
|
(asset.trimLeft === 0 ? presentationTimeOffsetInSeconds : 0);
|
|
102
106
|
// Set as few filters as possible, as combining them can create noise
|
|
103
107
|
return {
|
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.536",
|
|
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.536",
|
|
26
|
+
"@remotion/streaming": "4.0.536",
|
|
27
27
|
"source-map": "0.8.0",
|
|
28
28
|
"ws": "8.21.0",
|
|
29
|
-
"@remotion/licensing": "4.0.
|
|
29
|
+
"@remotion/licensing": "4.0.536"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.8.0",
|
|
@@ -40,19 +40,21 @@
|
|
|
40
40
|
"react-dom": "19.2.3",
|
|
41
41
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
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.536",
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.536",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
|
-
"@types/node": "20.12.14"
|
|
46
|
+
"@types/node": "20.12.14",
|
|
47
|
+
"@types/pngjs": "6.0.5",
|
|
48
|
+
"pngjs": "7.0.0"
|
|
47
49
|
},
|
|
48
50
|
"optionalDependencies": {
|
|
49
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
50
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
55
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
51
|
+
"@remotion/compositor-darwin-arm64": "4.0.536",
|
|
52
|
+
"@remotion/compositor-darwin-x64": "4.0.536",
|
|
53
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.536",
|
|
54
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.536",
|
|
55
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.536",
|
|
56
|
+
"@remotion/compositor-linux-x64-musl": "4.0.536",
|
|
57
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.536"
|
|
56
58
|
},
|
|
57
59
|
"keywords": [
|
|
58
60
|
"remotion",
|
|
@@ -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,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;
|
|
@@ -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;
|