@remotion/renderer 4.0.118 → 4.0.120
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/get-audio-channels.d.ts +8 -2
- package/dist/assets/get-audio-channels.js +18 -6
- package/dist/call-ffmpeg.d.ts +4 -3
- package/dist/call-ffmpeg.js +14 -4
- package/dist/client.d.ts +154 -64
- package/dist/combine-videos.d.ts +1 -0
- package/dist/combine-videos.js +2 -1
- package/dist/compositor/compose.d.ts +1 -1
- package/dist/compositor/compose.js +7 -2
- package/dist/compositor/compositor.d.ts +9 -2
- package/dist/compositor/compositor.js +19 -8
- package/dist/compositor/get-executable-path.d.ts +6 -1
- package/dist/compositor/get-executable-path.js +2 -2
- package/dist/copy-to-clipboard.d.ts +1 -1
- package/dist/copy-to-clipboard.js +2 -1
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/create-silent-audio.d.ts +2 -1
- package/dist/create-silent-audio.js +2 -1
- package/dist/extract-audio.d.ts +1 -0
- package/dist/extract-audio.js +2 -1
- package/dist/get-compositions.js +5 -2
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-silent-parts.d.ts +2 -1
- package/dist/get-silent-parts.js +2 -1
- package/dist/get-video-metadata.d.ts +1 -0
- package/dist/get-video-metadata.js +2 -1
- package/dist/guess-extension-for-media.d.ts +2 -1
- package/dist/guess-extension-for-media.js +2 -1
- package/dist/index.d.ts +90 -37
- package/dist/merge-audio-track.d.ts +1 -0
- package/dist/merge-audio-track.js +11 -2
- package/dist/offthread-video-server.d.ts +2 -1
- package/dist/offthread-video-server.js +12 -6
- package/dist/options/binaries-directory.d.ts +15 -0
- package/dist/options/binaries-directory.js +35 -0
- package/dist/options/color-space.d.ts +3 -3
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +27 -12
- package/dist/options/index.js +2 -0
- package/dist/options/option.d.ts +1 -1
- package/dist/options/options-map.d.ts +89 -14
- package/dist/options/options-map.js +6 -0
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/pixel-format.d.ts +1 -1
- package/dist/prepare-server.d.ts +2 -1
- package/dist/prepare-server.js +3 -1
- package/dist/preprocess-audio-track.d.ts +1 -0
- package/dist/preprocess-audio-track.js +9 -3
- package/dist/prespawn-ffmpeg.d.ts +1 -0
- package/dist/prespawn-ffmpeg.js +1 -0
- package/dist/pure.d.ts +3 -3
- package/dist/render-frames.js +5 -2
- package/dist/render-media.d.ts +3 -1
- package/dist/render-media.js +7 -2
- package/dist/render-still.js +3 -1
- package/dist/select-composition.d.ts +1 -1
- package/dist/select-composition.js +5 -2
- package/dist/serve-static.d.ts +1 -0
- package/dist/serve-static.js +1 -0
- package/dist/stitch-frames-to-video.d.ts +3 -1
- package/dist/stitch-frames-to-video.js +9 -3
- package/dist/take-frame-and-compose.d.ts +0 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { LogLevel } from '../log-level';
|
|
2
2
|
import type { AudioChannelsAndDurationResultCache, DownloadMap } from './download-map';
|
|
3
|
-
export declare const getAudioChannelsAndDurationWithoutCache: (src: string, indent: boolean, logLevel: LogLevel) => Promise<AudioChannelsAndDurationResultCache>;
|
|
4
|
-
export declare const getAudioChannelsAndDuration: (downloadMap
|
|
3
|
+
export declare const getAudioChannelsAndDurationWithoutCache: (src: string, indent: boolean, logLevel: LogLevel, binariesDirectory: string | null) => Promise<AudioChannelsAndDurationResultCache>;
|
|
4
|
+
export declare const getAudioChannelsAndDuration: ({ downloadMap, src, indent, logLevel, binariesDirectory, }: {
|
|
5
|
+
downloadMap: DownloadMap;
|
|
6
|
+
src: string;
|
|
7
|
+
indent: boolean;
|
|
8
|
+
logLevel: LogLevel;
|
|
9
|
+
binariesDirectory: string | null;
|
|
10
|
+
}) => Promise<AudioChannelsAndDurationResultCache>;
|
|
@@ -4,7 +4,7 @@ exports.getAudioChannelsAndDuration = exports.getAudioChannelsAndDurationWithout
|
|
|
4
4
|
const call_ffmpeg_1 = require("../call-ffmpeg");
|
|
5
5
|
const p_limit_1 = require("../p-limit");
|
|
6
6
|
const limit = (0, p_limit_1.pLimit)(1);
|
|
7
|
-
const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) => {
|
|
7
|
+
const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel, binariesDirectory) => {
|
|
8
8
|
const args = [
|
|
9
9
|
['-v', 'error'],
|
|
10
10
|
['-show_entries', 'stream=channels:format=duration'],
|
|
@@ -13,7 +13,13 @@ const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) =>
|
|
|
13
13
|
]
|
|
14
14
|
.reduce((acc, val) => acc.concat(val), [])
|
|
15
15
|
.filter(Boolean);
|
|
16
|
-
const task = await (0, call_ffmpeg_1.callFf)({
|
|
16
|
+
const task = await (0, call_ffmpeg_1.callFf)({
|
|
17
|
+
bin: 'ffprobe',
|
|
18
|
+
args,
|
|
19
|
+
indent,
|
|
20
|
+
logLevel,
|
|
21
|
+
binariesDirectory,
|
|
22
|
+
});
|
|
17
23
|
const channels = task.stdout.match(/channels=([0-9]+)/);
|
|
18
24
|
const duration = task.stdout.match(/duration=([0-9.]+)/);
|
|
19
25
|
const result = {
|
|
@@ -23,15 +29,21 @@ const getAudioChannelsAndDurationWithoutCache = async (src, indent, logLevel) =>
|
|
|
23
29
|
return result;
|
|
24
30
|
};
|
|
25
31
|
exports.getAudioChannelsAndDurationWithoutCache = getAudioChannelsAndDurationWithoutCache;
|
|
26
|
-
async function getAudioChannelsAndDurationUnlimited(downloadMap, src, indent, logLevel) {
|
|
32
|
+
async function getAudioChannelsAndDurationUnlimited({ downloadMap, src, indent, logLevel, binariesDirectory, }) {
|
|
27
33
|
if (downloadMap.durationOfAssetCache[src]) {
|
|
28
34
|
return downloadMap.durationOfAssetCache[src];
|
|
29
35
|
}
|
|
30
|
-
const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src, indent, logLevel);
|
|
36
|
+
const result = await (0, exports.getAudioChannelsAndDurationWithoutCache)(src, indent, logLevel, binariesDirectory);
|
|
31
37
|
downloadMap.durationOfAssetCache[src] = result;
|
|
32
38
|
return result;
|
|
33
39
|
}
|
|
34
|
-
const getAudioChannelsAndDuration = (downloadMap, src, indent, logLevel) => {
|
|
35
|
-
return limit(() => getAudioChannelsAndDurationUnlimited(
|
|
40
|
+
const getAudioChannelsAndDuration = ({ downloadMap, src, indent, logLevel, binariesDirectory, }) => {
|
|
41
|
+
return limit(() => getAudioChannelsAndDurationUnlimited({
|
|
42
|
+
downloadMap,
|
|
43
|
+
src,
|
|
44
|
+
indent,
|
|
45
|
+
logLevel,
|
|
46
|
+
binariesDirectory,
|
|
47
|
+
}));
|
|
36
48
|
};
|
|
37
49
|
exports.getAudioChannelsAndDuration = getAudioChannelsAndDuration;
|
package/dist/call-ffmpeg.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import execa from 'execa';
|
|
3
2
|
import type { SpawnOptionsWithoutStdio } from 'node:child_process';
|
|
4
3
|
import type { LogLevel } from './log-level';
|
|
5
|
-
export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
|
|
4
|
+
export declare const callFf: ({ args, bin, indent, logLevel, options, binariesDirectory, }: {
|
|
6
5
|
bin: 'ffmpeg' | 'ffprobe';
|
|
7
6
|
args: (string | null)[];
|
|
8
7
|
indent: boolean;
|
|
9
8
|
logLevel: LogLevel;
|
|
9
|
+
binariesDirectory: string | null;
|
|
10
10
|
options?: execa.Options<string> | undefined;
|
|
11
11
|
}) => execa.ExecaChildProcess<string>;
|
|
12
|
-
export declare const callFfNative: ({ args, bin, indent, logLevel, options, }: {
|
|
12
|
+
export declare const callFfNative: ({ args, bin, indent, logLevel, options, binariesDirectory, }: {
|
|
13
13
|
bin: 'ffmpeg' | 'ffprobe';
|
|
14
14
|
args: (string | null)[];
|
|
15
15
|
indent: boolean;
|
|
16
16
|
logLevel: LogLevel;
|
|
17
|
+
binariesDirectory: string | null;
|
|
17
18
|
options?: SpawnOptionsWithoutStdio | undefined;
|
|
18
19
|
}) => import("child_process").ChildProcessWithoutNullStreams;
|
package/dist/call-ffmpeg.js
CHANGED
|
@@ -10,8 +10,13 @@ const node_fs_1 = require("node:fs");
|
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
11
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
12
12
|
const truthy_1 = require("./truthy");
|
|
13
|
-
const callFf = ({ args, bin, indent, logLevel, options, }) => {
|
|
14
|
-
const executablePath = (0, get_executable_path_1.getExecutablePath)(
|
|
13
|
+
const callFf = ({ args, bin, indent, logLevel, options, binariesDirectory, }) => {
|
|
14
|
+
const executablePath = (0, get_executable_path_1.getExecutablePath)({
|
|
15
|
+
type: bin,
|
|
16
|
+
indent,
|
|
17
|
+
logLevel,
|
|
18
|
+
binariesDirectory,
|
|
19
|
+
});
|
|
15
20
|
if (!process.env.READ_ONLY_FS) {
|
|
16
21
|
(0, node_fs_1.chmodSync)(executablePath, 0o755);
|
|
17
22
|
}
|
|
@@ -21,8 +26,13 @@ const callFf = ({ args, bin, indent, logLevel, options, }) => {
|
|
|
21
26
|
});
|
|
22
27
|
};
|
|
23
28
|
exports.callFf = callFf;
|
|
24
|
-
const callFfNative = ({ args, bin, indent, logLevel, options, }) => {
|
|
25
|
-
const executablePath = (0, get_executable_path_1.getExecutablePath)(
|
|
29
|
+
const callFfNative = ({ args, bin, indent, logLevel, options, binariesDirectory, }) => {
|
|
30
|
+
const executablePath = (0, get_executable_path_1.getExecutablePath)({
|
|
31
|
+
type: bin,
|
|
32
|
+
indent,
|
|
33
|
+
logLevel,
|
|
34
|
+
binariesDirectory,
|
|
35
|
+
});
|
|
26
36
|
if (!process.env.READ_ONLY_FS) {
|
|
27
37
|
(0, node_fs_1.chmodSync)(executablePath, 0o755);
|
|
28
38
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export { AvailableOptions, TypeOfOption } from './options';
|
|
2
2
|
export declare const BrowserSafeApis: {
|
|
3
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
3
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
4
4
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
6
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
9
9
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
10
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
11
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
12
12
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
13
|
-
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
13
|
+
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
14
14
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
15
15
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
16
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
16
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
17
17
|
DEFAULT_TIMEOUT: number;
|
|
18
18
|
supportedAudioCodecs: {
|
|
19
19
|
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
@@ -31,11 +31,11 @@ export declare const BrowserSafeApis: {
|
|
|
31
31
|
h264: {
|
|
32
32
|
default: import("./file-extensions").FileExtension;
|
|
33
33
|
forAudioCodec: {
|
|
34
|
-
|
|
34
|
+
mp3: {
|
|
35
35
|
possible: import("./file-extensions").FileExtension[];
|
|
36
36
|
default: import("./file-extensions").FileExtension;
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
aac: {
|
|
39
39
|
possible: import("./file-extensions").FileExtension[];
|
|
40
40
|
default: import("./file-extensions").FileExtension;
|
|
41
41
|
};
|
|
@@ -61,11 +61,11 @@ export declare const BrowserSafeApis: {
|
|
|
61
61
|
vp8: {
|
|
62
62
|
default: import("./file-extensions").FileExtension;
|
|
63
63
|
forAudioCodec: {
|
|
64
|
-
|
|
64
|
+
"pcm-16": {
|
|
65
65
|
possible: import("./file-extensions").FileExtension[];
|
|
66
66
|
default: import("./file-extensions").FileExtension;
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
opus: {
|
|
69
69
|
possible: import("./file-extensions").FileExtension[];
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
};
|
|
@@ -74,20 +74,20 @@ export declare const BrowserSafeApis: {
|
|
|
74
74
|
vp9: {
|
|
75
75
|
default: import("./file-extensions").FileExtension;
|
|
76
76
|
forAudioCodec: {
|
|
77
|
-
|
|
77
|
+
"pcm-16": {
|
|
78
78
|
possible: import("./file-extensions").FileExtension[];
|
|
79
79
|
default: import("./file-extensions").FileExtension;
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
opus: {
|
|
82
82
|
possible: import("./file-extensions").FileExtension[];
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
mp3: {
|
|
88
88
|
default: import("./file-extensions").FileExtension;
|
|
89
89
|
forAudioCodec: {
|
|
90
|
-
|
|
90
|
+
mp3: {
|
|
91
91
|
possible: import("./file-extensions").FileExtension[];
|
|
92
92
|
default: import("./file-extensions").FileExtension;
|
|
93
93
|
};
|
|
@@ -110,22 +110,22 @@ export declare const BrowserSafeApis: {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
wav: {
|
|
114
114
|
default: import("./file-extensions").FileExtension;
|
|
115
115
|
forAudioCodec: {
|
|
116
|
-
mp3: {
|
|
117
|
-
possible: import("./file-extensions").FileExtension[];
|
|
118
|
-
default: import("./file-extensions").FileExtension;
|
|
119
|
-
};
|
|
120
116
|
"pcm-16": {
|
|
121
117
|
possible: import("./file-extensions").FileExtension[];
|
|
122
118
|
default: import("./file-extensions").FileExtension;
|
|
123
119
|
};
|
|
124
120
|
};
|
|
125
121
|
};
|
|
126
|
-
|
|
122
|
+
prores: {
|
|
127
123
|
default: import("./file-extensions").FileExtension;
|
|
128
124
|
forAudioCodec: {
|
|
125
|
+
aac: {
|
|
126
|
+
possible: import("./file-extensions").FileExtension[];
|
|
127
|
+
default: import("./file-extensions").FileExtension;
|
|
128
|
+
};
|
|
129
129
|
"pcm-16": {
|
|
130
130
|
possible: import("./file-extensions").FileExtension[];
|
|
131
131
|
default: import("./file-extensions").FileExtension;
|
|
@@ -152,37 +152,37 @@ export declare const BrowserSafeApis: {
|
|
|
152
152
|
};
|
|
153
153
|
defaultAudioCodecs: {
|
|
154
154
|
h264: {
|
|
155
|
-
compressed: "
|
|
156
|
-
lossless: "
|
|
155
|
+
compressed: "mp3" | "aac" | "pcm-16" | null;
|
|
156
|
+
lossless: "mp3" | "aac" | "pcm-16" | null;
|
|
157
157
|
};
|
|
158
158
|
h265: {
|
|
159
159
|
compressed: "aac" | "pcm-16" | null;
|
|
160
160
|
lossless: "aac" | "pcm-16" | null;
|
|
161
161
|
};
|
|
162
162
|
vp8: {
|
|
163
|
-
compressed: "
|
|
164
|
-
lossless: "
|
|
163
|
+
compressed: "pcm-16" | "opus" | null;
|
|
164
|
+
lossless: "pcm-16" | "opus" | null;
|
|
165
165
|
};
|
|
166
166
|
vp9: {
|
|
167
|
-
compressed: "
|
|
168
|
-
lossless: "
|
|
167
|
+
compressed: "pcm-16" | "opus" | null;
|
|
168
|
+
lossless: "pcm-16" | "opus" | null;
|
|
169
169
|
};
|
|
170
|
-
|
|
171
|
-
compressed: "
|
|
172
|
-
lossless: "
|
|
170
|
+
mp3: {
|
|
171
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
172
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
173
173
|
};
|
|
174
174
|
aac: {
|
|
175
175
|
compressed: "aac" | "pcm-16" | null;
|
|
176
176
|
lossless: "aac" | "pcm-16" | null;
|
|
177
177
|
};
|
|
178
|
-
mp3: {
|
|
179
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
180
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
181
|
-
};
|
|
182
178
|
wav: {
|
|
183
179
|
compressed: "pcm-16" | null;
|
|
184
180
|
lossless: "pcm-16" | null;
|
|
185
181
|
};
|
|
182
|
+
prores: {
|
|
183
|
+
compressed: "aac" | "pcm-16" | null;
|
|
184
|
+
lossless: "aac" | "pcm-16" | null;
|
|
185
|
+
};
|
|
186
186
|
"h264-mkv": {
|
|
187
187
|
compressed: "mp3" | "pcm-16" | null;
|
|
188
188
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -192,10 +192,10 @@ export declare const BrowserSafeApis: {
|
|
|
192
192
|
lossless: null;
|
|
193
193
|
};
|
|
194
194
|
};
|
|
195
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
196
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
195
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
196
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
197
197
|
codec: T_1;
|
|
198
|
-
audioCodec: "
|
|
198
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
199
199
|
extension: string;
|
|
200
200
|
preferLossless: boolean;
|
|
201
201
|
}) => void;
|
|
@@ -314,17 +314,17 @@ export declare const BrowserSafeApis: {
|
|
|
314
314
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
315
315
|
ssrName: string;
|
|
316
316
|
docLink: string;
|
|
317
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
317
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
318
318
|
getValue: ({ commandLine }: {
|
|
319
319
|
commandLine: Record<string, unknown>;
|
|
320
320
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
321
321
|
outName: string | null;
|
|
322
322
|
downloadName: string | null;
|
|
323
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
324
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
325
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
323
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
324
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
325
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
326
326
|
}) => {
|
|
327
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
327
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
328
328
|
source: string;
|
|
329
329
|
};
|
|
330
330
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -350,7 +350,7 @@ export declare const BrowserSafeApis: {
|
|
|
350
350
|
webhookCustomDataOption: {
|
|
351
351
|
name: string;
|
|
352
352
|
cliFlag: "webhook-custom-data";
|
|
353
|
-
description: (type: "
|
|
353
|
+
description: (type: "cli" | "ssr") => import("react/jsx-runtime").JSX.Element;
|
|
354
354
|
ssrName: "customData";
|
|
355
355
|
docLink: string;
|
|
356
356
|
type: Record<string, unknown> | null;
|
|
@@ -363,14 +363,14 @@ export declare const BrowserSafeApis: {
|
|
|
363
363
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
364
364
|
docLink: string;
|
|
365
365
|
ssrName: string;
|
|
366
|
-
type: "
|
|
366
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
367
367
|
getValue: ({ commandLine }: {
|
|
368
368
|
commandLine: Record<string, unknown>;
|
|
369
369
|
}) => {
|
|
370
370
|
source: string;
|
|
371
|
-
value: "
|
|
371
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
372
372
|
};
|
|
373
|
-
setConfig: (value: "
|
|
373
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl") => void;
|
|
374
374
|
};
|
|
375
375
|
deleteAfterOption: {
|
|
376
376
|
name: string;
|
|
@@ -424,19 +424,19 @@ export declare const BrowserSafeApis: {
|
|
|
424
424
|
cliFlag: "gl";
|
|
425
425
|
docLink: string;
|
|
426
426
|
name: string;
|
|
427
|
-
type: "
|
|
427
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
428
428
|
ssrName: string;
|
|
429
429
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
430
430
|
getValue: ({ commandLine }: {
|
|
431
431
|
commandLine: Record<string, unknown>;
|
|
432
432
|
}) => {
|
|
433
|
-
value: "
|
|
433
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
434
434
|
source: string;
|
|
435
435
|
} | {
|
|
436
436
|
value: null;
|
|
437
437
|
source: string;
|
|
438
438
|
};
|
|
439
|
-
setConfig: (value: "
|
|
439
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
440
440
|
};
|
|
441
441
|
enableLambdaInsights: {
|
|
442
442
|
name: string;
|
|
@@ -615,6 +615,21 @@ export declare const BrowserSafeApis: {
|
|
|
615
615
|
};
|
|
616
616
|
setConfig: (value: boolean) => void;
|
|
617
617
|
};
|
|
618
|
+
binariesDirectoryOption: {
|
|
619
|
+
name: string;
|
|
620
|
+
cliFlag: "binaries-directory";
|
|
621
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
622
|
+
ssrName: "binariesDirectory";
|
|
623
|
+
docLink: string;
|
|
624
|
+
type: string | null;
|
|
625
|
+
getValue: ({ commandLine }: {
|
|
626
|
+
commandLine: Record<string, unknown>;
|
|
627
|
+
}) => {
|
|
628
|
+
source: string;
|
|
629
|
+
value: string | null;
|
|
630
|
+
};
|
|
631
|
+
setConfig: (value: string | null) => void;
|
|
632
|
+
};
|
|
618
633
|
};
|
|
619
634
|
validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
|
|
620
635
|
optionsMap: {
|
|
@@ -727,14 +742,14 @@ export declare const BrowserSafeApis: {
|
|
|
727
742
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
728
743
|
docLink: string;
|
|
729
744
|
ssrName: string;
|
|
730
|
-
type: "
|
|
745
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
731
746
|
getValue: ({ commandLine }: {
|
|
732
747
|
commandLine: Record<string, unknown>;
|
|
733
748
|
}) => {
|
|
734
749
|
source: string;
|
|
735
|
-
value: "
|
|
750
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
736
751
|
};
|
|
737
|
-
setConfig: (value: "
|
|
752
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl") => void;
|
|
738
753
|
};
|
|
739
754
|
readonly codec: {
|
|
740
755
|
name: string;
|
|
@@ -742,17 +757,17 @@ export declare const BrowserSafeApis: {
|
|
|
742
757
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
743
758
|
ssrName: string;
|
|
744
759
|
docLink: string;
|
|
745
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
760
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
746
761
|
getValue: ({ commandLine }: {
|
|
747
762
|
commandLine: Record<string, unknown>;
|
|
748
763
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
749
764
|
outName: string | null;
|
|
750
765
|
downloadName: string | null;
|
|
751
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
752
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
753
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
766
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
767
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
768
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
754
769
|
}) => {
|
|
755
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
770
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
756
771
|
source: string;
|
|
757
772
|
};
|
|
758
773
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -853,6 +868,21 @@ export declare const BrowserSafeApis: {
|
|
|
853
868
|
};
|
|
854
869
|
setConfig: (value: number) => void;
|
|
855
870
|
};
|
|
871
|
+
readonly binariesDirectory: {
|
|
872
|
+
name: string;
|
|
873
|
+
cliFlag: "binaries-directory";
|
|
874
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
875
|
+
ssrName: "binariesDirectory";
|
|
876
|
+
docLink: string;
|
|
877
|
+
type: string | null;
|
|
878
|
+
getValue: ({ commandLine }: {
|
|
879
|
+
commandLine: Record<string, unknown>;
|
|
880
|
+
}) => {
|
|
881
|
+
source: string;
|
|
882
|
+
value: string | null;
|
|
883
|
+
};
|
|
884
|
+
setConfig: (value: string | null) => void;
|
|
885
|
+
};
|
|
856
886
|
};
|
|
857
887
|
readonly renderStill: {
|
|
858
888
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -918,6 +948,21 @@ export declare const BrowserSafeApis: {
|
|
|
918
948
|
};
|
|
919
949
|
setConfig: (value: number) => void;
|
|
920
950
|
};
|
|
951
|
+
readonly binariesDirectory: {
|
|
952
|
+
name: string;
|
|
953
|
+
cliFlag: "binaries-directory";
|
|
954
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
955
|
+
ssrName: "binariesDirectory";
|
|
956
|
+
docLink: string;
|
|
957
|
+
type: string | null;
|
|
958
|
+
getValue: ({ commandLine }: {
|
|
959
|
+
commandLine: Record<string, unknown>;
|
|
960
|
+
}) => {
|
|
961
|
+
source: string;
|
|
962
|
+
value: string | null;
|
|
963
|
+
};
|
|
964
|
+
setConfig: (value: string | null) => void;
|
|
965
|
+
};
|
|
921
966
|
};
|
|
922
967
|
readonly getCompositions: {
|
|
923
968
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -968,6 +1013,21 @@ export declare const BrowserSafeApis: {
|
|
|
968
1013
|
};
|
|
969
1014
|
setConfig: (value: number) => void;
|
|
970
1015
|
};
|
|
1016
|
+
readonly binariesDirectory: {
|
|
1017
|
+
name: string;
|
|
1018
|
+
cliFlag: "binaries-directory";
|
|
1019
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1020
|
+
ssrName: "binariesDirectory";
|
|
1021
|
+
docLink: string;
|
|
1022
|
+
type: string | null;
|
|
1023
|
+
getValue: ({ commandLine }: {
|
|
1024
|
+
commandLine: Record<string, unknown>;
|
|
1025
|
+
}) => {
|
|
1026
|
+
source: string;
|
|
1027
|
+
value: string | null;
|
|
1028
|
+
};
|
|
1029
|
+
setConfig: (value: string | null) => void;
|
|
1030
|
+
};
|
|
971
1031
|
};
|
|
972
1032
|
readonly selectComposition: {
|
|
973
1033
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -1018,6 +1078,21 @@ export declare const BrowserSafeApis: {
|
|
|
1018
1078
|
};
|
|
1019
1079
|
setConfig: (value: number) => void;
|
|
1020
1080
|
};
|
|
1081
|
+
readonly binariesDirectory: {
|
|
1082
|
+
name: string;
|
|
1083
|
+
cliFlag: "binaries-directory";
|
|
1084
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1085
|
+
ssrName: "binariesDirectory";
|
|
1086
|
+
docLink: string;
|
|
1087
|
+
type: string | null;
|
|
1088
|
+
getValue: ({ commandLine }: {
|
|
1089
|
+
commandLine: Record<string, unknown>;
|
|
1090
|
+
}) => {
|
|
1091
|
+
source: string;
|
|
1092
|
+
value: string | null;
|
|
1093
|
+
};
|
|
1094
|
+
setConfig: (value: string | null) => void;
|
|
1095
|
+
};
|
|
1021
1096
|
};
|
|
1022
1097
|
readonly renderFrames: {
|
|
1023
1098
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -1083,6 +1158,21 @@ export declare const BrowserSafeApis: {
|
|
|
1083
1158
|
};
|
|
1084
1159
|
setConfig: (value: number) => void;
|
|
1085
1160
|
};
|
|
1161
|
+
readonly binariesDirectory: {
|
|
1162
|
+
name: string;
|
|
1163
|
+
cliFlag: "binaries-directory";
|
|
1164
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1165
|
+
ssrName: "binariesDirectory";
|
|
1166
|
+
docLink: string;
|
|
1167
|
+
type: string | null;
|
|
1168
|
+
getValue: ({ commandLine }: {
|
|
1169
|
+
commandLine: Record<string, unknown>;
|
|
1170
|
+
}) => {
|
|
1171
|
+
source: string;
|
|
1172
|
+
value: string | null;
|
|
1173
|
+
};
|
|
1174
|
+
setConfig: (value: string | null) => void;
|
|
1175
|
+
};
|
|
1086
1176
|
};
|
|
1087
1177
|
readonly renderMediaOnLambda: {
|
|
1088
1178
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -1232,14 +1322,14 @@ export declare const BrowserSafeApis: {
|
|
|
1232
1322
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1233
1323
|
docLink: string;
|
|
1234
1324
|
ssrName: string;
|
|
1235
|
-
type: "
|
|
1325
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
1236
1326
|
getValue: ({ commandLine }: {
|
|
1237
1327
|
commandLine: Record<string, unknown>;
|
|
1238
1328
|
}) => {
|
|
1239
1329
|
source: string;
|
|
1240
|
-
value: "
|
|
1330
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
1241
1331
|
};
|
|
1242
|
-
setConfig: (value: "
|
|
1332
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl") => void;
|
|
1243
1333
|
};
|
|
1244
1334
|
readonly muted: {
|
|
1245
1335
|
name: string;
|
|
@@ -1478,14 +1568,14 @@ export declare const BrowserSafeApis: {
|
|
|
1478
1568
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1479
1569
|
docLink: string;
|
|
1480
1570
|
ssrName: string;
|
|
1481
|
-
type: "
|
|
1571
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
1482
1572
|
getValue: ({ commandLine }: {
|
|
1483
1573
|
commandLine: Record<string, unknown>;
|
|
1484
1574
|
}) => {
|
|
1485
1575
|
source: string;
|
|
1486
|
-
value: "
|
|
1576
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
1487
1577
|
};
|
|
1488
|
-
setConfig: (value: "
|
|
1578
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl") => void;
|
|
1489
1579
|
};
|
|
1490
1580
|
readonly audioBitrate: {
|
|
1491
1581
|
name: string;
|
|
@@ -1761,8 +1851,8 @@ export declare const BrowserSafeApis: {
|
|
|
1761
1851
|
};
|
|
1762
1852
|
};
|
|
1763
1853
|
};
|
|
1764
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
1765
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
1854
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
1855
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
1766
1856
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
1767
1857
|
getOutputCodecOrUndefined: () => import("./codec").CodecOrUndefined;
|
|
1768
1858
|
};
|
package/dist/combine-videos.d.ts
CHANGED
package/dist/combine-videos.js
CHANGED
|
@@ -14,7 +14,7 @@ const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
|
14
14
|
const truthy_1 = require("./truthy");
|
|
15
15
|
const combineVideos = async (options) => {
|
|
16
16
|
var _a;
|
|
17
|
-
const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, audioBitrate, indent, logLevel, } = options;
|
|
17
|
+
const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, audioBitrate, indent, logLevel, binariesDirectory, } = options;
|
|
18
18
|
const fileList = files.map((p) => `file '${p}'`).join('\n');
|
|
19
19
|
const fileListTxt = (0, node_path_1.join)(filelistDir, 'files.txt');
|
|
20
20
|
(0, node_fs_1.writeFileSync)(fileListTxt, fileList);
|
|
@@ -56,6 +56,7 @@ const combineVideos = async (options) => {
|
|
|
56
56
|
args: command,
|
|
57
57
|
indent: options.indent,
|
|
58
58
|
logLevel: options.logLevel,
|
|
59
|
+
binariesDirectory,
|
|
59
60
|
});
|
|
60
61
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
61
62
|
if (onProgress) {
|
|
@@ -23,5 +23,5 @@ export declare const compose: ({ height, width, layers, output, downloadMap, ima
|
|
|
23
23
|
} & {
|
|
24
24
|
downloadMap: DownloadMap;
|
|
25
25
|
}) => Promise<void>;
|
|
26
|
-
export declare const callCompositor: (payload: string, indent: boolean, logLevel: LogLevel) => Promise<void>;
|
|
26
|
+
export declare const callCompositor: (payload: string, indent: boolean, logLevel: LogLevel, binariesDirectory: string | null) => Promise<void>;
|
|
27
27
|
export {};
|
|
@@ -51,9 +51,14 @@ const compose = async ({ height, width, layers, output, downloadMap, imageFormat
|
|
|
51
51
|
downloadMap.compositorCache[hash] = output;
|
|
52
52
|
};
|
|
53
53
|
exports.compose = compose;
|
|
54
|
-
const callCompositor = (payload, indent, logLevel) => {
|
|
54
|
+
const callCompositor = (payload, indent, logLevel, binariesDirectory) => {
|
|
55
55
|
return new Promise((resolve, reject) => {
|
|
56
|
-
const execPath = (0, get_executable_path_1.getExecutablePath)(
|
|
56
|
+
const execPath = (0, get_executable_path_1.getExecutablePath)({
|
|
57
|
+
type: 'compositor',
|
|
58
|
+
indent,
|
|
59
|
+
logLevel,
|
|
60
|
+
binariesDirectory,
|
|
61
|
+
});
|
|
57
62
|
if (!process.env.READ_ONLY_FS) {
|
|
58
63
|
(0, node_fs_1.chmodSync)(execPath, 0o755);
|
|
59
64
|
}
|