@remotion/renderer 4.0.15 → 4.0.17
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/audio-codec.d.ts +2 -2
- package/dist/audio-codec.js +2 -2
- package/dist/client.d.ts +53 -45
- package/dist/combine-videos.js +31 -29
- package/dist/file-extensions.js +2 -0
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +44 -37
- package/dist/stitch-frames-to-video.d.ts +0 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/dist/audio-codec.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Codec } from './codec';
|
|
|
2
2
|
export declare const validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
3
3
|
export type AudioCodec = typeof validAudioCodecs[number];
|
|
4
4
|
export declare const supportedAudioCodecs: {
|
|
5
|
-
readonly h264: readonly ["aac", "pcm-16"];
|
|
6
|
-
readonly 'h264-mkv': readonly ["pcm-16"];
|
|
5
|
+
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
6
|
+
readonly 'h264-mkv': readonly ["pcm-16", "mp3"];
|
|
7
7
|
readonly aac: readonly ["aac", "pcm-16"];
|
|
8
8
|
readonly gif: readonly [];
|
|
9
9
|
readonly h265: readonly ["aac", "pcm-16"];
|
package/dist/audio-codec.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getDefaultAudioCodec = exports.defaultAudioCodecs = exports.mapAudioCodecToFfmpegAudioCodecName = exports.supportedAudioCodecs = exports.validAudioCodecs = void 0;
|
|
4
4
|
exports.validAudioCodecs = ['pcm-16', 'aac', 'mp3', 'opus'];
|
|
5
5
|
exports.supportedAudioCodecs = {
|
|
6
|
-
h264: ['aac', 'pcm-16'],
|
|
7
|
-
'h264-mkv': ['pcm-16'],
|
|
6
|
+
h264: ['aac', 'pcm-16', 'mp3'],
|
|
7
|
+
'h264-mkv': ['pcm-16', 'mp3'],
|
|
8
8
|
aac: ['aac', 'pcm-16'],
|
|
9
9
|
gif: [],
|
|
10
10
|
h265: ['aac', 'pcm-16'],
|
package/dist/client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const BrowserSafeApis: {
|
|
2
|
-
getFileExtensionFromCodec: <T extends "
|
|
2
|
+
getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
3
3
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
4
4
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
5
|
-
getDefaultCrfForCodec: (codec: "
|
|
6
|
-
getValidCrfRanges: (codec: "
|
|
7
|
-
isAudioCodec: (codec: "
|
|
5
|
+
getDefaultCrfForCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
6
|
+
getValidCrfRanges: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
7
|
+
isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
8
8
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
9
9
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
10
10
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
11
11
|
supportedAudioCodecs: {
|
|
12
|
-
readonly h264: readonly ["aac", "pcm-16"];
|
|
13
|
-
readonly 'h264-mkv': readonly ["pcm-16"];
|
|
12
|
+
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
13
|
+
readonly 'h264-mkv': readonly ["pcm-16", "mp3"];
|
|
14
14
|
readonly aac: readonly ["aac", "pcm-16"];
|
|
15
15
|
readonly gif: readonly [];
|
|
16
16
|
readonly h265: readonly ["aac", "pcm-16"];
|
|
@@ -21,79 +21,83 @@ export declare const BrowserSafeApis: {
|
|
|
21
21
|
readonly wav: readonly ["pcm-16"];
|
|
22
22
|
};
|
|
23
23
|
defaultFileExtensionMap: {
|
|
24
|
-
|
|
24
|
+
aac: {
|
|
25
25
|
default: import("./file-extensions").FileExtension;
|
|
26
26
|
forAudioCodec: {
|
|
27
|
-
|
|
27
|
+
"pcm-16": {
|
|
28
28
|
possible: import("./file-extensions").FileExtension[];
|
|
29
29
|
default: import("./file-extensions").FileExtension;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
aac: {
|
|
32
32
|
possible: import("./file-extensions").FileExtension[];
|
|
33
33
|
default: import("./file-extensions").FileExtension;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
mp3: {
|
|
38
38
|
default: import("./file-extensions").FileExtension;
|
|
39
39
|
forAudioCodec: {
|
|
40
|
-
|
|
40
|
+
"pcm-16": {
|
|
41
41
|
possible: import("./file-extensions").FileExtension[];
|
|
42
42
|
default: import("./file-extensions").FileExtension;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
mp3: {
|
|
45
45
|
possible: import("./file-extensions").FileExtension[];
|
|
46
46
|
default: import("./file-extensions").FileExtension;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
h264: {
|
|
51
51
|
default: import("./file-extensions").FileExtension;
|
|
52
52
|
forAudioCodec: {
|
|
53
53
|
"pcm-16": {
|
|
54
54
|
possible: import("./file-extensions").FileExtension[];
|
|
55
55
|
default: import("./file-extensions").FileExtension;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
aac: {
|
|
58
|
+
possible: import("./file-extensions").FileExtension[];
|
|
59
|
+
default: import("./file-extensions").FileExtension;
|
|
60
|
+
};
|
|
61
|
+
mp3: {
|
|
58
62
|
possible: import("./file-extensions").FileExtension[];
|
|
59
63
|
default: import("./file-extensions").FileExtension;
|
|
60
64
|
};
|
|
61
65
|
};
|
|
62
66
|
};
|
|
63
|
-
|
|
67
|
+
h265: {
|
|
64
68
|
default: import("./file-extensions").FileExtension;
|
|
65
69
|
forAudioCodec: {
|
|
66
70
|
"pcm-16": {
|
|
67
71
|
possible: import("./file-extensions").FileExtension[];
|
|
68
72
|
default: import("./file-extensions").FileExtension;
|
|
69
73
|
};
|
|
70
|
-
|
|
74
|
+
aac: {
|
|
71
75
|
possible: import("./file-extensions").FileExtension[];
|
|
72
76
|
default: import("./file-extensions").FileExtension;
|
|
73
77
|
};
|
|
74
78
|
};
|
|
75
79
|
};
|
|
76
|
-
|
|
80
|
+
vp8: {
|
|
77
81
|
default: import("./file-extensions").FileExtension;
|
|
78
82
|
forAudioCodec: {
|
|
79
|
-
|
|
83
|
+
"pcm-16": {
|
|
80
84
|
possible: import("./file-extensions").FileExtension[];
|
|
81
85
|
default: import("./file-extensions").FileExtension;
|
|
82
86
|
};
|
|
83
|
-
|
|
87
|
+
opus: {
|
|
84
88
|
possible: import("./file-extensions").FileExtension[];
|
|
85
89
|
default: import("./file-extensions").FileExtension;
|
|
86
90
|
};
|
|
87
91
|
};
|
|
88
92
|
};
|
|
89
|
-
|
|
93
|
+
vp9: {
|
|
90
94
|
default: import("./file-extensions").FileExtension;
|
|
91
95
|
forAudioCodec: {
|
|
92
|
-
|
|
96
|
+
"pcm-16": {
|
|
93
97
|
possible: import("./file-extensions").FileExtension[];
|
|
94
98
|
default: import("./file-extensions").FileExtension;
|
|
95
99
|
};
|
|
96
|
-
|
|
100
|
+
opus: {
|
|
97
101
|
possible: import("./file-extensions").FileExtension[];
|
|
98
102
|
default: import("./file-extensions").FileExtension;
|
|
99
103
|
};
|
|
@@ -111,11 +115,11 @@ export declare const BrowserSafeApis: {
|
|
|
111
115
|
prores: {
|
|
112
116
|
default: import("./file-extensions").FileExtension;
|
|
113
117
|
forAudioCodec: {
|
|
114
|
-
|
|
118
|
+
"pcm-16": {
|
|
115
119
|
possible: import("./file-extensions").FileExtension[];
|
|
116
120
|
default: import("./file-extensions").FileExtension;
|
|
117
121
|
};
|
|
118
|
-
|
|
122
|
+
aac: {
|
|
119
123
|
possible: import("./file-extensions").FileExtension[];
|
|
120
124
|
default: import("./file-extensions").FileExtension;
|
|
121
125
|
};
|
|
@@ -128,6 +132,10 @@ export declare const BrowserSafeApis: {
|
|
|
128
132
|
possible: import("./file-extensions").FileExtension[];
|
|
129
133
|
default: import("./file-extensions").FileExtension;
|
|
130
134
|
};
|
|
135
|
+
mp3: {
|
|
136
|
+
possible: import("./file-extensions").FileExtension[];
|
|
137
|
+
default: import("./file-extensions").FileExtension;
|
|
138
|
+
};
|
|
131
139
|
};
|
|
132
140
|
};
|
|
133
141
|
gif: {
|
|
@@ -136,13 +144,21 @@ export declare const BrowserSafeApis: {
|
|
|
136
144
|
};
|
|
137
145
|
};
|
|
138
146
|
defaultAudioCodecs: {
|
|
147
|
+
aac: {
|
|
148
|
+
compressed: "pcm-16" | "aac" | null;
|
|
149
|
+
lossless: "pcm-16" | "aac" | null;
|
|
150
|
+
};
|
|
151
|
+
mp3: {
|
|
152
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
153
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
154
|
+
};
|
|
139
155
|
h264: {
|
|
140
|
-
compressed: "aac" | "
|
|
141
|
-
lossless: "aac" | "
|
|
156
|
+
compressed: "pcm-16" | "aac" | "mp3" | null;
|
|
157
|
+
lossless: "pcm-16" | "aac" | "mp3" | null;
|
|
142
158
|
};
|
|
143
159
|
h265: {
|
|
144
|
-
compressed: "
|
|
145
|
-
lossless: "
|
|
160
|
+
compressed: "pcm-16" | "aac" | null;
|
|
161
|
+
lossless: "pcm-16" | "aac" | null;
|
|
146
162
|
};
|
|
147
163
|
vp8: {
|
|
148
164
|
compressed: "pcm-16" | "opus" | null;
|
|
@@ -152,35 +168,27 @@ export declare const BrowserSafeApis: {
|
|
|
152
168
|
compressed: "pcm-16" | "opus" | null;
|
|
153
169
|
lossless: "pcm-16" | "opus" | null;
|
|
154
170
|
};
|
|
155
|
-
mp3: {
|
|
156
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
157
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
158
|
-
};
|
|
159
|
-
aac: {
|
|
160
|
-
compressed: "aac" | "pcm-16" | null;
|
|
161
|
-
lossless: "aac" | "pcm-16" | null;
|
|
162
|
-
};
|
|
163
171
|
wav: {
|
|
164
172
|
compressed: "pcm-16" | null;
|
|
165
173
|
lossless: "pcm-16" | null;
|
|
166
174
|
};
|
|
167
175
|
prores: {
|
|
168
|
-
compressed: "
|
|
169
|
-
lossless: "
|
|
176
|
+
compressed: "pcm-16" | "aac" | null;
|
|
177
|
+
lossless: "pcm-16" | "aac" | null;
|
|
170
178
|
};
|
|
171
179
|
"h264-mkv": {
|
|
172
|
-
compressed: "pcm-16" | null;
|
|
173
|
-
lossless: "pcm-16" | null;
|
|
180
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
181
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
174
182
|
};
|
|
175
183
|
gif: {
|
|
176
184
|
compressed: null;
|
|
177
185
|
lossless: null;
|
|
178
186
|
};
|
|
179
187
|
};
|
|
180
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
181
|
-
validateOutputFilename: <T_1 extends "
|
|
188
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
189
|
+
validateOutputFilename: <T_1 extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
182
190
|
codec: T_1;
|
|
183
|
-
audioCodec: "
|
|
191
|
+
audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
184
192
|
extension: string;
|
|
185
193
|
preferLossless: boolean;
|
|
186
194
|
}) => void;
|
|
@@ -194,6 +202,6 @@ export declare const BrowserSafeApis: {
|
|
|
194
202
|
muteOption: import(".").RemotionOption;
|
|
195
203
|
videoCodecOption: import(".").RemotionOption;
|
|
196
204
|
};
|
|
197
|
-
codecSupportsCrf: (codec: "
|
|
198
|
-
codecSupportsVideoBitrate: (codec: "
|
|
205
|
+
codecSupportsCrf: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
206
|
+
codecSupportsVideoBitrate: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
199
207
|
};
|
package/dist/combine-videos.js
CHANGED
|
@@ -17,36 +17,38 @@ const combineVideos = async (options) => {
|
|
|
17
17
|
const fileListTxt = (0, node_path_1.join)(filelistDir, 'files.txt');
|
|
18
18
|
(0, node_fs_1.writeFileSync)(fileListTxt, fileList);
|
|
19
19
|
const resolvedAudioCodec = audioCodec !== null && audioCodec !== void 0 ? audioCodec : (0, audio_codec_1.getDefaultAudioCodec)({ codec, preferLossless: false });
|
|
20
|
+
const command = [
|
|
21
|
+
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-r',
|
|
22
|
+
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : String(fps),
|
|
23
|
+
'-f',
|
|
24
|
+
'concat',
|
|
25
|
+
'-safe',
|
|
26
|
+
'0',
|
|
27
|
+
'-i',
|
|
28
|
+
fileListTxt,
|
|
29
|
+
numberOfGifLoops === null ? null : '-loop',
|
|
30
|
+
numberOfGifLoops === null
|
|
31
|
+
? null
|
|
32
|
+
: typeof numberOfGifLoops === 'number'
|
|
33
|
+
? String(numberOfGifLoops)
|
|
34
|
+
: '-1',
|
|
35
|
+
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-c:v',
|
|
36
|
+
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : codec === 'gif' ? 'gif' : 'copy',
|
|
37
|
+
resolvedAudioCodec ? '-c:a' : null,
|
|
38
|
+
resolvedAudioCodec
|
|
39
|
+
? (0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec)
|
|
40
|
+
: null,
|
|
41
|
+
// Set max bitrate up to 512kbps, will choose lower if that's too much
|
|
42
|
+
'-b:a',
|
|
43
|
+
'512K',
|
|
44
|
+
codec === 'h264' ? '-movflags' : null,
|
|
45
|
+
codec === 'h264' ? 'faststart' : null,
|
|
46
|
+
'-y',
|
|
47
|
+
output,
|
|
48
|
+
].filter(truthy_1.truthy);
|
|
49
|
+
logger_1.Log.verbose('Combining command: ', command);
|
|
20
50
|
try {
|
|
21
|
-
const task = (0, call_ffmpeg_1.callFf)('ffmpeg',
|
|
22
|
-
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-r',
|
|
23
|
-
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : String(fps),
|
|
24
|
-
'-f',
|
|
25
|
-
'concat',
|
|
26
|
-
'-safe',
|
|
27
|
-
'0',
|
|
28
|
-
'-i',
|
|
29
|
-
fileListTxt,
|
|
30
|
-
numberOfGifLoops === null ? null : '-loop',
|
|
31
|
-
numberOfGifLoops === null
|
|
32
|
-
? null
|
|
33
|
-
: typeof numberOfGifLoops === 'number'
|
|
34
|
-
? String(numberOfGifLoops)
|
|
35
|
-
: '-1',
|
|
36
|
-
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-c:v',
|
|
37
|
-
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : codec === 'gif' ? 'gif' : 'copy',
|
|
38
|
-
resolvedAudioCodec ? '-c:a' : null,
|
|
39
|
-
resolvedAudioCodec
|
|
40
|
-
? (0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec)
|
|
41
|
-
: null,
|
|
42
|
-
// Set max bitrate up to 512kbps, will choose lower if that's too much
|
|
43
|
-
'-b:a',
|
|
44
|
-
'512K',
|
|
45
|
-
codec === 'h264' ? '-movflags' : null,
|
|
46
|
-
codec === 'h264' ? 'faststart' : null,
|
|
47
|
-
'-y',
|
|
48
|
-
output,
|
|
49
|
-
].filter(truthy_1.truthy));
|
|
51
|
+
const task = (0, call_ffmpeg_1.callFf)('ffmpeg', command);
|
|
50
52
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
51
53
|
if (onProgress) {
|
|
52
54
|
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString('utf8'));
|
package/dist/file-extensions.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.defaultFileExtensionMap = {
|
|
|
6
6
|
default: 'mkv',
|
|
7
7
|
forAudioCodec: {
|
|
8
8
|
'pcm-16': { possible: ['mkv'], default: 'mkv' },
|
|
9
|
+
mp3: { possible: ['mkv'], default: 'mkv' },
|
|
9
10
|
},
|
|
10
11
|
},
|
|
11
12
|
aac: {
|
|
@@ -30,6 +31,7 @@ exports.defaultFileExtensionMap = {
|
|
|
30
31
|
forAudioCodec: {
|
|
31
32
|
'pcm-16': { possible: ['mkv', 'mov'], default: 'mkv' },
|
|
32
33
|
aac: { possible: ['mp4', 'mkv', 'mov'], default: 'mp4' },
|
|
34
|
+
mp3: { possible: ['mp4', 'mkv', 'mov'], default: 'mp4' },
|
|
33
35
|
},
|
|
34
36
|
},
|
|
35
37
|
h265: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import execa from 'execa';
|
|
3
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
4
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -55,9 +54,9 @@ export declare const RenderInternals: {
|
|
|
55
54
|
width: number;
|
|
56
55
|
height: number;
|
|
57
56
|
scale: number;
|
|
58
|
-
codec: "
|
|
57
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
59
58
|
}) => void;
|
|
60
|
-
getFileExtensionFromCodec: <T extends "
|
|
59
|
+
getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
61
60
|
tmpDir: (str: string) => string;
|
|
62
61
|
deleteDirectory: (directory: string) => void;
|
|
63
62
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -107,21 +106,21 @@ export declare const RenderInternals: {
|
|
|
107
106
|
};
|
|
108
107
|
registerErrorSymbolicationLock: () => number;
|
|
109
108
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
110
|
-
canUseParallelEncoding: (codec: "
|
|
109
|
+
canUseParallelEncoding: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
111
110
|
mimeContentType: typeof mimeContentType;
|
|
112
111
|
mimeLookup: typeof mimeLookup;
|
|
113
112
|
validateConcurrency: (value: unknown, setting: string) => void;
|
|
114
113
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
115
114
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
116
115
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
117
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
118
|
-
validateOpenGlRenderer: (option: "
|
|
116
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
117
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | null) => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
119
118
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
120
119
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
121
120
|
validateJpegQuality: (q: number | undefined) => void;
|
|
122
121
|
DEFAULT_TIMEOUT: number;
|
|
123
|
-
DEFAULT_CODEC: "
|
|
124
|
-
isAudioCodec: (codec: "
|
|
122
|
+
DEFAULT_CODEC: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
123
|
+
isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
125
124
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
126
125
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
127
126
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -138,92 +137,96 @@ export declare const RenderInternals: {
|
|
|
138
137
|
output: string;
|
|
139
138
|
onProgress: (p: number) => void;
|
|
140
139
|
numberOfFrames: number;
|
|
141
|
-
codec: "
|
|
140
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
142
141
|
fps: number;
|
|
143
142
|
numberOfGifLoops: number | null;
|
|
144
|
-
audioCodec: "
|
|
143
|
+
audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
145
144
|
}) => Promise<void>;
|
|
146
145
|
getMinConcurrency: () => number;
|
|
147
146
|
getMaxConcurrency: () => any;
|
|
148
147
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
149
|
-
codec: "
|
|
148
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
150
149
|
preferLossless: boolean;
|
|
151
|
-
}) => "
|
|
150
|
+
}) => "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
152
151
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
153
152
|
defaultFileExtensionMap: {
|
|
154
|
-
|
|
153
|
+
aac: {
|
|
155
154
|
default: import("./file-extensions").FileExtension;
|
|
156
155
|
forAudioCodec: {
|
|
157
|
-
|
|
156
|
+
"pcm-16": {
|
|
158
157
|
possible: import("./file-extensions").FileExtension[];
|
|
159
158
|
default: import("./file-extensions").FileExtension;
|
|
160
159
|
};
|
|
161
|
-
|
|
160
|
+
aac: {
|
|
162
161
|
possible: import("./file-extensions").FileExtension[];
|
|
163
162
|
default: import("./file-extensions").FileExtension;
|
|
164
163
|
};
|
|
165
164
|
};
|
|
166
165
|
};
|
|
167
|
-
|
|
166
|
+
mp3: {
|
|
168
167
|
default: import("./file-extensions").FileExtension;
|
|
169
168
|
forAudioCodec: {
|
|
170
|
-
|
|
169
|
+
"pcm-16": {
|
|
171
170
|
possible: import("./file-extensions").FileExtension[];
|
|
172
171
|
default: import("./file-extensions").FileExtension;
|
|
173
172
|
};
|
|
174
|
-
|
|
173
|
+
mp3: {
|
|
175
174
|
possible: import("./file-extensions").FileExtension[];
|
|
176
175
|
default: import("./file-extensions").FileExtension;
|
|
177
176
|
};
|
|
178
177
|
};
|
|
179
178
|
};
|
|
180
|
-
|
|
179
|
+
h264: {
|
|
181
180
|
default: import("./file-extensions").FileExtension;
|
|
182
181
|
forAudioCodec: {
|
|
183
182
|
"pcm-16": {
|
|
184
183
|
possible: import("./file-extensions").FileExtension[];
|
|
185
184
|
default: import("./file-extensions").FileExtension;
|
|
186
185
|
};
|
|
187
|
-
|
|
186
|
+
aac: {
|
|
187
|
+
possible: import("./file-extensions").FileExtension[];
|
|
188
|
+
default: import("./file-extensions").FileExtension;
|
|
189
|
+
};
|
|
190
|
+
mp3: {
|
|
188
191
|
possible: import("./file-extensions").FileExtension[];
|
|
189
192
|
default: import("./file-extensions").FileExtension;
|
|
190
193
|
};
|
|
191
194
|
};
|
|
192
195
|
};
|
|
193
|
-
|
|
196
|
+
h265: {
|
|
194
197
|
default: import("./file-extensions").FileExtension;
|
|
195
198
|
forAudioCodec: {
|
|
196
199
|
"pcm-16": {
|
|
197
200
|
possible: import("./file-extensions").FileExtension[];
|
|
198
201
|
default: import("./file-extensions").FileExtension;
|
|
199
202
|
};
|
|
200
|
-
|
|
203
|
+
aac: {
|
|
201
204
|
possible: import("./file-extensions").FileExtension[];
|
|
202
205
|
default: import("./file-extensions").FileExtension;
|
|
203
206
|
};
|
|
204
207
|
};
|
|
205
208
|
};
|
|
206
|
-
|
|
209
|
+
vp8: {
|
|
207
210
|
default: import("./file-extensions").FileExtension;
|
|
208
211
|
forAudioCodec: {
|
|
209
|
-
|
|
212
|
+
"pcm-16": {
|
|
210
213
|
possible: import("./file-extensions").FileExtension[];
|
|
211
214
|
default: import("./file-extensions").FileExtension;
|
|
212
215
|
};
|
|
213
|
-
|
|
216
|
+
opus: {
|
|
214
217
|
possible: import("./file-extensions").FileExtension[];
|
|
215
218
|
default: import("./file-extensions").FileExtension;
|
|
216
219
|
};
|
|
217
220
|
};
|
|
218
221
|
};
|
|
219
|
-
|
|
222
|
+
vp9: {
|
|
220
223
|
default: import("./file-extensions").FileExtension;
|
|
221
224
|
forAudioCodec: {
|
|
222
|
-
|
|
225
|
+
"pcm-16": {
|
|
223
226
|
possible: import("./file-extensions").FileExtension[];
|
|
224
227
|
default: import("./file-extensions").FileExtension;
|
|
225
228
|
};
|
|
226
|
-
|
|
229
|
+
opus: {
|
|
227
230
|
possible: import("./file-extensions").FileExtension[];
|
|
228
231
|
default: import("./file-extensions").FileExtension;
|
|
229
232
|
};
|
|
@@ -241,11 +244,11 @@ export declare const RenderInternals: {
|
|
|
241
244
|
prores: {
|
|
242
245
|
default: import("./file-extensions").FileExtension;
|
|
243
246
|
forAudioCodec: {
|
|
244
|
-
|
|
247
|
+
"pcm-16": {
|
|
245
248
|
possible: import("./file-extensions").FileExtension[];
|
|
246
249
|
default: import("./file-extensions").FileExtension;
|
|
247
250
|
};
|
|
248
|
-
|
|
251
|
+
aac: {
|
|
249
252
|
possible: import("./file-extensions").FileExtension[];
|
|
250
253
|
default: import("./file-extensions").FileExtension;
|
|
251
254
|
};
|
|
@@ -258,6 +261,10 @@ export declare const RenderInternals: {
|
|
|
258
261
|
possible: import("./file-extensions").FileExtension[];
|
|
259
262
|
default: import("./file-extensions").FileExtension;
|
|
260
263
|
};
|
|
264
|
+
mp3: {
|
|
265
|
+
possible: import("./file-extensions").FileExtension[];
|
|
266
|
+
default: import("./file-extensions").FileExtension;
|
|
267
|
+
};
|
|
261
268
|
};
|
|
262
269
|
};
|
|
263
270
|
gif: {
|
|
@@ -266,8 +273,8 @@ export declare const RenderInternals: {
|
|
|
266
273
|
};
|
|
267
274
|
};
|
|
268
275
|
supportedAudioCodecs: {
|
|
269
|
-
readonly h264: readonly ["aac", "pcm-16"];
|
|
270
|
-
readonly 'h264-mkv': readonly ["pcm-16"];
|
|
276
|
+
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
277
|
+
readonly 'h264-mkv': readonly ["pcm-16", "mp3"];
|
|
271
278
|
readonly aac: readonly ["aac", "pcm-16"];
|
|
272
279
|
readonly gif: readonly [];
|
|
273
280
|
readonly h265: readonly ["aac", "pcm-16"];
|
|
@@ -277,8 +284,8 @@ export declare const RenderInternals: {
|
|
|
277
284
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
278
285
|
readonly wav: readonly ["pcm-16"];
|
|
279
286
|
};
|
|
280
|
-
makeFileExtensionMap: () => Record<string, ("
|
|
281
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
287
|
+
makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
288
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
282
289
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
283
290
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
284
291
|
dynamicLibraryPathOptions: () => {
|
|
@@ -295,8 +302,8 @@ export declare const RenderInternals: {
|
|
|
295
302
|
};
|
|
296
303
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
297
304
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
298
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
299
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
305
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
306
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
300
307
|
DEFAULT_JPEG_QUALITY: number;
|
|
301
308
|
chalk: {
|
|
302
309
|
enabled: () => boolean;
|
|
@@ -407,7 +414,7 @@ export declare const RenderInternals: {
|
|
|
407
414
|
frame: number;
|
|
408
415
|
serializedInputPropsWithCustomSchema: string;
|
|
409
416
|
serializedResolvedPropsWithCustomSchema: string;
|
|
410
|
-
imageFormat: "
|
|
417
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
411
418
|
jpegQuality: number;
|
|
412
419
|
puppeteerInstance: HeadlessBrowser | null;
|
|
413
420
|
envVariables: Record<string, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.17"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"zod": "^3.21.4"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-arm64-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
50
|
-
"@remotion/compositor-
|
|
51
|
-
"@remotion/compositor-linux-x64-
|
|
45
|
+
"@remotion/compositor-darwin-arm64": "4.0.17",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.17",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.17",
|
|
48
|
+
"@remotion/compositor-darwin-x64": "4.0.17",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.17",
|
|
50
|
+
"@remotion/compositor-linux-x64-musl": "4.0.17",
|
|
51
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.17"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"remotion",
|