@remotion/renderer 4.0.122 → 4.0.123
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 +10 -2
- package/dist/assets/get-audio-channels.js +12 -4
- package/dist/calculate-ffmpeg-filters.d.ts +2 -1
- package/dist/calculate-ffmpeg-filters.js +14 -3
- package/dist/call-ffmpeg.d.ts +6 -2
- package/dist/call-ffmpeg.js +12 -4
- package/dist/can-use-parallel-encoding.js +2 -2
- package/dist/client.d.ts +252 -26
- package/dist/client.js +3 -3
- package/dist/codec-supports-media.js +5 -0
- package/dist/codec.d.ts +1 -1
- package/dist/codec.js +1 -0
- package/dist/combine-audio.d.ts +1 -1
- package/dist/combine-audio.js +1 -1
- package/dist/combine-videos.d.ts +8 -3
- package/dist/combine-videos.js +85 -61
- package/dist/compress-audio.d.ts +5 -2
- package/dist/compress-audio.js +22 -3
- package/dist/create-audio.d.ts +1 -1
- package/dist/create-audio.js +25 -5
- package/dist/create-silent-audio.d.ts +3 -1
- package/dist/create-silent-audio.js +2 -1
- package/dist/crf.js +7 -7
- package/dist/ffmpeg-args.js +1 -0
- package/dist/file-extensions.d.ts +2 -2
- package/dist/file-extensions.js +7 -0
- package/dist/get-codec-name.js +3 -3
- package/dist/get-extension-from-codec.d.ts +3 -3
- package/dist/get-extension-from-codec.js +1 -0
- package/dist/guess-extension-for-media.d.ts +3 -1
- package/dist/guess-extension-for-media.js +2 -1
- package/dist/index.d.ts +49 -21
- package/dist/index.js +4 -4
- package/dist/merge-audio-track.d.ts +5 -1
- package/dist/merge-audio-track.js +40 -3
- package/dist/options/audio-codec.d.ts +55 -0
- package/dist/options/audio-codec.js +190 -0
- package/dist/options/enforce-audio.d.ts +4 -1
- package/dist/options/enforce-audio.js +3 -3
- package/dist/options/for-seamless-aac-concatenation.js +1 -1
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +84 -9
- package/dist/options/index.js +8 -0
- package/dist/options/options-map.d.ts +137 -6
- package/dist/options/options-map.js +13 -0
- package/dist/options/separate-audio.d.ts +18 -0
- package/dist/options/separate-audio.js +28 -0
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/preprocess-audio-track.d.ts +4 -0
- package/dist/preprocess-audio-track.js +28 -2
- package/dist/prespawn-ffmpeg.js +1 -3
- package/dist/pure.d.ts +4 -3
- package/dist/render-media.d.ts +1 -4
- package/dist/render-media.js +10 -5
- package/dist/stitch-frames-to-video.d.ts +6 -4
- package/dist/stitch-frames-to-video.js +36 -98
- package/dist/stringify-ffmpeg-filter.js +9 -8
- package/dist/validate-output-filename.d.ts +4 -3
- package/dist/validate-output-filename.js +10 -4
- package/package.json +9 -9
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
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import type { AnyRemotionOption } from './option';
|
|
2
2
|
export declare const allOptions: {
|
|
3
|
+
audioCodecOption: {
|
|
4
|
+
cliFlag: "audio-codec";
|
|
5
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
6
|
+
getValue: ({ commandLine }: {
|
|
7
|
+
commandLine: Record<string, unknown>;
|
|
8
|
+
}) => {
|
|
9
|
+
source: string;
|
|
10
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
11
|
+
} | {
|
|
12
|
+
source: string;
|
|
13
|
+
value: null;
|
|
14
|
+
};
|
|
15
|
+
description: () => string;
|
|
16
|
+
docLink: string;
|
|
17
|
+
name: string;
|
|
18
|
+
ssrName: "audioCodec";
|
|
19
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
20
|
+
};
|
|
3
21
|
scaleOption: {
|
|
4
22
|
name: string;
|
|
5
23
|
cliFlag: "scale";
|
|
@@ -89,7 +107,10 @@ export declare const allOptions: {
|
|
|
89
107
|
commandLine: Record<string, unknown>;
|
|
90
108
|
}) => {
|
|
91
109
|
source: string;
|
|
92
|
-
value:
|
|
110
|
+
value: true;
|
|
111
|
+
} | {
|
|
112
|
+
source: string;
|
|
113
|
+
value: false;
|
|
93
114
|
};
|
|
94
115
|
setConfig: (value: boolean) => void;
|
|
95
116
|
};
|
|
@@ -114,17 +135,17 @@ export declare const allOptions: {
|
|
|
114
135
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
115
136
|
ssrName: string;
|
|
116
137
|
docLink: string;
|
|
117
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
138
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
118
139
|
getValue: ({ commandLine }: {
|
|
119
140
|
commandLine: Record<string, unknown>;
|
|
120
141
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
121
142
|
outName: string | null;
|
|
122
143
|
downloadName: string | null;
|
|
123
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
124
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
125
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
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;
|
|
126
147
|
}) => {
|
|
127
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
148
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
|
|
128
149
|
source: string;
|
|
129
150
|
};
|
|
130
151
|
setConfig: (newCodec: import("..").CodecOrUndefined) => void;
|
|
@@ -224,19 +245,19 @@ export declare const allOptions: {
|
|
|
224
245
|
cliFlag: "gl";
|
|
225
246
|
docLink: string;
|
|
226
247
|
name: string;
|
|
227
|
-
type: "
|
|
248
|
+
type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
228
249
|
ssrName: string;
|
|
229
250
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
230
251
|
getValue: ({ commandLine }: {
|
|
231
252
|
commandLine: Record<string, unknown>;
|
|
232
253
|
}) => {
|
|
233
|
-
value: "
|
|
254
|
+
value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
234
255
|
source: string;
|
|
235
256
|
} | {
|
|
236
257
|
value: null;
|
|
237
258
|
source: string;
|
|
238
259
|
};
|
|
239
|
-
setConfig: (value: "
|
|
260
|
+
setConfig: (value: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
240
261
|
};
|
|
241
262
|
enableLambdaInsights: {
|
|
242
263
|
name: string;
|
|
@@ -337,6 +358,24 @@ export declare const allOptions: {
|
|
|
337
358
|
};
|
|
338
359
|
setConfig: (should: boolean) => void;
|
|
339
360
|
};
|
|
361
|
+
preferLosslessOption: {
|
|
362
|
+
name: string;
|
|
363
|
+
cliFlag: "prefer-lossless";
|
|
364
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
365
|
+
docLink: string;
|
|
366
|
+
type: boolean;
|
|
367
|
+
ssrName: "preferLossless";
|
|
368
|
+
getValue: ({ commandLine }: {
|
|
369
|
+
commandLine: Record<string, unknown>;
|
|
370
|
+
}) => {
|
|
371
|
+
value: true;
|
|
372
|
+
source: string;
|
|
373
|
+
} | {
|
|
374
|
+
value: false;
|
|
375
|
+
source: string;
|
|
376
|
+
};
|
|
377
|
+
setConfig: (val: boolean) => void;
|
|
378
|
+
};
|
|
340
379
|
x264Option: {
|
|
341
380
|
name: string;
|
|
342
381
|
cliFlag: "x264-preset";
|
|
@@ -430,6 +469,42 @@ export declare const allOptions: {
|
|
|
430
469
|
};
|
|
431
470
|
setConfig: (value: string | null) => void;
|
|
432
471
|
};
|
|
472
|
+
forSeamlessAacConcatenationOption: {
|
|
473
|
+
name: string;
|
|
474
|
+
cliFlag: "for-seamless-aac-concatenation";
|
|
475
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
476
|
+
docLink: string;
|
|
477
|
+
getValue: ({ commandLine }: {
|
|
478
|
+
commandLine: Record<string, unknown>;
|
|
479
|
+
}) => {
|
|
480
|
+
source: string;
|
|
481
|
+
value: true;
|
|
482
|
+
} | {
|
|
483
|
+
source: string;
|
|
484
|
+
value: false;
|
|
485
|
+
};
|
|
486
|
+
setConfig: (value: boolean) => void;
|
|
487
|
+
ssrName: string;
|
|
488
|
+
type: boolean;
|
|
489
|
+
};
|
|
490
|
+
separateAudioOption: {
|
|
491
|
+
cliFlag: string;
|
|
492
|
+
description: () => string;
|
|
493
|
+
docLink: string;
|
|
494
|
+
getValue: ({ commandLine }: {
|
|
495
|
+
commandLine: Record<string, unknown>;
|
|
496
|
+
}) => {
|
|
497
|
+
source: string;
|
|
498
|
+
value: string;
|
|
499
|
+
} | {
|
|
500
|
+
source: string;
|
|
501
|
+
value: null;
|
|
502
|
+
};
|
|
503
|
+
name: string;
|
|
504
|
+
setConfig: () => never;
|
|
505
|
+
ssrName: string;
|
|
506
|
+
type: string | null;
|
|
507
|
+
};
|
|
433
508
|
};
|
|
434
509
|
export type AvailableOptions = keyof typeof allOptions;
|
|
435
510
|
export type TypeOfOption<Type> = Type extends AnyRemotionOption<infer X> ? X : never;
|
package/dist/options/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.allOptions = void 0;
|
|
4
4
|
const audio_bitrate_1 = require("./audio-bitrate");
|
|
5
|
+
const audio_codec_1 = require("./audio-codec");
|
|
5
6
|
const beep_on_finish_1 = require("./beep-on-finish");
|
|
6
7
|
const binaries_directory_1 = require("./binaries-directory");
|
|
7
8
|
const color_space_1 = require("./color-space");
|
|
@@ -13,6 +14,7 @@ const encoding_buffer_size_1 = require("./encoding-buffer-size");
|
|
|
13
14
|
const encoding_max_rate_1 = require("./encoding-max-rate");
|
|
14
15
|
const enforce_audio_1 = require("./enforce-audio");
|
|
15
16
|
const folder_expiry_1 = require("./folder-expiry");
|
|
17
|
+
const for_seamless_aac_concatenation_1 = require("./for-seamless-aac-concatenation");
|
|
16
18
|
const gl_1 = require("./gl");
|
|
17
19
|
const headless_1 = require("./headless");
|
|
18
20
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
@@ -21,14 +23,17 @@ const mute_1 = require("./mute");
|
|
|
21
23
|
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
22
24
|
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
23
25
|
const overwrite_1 = require("./overwrite");
|
|
26
|
+
const prefer_lossless_1 = require("./prefer-lossless");
|
|
24
27
|
const repro_1 = require("./repro");
|
|
25
28
|
const scale_1 = require("./scale");
|
|
29
|
+
const separate_audio_1 = require("./separate-audio");
|
|
26
30
|
const timeout_1 = require("./timeout");
|
|
27
31
|
const video_bitrate_1 = require("./video-bitrate");
|
|
28
32
|
const video_codec_1 = require("./video-codec");
|
|
29
33
|
const webhook_custom_data_1 = require("./webhook-custom-data");
|
|
30
34
|
const x264_preset_1 = require("./x264-preset");
|
|
31
35
|
exports.allOptions = {
|
|
36
|
+
audioCodecOption: audio_codec_1.audioCodecOption,
|
|
32
37
|
scaleOption: scale_1.scaleOption,
|
|
33
38
|
crfOption: crf_1.crfOption,
|
|
34
39
|
jpegQualityOption: jpeg_quality_1.jpegQualityOption,
|
|
@@ -50,10 +55,13 @@ exports.allOptions = {
|
|
|
50
55
|
beepOnFinishOption: beep_on_finish_1.beepOnFinishOption,
|
|
51
56
|
numberOfGifLoopsOption: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
52
57
|
reproOption: repro_1.reproOption,
|
|
58
|
+
preferLosslessOption: prefer_lossless_1.preferLosslessAudioOption,
|
|
53
59
|
x264Option: x264_preset_1.x264Option,
|
|
54
60
|
logLevelOption: log_level_1.logLevelOption,
|
|
55
61
|
delayRenderTimeoutInMillisecondsOption: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
56
62
|
headlessOption: headless_1.headlessOption,
|
|
57
63
|
overwriteOption: overwrite_1.overwriteOption,
|
|
58
64
|
binariesDirectoryOption: binaries_directory_1.binariesDirectoryOption,
|
|
65
|
+
forSeamlessAacConcatenationOption: for_seamless_aac_concatenation_1.forSeamlessAacConcatenationOption,
|
|
66
|
+
separateAudioOption: separate_audio_1.separateAudioOption,
|
|
59
67
|
};
|
|
@@ -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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
133
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
134
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null;
|
|
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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
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;
|
|
@@ -249,6 +249,98 @@ export declare const optionsMap: {
|
|
|
249
249
|
};
|
|
250
250
|
setConfig: (value: string | null) => void;
|
|
251
251
|
};
|
|
252
|
+
readonly forSeamlessAacConcatenation: {
|
|
253
|
+
name: string;
|
|
254
|
+
cliFlag: "for-seamless-aac-concatenation";
|
|
255
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
256
|
+
docLink: string;
|
|
257
|
+
getValue: ({ commandLine }: {
|
|
258
|
+
commandLine: Record<string, unknown>;
|
|
259
|
+
}) => {
|
|
260
|
+
source: string;
|
|
261
|
+
value: true;
|
|
262
|
+
} | {
|
|
263
|
+
source: string;
|
|
264
|
+
value: false;
|
|
265
|
+
};
|
|
266
|
+
setConfig: (value: boolean) => void;
|
|
267
|
+
ssrName: string;
|
|
268
|
+
type: boolean;
|
|
269
|
+
};
|
|
270
|
+
readonly separateAudioTo: {
|
|
271
|
+
cliFlag: string;
|
|
272
|
+
description: () => string;
|
|
273
|
+
docLink: string;
|
|
274
|
+
getValue: ({ commandLine }: {
|
|
275
|
+
commandLine: Record<string, unknown>;
|
|
276
|
+
}) => {
|
|
277
|
+
source: string;
|
|
278
|
+
value: string;
|
|
279
|
+
} | {
|
|
280
|
+
source: string;
|
|
281
|
+
value: null;
|
|
282
|
+
};
|
|
283
|
+
name: string;
|
|
284
|
+
setConfig: () => never;
|
|
285
|
+
ssrName: string;
|
|
286
|
+
type: string | null;
|
|
287
|
+
};
|
|
288
|
+
readonly audioCodec: {
|
|
289
|
+
cliFlag: "audio-codec";
|
|
290
|
+
setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
|
|
291
|
+
getValue: ({ commandLine }: {
|
|
292
|
+
commandLine: Record<string, unknown>;
|
|
293
|
+
}) => {
|
|
294
|
+
source: string;
|
|
295
|
+
value: "mp3" | "aac" | "pcm-16" | "opus";
|
|
296
|
+
} | {
|
|
297
|
+
source: string;
|
|
298
|
+
value: null;
|
|
299
|
+
};
|
|
300
|
+
description: () => string;
|
|
301
|
+
docLink: string;
|
|
302
|
+
name: string;
|
|
303
|
+
ssrName: "audioCodec";
|
|
304
|
+
type: "mp3" | "aac" | "pcm-16" | "opus";
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly stitchFramesToVideo: {
|
|
308
|
+
readonly forSeamlessAacConcatenation: {
|
|
309
|
+
name: string;
|
|
310
|
+
cliFlag: "for-seamless-aac-concatenation";
|
|
311
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
312
|
+
docLink: string;
|
|
313
|
+
getValue: ({ commandLine }: {
|
|
314
|
+
commandLine: Record<string, unknown>;
|
|
315
|
+
}) => {
|
|
316
|
+
source: string;
|
|
317
|
+
value: true;
|
|
318
|
+
} | {
|
|
319
|
+
source: string;
|
|
320
|
+
value: false;
|
|
321
|
+
};
|
|
322
|
+
setConfig: (value: boolean) => void;
|
|
323
|
+
ssrName: string;
|
|
324
|
+
type: boolean;
|
|
325
|
+
};
|
|
326
|
+
readonly separateAudioTo: {
|
|
327
|
+
cliFlag: string;
|
|
328
|
+
description: () => string;
|
|
329
|
+
docLink: string;
|
|
330
|
+
getValue: ({ commandLine }: {
|
|
331
|
+
commandLine: Record<string, unknown>;
|
|
332
|
+
}) => {
|
|
333
|
+
source: string;
|
|
334
|
+
value: string;
|
|
335
|
+
} | {
|
|
336
|
+
source: string;
|
|
337
|
+
value: null;
|
|
338
|
+
};
|
|
339
|
+
name: string;
|
|
340
|
+
setConfig: () => never;
|
|
341
|
+
ssrName: string;
|
|
342
|
+
type: string | null;
|
|
343
|
+
};
|
|
252
344
|
};
|
|
253
345
|
readonly renderStill: {
|
|
254
346
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -592,6 +684,24 @@ export declare const optionsMap: {
|
|
|
592
684
|
};
|
|
593
685
|
setConfig: (newLoop: import("./number-of-gif-loops").NumberOfGifLoops) => void;
|
|
594
686
|
};
|
|
687
|
+
readonly preferLossless: {
|
|
688
|
+
name: string;
|
|
689
|
+
cliFlag: "prefer-lossless";
|
|
690
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
691
|
+
docLink: string;
|
|
692
|
+
type: boolean;
|
|
693
|
+
ssrName: "preferLossless";
|
|
694
|
+
getValue: ({ commandLine }: {
|
|
695
|
+
commandLine: Record<string, unknown>;
|
|
696
|
+
}) => {
|
|
697
|
+
value: true;
|
|
698
|
+
source: string;
|
|
699
|
+
} | {
|
|
700
|
+
value: false;
|
|
701
|
+
source: string;
|
|
702
|
+
};
|
|
703
|
+
setConfig: (val: boolean) => void;
|
|
704
|
+
};
|
|
595
705
|
readonly audioBitrate: {
|
|
596
706
|
name: string;
|
|
597
707
|
cliFlag: "audio-bitrate";
|
|
@@ -928,6 +1038,24 @@ export declare const optionsMap: {
|
|
|
928
1038
|
};
|
|
929
1039
|
setConfig: (newLoop: import("./number-of-gif-loops").NumberOfGifLoops) => void;
|
|
930
1040
|
};
|
|
1041
|
+
readonly preferLossless: {
|
|
1042
|
+
name: string;
|
|
1043
|
+
cliFlag: "prefer-lossless";
|
|
1044
|
+
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1045
|
+
docLink: string;
|
|
1046
|
+
type: boolean;
|
|
1047
|
+
ssrName: "preferLossless";
|
|
1048
|
+
getValue: ({ commandLine }: {
|
|
1049
|
+
commandLine: Record<string, unknown>;
|
|
1050
|
+
}) => {
|
|
1051
|
+
value: true;
|
|
1052
|
+
source: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
value: false;
|
|
1055
|
+
source: string;
|
|
1056
|
+
};
|
|
1057
|
+
setConfig: (val: boolean) => void;
|
|
1058
|
+
};
|
|
931
1059
|
readonly colorSpace: {
|
|
932
1060
|
name: string;
|
|
933
1061
|
cliFlag: "color-space";
|
|
@@ -1086,7 +1214,10 @@ export declare const optionsMap: {
|
|
|
1086
1214
|
commandLine: Record<string, unknown>;
|
|
1087
1215
|
}) => {
|
|
1088
1216
|
source: string;
|
|
1089
|
-
value:
|
|
1217
|
+
value: true;
|
|
1218
|
+
} | {
|
|
1219
|
+
source: string;
|
|
1220
|
+
value: false;
|
|
1090
1221
|
};
|
|
1091
1222
|
setConfig: (value: boolean) => void;
|
|
1092
1223
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optionsMap = void 0;
|
|
4
4
|
const audio_bitrate_1 = require("./audio-bitrate");
|
|
5
|
+
const audio_codec_1 = require("./audio-codec");
|
|
5
6
|
const binaries_directory_1 = require("./binaries-directory");
|
|
6
7
|
const color_space_1 = require("./color-space");
|
|
7
8
|
const crf_1 = require("./crf");
|
|
@@ -9,13 +10,16 @@ const delete_after_1 = require("./delete-after");
|
|
|
9
10
|
const encoding_buffer_size_1 = require("./encoding-buffer-size");
|
|
10
11
|
const encoding_max_rate_1 = require("./encoding-max-rate");
|
|
11
12
|
const enforce_audio_1 = require("./enforce-audio");
|
|
13
|
+
const for_seamless_aac_concatenation_1 = require("./for-seamless-aac-concatenation");
|
|
12
14
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
13
15
|
const log_level_1 = require("./log-level");
|
|
14
16
|
const mute_1 = require("./mute");
|
|
15
17
|
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
16
18
|
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
19
|
+
const prefer_lossless_1 = require("./prefer-lossless");
|
|
17
20
|
const repro_1 = require("./repro");
|
|
18
21
|
const scale_1 = require("./scale");
|
|
22
|
+
const separate_audio_1 = require("./separate-audio");
|
|
19
23
|
const timeout_1 = require("./timeout");
|
|
20
24
|
const video_bitrate_1 = require("./video-bitrate");
|
|
21
25
|
const video_codec_1 = require("./video-codec");
|
|
@@ -37,6 +41,13 @@ exports.optionsMap = {
|
|
|
37
41
|
logLevel: log_level_1.logLevelOption,
|
|
38
42
|
timeoutInMilliseconds: timeout_1.delayRenderTimeoutInMillisecondsOption,
|
|
39
43
|
binariesDirectory: binaries_directory_1.binariesDirectoryOption,
|
|
44
|
+
forSeamlessAacConcatenation: for_seamless_aac_concatenation_1.forSeamlessAacConcatenationOption,
|
|
45
|
+
separateAudioTo: separate_audio_1.separateAudioOption,
|
|
46
|
+
audioCodec: audio_codec_1.audioCodecOption,
|
|
47
|
+
},
|
|
48
|
+
stitchFramesToVideo: {
|
|
49
|
+
forSeamlessAacConcatenation: for_seamless_aac_concatenation_1.forSeamlessAacConcatenationOption,
|
|
50
|
+
separateAudioTo: separate_audio_1.separateAudioOption,
|
|
40
51
|
},
|
|
41
52
|
renderStill: {
|
|
42
53
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
@@ -68,6 +79,7 @@ exports.optionsMap = {
|
|
|
68
79
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
69
80
|
videoBitrate: video_bitrate_1.videoBitrateOption,
|
|
70
81
|
numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
82
|
+
preferLossless: prefer_lossless_1.preferLosslessAudioOption,
|
|
71
83
|
audioBitrate: audio_bitrate_1.audioBitrateOption,
|
|
72
84
|
deleteAfter: delete_after_1.deleteAfterOption,
|
|
73
85
|
x264Preset: x264_preset_1.x264Option,
|
|
@@ -94,6 +106,7 @@ exports.optionsMap = {
|
|
|
94
106
|
renderMediaOnCloudRun: {
|
|
95
107
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytesOption,
|
|
96
108
|
numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
109
|
+
preferLossless: prefer_lossless_1.preferLosslessAudioOption,
|
|
97
110
|
colorSpace: color_space_1.colorSpaceOption,
|
|
98
111
|
audioBitrate: audio_bitrate_1.audioBitrateOption,
|
|
99
112
|
videoBitrate: video_bitrate_1.videoBitrateOption,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const separateAudioOption: {
|
|
2
|
+
cliFlag: string;
|
|
3
|
+
description: () => string;
|
|
4
|
+
docLink: string;
|
|
5
|
+
getValue: ({ commandLine }: {
|
|
6
|
+
commandLine: Record<string, unknown>;
|
|
7
|
+
}) => {
|
|
8
|
+
source: string;
|
|
9
|
+
value: string;
|
|
10
|
+
} | {
|
|
11
|
+
source: string;
|
|
12
|
+
value: null;
|
|
13
|
+
};
|
|
14
|
+
name: string;
|
|
15
|
+
setConfig: () => never;
|
|
16
|
+
ssrName: string;
|
|
17
|
+
type: string | null;
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.separateAudioOption = void 0;
|
|
4
|
+
const DEFAULT = null;
|
|
5
|
+
const cliFlag = 'separate-audio-to';
|
|
6
|
+
exports.separateAudioOption = {
|
|
7
|
+
cliFlag,
|
|
8
|
+
description: () => `If set, the audio will not be included in the main output but rendered as a separate file at the location you pass. It is recommended to use an absolute path. If a relative path is passed, it is relative to the Remotion Root.`,
|
|
9
|
+
docLink: 'https://remotion.dev/docs/renderer/render-media',
|
|
10
|
+
getValue: ({ commandLine }) => {
|
|
11
|
+
if (commandLine[cliFlag]) {
|
|
12
|
+
return {
|
|
13
|
+
source: 'cli',
|
|
14
|
+
value: commandLine[cliFlag],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
source: 'default',
|
|
19
|
+
value: DEFAULT,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
name: 'Separate audio to',
|
|
23
|
+
setConfig: () => {
|
|
24
|
+
throw new Error('Not implemented');
|
|
25
|
+
},
|
|
26
|
+
ssrName: 'separateAudioTo',
|
|
27
|
+
type: 'string',
|
|
28
|
+
};
|
|
@@ -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: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
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, }: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DownloadMap } from './assets/download-map';
|
|
2
2
|
import type { MediaAsset } from './assets/types';
|
|
3
3
|
import type { LogLevel } from './log-level';
|
|
4
|
+
import type { CancelSignal } from './make-cancel-signal';
|
|
4
5
|
import type { ProcessedTrack } from './stringify-ffmpeg-filter';
|
|
5
6
|
type Options = {
|
|
6
7
|
outName: string;
|
|
@@ -11,6 +12,9 @@ type Options = {
|
|
|
11
12
|
indent: boolean;
|
|
12
13
|
logLevel: LogLevel;
|
|
13
14
|
binariesDirectory: string | null;
|
|
15
|
+
cancelSignal: CancelSignal | undefined;
|
|
16
|
+
forSeamlessAacConcatenation: boolean;
|
|
17
|
+
onProgress: (progress: number) => void;
|
|
14
18
|
};
|
|
15
19
|
export type PreprocessedAudioTrack = {
|
|
16
20
|
outName: string;
|
|
@@ -5,16 +5,20 @@ const get_audio_channels_1 = require("./assets/get-audio-channels");
|
|
|
5
5
|
const calculate_ffmpeg_filters_1 = require("./calculate-ffmpeg-filters");
|
|
6
6
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
7
7
|
const ffmpeg_filter_file_1 = require("./ffmpeg-filter-file");
|
|
8
|
+
const logger_1 = require("./logger");
|
|
8
9
|
const p_limit_1 = require("./p-limit");
|
|
10
|
+
const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
9
11
|
const resolve_asset_src_1 = require("./resolve-asset-src");
|
|
10
12
|
const sample_rate_1 = require("./sample-rate");
|
|
11
|
-
const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, fps, downloadMap, indent, logLevel, binariesDirectory, }) => {
|
|
13
|
+
const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, fps, downloadMap, indent, logLevel, binariesDirectory, cancelSignal, forSeamlessAacConcatenation, onProgress, }) => {
|
|
14
|
+
var _a;
|
|
12
15
|
const { channels, duration } = await (0, get_audio_channels_1.getAudioChannelsAndDuration)({
|
|
13
16
|
downloadMap,
|
|
14
17
|
src: (0, resolve_asset_src_1.resolveAssetSrc)(asset.src),
|
|
15
18
|
indent,
|
|
16
19
|
logLevel,
|
|
17
20
|
binariesDirectory,
|
|
21
|
+
cancelSignal,
|
|
18
22
|
});
|
|
19
23
|
const filter = (0, calculate_ffmpeg_filters_1.calculateFfmpegFilter)({
|
|
20
24
|
asset,
|
|
@@ -22,6 +26,7 @@ const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, f
|
|
|
22
26
|
fps,
|
|
23
27
|
channels,
|
|
24
28
|
assetDuration: duration,
|
|
29
|
+
forSeamlessAacConcatenation,
|
|
25
30
|
});
|
|
26
31
|
if (filter === null) {
|
|
27
32
|
return null;
|
|
@@ -35,7 +40,28 @@ const preprocessAudioTrackUnlimited = async ({ outName, asset, expectedFrames, f
|
|
|
35
40
|
['-ar', String(sample_rate_1.DEFAULT_SAMPLE_RATE)],
|
|
36
41
|
['-y', outName],
|
|
37
42
|
].flat(2);
|
|
38
|
-
|
|
43
|
+
logger_1.Log.verbose({ indent, logLevel }, 'Preprocessing audio track', args, 'Filter:', filter.filter);
|
|
44
|
+
const startTime = Date.now();
|
|
45
|
+
const task = (0, call_ffmpeg_1.callFf)({
|
|
46
|
+
bin: 'ffmpeg',
|
|
47
|
+
args,
|
|
48
|
+
indent,
|
|
49
|
+
logLevel,
|
|
50
|
+
binariesDirectory,
|
|
51
|
+
cancelSignal,
|
|
52
|
+
});
|
|
53
|
+
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
54
|
+
const utf8 = data.toString('utf8');
|
|
55
|
+
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(utf8, fps);
|
|
56
|
+
if (parsed === undefined) {
|
|
57
|
+
logger_1.Log.verbose({ indent, logLevel }, utf8);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
onProgress(parsed / expectedFrames);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
await task;
|
|
64
|
+
logger_1.Log.verbose({ indent, logLevel }, 'Preprocessed audio track', `${Date.now() - startTime}ms`);
|
|
39
65
|
cleanup();
|
|
40
66
|
return { outName, filter };
|
|
41
67
|
};
|
package/dist/prespawn-ffmpeg.js
CHANGED
|
@@ -71,9 +71,7 @@ const prespawnFfmpeg = (options) => {
|
|
|
71
71
|
indent: options.indent,
|
|
72
72
|
logLevel: options.logLevel,
|
|
73
73
|
binariesDirectory: options.binariesDirectory,
|
|
74
|
-
|
|
75
|
-
options.signal(() => {
|
|
76
|
-
task.kill();
|
|
74
|
+
cancelSignal: options.signal,
|
|
77
75
|
});
|
|
78
76
|
let ffmpegOutput = '';
|
|
79
77
|
(_c = task.stderr) === null || _c === void 0 ? void 0 : _c.on('data', (data) => {
|
package/dist/pure.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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 "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "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" | "gif">({ codec,
|
|
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
|
-
|
|
7
|
+
audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
8
8
|
extension: string;
|
|
9
9
|
preferLossless: boolean;
|
|
10
|
+
separateAudioTo: string | null;
|
|
10
11
|
}) => void;
|
|
11
12
|
};
|
package/dist/render-media.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { VideoConfig } from 'remotion/no-react';
|
|
3
3
|
import { type RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
|
|
4
|
-
import type { AudioCodec } from './audio-codec';
|
|
5
4
|
import type { BrowserExecutable } from './browser-executable';
|
|
6
5
|
import type { BrowserLog } from './browser-log';
|
|
7
6
|
import type { HeadlessBrowser } from './browser/Browser';
|
|
@@ -62,7 +61,6 @@ export type InternalRenderMediaOptions = {
|
|
|
62
61
|
enforceAudioTrack: boolean;
|
|
63
62
|
ffmpegOverride: FfmpegOverrideFn | undefined;
|
|
64
63
|
disallowParallelEncoding: boolean;
|
|
65
|
-
audioCodec: AudioCodec | null;
|
|
66
64
|
serveUrl: string;
|
|
67
65
|
concurrency: number | string | null;
|
|
68
66
|
finishRenderProgress: () => void;
|
|
@@ -114,7 +112,6 @@ export type RenderMediaOptions = Prettify<{
|
|
|
114
112
|
encodingMaxRate?: string | null;
|
|
115
113
|
encodingBufferSize?: string | null;
|
|
116
114
|
disallowParallelEncoding?: boolean;
|
|
117
|
-
audioCodec?: AudioCodec | null;
|
|
118
115
|
serveUrl: string;
|
|
119
116
|
concurrency?: number | string | null;
|
|
120
117
|
colorSpace?: ColorSpace;
|
|
@@ -131,5 +128,5 @@ export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) =
|
|
|
131
128
|
* @description Render a video from a composition
|
|
132
129
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
133
130
|
*/
|
|
134
|
-
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
131
|
+
export declare const renderMedia: ({ proResProfile, x264Preset, crf, composition, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, audioCodec, jpegQuality, concurrency, serveUrl, disallowParallelEncoding, everyNthFrame, imageFormat, numberOfGifLoops, dumpBrowserLogs, preferLossless, verbose, quality, logLevel, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, separateAudioTo, forSeamlessAacConcatenation, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
135
132
|
export {};
|