@remotion/renderer 4.0.45 → 4.0.46
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 +1 -1
- package/dist/audio-codec.js +7 -2
- package/dist/client.d.ts +48 -49
- package/dist/combine-videos.d.ts +1 -0
- package/dist/combine-videos.js +5 -4
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +40 -41
- package/dist/provide-screenshot.d.ts +0 -1
- package/dist/puppeteer-screenshot.d.ts +0 -1
- package/dist/screenshot-dom-element.d.ts +0 -1
- package/dist/screenshot-task.d.ts +0 -1
- package/dist/stitch-frames-to-video.d.ts +0 -1
- package/dist/stitch-frames-to-video.js +4 -4
- package/dist/take-frame-and-compose.d.ts +0 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
- package/dist/options/render-expiry-days.d.ts +0 -8
- package/dist/options/render-expiry-days.js +0 -14
- package/dist/presets-profile.d.ts +0 -7
- package/dist/presets-profile.js +0 -27
package/dist/audio-codec.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const supportedAudioCodecs: {
|
|
|
13
13
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
14
14
|
readonly wav: readonly ["pcm-16"];
|
|
15
15
|
};
|
|
16
|
-
declare const audioCodecNames: readonly ["pcm_s16le", "
|
|
16
|
+
declare const audioCodecNames: readonly ["pcm_s16le", "libfdk_aac", "libmp3lame", "libopus"];
|
|
17
17
|
type FfmpegAudioCodecName = (typeof audioCodecNames)[number];
|
|
18
18
|
export declare const mapAudioCodecToFfmpegAudioCodecName: (audioCodec: AudioCodec) => FfmpegAudioCodecName;
|
|
19
19
|
export declare const defaultAudioCodecs: {
|
package/dist/audio-codec.js
CHANGED
|
@@ -18,10 +18,15 @@ const _satisfies = exports.supportedAudioCodecs;
|
|
|
18
18
|
if (_satisfies) {
|
|
19
19
|
// Just for type checking
|
|
20
20
|
}
|
|
21
|
-
const audioCodecNames = [
|
|
21
|
+
const audioCodecNames = [
|
|
22
|
+
'pcm_s16le',
|
|
23
|
+
'libfdk_aac',
|
|
24
|
+
'libmp3lame',
|
|
25
|
+
'libopus',
|
|
26
|
+
];
|
|
22
27
|
const mapAudioCodecToFfmpegAudioCodecName = (audioCodec) => {
|
|
23
28
|
if (audioCodec === 'aac') {
|
|
24
|
-
return '
|
|
29
|
+
return 'libfdk_aac';
|
|
25
30
|
}
|
|
26
31
|
if (audioCodec === 'mp3') {
|
|
27
32
|
return 'libmp3lame';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const BrowserSafeApis: {
|
|
3
|
-
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;
|
|
4
3
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
5
4
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "
|
|
7
|
-
getValidCrfRanges: (codec: "
|
|
8
|
-
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;
|
|
9
8
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
9
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
10
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
@@ -23,10 +22,10 @@ export declare const BrowserSafeApis: {
|
|
|
23
22
|
readonly wav: readonly ["pcm-16"];
|
|
24
23
|
};
|
|
25
24
|
defaultFileExtensionMap: {
|
|
26
|
-
|
|
25
|
+
aac: {
|
|
27
26
|
default: import("./file-extensions").FileExtension;
|
|
28
27
|
forAudioCodec: {
|
|
29
|
-
|
|
28
|
+
"pcm-16": {
|
|
30
29
|
possible: import("./file-extensions").FileExtension[];
|
|
31
30
|
default: import("./file-extensions").FileExtension;
|
|
32
31
|
};
|
|
@@ -34,72 +33,72 @@ export declare const BrowserSafeApis: {
|
|
|
34
33
|
possible: import("./file-extensions").FileExtension[];
|
|
35
34
|
default: import("./file-extensions").FileExtension;
|
|
36
35
|
};
|
|
37
|
-
"pcm-16": {
|
|
38
|
-
possible: import("./file-extensions").FileExtension[];
|
|
39
|
-
default: import("./file-extensions").FileExtension;
|
|
40
|
-
};
|
|
41
36
|
};
|
|
42
37
|
};
|
|
43
|
-
|
|
38
|
+
mp3: {
|
|
44
39
|
default: import("./file-extensions").FileExtension;
|
|
45
40
|
forAudioCodec: {
|
|
46
|
-
|
|
41
|
+
"pcm-16": {
|
|
47
42
|
possible: import("./file-extensions").FileExtension[];
|
|
48
43
|
default: import("./file-extensions").FileExtension;
|
|
49
44
|
};
|
|
50
|
-
|
|
45
|
+
mp3: {
|
|
51
46
|
possible: import("./file-extensions").FileExtension[];
|
|
52
47
|
default: import("./file-extensions").FileExtension;
|
|
53
48
|
};
|
|
54
49
|
};
|
|
55
50
|
};
|
|
56
|
-
|
|
51
|
+
h264: {
|
|
57
52
|
default: import("./file-extensions").FileExtension;
|
|
58
53
|
forAudioCodec: {
|
|
59
54
|
"pcm-16": {
|
|
60
55
|
possible: import("./file-extensions").FileExtension[];
|
|
61
56
|
default: import("./file-extensions").FileExtension;
|
|
62
57
|
};
|
|
63
|
-
|
|
58
|
+
aac: {
|
|
59
|
+
possible: import("./file-extensions").FileExtension[];
|
|
60
|
+
default: import("./file-extensions").FileExtension;
|
|
61
|
+
};
|
|
62
|
+
mp3: {
|
|
64
63
|
possible: import("./file-extensions").FileExtension[];
|
|
65
64
|
default: import("./file-extensions").FileExtension;
|
|
66
65
|
};
|
|
67
66
|
};
|
|
68
67
|
};
|
|
69
|
-
|
|
68
|
+
h265: {
|
|
70
69
|
default: import("./file-extensions").FileExtension;
|
|
71
70
|
forAudioCodec: {
|
|
72
71
|
"pcm-16": {
|
|
73
72
|
possible: import("./file-extensions").FileExtension[];
|
|
74
73
|
default: import("./file-extensions").FileExtension;
|
|
75
74
|
};
|
|
76
|
-
|
|
75
|
+
aac: {
|
|
77
76
|
possible: import("./file-extensions").FileExtension[];
|
|
78
77
|
default: import("./file-extensions").FileExtension;
|
|
79
78
|
};
|
|
80
79
|
};
|
|
81
80
|
};
|
|
82
|
-
|
|
81
|
+
vp8: {
|
|
83
82
|
default: import("./file-extensions").FileExtension;
|
|
84
83
|
forAudioCodec: {
|
|
85
|
-
|
|
84
|
+
"pcm-16": {
|
|
86
85
|
possible: import("./file-extensions").FileExtension[];
|
|
87
86
|
default: import("./file-extensions").FileExtension;
|
|
88
87
|
};
|
|
89
|
-
|
|
88
|
+
opus: {
|
|
90
89
|
possible: import("./file-extensions").FileExtension[];
|
|
91
90
|
default: import("./file-extensions").FileExtension;
|
|
92
91
|
};
|
|
93
92
|
};
|
|
94
93
|
};
|
|
95
|
-
|
|
94
|
+
vp9: {
|
|
96
95
|
default: import("./file-extensions").FileExtension;
|
|
97
96
|
forAudioCodec: {
|
|
98
|
-
|
|
97
|
+
"pcm-16": {
|
|
99
98
|
possible: import("./file-extensions").FileExtension[];
|
|
100
99
|
default: import("./file-extensions").FileExtension;
|
|
101
100
|
};
|
|
102
|
-
|
|
101
|
+
opus: {
|
|
103
102
|
possible: import("./file-extensions").FileExtension[];
|
|
104
103
|
default: import("./file-extensions").FileExtension;
|
|
105
104
|
};
|
|
@@ -117,11 +116,11 @@ export declare const BrowserSafeApis: {
|
|
|
117
116
|
prores: {
|
|
118
117
|
default: import("./file-extensions").FileExtension;
|
|
119
118
|
forAudioCodec: {
|
|
120
|
-
|
|
119
|
+
"pcm-16": {
|
|
121
120
|
possible: import("./file-extensions").FileExtension[];
|
|
122
121
|
default: import("./file-extensions").FileExtension;
|
|
123
122
|
};
|
|
124
|
-
|
|
123
|
+
aac: {
|
|
125
124
|
possible: import("./file-extensions").FileExtension[];
|
|
126
125
|
default: import("./file-extensions").FileExtension;
|
|
127
126
|
};
|
|
@@ -130,11 +129,11 @@ export declare const BrowserSafeApis: {
|
|
|
130
129
|
"h264-mkv": {
|
|
131
130
|
default: import("./file-extensions").FileExtension;
|
|
132
131
|
forAudioCodec: {
|
|
133
|
-
|
|
132
|
+
"pcm-16": {
|
|
134
133
|
possible: import("./file-extensions").FileExtension[];
|
|
135
134
|
default: import("./file-extensions").FileExtension;
|
|
136
135
|
};
|
|
137
|
-
|
|
136
|
+
mp3: {
|
|
138
137
|
possible: import("./file-extensions").FileExtension[];
|
|
139
138
|
default: import("./file-extensions").FileExtension;
|
|
140
139
|
};
|
|
@@ -146,13 +145,21 @@ export declare const BrowserSafeApis: {
|
|
|
146
145
|
};
|
|
147
146
|
};
|
|
148
147
|
defaultAudioCodecs: {
|
|
148
|
+
aac: {
|
|
149
|
+
compressed: "pcm-16" | "aac" | null;
|
|
150
|
+
lossless: "pcm-16" | "aac" | null;
|
|
151
|
+
};
|
|
152
|
+
mp3: {
|
|
153
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
154
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
155
|
+
};
|
|
149
156
|
h264: {
|
|
150
|
-
compressed: "
|
|
151
|
-
lossless: "
|
|
157
|
+
compressed: "pcm-16" | "aac" | "mp3" | null;
|
|
158
|
+
lossless: "pcm-16" | "aac" | "mp3" | null;
|
|
152
159
|
};
|
|
153
160
|
h265: {
|
|
154
|
-
compressed: "
|
|
155
|
-
lossless: "
|
|
161
|
+
compressed: "pcm-16" | "aac" | null;
|
|
162
|
+
lossless: "pcm-16" | "aac" | null;
|
|
156
163
|
};
|
|
157
164
|
vp8: {
|
|
158
165
|
compressed: "pcm-16" | "opus" | null;
|
|
@@ -162,35 +169,27 @@ export declare const BrowserSafeApis: {
|
|
|
162
169
|
compressed: "pcm-16" | "opus" | null;
|
|
163
170
|
lossless: "pcm-16" | "opus" | null;
|
|
164
171
|
};
|
|
165
|
-
mp3: {
|
|
166
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
167
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
168
|
-
};
|
|
169
|
-
aac: {
|
|
170
|
-
compressed: "aac" | "pcm-16" | null;
|
|
171
|
-
lossless: "aac" | "pcm-16" | null;
|
|
172
|
-
};
|
|
173
172
|
wav: {
|
|
174
173
|
compressed: "pcm-16" | null;
|
|
175
174
|
lossless: "pcm-16" | null;
|
|
176
175
|
};
|
|
177
176
|
prores: {
|
|
178
|
-
compressed: "
|
|
179
|
-
lossless: "
|
|
177
|
+
compressed: "pcm-16" | "aac" | null;
|
|
178
|
+
lossless: "pcm-16" | "aac" | null;
|
|
180
179
|
};
|
|
181
180
|
"h264-mkv": {
|
|
182
|
-
compressed: "
|
|
183
|
-
lossless: "
|
|
181
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
182
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
184
183
|
};
|
|
185
184
|
gif: {
|
|
186
185
|
compressed: null;
|
|
187
186
|
lossless: null;
|
|
188
187
|
};
|
|
189
188
|
};
|
|
190
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
191
|
-
validateOutputFilename: <T_1 extends "
|
|
189
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
190
|
+
validateOutputFilename: <T_1 extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
192
191
|
codec: T_1;
|
|
193
|
-
audioCodec: "
|
|
192
|
+
audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
194
193
|
extension: string;
|
|
195
194
|
preferLossless: boolean;
|
|
196
195
|
}) => void;
|
|
@@ -391,6 +390,6 @@ export declare const BrowserSafeApis: {
|
|
|
391
390
|
type: number | null;
|
|
392
391
|
}];
|
|
393
392
|
};
|
|
394
|
-
codecSupportsCrf: (codec: "
|
|
395
|
-
codecSupportsVideoBitrate: (codec: "
|
|
393
|
+
codecSupportsCrf: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
394
|
+
codecSupportsVideoBitrate: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
396
395
|
};
|
package/dist/combine-videos.d.ts
CHANGED
package/dist/combine-videos.js
CHANGED
|
@@ -12,7 +12,7 @@ const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
|
|
|
12
12
|
const truthy_1 = require("./truthy");
|
|
13
13
|
const combineVideos = async (options) => {
|
|
14
14
|
var _a;
|
|
15
|
-
const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, } = options;
|
|
15
|
+
const { files, filelistDir, output, onProgress, numberOfFrames, codec, fps, numberOfGifLoops, audioCodec, audioBitrate, } = options;
|
|
16
16
|
const fileList = files.map((p) => `file '${p}'`).join('\n');
|
|
17
17
|
const fileListTxt = (0, node_path_1.join)(filelistDir, 'files.txt');
|
|
18
18
|
(0, node_fs_1.writeFileSync)(fileListTxt, fileList);
|
|
@@ -38,9 +38,10 @@ const combineVideos = async (options) => {
|
|
|
38
38
|
resolvedAudioCodec
|
|
39
39
|
? (0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec)
|
|
40
40
|
: null,
|
|
41
|
-
|
|
41
|
+
resolvedAudioCodec === 'aac' ? '-cutoff' : null,
|
|
42
|
+
resolvedAudioCodec === 'aac' ? '18000' : null,
|
|
42
43
|
'-b:a',
|
|
43
|
-
'
|
|
44
|
+
audioBitrate ? audioBitrate : '320k',
|
|
44
45
|
codec === 'h264' ? '-movflags' : null,
|
|
45
46
|
codec === 'h264' ? 'faststart' : null,
|
|
46
47
|
'-y',
|
|
@@ -56,7 +57,7 @@ const combineVideos = async (options) => {
|
|
|
56
57
|
logger_1.Log.verbose(data.toString('utf8'));
|
|
57
58
|
}
|
|
58
59
|
else {
|
|
59
|
-
logger_1.Log.verbose(parsed);
|
|
60
|
+
logger_1.Log.verbose(`Combined ${parsed} frames`);
|
|
60
61
|
onProgress(parsed);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -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,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import execa from 'execa';
|
|
4
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
5
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -60,10 +58,10 @@ export declare const RenderInternals: {
|
|
|
60
58
|
width: number;
|
|
61
59
|
height: number;
|
|
62
60
|
scale: number;
|
|
63
|
-
codec: "
|
|
61
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
64
62
|
wantsImageSequence: boolean;
|
|
65
63
|
}) => void;
|
|
66
|
-
getFileExtensionFromCodec: <T extends "
|
|
64
|
+
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;
|
|
67
65
|
tmpDir: (str: string) => string;
|
|
68
66
|
deleteDirectory: (directory: string) => void;
|
|
69
67
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -113,7 +111,7 @@ export declare const RenderInternals: {
|
|
|
113
111
|
};
|
|
114
112
|
registerErrorSymbolicationLock: () => number;
|
|
115
113
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
116
|
-
canUseParallelEncoding: (codec: "
|
|
114
|
+
canUseParallelEncoding: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
117
115
|
mimeContentType: typeof mimeContentType;
|
|
118
116
|
mimeLookup: typeof mimeLookup;
|
|
119
117
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -124,14 +122,14 @@ export declare const RenderInternals: {
|
|
|
124
122
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
125
123
|
DEFAULT_BROWSER: "chrome";
|
|
126
124
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
127
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
128
|
-
validateOpenGlRenderer: (option: "
|
|
125
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
126
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
129
127
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
130
128
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
131
129
|
validateJpegQuality: (q: number | undefined) => void;
|
|
132
130
|
DEFAULT_TIMEOUT: number;
|
|
133
|
-
DEFAULT_CODEC: "
|
|
134
|
-
isAudioCodec: (codec: "
|
|
131
|
+
DEFAULT_CODEC: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
132
|
+
isAudioCodec: (codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
135
133
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
136
134
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
137
135
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -148,23 +146,24 @@ export declare const RenderInternals: {
|
|
|
148
146
|
output: string;
|
|
149
147
|
onProgress: (p: number) => void;
|
|
150
148
|
numberOfFrames: number;
|
|
151
|
-
codec: "
|
|
149
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
152
150
|
fps: number;
|
|
153
151
|
numberOfGifLoops: number | null;
|
|
154
|
-
audioCodec: "
|
|
152
|
+
audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
153
|
+
audioBitrate: string | null;
|
|
155
154
|
}) => Promise<void>;
|
|
156
155
|
getMinConcurrency: () => number;
|
|
157
156
|
getMaxConcurrency: () => number;
|
|
158
157
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
159
|
-
codec: "
|
|
158
|
+
codec: "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
160
159
|
preferLossless: boolean;
|
|
161
|
-
}) => "
|
|
160
|
+
}) => "pcm-16" | "aac" | "mp3" | "opus" | null;
|
|
162
161
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
163
162
|
defaultFileExtensionMap: {
|
|
164
|
-
|
|
163
|
+
aac: {
|
|
165
164
|
default: import("./file-extensions").FileExtension;
|
|
166
165
|
forAudioCodec: {
|
|
167
|
-
|
|
166
|
+
"pcm-16": {
|
|
168
167
|
possible: import("./file-extensions").FileExtension[];
|
|
169
168
|
default: import("./file-extensions").FileExtension;
|
|
170
169
|
};
|
|
@@ -172,72 +171,72 @@ export declare const RenderInternals: {
|
|
|
172
171
|
possible: import("./file-extensions").FileExtension[];
|
|
173
172
|
default: import("./file-extensions").FileExtension;
|
|
174
173
|
};
|
|
175
|
-
"pcm-16": {
|
|
176
|
-
possible: import("./file-extensions").FileExtension[];
|
|
177
|
-
default: import("./file-extensions").FileExtension;
|
|
178
|
-
};
|
|
179
174
|
};
|
|
180
175
|
};
|
|
181
|
-
|
|
176
|
+
mp3: {
|
|
182
177
|
default: import("./file-extensions").FileExtension;
|
|
183
178
|
forAudioCodec: {
|
|
184
|
-
|
|
179
|
+
"pcm-16": {
|
|
185
180
|
possible: import("./file-extensions").FileExtension[];
|
|
186
181
|
default: import("./file-extensions").FileExtension;
|
|
187
182
|
};
|
|
188
|
-
|
|
183
|
+
mp3: {
|
|
189
184
|
possible: import("./file-extensions").FileExtension[];
|
|
190
185
|
default: import("./file-extensions").FileExtension;
|
|
191
186
|
};
|
|
192
187
|
};
|
|
193
188
|
};
|
|
194
|
-
|
|
189
|
+
h264: {
|
|
195
190
|
default: import("./file-extensions").FileExtension;
|
|
196
191
|
forAudioCodec: {
|
|
197
192
|
"pcm-16": {
|
|
198
193
|
possible: import("./file-extensions").FileExtension[];
|
|
199
194
|
default: import("./file-extensions").FileExtension;
|
|
200
195
|
};
|
|
201
|
-
|
|
196
|
+
aac: {
|
|
197
|
+
possible: import("./file-extensions").FileExtension[];
|
|
198
|
+
default: import("./file-extensions").FileExtension;
|
|
199
|
+
};
|
|
200
|
+
mp3: {
|
|
202
201
|
possible: import("./file-extensions").FileExtension[];
|
|
203
202
|
default: import("./file-extensions").FileExtension;
|
|
204
203
|
};
|
|
205
204
|
};
|
|
206
205
|
};
|
|
207
|
-
|
|
206
|
+
h265: {
|
|
208
207
|
default: import("./file-extensions").FileExtension;
|
|
209
208
|
forAudioCodec: {
|
|
210
209
|
"pcm-16": {
|
|
211
210
|
possible: import("./file-extensions").FileExtension[];
|
|
212
211
|
default: import("./file-extensions").FileExtension;
|
|
213
212
|
};
|
|
214
|
-
|
|
213
|
+
aac: {
|
|
215
214
|
possible: import("./file-extensions").FileExtension[];
|
|
216
215
|
default: import("./file-extensions").FileExtension;
|
|
217
216
|
};
|
|
218
217
|
};
|
|
219
218
|
};
|
|
220
|
-
|
|
219
|
+
vp8: {
|
|
221
220
|
default: import("./file-extensions").FileExtension;
|
|
222
221
|
forAudioCodec: {
|
|
223
|
-
|
|
222
|
+
"pcm-16": {
|
|
224
223
|
possible: import("./file-extensions").FileExtension[];
|
|
225
224
|
default: import("./file-extensions").FileExtension;
|
|
226
225
|
};
|
|
227
|
-
|
|
226
|
+
opus: {
|
|
228
227
|
possible: import("./file-extensions").FileExtension[];
|
|
229
228
|
default: import("./file-extensions").FileExtension;
|
|
230
229
|
};
|
|
231
230
|
};
|
|
232
231
|
};
|
|
233
|
-
|
|
232
|
+
vp9: {
|
|
234
233
|
default: import("./file-extensions").FileExtension;
|
|
235
234
|
forAudioCodec: {
|
|
236
|
-
|
|
235
|
+
"pcm-16": {
|
|
237
236
|
possible: import("./file-extensions").FileExtension[];
|
|
238
237
|
default: import("./file-extensions").FileExtension;
|
|
239
238
|
};
|
|
240
|
-
|
|
239
|
+
opus: {
|
|
241
240
|
possible: import("./file-extensions").FileExtension[];
|
|
242
241
|
default: import("./file-extensions").FileExtension;
|
|
243
242
|
};
|
|
@@ -255,11 +254,11 @@ export declare const RenderInternals: {
|
|
|
255
254
|
prores: {
|
|
256
255
|
default: import("./file-extensions").FileExtension;
|
|
257
256
|
forAudioCodec: {
|
|
258
|
-
|
|
257
|
+
"pcm-16": {
|
|
259
258
|
possible: import("./file-extensions").FileExtension[];
|
|
260
259
|
default: import("./file-extensions").FileExtension;
|
|
261
260
|
};
|
|
262
|
-
|
|
261
|
+
aac: {
|
|
263
262
|
possible: import("./file-extensions").FileExtension[];
|
|
264
263
|
default: import("./file-extensions").FileExtension;
|
|
265
264
|
};
|
|
@@ -268,11 +267,11 @@ export declare const RenderInternals: {
|
|
|
268
267
|
"h264-mkv": {
|
|
269
268
|
default: import("./file-extensions").FileExtension;
|
|
270
269
|
forAudioCodec: {
|
|
271
|
-
|
|
270
|
+
"pcm-16": {
|
|
272
271
|
possible: import("./file-extensions").FileExtension[];
|
|
273
272
|
default: import("./file-extensions").FileExtension;
|
|
274
273
|
};
|
|
275
|
-
|
|
274
|
+
mp3: {
|
|
276
275
|
possible: import("./file-extensions").FileExtension[];
|
|
277
276
|
default: import("./file-extensions").FileExtension;
|
|
278
277
|
};
|
|
@@ -295,8 +294,8 @@ export declare const RenderInternals: {
|
|
|
295
294
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
296
295
|
readonly wav: readonly ["pcm-16"];
|
|
297
296
|
};
|
|
298
|
-
makeFileExtensionMap: () => Record<string, ("
|
|
299
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "
|
|
297
|
+
makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
298
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
300
299
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
301
300
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
302
301
|
dynamicLibraryPathOptions: () => {
|
|
@@ -313,8 +312,8 @@ export declare const RenderInternals: {
|
|
|
313
312
|
};
|
|
314
313
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
315
314
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
316
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
317
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
315
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
316
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
318
317
|
DEFAULT_JPEG_QUALITY: number;
|
|
319
318
|
chalk: {
|
|
320
319
|
enabled: () => boolean;
|
|
@@ -427,7 +426,7 @@ export declare const RenderInternals: {
|
|
|
427
426
|
frame: number;
|
|
428
427
|
serializedInputPropsWithCustomSchema: string;
|
|
429
428
|
serializedResolvedPropsWithCustomSchema: string;
|
|
430
|
-
imageFormat: "
|
|
429
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
431
430
|
jpegQuality: number;
|
|
432
431
|
puppeteerInstance: HeadlessBrowser | null;
|
|
433
432
|
envVariables: Record<string, string>;
|
|
@@ -193,9 +193,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
193
193
|
audio,
|
|
194
194
|
'-c:a',
|
|
195
195
|
(0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec),
|
|
196
|
-
// Set bitrate up to 320k, for aac it might effectively be lower
|
|
197
196
|
'-b:a',
|
|
198
|
-
audioBitrate
|
|
197
|
+
audioBitrate ? audioBitrate : '320k',
|
|
199
198
|
force ? '-y' : null,
|
|
200
199
|
outputLocation !== null && outputLocation !== void 0 ? outputLocation : tempFile,
|
|
201
200
|
].filter(remotion_1.Internals.truthy));
|
|
@@ -254,8 +253,9 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
254
253
|
resolvedAudioCodec
|
|
255
254
|
? ['-c:a', (0, audio_codec_1.mapAudioCodecToFfmpegAudioCodecName)(resolvedAudioCodec)]
|
|
256
255
|
: null,
|
|
257
|
-
|
|
258
|
-
resolvedAudioCodec
|
|
256
|
+
resolvedAudioCodec ? ['-b:a', audioBitrate || '320k'] : null,
|
|
257
|
+
resolvedAudioCodec === 'aac' ? '-cutoff' : null,
|
|
258
|
+
resolvedAudioCodec === 'aac' ? '18000' : null,
|
|
259
259
|
// Ignore metadata that may come from remote media
|
|
260
260
|
['-map_metadata', '-1'],
|
|
261
261
|
[
|
|
@@ -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.46",
|
|
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.46"
|
|
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-linux-arm64-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.46",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.46",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.46",
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.46",
|
|
47
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.46",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.46",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.46"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAfterOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.deleteAfterOption = {
|
|
6
|
-
name: 'Render expiry days',
|
|
7
|
-
cliFlag: 'delete-after',
|
|
8
|
-
description: () => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
|
|
10
|
-
},
|
|
11
|
-
ssrName: 'deleteAfter',
|
|
12
|
-
docLink: 'https://www.remotion.dev/docs/autodelete',
|
|
13
|
-
type: 0,
|
|
14
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Codec } from './codec';
|
|
2
|
-
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
-
export type x264Preset = typeof x264PresetOptions[number];
|
|
4
|
-
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
-
codec: Codec;
|
|
6
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
7
|
-
}) => void;
|
package/dist/presets-profile.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
-
exports.x264PresetOptions = [
|
|
5
|
-
'ultrafast',
|
|
6
|
-
'superfast',
|
|
7
|
-
'veryfast',
|
|
8
|
-
'faster',
|
|
9
|
-
'fast',
|
|
10
|
-
'medium',
|
|
11
|
-
'slow',
|
|
12
|
-
'slower',
|
|
13
|
-
'veryslow',
|
|
14
|
-
'placebo',
|
|
15
|
-
];
|
|
16
|
-
const validateSelectedCodecAndPresetCombination = ({ codec, x264Preset, }) => {
|
|
17
|
-
if (typeof x264Preset !== 'undefined' && codec !== 'h264') {
|
|
18
|
-
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
-
}
|
|
20
|
-
if (x264Preset !== undefined &&
|
|
21
|
-
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
22
|
-
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
23
|
-
.map((p) => `"${p}"`)
|
|
24
|
-
.join(', ')}`);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|