@remotion/renderer 4.0.125 → 4.0.126
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/client.d.ts +73 -73
- package/dist/create-ffmpeg-complex-filter.d.ts +1 -4
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-extra-frames-to-capture.d.ts +13 -0
- package/dist/get-extra-frames-to-capture.js +55 -0
- package/dist/index.d.ts +47 -45
- package/dist/options/audio-codec.d.ts +5 -5
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +11 -11
- package/dist/options/options-map.d.ts +8 -8
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/port-config.d.ts +4 -0
- package/dist/pure.d.ts +3 -3
- package/dist/take-frame-and-compose.d.ts +1 -0
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/dist/client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { AvailableOptions, TypeOfOption } from './options';
|
|
2
2
|
export declare const BrowserSafeApis: {
|
|
3
|
-
getFileExtensionFromCodec: <T extends "
|
|
3
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "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", "h264-ts", "gif"];
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "
|
|
7
|
-
getValidCrfRanges: (codec: "
|
|
8
|
-
isAudioCodec: (codec: "
|
|
6
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "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: "
|
|
13
|
+
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "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
16
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
@@ -29,10 +29,10 @@ export declare const BrowserSafeApis: {
|
|
|
29
29
|
readonly wav: readonly ["pcm-16"];
|
|
30
30
|
};
|
|
31
31
|
defaultFileExtensionMap: {
|
|
32
|
-
|
|
32
|
+
h264: {
|
|
33
33
|
default: import("./file-extensions").FileExtension;
|
|
34
34
|
forAudioCodec: {
|
|
35
|
-
|
|
35
|
+
mp3: {
|
|
36
36
|
possible: import("./file-extensions").FileExtension[];
|
|
37
37
|
default: import("./file-extensions").FileExtension;
|
|
38
38
|
};
|
|
@@ -40,72 +40,72 @@ export declare const BrowserSafeApis: {
|
|
|
40
40
|
possible: import("./file-extensions").FileExtension[];
|
|
41
41
|
default: import("./file-extensions").FileExtension;
|
|
42
42
|
};
|
|
43
|
+
"pcm-16": {
|
|
44
|
+
possible: import("./file-extensions").FileExtension[];
|
|
45
|
+
default: import("./file-extensions").FileExtension;
|
|
46
|
+
};
|
|
43
47
|
};
|
|
44
48
|
};
|
|
45
|
-
|
|
49
|
+
h265: {
|
|
46
50
|
default: import("./file-extensions").FileExtension;
|
|
47
51
|
forAudioCodec: {
|
|
48
|
-
|
|
52
|
+
aac: {
|
|
49
53
|
possible: import("./file-extensions").FileExtension[];
|
|
50
54
|
default: import("./file-extensions").FileExtension;
|
|
51
55
|
};
|
|
52
|
-
|
|
56
|
+
"pcm-16": {
|
|
53
57
|
possible: import("./file-extensions").FileExtension[];
|
|
54
58
|
default: import("./file-extensions").FileExtension;
|
|
55
59
|
};
|
|
56
60
|
};
|
|
57
61
|
};
|
|
58
|
-
|
|
62
|
+
vp8: {
|
|
59
63
|
default: import("./file-extensions").FileExtension;
|
|
60
64
|
forAudioCodec: {
|
|
61
65
|
"pcm-16": {
|
|
62
66
|
possible: import("./file-extensions").FileExtension[];
|
|
63
67
|
default: import("./file-extensions").FileExtension;
|
|
64
68
|
};
|
|
65
|
-
|
|
66
|
-
possible: import("./file-extensions").FileExtension[];
|
|
67
|
-
default: import("./file-extensions").FileExtension;
|
|
68
|
-
};
|
|
69
|
-
mp3: {
|
|
69
|
+
opus: {
|
|
70
70
|
possible: import("./file-extensions").FileExtension[];
|
|
71
71
|
default: import("./file-extensions").FileExtension;
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
vp9: {
|
|
76
76
|
default: import("./file-extensions").FileExtension;
|
|
77
77
|
forAudioCodec: {
|
|
78
78
|
"pcm-16": {
|
|
79
79
|
possible: import("./file-extensions").FileExtension[];
|
|
80
80
|
default: import("./file-extensions").FileExtension;
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
opus: {
|
|
83
83
|
possible: import("./file-extensions").FileExtension[];
|
|
84
84
|
default: import("./file-extensions").FileExtension;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
mp3: {
|
|
89
89
|
default: import("./file-extensions").FileExtension;
|
|
90
90
|
forAudioCodec: {
|
|
91
|
-
|
|
91
|
+
mp3: {
|
|
92
92
|
possible: import("./file-extensions").FileExtension[];
|
|
93
93
|
default: import("./file-extensions").FileExtension;
|
|
94
94
|
};
|
|
95
|
-
|
|
95
|
+
"pcm-16": {
|
|
96
96
|
possible: import("./file-extensions").FileExtension[];
|
|
97
97
|
default: import("./file-extensions").FileExtension;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
aac: {
|
|
102
102
|
default: import("./file-extensions").FileExtension;
|
|
103
103
|
forAudioCodec: {
|
|
104
|
-
|
|
104
|
+
aac: {
|
|
105
105
|
possible: import("./file-extensions").FileExtension[];
|
|
106
106
|
default: import("./file-extensions").FileExtension;
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
"pcm-16": {
|
|
109
109
|
possible: import("./file-extensions").FileExtension[];
|
|
110
110
|
default: import("./file-extensions").FileExtension;
|
|
111
111
|
};
|
|
@@ -123,11 +123,11 @@ export declare const BrowserSafeApis: {
|
|
|
123
123
|
prores: {
|
|
124
124
|
default: import("./file-extensions").FileExtension;
|
|
125
125
|
forAudioCodec: {
|
|
126
|
-
|
|
126
|
+
aac: {
|
|
127
127
|
possible: import("./file-extensions").FileExtension[];
|
|
128
128
|
default: import("./file-extensions").FileExtension;
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
"pcm-16": {
|
|
131
131
|
possible: import("./file-extensions").FileExtension[];
|
|
132
132
|
default: import("./file-extensions").FileExtension;
|
|
133
133
|
};
|
|
@@ -136,11 +136,11 @@ export declare const BrowserSafeApis: {
|
|
|
136
136
|
"h264-mkv": {
|
|
137
137
|
default: import("./file-extensions").FileExtension;
|
|
138
138
|
forAudioCodec: {
|
|
139
|
-
|
|
139
|
+
mp3: {
|
|
140
140
|
possible: import("./file-extensions").FileExtension[];
|
|
141
141
|
default: import("./file-extensions").FileExtension;
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
"pcm-16": {
|
|
144
144
|
possible: import("./file-extensions").FileExtension[];
|
|
145
145
|
default: import("./file-extensions").FileExtension;
|
|
146
146
|
};
|
|
@@ -149,11 +149,11 @@ export declare const BrowserSafeApis: {
|
|
|
149
149
|
"h264-ts": {
|
|
150
150
|
default: import("./file-extensions").FileExtension;
|
|
151
151
|
forAudioCodec: {
|
|
152
|
-
|
|
152
|
+
aac: {
|
|
153
153
|
possible: import("./file-extensions").FileExtension[];
|
|
154
154
|
default: import("./file-extensions").FileExtension;
|
|
155
155
|
};
|
|
156
|
-
|
|
156
|
+
"pcm-16": {
|
|
157
157
|
possible: import("./file-extensions").FileExtension[];
|
|
158
158
|
default: import("./file-extensions").FileExtension;
|
|
159
159
|
};
|
|
@@ -165,21 +165,13 @@ export declare const BrowserSafeApis: {
|
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
167
|
defaultAudioCodecs: {
|
|
168
|
-
aac: {
|
|
169
|
-
compressed: "pcm-16" | "aac" | null;
|
|
170
|
-
lossless: "pcm-16" | "aac" | null;
|
|
171
|
-
};
|
|
172
|
-
mp3: {
|
|
173
|
-
compressed: "pcm-16" | "mp3" | null;
|
|
174
|
-
lossless: "pcm-16" | "mp3" | null;
|
|
175
|
-
};
|
|
176
168
|
h264: {
|
|
177
|
-
compressed: "
|
|
178
|
-
lossless: "
|
|
169
|
+
compressed: "mp3" | "aac" | "pcm-16" | null;
|
|
170
|
+
lossless: "mp3" | "aac" | "pcm-16" | null;
|
|
179
171
|
};
|
|
180
172
|
h265: {
|
|
181
|
-
compressed: "
|
|
182
|
-
lossless: "
|
|
173
|
+
compressed: "aac" | "pcm-16" | null;
|
|
174
|
+
lossless: "aac" | "pcm-16" | null;
|
|
183
175
|
};
|
|
184
176
|
vp8: {
|
|
185
177
|
compressed: "pcm-16" | "opus" | null;
|
|
@@ -189,31 +181,39 @@ export declare const BrowserSafeApis: {
|
|
|
189
181
|
compressed: "pcm-16" | "opus" | null;
|
|
190
182
|
lossless: "pcm-16" | "opus" | null;
|
|
191
183
|
};
|
|
184
|
+
mp3: {
|
|
185
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
186
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
187
|
+
};
|
|
188
|
+
aac: {
|
|
189
|
+
compressed: "aac" | "pcm-16" | null;
|
|
190
|
+
lossless: "aac" | "pcm-16" | null;
|
|
191
|
+
};
|
|
192
192
|
wav: {
|
|
193
193
|
compressed: "pcm-16" | null;
|
|
194
194
|
lossless: "pcm-16" | null;
|
|
195
195
|
};
|
|
196
196
|
prores: {
|
|
197
|
-
compressed: "
|
|
198
|
-
lossless: "
|
|
197
|
+
compressed: "aac" | "pcm-16" | null;
|
|
198
|
+
lossless: "aac" | "pcm-16" | null;
|
|
199
199
|
};
|
|
200
200
|
"h264-mkv": {
|
|
201
|
-
compressed: "
|
|
202
|
-
lossless: "
|
|
201
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
202
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
203
203
|
};
|
|
204
204
|
"h264-ts": {
|
|
205
|
-
compressed: "
|
|
206
|
-
lossless: "
|
|
205
|
+
compressed: "aac" | "pcm-16" | null;
|
|
206
|
+
lossless: "aac" | "pcm-16" | null;
|
|
207
207
|
};
|
|
208
208
|
gif: {
|
|
209
209
|
compressed: null;
|
|
210
210
|
lossless: null;
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
214
|
-
validateOutputFilename: <T_1 extends "
|
|
213
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">;
|
|
214
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
215
215
|
codec: T_1;
|
|
216
|
-
audioCodecSetting: "
|
|
216
|
+
audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
217
217
|
extension: string;
|
|
218
218
|
preferLossless: boolean;
|
|
219
219
|
separateAudioTo: string | null;
|
|
@@ -221,12 +221,12 @@ export declare const BrowserSafeApis: {
|
|
|
221
221
|
options: {
|
|
222
222
|
audioCodecOption: {
|
|
223
223
|
cliFlag: "audio-codec";
|
|
224
|
-
setConfig: (audioCodec: "
|
|
224
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
225
225
|
getValue: ({ commandLine }: {
|
|
226
226
|
commandLine: Record<string, unknown>;
|
|
227
227
|
}) => {
|
|
228
228
|
source: string;
|
|
229
|
-
value: "
|
|
229
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
230
230
|
} | {
|
|
231
231
|
source: string;
|
|
232
232
|
value: null;
|
|
@@ -235,7 +235,7 @@ export declare const BrowserSafeApis: {
|
|
|
235
235
|
docLink: string;
|
|
236
236
|
name: string;
|
|
237
237
|
ssrName: "audioCodec";
|
|
238
|
-
type: "
|
|
238
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
239
239
|
};
|
|
240
240
|
scaleOption: {
|
|
241
241
|
name: string;
|
|
@@ -354,17 +354,17 @@ export declare const BrowserSafeApis: {
|
|
|
354
354
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
355
355
|
ssrName: string;
|
|
356
356
|
docLink: string;
|
|
357
|
-
type: "
|
|
357
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
358
358
|
getValue: ({ commandLine }: {
|
|
359
359
|
commandLine: Record<string, unknown>;
|
|
360
360
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
361
361
|
outName: string | null;
|
|
362
362
|
downloadName: string | null;
|
|
363
|
-
configFile: "
|
|
364
|
-
uiCodec: "
|
|
365
|
-
compositionCodec: "
|
|
363
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
364
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
365
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
366
366
|
}) => {
|
|
367
|
-
value: "
|
|
367
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
368
368
|
source: string;
|
|
369
369
|
};
|
|
370
370
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -464,19 +464,19 @@ export declare const BrowserSafeApis: {
|
|
|
464
464
|
cliFlag: "gl";
|
|
465
465
|
docLink: string;
|
|
466
466
|
name: string;
|
|
467
|
-
type: "
|
|
467
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
468
468
|
ssrName: string;
|
|
469
469
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
470
470
|
getValue: ({ commandLine }: {
|
|
471
471
|
commandLine: Record<string, unknown>;
|
|
472
472
|
}) => {
|
|
473
|
-
value: "
|
|
473
|
+
value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
474
474
|
source: string;
|
|
475
475
|
} | {
|
|
476
476
|
value: null;
|
|
477
477
|
source: string;
|
|
478
478
|
};
|
|
479
|
-
setConfig: (value: "
|
|
479
|
+
setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
480
480
|
};
|
|
481
481
|
enableLambdaInsights: {
|
|
482
482
|
name: string;
|
|
@@ -851,17 +851,17 @@ export declare const BrowserSafeApis: {
|
|
|
851
851
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
852
852
|
ssrName: string;
|
|
853
853
|
docLink: string;
|
|
854
|
-
type: "
|
|
854
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
855
855
|
getValue: ({ commandLine }: {
|
|
856
856
|
commandLine: Record<string, unknown>;
|
|
857
857
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
858
858
|
outName: string | null;
|
|
859
859
|
downloadName: string | null;
|
|
860
|
-
configFile: "
|
|
861
|
-
uiCodec: "
|
|
862
|
-
compositionCodec: "
|
|
860
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
861
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
862
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
863
863
|
}) => {
|
|
864
|
-
value: "
|
|
864
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
865
865
|
source: string;
|
|
866
866
|
};
|
|
867
867
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -1015,12 +1015,12 @@ export declare const BrowserSafeApis: {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
readonly audioCodec: {
|
|
1017
1017
|
cliFlag: "audio-codec";
|
|
1018
|
-
setConfig: (audioCodec: "
|
|
1018
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
1019
1019
|
getValue: ({ commandLine }: {
|
|
1020
1020
|
commandLine: Record<string, unknown>;
|
|
1021
1021
|
}) => {
|
|
1022
1022
|
source: string;
|
|
1023
|
-
value: "
|
|
1023
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
1024
1024
|
} | {
|
|
1025
1025
|
source: string;
|
|
1026
1026
|
value: null;
|
|
@@ -1029,7 +1029,7 @@ export declare const BrowserSafeApis: {
|
|
|
1029
1029
|
docLink: string;
|
|
1030
1030
|
name: string;
|
|
1031
1031
|
ssrName: "audioCodec";
|
|
1032
|
-
type: "
|
|
1032
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
1033
1033
|
};
|
|
1034
1034
|
};
|
|
1035
1035
|
readonly stitchFramesToVideo: {
|
|
@@ -2076,9 +2076,9 @@ export declare const BrowserSafeApis: {
|
|
|
2076
2076
|
};
|
|
2077
2077
|
};
|
|
2078
2078
|
};
|
|
2079
|
-
codecSupportsCrf: (codec: "
|
|
2080
|
-
codecSupportsVideoBitrate: (codec: "
|
|
2079
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
2080
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
2081
2081
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
2082
2082
|
getOutputCodecOrUndefined: () => import("./codec").CodecOrUndefined;
|
|
2083
|
-
getExtensionFromAudioCodec: (audioCodec: "
|
|
2083
|
+
getExtensionFromAudioCodec: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus") => "mp3" | "aac" | "wav" | "opus";
|
|
2084
2084
|
};
|
|
@@ -4,9 +4,6 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
|
|
|
4
4
|
filters: PreprocessedAudioTrack[];
|
|
5
5
|
downloadMap: DownloadMap;
|
|
6
6
|
}) => Promise<{
|
|
7
|
-
complexFilterFlag: [
|
|
8
|
-
string,
|
|
9
|
-
string
|
|
10
|
-
] | null;
|
|
7
|
+
complexFilterFlag: [string, string] | null;
|
|
11
8
|
cleanup: () => void;
|
|
12
9
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
2
|
import type { FileExtension } from './file-extensions';
|
|
3
3
|
import type { AudioCodec } from './options/audio-codec';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type ReturnType = {
|
|
2
|
+
extraFramesToCaptureAssets: number[];
|
|
3
|
+
trimLeftOffset: number;
|
|
4
|
+
trimRightOffset: number;
|
|
5
|
+
chunkLengthInSeconds: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const getExtraFramesToCapture: ({ compositionStart, realFrameRange, fps, forSeamlessAacConcatenation, }: {
|
|
8
|
+
fps: number;
|
|
9
|
+
compositionStart: number;
|
|
10
|
+
realFrameRange: [number, number];
|
|
11
|
+
forSeamlessAacConcatenation: boolean;
|
|
12
|
+
}) => ReturnType;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// For seamless AAC concatenation, we need to capture a bit of extra audio on both sides
|
|
3
|
+
// to later align the audio correctly. This function calculates the exact frames to capture.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getExtraFramesToCapture = void 0;
|
|
6
|
+
const combine_audio_1 = require("./combine-audio");
|
|
7
|
+
const sample_rate_1 = require("./sample-rate");
|
|
8
|
+
const getExtraFramesToCapture = ({ compositionStart, realFrameRange, fps, forSeamlessAacConcatenation, }) => {
|
|
9
|
+
if (!forSeamlessAacConcatenation) {
|
|
10
|
+
return {
|
|
11
|
+
extraFramesToCaptureAssets: [],
|
|
12
|
+
chunkLengthInSeconds: (realFrameRange[1] - realFrameRange[0] + 1) / fps,
|
|
13
|
+
trimLeftOffset: 0,
|
|
14
|
+
trimRightOffset: 0,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const chunkStart = realFrameRange[0] / fps;
|
|
18
|
+
if (chunkStart < compositionStart) {
|
|
19
|
+
throw new Error('chunkStart may not be below compositionStart');
|
|
20
|
+
}
|
|
21
|
+
const realLeftEnd = chunkStart - compositionStart;
|
|
22
|
+
if (realLeftEnd < 0) {
|
|
23
|
+
throw new Error('chunkStat - compositionStart may not be below 0');
|
|
24
|
+
}
|
|
25
|
+
const realRightEnd = realLeftEnd + (realFrameRange[1] - realFrameRange[0] + 1) / fps;
|
|
26
|
+
const aacAdjustedLeftEnd = Math.max(0, (0, combine_audio_1.getClosestAlignedTime)(realLeftEnd) - 2 * (1024 / sample_rate_1.DEFAULT_SAMPLE_RATE));
|
|
27
|
+
const aacAdjustedRightEnd = (0, combine_audio_1.getClosestAlignedTime)(realRightEnd) + 2 * (1024 / sample_rate_1.DEFAULT_SAMPLE_RATE);
|
|
28
|
+
const startTimeWithoutOffset = Math.floor(aacAdjustedLeftEnd * fps);
|
|
29
|
+
// TODO: Prevent floating point issues by dividing and then multiplying by FPS
|
|
30
|
+
const startFrame = startTimeWithoutOffset + compositionStart * fps;
|
|
31
|
+
const trimLeftOffset = (aacAdjustedLeftEnd * fps - startTimeWithoutOffset) / fps;
|
|
32
|
+
const endFrame = Math.ceil(aacAdjustedRightEnd * fps) + compositionStart * fps;
|
|
33
|
+
const trimRightOffset = (aacAdjustedRightEnd * fps - Math.ceil(aacAdjustedRightEnd * fps)) / fps;
|
|
34
|
+
const extraFramesToCaptureAudioOnly = new Array(realFrameRange[0] - startFrame)
|
|
35
|
+
.fill(true)
|
|
36
|
+
.map((_, f) => {
|
|
37
|
+
return f + startFrame;
|
|
38
|
+
});
|
|
39
|
+
const extraFramesToCaptureAudioOnlyBackend = new Array(endFrame - realFrameRange[1] - 1)
|
|
40
|
+
.fill(true)
|
|
41
|
+
.map((_, f) => {
|
|
42
|
+
return f + realFrameRange[1] + 1;
|
|
43
|
+
});
|
|
44
|
+
const chunkLengthInSeconds = aacAdjustedRightEnd - aacAdjustedLeftEnd;
|
|
45
|
+
return {
|
|
46
|
+
extraFramesToCaptureAssets: [
|
|
47
|
+
...extraFramesToCaptureAudioOnly,
|
|
48
|
+
...extraFramesToCaptureAudioOnlyBackend,
|
|
49
|
+
],
|
|
50
|
+
chunkLengthInSeconds,
|
|
51
|
+
trimLeftOffset,
|
|
52
|
+
trimRightOffset,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.getExtraFramesToCapture = getExtraFramesToCapture;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import execa from 'execa';
|
|
2
4
|
import { HeadlessBrowser } from './browser/Browser';
|
|
3
5
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -69,10 +71,10 @@ export declare const RenderInternals: {
|
|
|
69
71
|
width: number;
|
|
70
72
|
height: number;
|
|
71
73
|
scale: number;
|
|
72
|
-
codec: "
|
|
74
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
73
75
|
wantsImageSequence: boolean;
|
|
74
76
|
}) => void;
|
|
75
|
-
getFileExtensionFromCodec: <T extends "
|
|
77
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
76
78
|
tmpDir: (str: string) => string;
|
|
77
79
|
deleteDirectory: (directory: string) => void;
|
|
78
80
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -129,7 +131,7 @@ export declare const RenderInternals: {
|
|
|
129
131
|
};
|
|
130
132
|
registerErrorSymbolicationLock: () => number;
|
|
131
133
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
132
|
-
canUseParallelEncoding: (codec: "
|
|
134
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
133
135
|
mimeContentType: typeof mimeContentType;
|
|
134
136
|
mimeLookup: typeof mimeLookup;
|
|
135
137
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -140,14 +142,14 @@ export declare const RenderInternals: {
|
|
|
140
142
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
141
143
|
DEFAULT_BROWSER: "chrome";
|
|
142
144
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
143
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
144
|
-
validateOpenGlRenderer: (option: unknown) => "
|
|
145
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
146
|
+
validateOpenGlRenderer: (option: unknown) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
145
147
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
146
148
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
147
149
|
validateJpegQuality: (q: unknown) => void;
|
|
148
150
|
DEFAULT_TIMEOUT: number;
|
|
149
|
-
DEFAULT_CODEC: "
|
|
150
|
-
isAudioCodec: (codec: "
|
|
151
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
152
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null | undefined) => boolean;
|
|
151
153
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
152
154
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
153
155
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -164,10 +166,10 @@ export declare const RenderInternals: {
|
|
|
164
166
|
output: string;
|
|
165
167
|
onProgress: (p: number) => void;
|
|
166
168
|
numberOfFrames: number;
|
|
167
|
-
codec: "
|
|
169
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
168
170
|
fps: number;
|
|
169
171
|
numberOfGifLoops: number | null;
|
|
170
|
-
resolvedAudioCodec: "
|
|
172
|
+
resolvedAudioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
171
173
|
audioBitrate: string | null;
|
|
172
174
|
indent: boolean;
|
|
173
175
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -180,14 +182,14 @@ export declare const RenderInternals: {
|
|
|
180
182
|
getMinConcurrency: () => number;
|
|
181
183
|
getMaxConcurrency: () => number;
|
|
182
184
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
183
|
-
codec: "
|
|
185
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
184
186
|
preferLossless: boolean;
|
|
185
|
-
}) => "
|
|
187
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
186
188
|
defaultFileExtensionMap: {
|
|
187
|
-
|
|
189
|
+
h264: {
|
|
188
190
|
default: import("./file-extensions").FileExtension;
|
|
189
191
|
forAudioCodec: {
|
|
190
|
-
|
|
192
|
+
mp3: {
|
|
191
193
|
possible: import("./file-extensions").FileExtension[];
|
|
192
194
|
default: import("./file-extensions").FileExtension;
|
|
193
195
|
};
|
|
@@ -195,72 +197,72 @@ export declare const RenderInternals: {
|
|
|
195
197
|
possible: import("./file-extensions").FileExtension[];
|
|
196
198
|
default: import("./file-extensions").FileExtension;
|
|
197
199
|
};
|
|
200
|
+
"pcm-16": {
|
|
201
|
+
possible: import("./file-extensions").FileExtension[];
|
|
202
|
+
default: import("./file-extensions").FileExtension;
|
|
203
|
+
};
|
|
198
204
|
};
|
|
199
205
|
};
|
|
200
|
-
|
|
206
|
+
h265: {
|
|
201
207
|
default: import("./file-extensions").FileExtension;
|
|
202
208
|
forAudioCodec: {
|
|
203
|
-
|
|
209
|
+
aac: {
|
|
204
210
|
possible: import("./file-extensions").FileExtension[];
|
|
205
211
|
default: import("./file-extensions").FileExtension;
|
|
206
212
|
};
|
|
207
|
-
|
|
213
|
+
"pcm-16": {
|
|
208
214
|
possible: import("./file-extensions").FileExtension[];
|
|
209
215
|
default: import("./file-extensions").FileExtension;
|
|
210
216
|
};
|
|
211
217
|
};
|
|
212
218
|
};
|
|
213
|
-
|
|
219
|
+
vp8: {
|
|
214
220
|
default: import("./file-extensions").FileExtension;
|
|
215
221
|
forAudioCodec: {
|
|
216
222
|
"pcm-16": {
|
|
217
223
|
possible: import("./file-extensions").FileExtension[];
|
|
218
224
|
default: import("./file-extensions").FileExtension;
|
|
219
225
|
};
|
|
220
|
-
|
|
221
|
-
possible: import("./file-extensions").FileExtension[];
|
|
222
|
-
default: import("./file-extensions").FileExtension;
|
|
223
|
-
};
|
|
224
|
-
mp3: {
|
|
226
|
+
opus: {
|
|
225
227
|
possible: import("./file-extensions").FileExtension[];
|
|
226
228
|
default: import("./file-extensions").FileExtension;
|
|
227
229
|
};
|
|
228
230
|
};
|
|
229
231
|
};
|
|
230
|
-
|
|
232
|
+
vp9: {
|
|
231
233
|
default: import("./file-extensions").FileExtension;
|
|
232
234
|
forAudioCodec: {
|
|
233
235
|
"pcm-16": {
|
|
234
236
|
possible: import("./file-extensions").FileExtension[];
|
|
235
237
|
default: import("./file-extensions").FileExtension;
|
|
236
238
|
};
|
|
237
|
-
|
|
239
|
+
opus: {
|
|
238
240
|
possible: import("./file-extensions").FileExtension[];
|
|
239
241
|
default: import("./file-extensions").FileExtension;
|
|
240
242
|
};
|
|
241
243
|
};
|
|
242
244
|
};
|
|
243
|
-
|
|
245
|
+
mp3: {
|
|
244
246
|
default: import("./file-extensions").FileExtension;
|
|
245
247
|
forAudioCodec: {
|
|
246
|
-
|
|
248
|
+
mp3: {
|
|
247
249
|
possible: import("./file-extensions").FileExtension[];
|
|
248
250
|
default: import("./file-extensions").FileExtension;
|
|
249
251
|
};
|
|
250
|
-
|
|
252
|
+
"pcm-16": {
|
|
251
253
|
possible: import("./file-extensions").FileExtension[];
|
|
252
254
|
default: import("./file-extensions").FileExtension;
|
|
253
255
|
};
|
|
254
256
|
};
|
|
255
257
|
};
|
|
256
|
-
|
|
258
|
+
aac: {
|
|
257
259
|
default: import("./file-extensions").FileExtension;
|
|
258
260
|
forAudioCodec: {
|
|
259
|
-
|
|
261
|
+
aac: {
|
|
260
262
|
possible: import("./file-extensions").FileExtension[];
|
|
261
263
|
default: import("./file-extensions").FileExtension;
|
|
262
264
|
};
|
|
263
|
-
|
|
265
|
+
"pcm-16": {
|
|
264
266
|
possible: import("./file-extensions").FileExtension[];
|
|
265
267
|
default: import("./file-extensions").FileExtension;
|
|
266
268
|
};
|
|
@@ -278,11 +280,11 @@ export declare const RenderInternals: {
|
|
|
278
280
|
prores: {
|
|
279
281
|
default: import("./file-extensions").FileExtension;
|
|
280
282
|
forAudioCodec: {
|
|
281
|
-
|
|
283
|
+
aac: {
|
|
282
284
|
possible: import("./file-extensions").FileExtension[];
|
|
283
285
|
default: import("./file-extensions").FileExtension;
|
|
284
286
|
};
|
|
285
|
-
|
|
287
|
+
"pcm-16": {
|
|
286
288
|
possible: import("./file-extensions").FileExtension[];
|
|
287
289
|
default: import("./file-extensions").FileExtension;
|
|
288
290
|
};
|
|
@@ -291,11 +293,11 @@ export declare const RenderInternals: {
|
|
|
291
293
|
"h264-mkv": {
|
|
292
294
|
default: import("./file-extensions").FileExtension;
|
|
293
295
|
forAudioCodec: {
|
|
294
|
-
|
|
296
|
+
mp3: {
|
|
295
297
|
possible: import("./file-extensions").FileExtension[];
|
|
296
298
|
default: import("./file-extensions").FileExtension;
|
|
297
299
|
};
|
|
298
|
-
|
|
300
|
+
"pcm-16": {
|
|
299
301
|
possible: import("./file-extensions").FileExtension[];
|
|
300
302
|
default: import("./file-extensions").FileExtension;
|
|
301
303
|
};
|
|
@@ -304,11 +306,11 @@ export declare const RenderInternals: {
|
|
|
304
306
|
"h264-ts": {
|
|
305
307
|
default: import("./file-extensions").FileExtension;
|
|
306
308
|
forAudioCodec: {
|
|
307
|
-
|
|
309
|
+
aac: {
|
|
308
310
|
possible: import("./file-extensions").FileExtension[];
|
|
309
311
|
default: import("./file-extensions").FileExtension;
|
|
310
312
|
};
|
|
311
|
-
|
|
313
|
+
"pcm-16": {
|
|
312
314
|
possible: import("./file-extensions").FileExtension[];
|
|
313
315
|
default: import("./file-extensions").FileExtension;
|
|
314
316
|
};
|
|
@@ -332,8 +334,8 @@ export declare const RenderInternals: {
|
|
|
332
334
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
333
335
|
readonly wav: readonly ["pcm-16"];
|
|
334
336
|
};
|
|
335
|
-
makeFileExtensionMap: () => Record<string, ("
|
|
336
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
337
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
338
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">;
|
|
337
339
|
getExecutablePath: ({ indent, logLevel, type, binariesDirectory, }: {
|
|
338
340
|
type: "ffmpeg" | "ffprobe" | "compositor";
|
|
339
341
|
indent: boolean;
|
|
@@ -351,8 +353,8 @@ export declare const RenderInternals: {
|
|
|
351
353
|
}) => execa.ExecaChildProcess<string>;
|
|
352
354
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
353
355
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
354
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
355
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
356
|
+
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
357
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
356
358
|
DEFAULT_JPEG_QUALITY: number;
|
|
357
359
|
chalk: {
|
|
358
360
|
enabled: () => boolean;
|
|
@@ -451,7 +453,7 @@ export declare const RenderInternals: {
|
|
|
451
453
|
frame: number;
|
|
452
454
|
serializedInputPropsWithCustomSchema: string;
|
|
453
455
|
serializedResolvedPropsWithCustomSchema: string;
|
|
454
|
-
imageFormat: "
|
|
456
|
+
imageFormat: "jpeg" | "png" | "webp" | "pdf";
|
|
455
457
|
jpegQuality: number;
|
|
456
458
|
puppeteerInstance: HeadlessBrowser | null;
|
|
457
459
|
envVariables: Record<string, string>;
|
|
@@ -737,12 +739,12 @@ export declare const RenderInternals: {
|
|
|
737
739
|
hostsToTry: string[];
|
|
738
740
|
};
|
|
739
741
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
740
|
-
getExtensionFromAudioCodec: (audioCodec: "
|
|
742
|
+
getExtensionFromAudioCodec: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus") => "mp3" | "aac" | "wav" | "opus";
|
|
741
743
|
makeFileExecutableIfItIsNot: (path: string) => void;
|
|
742
744
|
resolveAudioCodec: ({ codec, setting, preferLossless, separateAudioTo, }: {
|
|
743
|
-
setting: "
|
|
744
|
-
codec: "
|
|
745
|
+
setting: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
746
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
745
747
|
preferLossless: boolean;
|
|
746
748
|
separateAudioTo: string | null;
|
|
747
|
-
}) => "
|
|
749
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
748
750
|
};
|
|
@@ -23,25 +23,25 @@ export declare const defaultAudioCodecs: {
|
|
|
23
23
|
[k in 'compressed' | 'lossless']: (typeof supportedAudioCodecs)[key][number] | null;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
export declare const getExtensionFromAudioCodec: (audioCodec: AudioCodec) => "
|
|
26
|
+
export declare const getExtensionFromAudioCodec: (audioCodec: AudioCodec) => "mp3" | "aac" | "wav" | "opus";
|
|
27
27
|
export declare const resolveAudioCodec: ({ codec, setting, preferLossless, separateAudioTo, }: {
|
|
28
28
|
setting: AudioCodec | null;
|
|
29
29
|
codec: Codec;
|
|
30
30
|
preferLossless: boolean;
|
|
31
31
|
separateAudioTo: string | null;
|
|
32
|
-
}) => "
|
|
32
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
33
33
|
export declare const getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
34
34
|
codec: Codec;
|
|
35
35
|
preferLossless: boolean;
|
|
36
36
|
}) => AudioCodec | null;
|
|
37
37
|
export declare const audioCodecOption: {
|
|
38
38
|
cliFlag: "audio-codec";
|
|
39
|
-
setConfig: (audioCodec: "
|
|
39
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
40
40
|
getValue: ({ commandLine }: {
|
|
41
41
|
commandLine: Record<string, unknown>;
|
|
42
42
|
}) => {
|
|
43
43
|
source: string;
|
|
44
|
-
value: "
|
|
44
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
45
45
|
} | {
|
|
46
46
|
source: string;
|
|
47
47
|
value: null;
|
|
@@ -50,6 +50,6 @@ export declare const audioCodecOption: {
|
|
|
50
50
|
docLink: string;
|
|
51
51
|
name: string;
|
|
52
52
|
ssrName: "audioCodec";
|
|
53
|
-
type: "
|
|
53
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
54
54
|
};
|
|
55
55
|
export {};
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
2
2
|
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const getChromiumOpenGlRenderer: () => "
|
|
4
|
+
export declare const getChromiumOpenGlRenderer: () => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
5
5
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
6
6
|
export declare const glOption: {
|
|
7
7
|
cliFlag: "gl";
|
|
8
8
|
docLink: string;
|
|
9
9
|
name: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
11
11
|
ssrName: string;
|
|
12
12
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
getValue: ({ commandLine }: {
|
|
14
14
|
commandLine: Record<string, unknown>;
|
|
15
15
|
}) => {
|
|
16
|
-
value: "
|
|
16
|
+
value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
17
17
|
source: string;
|
|
18
18
|
} | {
|
|
19
19
|
value: null;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import type { AnyRemotionOption } from './option';
|
|
|
2
2
|
export declare const allOptions: {
|
|
3
3
|
audioCodecOption: {
|
|
4
4
|
cliFlag: "audio-codec";
|
|
5
|
-
setConfig: (audioCodec: "
|
|
5
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
6
6
|
getValue: ({ commandLine }: {
|
|
7
7
|
commandLine: Record<string, unknown>;
|
|
8
8
|
}) => {
|
|
9
9
|
source: string;
|
|
10
|
-
value: "
|
|
10
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
11
11
|
} | {
|
|
12
12
|
source: string;
|
|
13
13
|
value: null;
|
|
@@ -16,7 +16,7 @@ export declare const allOptions: {
|
|
|
16
16
|
docLink: string;
|
|
17
17
|
name: string;
|
|
18
18
|
ssrName: "audioCodec";
|
|
19
|
-
type: "
|
|
19
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
20
20
|
};
|
|
21
21
|
scaleOption: {
|
|
22
22
|
name: string;
|
|
@@ -135,17 +135,17 @@ export declare const allOptions: {
|
|
|
135
135
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
136
136
|
ssrName: string;
|
|
137
137
|
docLink: string;
|
|
138
|
-
type: "
|
|
138
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
139
139
|
getValue: ({ commandLine }: {
|
|
140
140
|
commandLine: Record<string, unknown>;
|
|
141
141
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
142
142
|
outName: string | null;
|
|
143
143
|
downloadName: string | null;
|
|
144
|
-
configFile: "
|
|
145
|
-
uiCodec: "
|
|
146
|
-
compositionCodec: "
|
|
144
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
145
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
146
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
147
147
|
}) => {
|
|
148
|
-
value: "
|
|
148
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
149
149
|
source: string;
|
|
150
150
|
};
|
|
151
151
|
setConfig: (newCodec: import("..").CodecOrUndefined) => void;
|
|
@@ -245,19 +245,19 @@ export declare const allOptions: {
|
|
|
245
245
|
cliFlag: "gl";
|
|
246
246
|
docLink: string;
|
|
247
247
|
name: string;
|
|
248
|
-
type: "
|
|
248
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
249
249
|
ssrName: string;
|
|
250
250
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
251
251
|
getValue: ({ commandLine }: {
|
|
252
252
|
commandLine: Record<string, unknown>;
|
|
253
253
|
}) => {
|
|
254
|
-
value: "
|
|
254
|
+
value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
255
255
|
source: string;
|
|
256
256
|
} | {
|
|
257
257
|
value: null;
|
|
258
258
|
source: string;
|
|
259
259
|
};
|
|
260
|
-
setConfig: (value: "
|
|
260
|
+
setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
261
261
|
};
|
|
262
262
|
enableLambdaInsights: {
|
|
263
263
|
name: string;
|
|
@@ -123,17 +123,17 @@ export declare const optionsMap: {
|
|
|
123
123
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
124
124
|
ssrName: string;
|
|
125
125
|
docLink: string;
|
|
126
|
-
type: "
|
|
126
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
127
127
|
getValue: ({ commandLine }: {
|
|
128
128
|
commandLine: Record<string, unknown>;
|
|
129
129
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
130
130
|
outName: string | null;
|
|
131
131
|
downloadName: string | null;
|
|
132
|
-
configFile: "
|
|
133
|
-
uiCodec: "
|
|
134
|
-
compositionCodec: "
|
|
132
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
133
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
134
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
135
135
|
}) => {
|
|
136
|
-
value: "
|
|
136
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
137
137
|
source: string;
|
|
138
138
|
};
|
|
139
139
|
setConfig: (newCodec: import("..").CodecOrUndefined) => void;
|
|
@@ -287,12 +287,12 @@ export declare const optionsMap: {
|
|
|
287
287
|
};
|
|
288
288
|
readonly audioCodec: {
|
|
289
289
|
cliFlag: "audio-codec";
|
|
290
|
-
setConfig: (audioCodec: "
|
|
290
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
291
291
|
getValue: ({ commandLine }: {
|
|
292
292
|
commandLine: Record<string, unknown>;
|
|
293
293
|
}) => {
|
|
294
294
|
source: string;
|
|
295
|
-
value: "
|
|
295
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
296
296
|
} | {
|
|
297
297
|
source: string;
|
|
298
298
|
value: null;
|
|
@@ -301,7 +301,7 @@ export declare const optionsMap: {
|
|
|
301
301
|
docLink: string;
|
|
302
302
|
name: string;
|
|
303
303
|
ssrName: "audioCodec";
|
|
304
|
-
type: "
|
|
304
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
305
305
|
};
|
|
306
306
|
};
|
|
307
307
|
readonly stitchFramesToVideo: {
|
|
@@ -6,7 +6,7 @@ export declare const videoCodecOption: {
|
|
|
6
6
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
ssrName: string;
|
|
8
8
|
docLink: string;
|
|
9
|
-
type: "
|
|
9
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
10
10
|
getValue: ({ commandLine }: {
|
|
11
11
|
commandLine: Record<string, unknown>;
|
|
12
12
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
package/dist/port-config.d.ts
CHANGED
package/dist/pure.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const NoReactAPIs: {
|
|
2
2
|
wrapWithErrorHandling: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
|
|
3
3
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
4
|
-
getFileExtensionFromCodec: <T extends "
|
|
5
|
-
validateOutputFilename: <T_1 extends "
|
|
4
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
5
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
6
6
|
codec: T_1;
|
|
7
|
-
audioCodecSetting: "
|
|
7
|
+
audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
8
8
|
extension: string;
|
|
9
9
|
preferLossless: boolean;
|
|
10
10
|
separateAudioTo: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './options/audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodecSetting: 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.126",
|
|
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.126"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-linux-arm64-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.126",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.126",
|
|
45
|
+
"@remotion/compositor-darwin-x64": "4.0.126",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.126",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.126",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.126",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.126"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|