@remotion/renderer 4.0.534 → 4.0.535
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 +4 -0
- package/dist/client.d.ts +315 -0
- 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 +1076 -846
- package/dist/esm/index.mjs +394 -351
- 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/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 +175 -0
- package/dist/options/index.js +8 -0
- 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/show-premounting.d.ts +19 -0
- 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/package.json +13 -13
package/dist/combine-chunks.d.ts
CHANGED
|
@@ -32,8 +32,9 @@ type OptionalCombineChunksOptions = {
|
|
|
32
32
|
sampleRate: number;
|
|
33
33
|
};
|
|
34
34
|
export type CombineChunksOptions = MandatoryCombineChunksOptions & Partial<OptionalCombineChunksOptions>;
|
|
35
|
-
export declare const internalCombineChunks: ({ outputLocation: output, onProgress, codec, fps, numberOfGifLoops, audioBitrate, indent, logLevel, binariesDirectory, cancelSignal, metadata, audioFiles, videoFiles, framesPerChunk, audioCodec, preferLossless, everyNthFrame, frameRange, compositionDurationInFrames, sampleRate, }: MandatoryCombineChunksOptions & OptionalCombineChunksOptions & {
|
|
35
|
+
export declare const internalCombineChunks: ({ outputLocation: output, onProgress, codec, fps, numberOfGifLoops, audioBitrate, indent, logLevel, binariesDirectory, cancelSignal, metadata, audioFiles, videoFiles, framesPerChunk, audioCodec, preferLossless, everyNthFrame, frameRange, compositionDurationInFrames, sampleRate, separateAudioTo, }: MandatoryCombineChunksOptions & OptionalCombineChunksOptions & {
|
|
36
36
|
indent: boolean;
|
|
37
|
+
separateAudioTo: string | null;
|
|
37
38
|
}) => Promise<void>;
|
|
38
39
|
export declare const combineChunks: (options: CombineChunksOptions) => Promise<void>;
|
|
39
40
|
export {};
|
package/dist/combine-chunks.js
CHANGED
|
@@ -10,7 +10,9 @@ const combine_video_streams_1 = require("./combine-video-streams");
|
|
|
10
10
|
const combine_video_streams_seamlessly_1 = require("./combine-video-streams-seamlessly");
|
|
11
11
|
const get_duration_from_frame_range_1 = require("./get-duration-from-frame-range");
|
|
12
12
|
const get_extension_from_codec_1 = require("./get-extension-from-codec");
|
|
13
|
+
const get_extension_of_filename_1 = require("./get-extension-of-filename");
|
|
13
14
|
const get_frame_to_render_1 = require("./get-frame-to-render");
|
|
15
|
+
const get_mp4_brand_1 = require("./get-mp4-brand");
|
|
14
16
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
15
17
|
const logger_1 = require("./logger");
|
|
16
18
|
const mux_video_and_audio_1 = require("./mux-video-and-audio");
|
|
@@ -19,23 +21,28 @@ const tmp_dir_1 = require("./tmp-dir");
|
|
|
19
21
|
const truthy_1 = require("./truthy");
|
|
20
22
|
const validate_number_of_gif_loops_1 = require("./validate-number-of-gif-loops");
|
|
21
23
|
const REMOTION_FILELIST_TOKEN = 'remotion-filelist';
|
|
22
|
-
const internalCombineChunks = async ({ outputLocation: output, onProgress, codec, fps, numberOfGifLoops, audioBitrate, indent, logLevel, binariesDirectory, cancelSignal, metadata, audioFiles, videoFiles, framesPerChunk, audioCodec, preferLossless, everyNthFrame, frameRange, compositionDurationInFrames, sampleRate, }) => {
|
|
24
|
+
const internalCombineChunks = async ({ outputLocation: output, onProgress, codec, fps, numberOfGifLoops, audioBitrate, indent, logLevel, binariesDirectory, cancelSignal, metadata, audioFiles, videoFiles, framesPerChunk, audioCodec, preferLossless, everyNthFrame, frameRange, compositionDurationInFrames, sampleRate, separateAudioTo, }) => {
|
|
25
|
+
var _a;
|
|
26
|
+
var _b;
|
|
23
27
|
(0, validate_number_of_gif_loops_1.validateNumberOfGifLoops)(numberOfGifLoops, codec);
|
|
24
|
-
const filelistDir = (0, tmp_dir_1.tmpDir)(REMOTION_FILELIST_TOKEN);
|
|
25
28
|
const shouldCreateVideo = !(0, is_audio_codec_1.isAudioCodec)(codec);
|
|
26
29
|
const resolvedAudioCodec = (0, audio_codec_1.resolveAudioCodec)({
|
|
27
30
|
setting: audioCodec,
|
|
28
31
|
codec,
|
|
29
32
|
preferLossless,
|
|
30
|
-
separateAudioTo
|
|
33
|
+
separateAudioTo,
|
|
31
34
|
});
|
|
32
35
|
const shouldCreateAudio = resolvedAudioCodec !== null && audioFiles.length > 0;
|
|
36
|
+
if (separateAudioTo !== null && (!shouldCreateAudio || !shouldCreateVideo)) {
|
|
37
|
+
throw new Error('Separate audio requires a video render with audio chunks.');
|
|
38
|
+
}
|
|
33
39
|
const seamlessVideo = (0, can_concat_seamlessly_1.canConcatVideoSeamlessly)(codec);
|
|
34
40
|
const realFrameRange = (0, get_frame_to_render_1.getRealFrameRange)(compositionDurationInFrames, frameRange);
|
|
35
41
|
const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(resolvedAudioCodec, framesPerChunk);
|
|
36
42
|
const numberOfFrames = (0, get_duration_from_frame_range_1.getFramesToRender)(realFrameRange, everyNthFrame).length;
|
|
43
|
+
const filelistDir = (0, tmp_dir_1.tmpDir)(REMOTION_FILELIST_TOKEN);
|
|
37
44
|
const videoOutput = shouldCreateVideo
|
|
38
|
-
? (0, node_path_1.join)(filelistDir, `video.${(0, get_extension_from_codec_1.getFileExtensionFromCodec)(codec, resolvedAudioCodec)}`)
|
|
45
|
+
? (0, node_path_1.join)(filelistDir, `video.${(0, get_extension_from_codec_1.getFileExtensionFromCodec)(codec, separateAudioTo === null ? resolvedAudioCodec : null)}`)
|
|
39
46
|
: null;
|
|
40
47
|
const audioOutput = shouldCreateAudio
|
|
41
48
|
? (0, node_path_1.join)(filelistDir, `audio.${(0, audio_codec_1.getExtensionFromAudioCodec)(resolvedAudioCodec)}`)
|
|
@@ -63,52 +70,52 @@ const internalCombineChunks = async ({ outputLocation: output, onProgress, codec
|
|
|
63
70
|
: seamlessVideo
|
|
64
71
|
? 'seamlessly'
|
|
65
72
|
: 'normally'}`);
|
|
66
|
-
await Promise.all([
|
|
67
|
-
shouldCreateAudio && audioOutput
|
|
68
|
-
? (0, combine_audio_1.createCombinedAudio)({
|
|
69
|
-
audioBitrate,
|
|
70
|
-
filelistDir,
|
|
71
|
-
files: audioFiles,
|
|
72
|
-
indent,
|
|
73
|
-
logLevel,
|
|
74
|
-
output: audioOutput,
|
|
75
|
-
resolvedAudioCodec,
|
|
76
|
-
seamless: seamlessAudio,
|
|
77
|
-
chunkDurationInSeconds,
|
|
78
|
-
addRemotionMetadata: !shouldCreateVideo,
|
|
79
|
-
binariesDirectory,
|
|
80
|
-
fps,
|
|
81
|
-
cancelSignal,
|
|
82
|
-
onProgress: (frames) => {
|
|
83
|
-
concatenatedAudio = frames;
|
|
84
|
-
updateProgress();
|
|
85
|
-
},
|
|
86
|
-
sampleRate,
|
|
87
|
-
})
|
|
88
|
-
: null,
|
|
89
|
-
shouldCreateVideo && !seamlessVideo && videoOutput
|
|
90
|
-
? (0, combine_video_streams_1.combineVideoStreams)({
|
|
91
|
-
codec,
|
|
92
|
-
filelistDir,
|
|
93
|
-
fps,
|
|
94
|
-
indent,
|
|
95
|
-
logLevel,
|
|
96
|
-
numberOfGifLoops,
|
|
97
|
-
output: videoOutput,
|
|
98
|
-
files: videoFiles,
|
|
99
|
-
addRemotionMetadata: !shouldCreateAudio,
|
|
100
|
-
binariesDirectory,
|
|
101
|
-
cancelSignal,
|
|
102
|
-
onProgress: (frames) => {
|
|
103
|
-
concatenatedVideo = frames;
|
|
104
|
-
updateProgress();
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
: null,
|
|
108
|
-
].filter(truthy_1.truthy));
|
|
109
73
|
try {
|
|
74
|
+
await Promise.all([
|
|
75
|
+
shouldCreateAudio && audioOutput
|
|
76
|
+
? (0, combine_audio_1.createCombinedAudio)({
|
|
77
|
+
audioBitrate,
|
|
78
|
+
filelistDir,
|
|
79
|
+
files: audioFiles,
|
|
80
|
+
indent,
|
|
81
|
+
logLevel,
|
|
82
|
+
output: audioOutput,
|
|
83
|
+
resolvedAudioCodec,
|
|
84
|
+
seamless: seamlessAudio,
|
|
85
|
+
chunkDurationInSeconds,
|
|
86
|
+
addRemotionMetadata: !shouldCreateVideo,
|
|
87
|
+
binariesDirectory,
|
|
88
|
+
fps,
|
|
89
|
+
cancelSignal,
|
|
90
|
+
onProgress: (frames) => {
|
|
91
|
+
concatenatedAudio = frames;
|
|
92
|
+
updateProgress();
|
|
93
|
+
},
|
|
94
|
+
sampleRate,
|
|
95
|
+
})
|
|
96
|
+
: null,
|
|
97
|
+
shouldCreateVideo && !seamlessVideo && videoOutput
|
|
98
|
+
? (0, combine_video_streams_1.combineVideoStreams)({
|
|
99
|
+
codec,
|
|
100
|
+
filelistDir,
|
|
101
|
+
fps,
|
|
102
|
+
indent,
|
|
103
|
+
logLevel,
|
|
104
|
+
numberOfGifLoops,
|
|
105
|
+
output: videoOutput,
|
|
106
|
+
files: videoFiles,
|
|
107
|
+
addRemotionMetadata: !shouldCreateAudio,
|
|
108
|
+
binariesDirectory,
|
|
109
|
+
cancelSignal,
|
|
110
|
+
onProgress: (frames) => {
|
|
111
|
+
concatenatedVideo = frames;
|
|
112
|
+
updateProgress();
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
: null,
|
|
116
|
+
].filter(truthy_1.truthy));
|
|
110
117
|
await (0, mux_video_and_audio_1.muxVideoAndAudio)({
|
|
111
|
-
audioOutput,
|
|
118
|
+
audioOutput: separateAudioTo === null ? audioOutput : null,
|
|
112
119
|
indent,
|
|
113
120
|
logLevel,
|
|
114
121
|
onProgress: (frames) => {
|
|
@@ -127,12 +134,33 @@ const internalCombineChunks = async ({ outputLocation: output, onProgress, codec
|
|
|
127
134
|
audioCodec: resolvedAudioCodec,
|
|
128
135
|
sampleRate,
|
|
129
136
|
});
|
|
137
|
+
if (separateAudioTo !== null && audioOutput !== null) {
|
|
138
|
+
const extension = (_b = (_a = (0, get_extension_of_filename_1.getExtensionOfFilename)(separateAudioTo)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : null;
|
|
139
|
+
if ((0, get_mp4_brand_1.getMp4BrandForExtension)(extension)) {
|
|
140
|
+
await (0, mux_video_and_audio_1.muxVideoAndAudio)({
|
|
141
|
+
videoOutput: null,
|
|
142
|
+
audioOutput,
|
|
143
|
+
output: separateAudioTo,
|
|
144
|
+
indent,
|
|
145
|
+
logLevel,
|
|
146
|
+
onProgress: () => undefined,
|
|
147
|
+
binariesDirectory,
|
|
148
|
+
fps,
|
|
149
|
+
cancelSignal,
|
|
150
|
+
metadata: null,
|
|
151
|
+
numberOfGifLoops: null,
|
|
152
|
+
audioCodec: resolvedAudioCodec,
|
|
153
|
+
sampleRate,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
(0, node_fs_1.copyFileSync)(audioOutput, separateAudioTo);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
130
160
|
onProgress({ totalProgress: 1, frames: numberOfFrames });
|
|
131
|
-
(0, node_fs_1.rmSync)(filelistDir, { recursive: true });
|
|
132
161
|
}
|
|
133
|
-
|
|
134
|
-
(0, node_fs_1.rmSync)(filelistDir, { recursive: true });
|
|
135
|
-
throw err;
|
|
162
|
+
finally {
|
|
163
|
+
(0, node_fs_1.rmSync)(filelistDir, { recursive: true, force: true });
|
|
136
164
|
}
|
|
137
165
|
};
|
|
138
166
|
exports.internalCombineChunks = internalCombineChunks;
|
|
@@ -159,6 +187,7 @@ const combineChunks = (options) => {
|
|
|
159
187
|
frameRange: (_j = options.frameRange) !== null && _j !== void 0 ? _j : null,
|
|
160
188
|
compositionDurationInFrames: options.compositionDurationInFrames,
|
|
161
189
|
sampleRate: (_k = options.sampleRate) !== null && _k !== void 0 ? _k : 48000,
|
|
190
|
+
separateAudioTo: null,
|
|
162
191
|
});
|
|
163
192
|
};
|
|
164
193
|
exports.combineChunks = combineChunks;
|
|
@@ -34,6 +34,9 @@ const combineVideoStreams = async ({ fps, codec, filelistDir, numberOfGifLoops,
|
|
|
34
34
|
'-an',
|
|
35
35
|
'-c:v',
|
|
36
36
|
encoder,
|
|
37
|
+
// Keep the MP4/MOV video time base consistent with the initial encoding.
|
|
38
|
+
'-video_track_timescale',
|
|
39
|
+
'90000',
|
|
37
40
|
codec === 'h265' ? '-tag:v' : null,
|
|
38
41
|
codec === 'h265' ? 'hvc1' : null,
|
|
39
42
|
addRemotionMetadata ? `-metadata` : null,
|
|
@@ -8,27 +8,42 @@ exports.getExecutableDir = exports.getExecutablePath = void 0;
|
|
|
8
8
|
exports.isMusl = isMusl;
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const logger_1 = require("../logger");
|
|
11
|
-
let
|
|
11
|
+
let cachedIsMusl = null;
|
|
12
12
|
function isMusl({ indent, logLevel, }) {
|
|
13
|
-
|
|
13
|
+
if (cachedIsMusl !== null) {
|
|
14
|
+
return cachedIsMusl;
|
|
15
|
+
}
|
|
14
16
|
if (!process.report && typeof Bun !== 'undefined') {
|
|
15
|
-
if
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
warned = true;
|
|
19
|
-
return false;
|
|
17
|
+
logger_1.Log.warn({ indent, logLevel }, 'Bun limitation: Could not determine if your Linux is using musl or glibc. Assuming glibc.');
|
|
18
|
+
cachedIsMusl = false;
|
|
19
|
+
return cachedIsMusl;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const processReport = process.report;
|
|
22
|
+
const excludeNetwork = processReport && 'excludeNetwork' in processReport
|
|
23
|
+
? processReport.excludeNetwork
|
|
24
|
+
: null;
|
|
25
|
+
try {
|
|
26
|
+
// Diagnostic reports can block on reverse DNS lookups for open sockets.
|
|
27
|
+
// This option is available in Node.js 20.13.0+ and 22.0.0+.
|
|
28
|
+
if (processReport && 'excludeNetwork' in processReport) {
|
|
29
|
+
processReport.excludeNetwork = true;
|
|
30
|
+
}
|
|
31
|
+
const report = processReport === null || processReport === void 0 ? void 0 : processReport.getReport();
|
|
32
|
+
if (report && typeof report === 'string') {
|
|
24
33
|
logger_1.Log.warn({ indent, logLevel }, 'Bun limitation: Could not determine if your Windows is using musl or glibc. Assuming glibc.');
|
|
34
|
+
cachedIsMusl = false;
|
|
35
|
+
return cachedIsMusl;
|
|
36
|
+
}
|
|
37
|
+
// @ts-expect-error no types
|
|
38
|
+
const { glibcVersionRuntime } = report.header;
|
|
39
|
+
cachedIsMusl = !glibcVersionRuntime;
|
|
40
|
+
return cachedIsMusl;
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
if (processReport && 'excludeNetwork' in processReport) {
|
|
44
|
+
processReport.excludeNetwork = excludeNetwork;
|
|
25
45
|
}
|
|
26
|
-
warned = true;
|
|
27
|
-
return false;
|
|
28
46
|
}
|
|
29
|
-
// @ts-expect-error no types
|
|
30
|
-
const { glibcVersionRuntime } = report.header;
|
|
31
|
-
return !glibcVersionRuntime;
|
|
32
47
|
}
|
|
33
48
|
const getExecutablePath = ({ indent, logLevel, type, binariesDirectory, }) => {
|
|
34
49
|
const base = binariesDirectory !== null && binariesDirectory !== void 0 ? binariesDirectory : (0, exports.getExecutableDir)(indent, logLevel);
|
package/dist/ensure-browser.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const ensureBrowser: (options?: Partial<{
|
|
|
29
29
|
readonly logLevel: {
|
|
30
30
|
cliFlag: "log";
|
|
31
31
|
name: string;
|
|
32
|
+
addedIn: string;
|
|
32
33
|
ssrName: string;
|
|
33
34
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
34
35
|
docLink: string;
|
|
@@ -46,6 +47,7 @@ export declare const ensureBrowser: (options?: Partial<{
|
|
|
46
47
|
};
|
|
47
48
|
readonly onBrowserDownload: {
|
|
48
49
|
name: string;
|
|
50
|
+
addedIn: string;
|
|
49
51
|
cliFlag: "on-browser-download";
|
|
50
52
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
51
53
|
ssrName: "onBrowserDownload";
|
|
@@ -58,6 +60,7 @@ export declare const ensureBrowser: (options?: Partial<{
|
|
|
58
60
|
readonly chromeMode: {
|
|
59
61
|
cliFlag: "chrome-mode";
|
|
60
62
|
name: string;
|
|
63
|
+
addedIn: string;
|
|
61
64
|
ssrName: string;
|
|
62
65
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
63
66
|
docLink: string;
|