@remotion/renderer 4.0.87 → 4.0.89
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 +55 -39
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +27 -27
- package/dist/logger.js +6 -0
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/index.d.ts +9 -1
- package/dist/options/index.js +2 -0
- package/dist/options/options-map.d.ts +8 -0
- package/dist/options/options-map.js +2 -0
- package/dist/options/repro.d.ts +9 -0
- package/dist/options/repro.js +12 -0
- package/dist/pixel-format.d.ts +1 -1
- package/dist/pure.d.ts +3 -3
- package/dist/render-media.d.ts +3 -1
- package/dist/render-media.js +30 -3
- package/dist/repro.d.ts +25 -0
- package/dist/repro.js +174 -0
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
- package/dist/does-have-m2-bug.d.ts +0 -3
- package/dist/does-have-m2-bug.js +0 -12
package/dist/client.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export { AvailableOptions } from './options';
|
|
3
3
|
export declare const BrowserSafeApis: {
|
|
4
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
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
5
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
6
6
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
7
|
-
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
9
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
|
|
8
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
|
|
9
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
10
10
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
11
11
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
12
12
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
13
13
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
14
|
-
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
14
|
+
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
15
15
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
16
16
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
17
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
17
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
18
18
|
DEFAULT_TIMEOUT: number;
|
|
19
19
|
supportedAudioCodecs: {
|
|
20
20
|
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
@@ -32,11 +32,11 @@ export declare const BrowserSafeApis: {
|
|
|
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
|
};
|
|
39
|
-
|
|
39
|
+
aac: {
|
|
40
40
|
possible: import("./file-extensions").FileExtension[];
|
|
41
41
|
default: import("./file-extensions").FileExtension;
|
|
42
42
|
};
|
|
@@ -62,11 +62,11 @@ export declare const BrowserSafeApis: {
|
|
|
62
62
|
vp8: {
|
|
63
63
|
default: import("./file-extensions").FileExtension;
|
|
64
64
|
forAudioCodec: {
|
|
65
|
-
|
|
65
|
+
"pcm-16": {
|
|
66
66
|
possible: import("./file-extensions").FileExtension[];
|
|
67
67
|
default: import("./file-extensions").FileExtension;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
opus: {
|
|
70
70
|
possible: import("./file-extensions").FileExtension[];
|
|
71
71
|
default: import("./file-extensions").FileExtension;
|
|
72
72
|
};
|
|
@@ -75,20 +75,20 @@ export declare const BrowserSafeApis: {
|
|
|
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
|
};
|
|
@@ -111,22 +111,22 @@ export declare const BrowserSafeApis: {
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
wav: {
|
|
115
115
|
default: import("./file-extensions").FileExtension;
|
|
116
116
|
forAudioCodec: {
|
|
117
|
-
mp3: {
|
|
118
|
-
possible: import("./file-extensions").FileExtension[];
|
|
119
|
-
default: import("./file-extensions").FileExtension;
|
|
120
|
-
};
|
|
121
117
|
"pcm-16": {
|
|
122
118
|
possible: import("./file-extensions").FileExtension[];
|
|
123
119
|
default: import("./file-extensions").FileExtension;
|
|
124
120
|
};
|
|
125
121
|
};
|
|
126
122
|
};
|
|
127
|
-
|
|
123
|
+
prores: {
|
|
128
124
|
default: import("./file-extensions").FileExtension;
|
|
129
125
|
forAudioCodec: {
|
|
126
|
+
aac: {
|
|
127
|
+
possible: import("./file-extensions").FileExtension[];
|
|
128
|
+
default: import("./file-extensions").FileExtension;
|
|
129
|
+
};
|
|
130
130
|
"pcm-16": {
|
|
131
131
|
possible: import("./file-extensions").FileExtension[];
|
|
132
132
|
default: import("./file-extensions").FileExtension;
|
|
@@ -153,37 +153,37 @@ export declare const BrowserSafeApis: {
|
|
|
153
153
|
};
|
|
154
154
|
defaultAudioCodecs: {
|
|
155
155
|
h264: {
|
|
156
|
-
compressed: "
|
|
157
|
-
lossless: "
|
|
156
|
+
compressed: "mp3" | "aac" | "pcm-16" | null;
|
|
157
|
+
lossless: "mp3" | "aac" | "pcm-16" | null;
|
|
158
158
|
};
|
|
159
159
|
h265: {
|
|
160
160
|
compressed: "aac" | "pcm-16" | null;
|
|
161
161
|
lossless: "aac" | "pcm-16" | null;
|
|
162
162
|
};
|
|
163
163
|
vp8: {
|
|
164
|
-
compressed: "
|
|
165
|
-
lossless: "
|
|
164
|
+
compressed: "pcm-16" | "opus" | null;
|
|
165
|
+
lossless: "pcm-16" | "opus" | null;
|
|
166
166
|
};
|
|
167
167
|
vp9: {
|
|
168
|
-
compressed: "
|
|
169
|
-
lossless: "
|
|
168
|
+
compressed: "pcm-16" | "opus" | null;
|
|
169
|
+
lossless: "pcm-16" | "opus" | null;
|
|
170
170
|
};
|
|
171
|
-
|
|
172
|
-
compressed: "
|
|
173
|
-
lossless: "
|
|
171
|
+
mp3: {
|
|
172
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
173
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
174
174
|
};
|
|
175
175
|
aac: {
|
|
176
176
|
compressed: "aac" | "pcm-16" | null;
|
|
177
177
|
lossless: "aac" | "pcm-16" | null;
|
|
178
178
|
};
|
|
179
|
-
mp3: {
|
|
180
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
181
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
182
|
-
};
|
|
183
179
|
wav: {
|
|
184
180
|
compressed: "pcm-16" | null;
|
|
185
181
|
lossless: "pcm-16" | null;
|
|
186
182
|
};
|
|
183
|
+
prores: {
|
|
184
|
+
compressed: "aac" | "pcm-16" | null;
|
|
185
|
+
lossless: "aac" | "pcm-16" | null;
|
|
186
|
+
};
|
|
187
187
|
"h264-mkv": {
|
|
188
188
|
compressed: "mp3" | "pcm-16" | null;
|
|
189
189
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -193,10 +193,10 @@ export declare const BrowserSafeApis: {
|
|
|
193
193
|
lossless: null;
|
|
194
194
|
};
|
|
195
195
|
};
|
|
196
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
197
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
196
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
197
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
198
198
|
codec: T_1;
|
|
199
|
-
audioCodec: "
|
|
199
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
200
200
|
extension: string;
|
|
201
201
|
preferLossless: boolean;
|
|
202
202
|
}) => void;
|
|
@@ -287,7 +287,7 @@ export declare const BrowserSafeApis: {
|
|
|
287
287
|
description: () => JSX.Element;
|
|
288
288
|
docLink: string;
|
|
289
289
|
ssrName: string;
|
|
290
|
-
type: "
|
|
290
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
291
291
|
};
|
|
292
292
|
deleteAfterOption: {
|
|
293
293
|
name: string;
|
|
@@ -361,6 +361,14 @@ export declare const BrowserSafeApis: {
|
|
|
361
361
|
docLink: string;
|
|
362
362
|
type: number | null;
|
|
363
363
|
};
|
|
364
|
+
reproOption: {
|
|
365
|
+
name: string;
|
|
366
|
+
cliFlag: string;
|
|
367
|
+
description: () => JSX.Element;
|
|
368
|
+
ssrName: string;
|
|
369
|
+
docLink: string;
|
|
370
|
+
type: boolean;
|
|
371
|
+
};
|
|
364
372
|
};
|
|
365
373
|
validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
|
|
366
374
|
optionsMap: {
|
|
@@ -389,6 +397,14 @@ export declare const BrowserSafeApis: {
|
|
|
389
397
|
docLink: string;
|
|
390
398
|
type: number | null;
|
|
391
399
|
};
|
|
400
|
+
readonly repro: {
|
|
401
|
+
name: string;
|
|
402
|
+
cliFlag: string;
|
|
403
|
+
description: () => JSX.Element;
|
|
404
|
+
ssrName: string;
|
|
405
|
+
docLink: string;
|
|
406
|
+
type: boolean;
|
|
407
|
+
};
|
|
392
408
|
};
|
|
393
409
|
readonly renderStill: {
|
|
394
410
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -505,7 +521,7 @@ export declare const BrowserSafeApis: {
|
|
|
505
521
|
};
|
|
506
522
|
};
|
|
507
523
|
};
|
|
508
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
509
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
524
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
525
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
510
526
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
511
527
|
};
|
|
@@ -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 "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/index.d.ts
CHANGED
|
@@ -67,10 +67,10 @@ export declare const RenderInternals: {
|
|
|
67
67
|
width: number;
|
|
68
68
|
height: number;
|
|
69
69
|
scale: number;
|
|
70
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
70
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
71
71
|
wantsImageSequence: boolean;
|
|
72
72
|
}) => void;
|
|
73
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
73
|
+
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;
|
|
74
74
|
tmpDir: (str: string) => string;
|
|
75
75
|
deleteDirectory: (directory: string) => void;
|
|
76
76
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -127,7 +127,7 @@ export declare const RenderInternals: {
|
|
|
127
127
|
};
|
|
128
128
|
registerErrorSymbolicationLock: () => number;
|
|
129
129
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
130
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
130
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
|
|
131
131
|
mimeContentType: typeof mimeContentType;
|
|
132
132
|
mimeLookup: typeof mimeLookup;
|
|
133
133
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -141,11 +141,11 @@ export declare const RenderInternals: {
|
|
|
141
141
|
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
142
142
|
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
143
143
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
144
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
144
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
145
145
|
validateJpegQuality: (q: number | undefined) => void;
|
|
146
146
|
DEFAULT_TIMEOUT: number;
|
|
147
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
148
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
147
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
148
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
149
149
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
150
150
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
151
151
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -162,10 +162,10 @@ export declare const RenderInternals: {
|
|
|
162
162
|
output: string;
|
|
163
163
|
onProgress: (p: number) => void;
|
|
164
164
|
numberOfFrames: number;
|
|
165
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
165
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
166
166
|
fps: number;
|
|
167
167
|
numberOfGifLoops: number | null;
|
|
168
|
-
audioCodec: "
|
|
168
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
169
169
|
audioBitrate: string | null;
|
|
170
170
|
indent: boolean;
|
|
171
171
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -173,19 +173,19 @@ export declare const RenderInternals: {
|
|
|
173
173
|
getMinConcurrency: () => number;
|
|
174
174
|
getMaxConcurrency: () => number;
|
|
175
175
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
176
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
176
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
177
177
|
preferLossless: boolean;
|
|
178
|
-
}) => "
|
|
178
|
+
}) => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
179
179
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
180
180
|
defaultFileExtensionMap: {
|
|
181
181
|
h264: {
|
|
182
182
|
default: import("./file-extensions").FileExtension;
|
|
183
183
|
forAudioCodec: {
|
|
184
|
-
|
|
184
|
+
mp3: {
|
|
185
185
|
possible: import("./file-extensions").FileExtension[];
|
|
186
186
|
default: import("./file-extensions").FileExtension;
|
|
187
187
|
};
|
|
188
|
-
|
|
188
|
+
aac: {
|
|
189
189
|
possible: import("./file-extensions").FileExtension[];
|
|
190
190
|
default: import("./file-extensions").FileExtension;
|
|
191
191
|
};
|
|
@@ -211,11 +211,11 @@ export declare const RenderInternals: {
|
|
|
211
211
|
vp8: {
|
|
212
212
|
default: import("./file-extensions").FileExtension;
|
|
213
213
|
forAudioCodec: {
|
|
214
|
-
|
|
214
|
+
"pcm-16": {
|
|
215
215
|
possible: import("./file-extensions").FileExtension[];
|
|
216
216
|
default: import("./file-extensions").FileExtension;
|
|
217
217
|
};
|
|
218
|
-
|
|
218
|
+
opus: {
|
|
219
219
|
possible: import("./file-extensions").FileExtension[];
|
|
220
220
|
default: import("./file-extensions").FileExtension;
|
|
221
221
|
};
|
|
@@ -224,20 +224,20 @@ export declare const RenderInternals: {
|
|
|
224
224
|
vp9: {
|
|
225
225
|
default: import("./file-extensions").FileExtension;
|
|
226
226
|
forAudioCodec: {
|
|
227
|
-
|
|
227
|
+
"pcm-16": {
|
|
228
228
|
possible: import("./file-extensions").FileExtension[];
|
|
229
229
|
default: import("./file-extensions").FileExtension;
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
opus: {
|
|
232
232
|
possible: import("./file-extensions").FileExtension[];
|
|
233
233
|
default: import("./file-extensions").FileExtension;
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
236
|
};
|
|
237
|
-
|
|
237
|
+
mp3: {
|
|
238
238
|
default: import("./file-extensions").FileExtension;
|
|
239
239
|
forAudioCodec: {
|
|
240
|
-
|
|
240
|
+
mp3: {
|
|
241
241
|
possible: import("./file-extensions").FileExtension[];
|
|
242
242
|
default: import("./file-extensions").FileExtension;
|
|
243
243
|
};
|
|
@@ -260,22 +260,22 @@ export declare const RenderInternals: {
|
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
262
|
};
|
|
263
|
-
|
|
263
|
+
wav: {
|
|
264
264
|
default: import("./file-extensions").FileExtension;
|
|
265
265
|
forAudioCodec: {
|
|
266
|
-
mp3: {
|
|
267
|
-
possible: import("./file-extensions").FileExtension[];
|
|
268
|
-
default: import("./file-extensions").FileExtension;
|
|
269
|
-
};
|
|
270
266
|
"pcm-16": {
|
|
271
267
|
possible: import("./file-extensions").FileExtension[];
|
|
272
268
|
default: import("./file-extensions").FileExtension;
|
|
273
269
|
};
|
|
274
270
|
};
|
|
275
271
|
};
|
|
276
|
-
|
|
272
|
+
prores: {
|
|
277
273
|
default: import("./file-extensions").FileExtension;
|
|
278
274
|
forAudioCodec: {
|
|
275
|
+
aac: {
|
|
276
|
+
possible: import("./file-extensions").FileExtension[];
|
|
277
|
+
default: import("./file-extensions").FileExtension;
|
|
278
|
+
};
|
|
279
279
|
"pcm-16": {
|
|
280
280
|
possible: import("./file-extensions").FileExtension[];
|
|
281
281
|
default: import("./file-extensions").FileExtension;
|
|
@@ -312,8 +312,8 @@ export declare const RenderInternals: {
|
|
|
312
312
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
313
313
|
readonly wav: readonly ["pcm-16"];
|
|
314
314
|
};
|
|
315
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
316
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
315
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
316
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
|
|
317
317
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
318
318
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
319
319
|
dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
@@ -331,7 +331,7 @@ export declare const RenderInternals: {
|
|
|
331
331
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
332
332
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
333
333
|
DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
|
|
334
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
334
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
|
|
335
335
|
DEFAULT_JPEG_QUALITY: number;
|
|
336
336
|
chalk: {
|
|
337
337
|
enabled: () => boolean;
|
package/dist/logger.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.setLogLevel = exports.getLogLevel = exports.Log = exports.secondverboseT
|
|
|
4
4
|
const chalk_1 = require("./chalk");
|
|
5
5
|
const is_color_supported_1 = require("./chalk/is-color-supported");
|
|
6
6
|
const log_level_1 = require("./log-level");
|
|
7
|
+
const repro_1 = require("./repro");
|
|
7
8
|
const truthy_1 = require("./truthy");
|
|
8
9
|
exports.INDENT_TOKEN = chalk_1.chalk.gray('│');
|
|
9
10
|
const verboseTag = (str) => {
|
|
@@ -16,6 +17,7 @@ const secondverboseTag = (str) => {
|
|
|
16
17
|
exports.secondverboseTag = secondverboseTag;
|
|
17
18
|
exports.Log = {
|
|
18
19
|
verbose: (options, ...args) => {
|
|
20
|
+
(0, repro_1.writeInRepro)('verbose', ...args);
|
|
19
21
|
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'verbose')) {
|
|
20
22
|
return console.log(...[
|
|
21
23
|
options.indent ? exports.INDENT_TOKEN : null,
|
|
@@ -29,9 +31,11 @@ exports.Log = {
|
|
|
29
31
|
exports.Log.infoAdvanced({ indent: false, logLevel: (0, exports.getLogLevel)() }, ...args);
|
|
30
32
|
},
|
|
31
33
|
infoAdvanced: (options, ...args) => {
|
|
34
|
+
(0, repro_1.writeInRepro)('info', ...args);
|
|
32
35
|
return console.log(...[options.indent ? exports.INDENT_TOKEN : null].filter(truthy_1.truthy).concat(args));
|
|
33
36
|
},
|
|
34
37
|
warn: (options, ...args) => {
|
|
38
|
+
(0, repro_1.writeInRepro)('warn', ...args);
|
|
35
39
|
if ((0, log_level_1.isEqualOrBelowLogLevel)(options.logLevel, 'warn')) {
|
|
36
40
|
return console.warn(...[options.indent ? chalk_1.chalk.yellow(exports.INDENT_TOKEN) : null]
|
|
37
41
|
.filter(truthy_1.truthy)
|
|
@@ -39,11 +43,13 @@ exports.Log = {
|
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
error: (...args) => {
|
|
46
|
+
(0, repro_1.writeInRepro)('error', ...args);
|
|
42
47
|
if ((0, log_level_1.isEqualOrBelowLogLevel)((0, exports.getLogLevel)(), 'error')) {
|
|
43
48
|
return console.error(...args.map((a) => chalk_1.chalk.red(a)));
|
|
44
49
|
}
|
|
45
50
|
},
|
|
46
51
|
errorAdvanced: (options, ...args) => {
|
|
52
|
+
(0, repro_1.writeInRepro)('error', ...args);
|
|
47
53
|
if ((0, log_level_1.isEqualOrBelowLogLevel)((0, exports.getLogLevel)(), 'error')) {
|
|
48
54
|
return console.log(...[
|
|
49
55
|
options.indent ? exports.INDENT_TOKEN : null,
|
|
@@ -7,6 +7,6 @@ export declare const colorSpaceOption: {
|
|
|
7
7
|
description: () => JSX.Element;
|
|
8
8
|
docLink: string;
|
|
9
9
|
ssrName: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
11
11
|
};
|
|
12
12
|
export declare const validateColorSpace: (option: unknown) => void;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export declare const allOptions: {
|
|
|
86
86
|
description: () => JSX.Element;
|
|
87
87
|
docLink: string;
|
|
88
88
|
ssrName: string;
|
|
89
|
-
type: "
|
|
89
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
90
90
|
};
|
|
91
91
|
deleteAfterOption: {
|
|
92
92
|
name: string;
|
|
@@ -160,5 +160,13 @@ export declare const allOptions: {
|
|
|
160
160
|
docLink: string;
|
|
161
161
|
type: number | null;
|
|
162
162
|
};
|
|
163
|
+
reproOption: {
|
|
164
|
+
name: string;
|
|
165
|
+
cliFlag: string;
|
|
166
|
+
description: () => JSX.Element;
|
|
167
|
+
ssrName: string;
|
|
168
|
+
docLink: string;
|
|
169
|
+
type: boolean;
|
|
170
|
+
};
|
|
163
171
|
};
|
|
164
172
|
export type AvailableOptions = keyof typeof allOptions;
|
package/dist/options/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const jpeg_quality_1 = require("./jpeg-quality");
|
|
|
17
17
|
const mute_1 = require("./mute");
|
|
18
18
|
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
19
19
|
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
20
|
+
const repro_1 = require("./repro");
|
|
20
21
|
const scale_1 = require("./scale");
|
|
21
22
|
const video_bitrate_1 = require("./video-bitrate");
|
|
22
23
|
const video_codec_1 = require("./video-codec");
|
|
@@ -42,4 +43,5 @@ exports.allOptions = {
|
|
|
42
43
|
encodingBufferSizeOption: encoding_buffer_size_1.encodingBufferSizeOption,
|
|
43
44
|
beepOnFinishOption: beep_on_finish_1.beepOnFinishOption,
|
|
44
45
|
numberOfGifLoopsOption: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
46
|
+
reproOption: repro_1.reproOption,
|
|
45
47
|
};
|
|
@@ -25,6 +25,14 @@ export declare const optionsMap: {
|
|
|
25
25
|
docLink: string;
|
|
26
26
|
type: number | null;
|
|
27
27
|
};
|
|
28
|
+
readonly repro: {
|
|
29
|
+
name: string;
|
|
30
|
+
cliFlag: string;
|
|
31
|
+
description: () => JSX.Element;
|
|
32
|
+
ssrName: string;
|
|
33
|
+
docLink: string;
|
|
34
|
+
type: boolean;
|
|
35
|
+
};
|
|
28
36
|
};
|
|
29
37
|
readonly renderStill: {
|
|
30
38
|
readonly offthreadVideoCacheSizeInBytes: {
|
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.optionsMap = void 0;
|
|
4
4
|
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
5
5
|
const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
|
|
6
|
+
const repro_1 = require("./repro");
|
|
6
7
|
const video_bitrate_1 = require("./video-bitrate");
|
|
7
8
|
exports.optionsMap = {
|
|
8
9
|
renderMedia: {
|
|
9
10
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
10
11
|
videoBitrate: video_bitrate_1.videoBitrate,
|
|
11
12
|
numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
|
|
13
|
+
repro: repro_1.reproOption,
|
|
12
14
|
},
|
|
13
15
|
renderStill: {
|
|
14
16
|
offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reproOption = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
exports.reproOption = {
|
|
6
|
+
name: 'Create reproduction',
|
|
7
|
+
cliFlag: 'repro',
|
|
8
|
+
description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Create a ZIP that you can submit to Remotion if asked for a reproduction." })),
|
|
9
|
+
ssrName: 'repro',
|
|
10
|
+
docLink: 'https://www.remotion.dev/docs/render-media#repro',
|
|
11
|
+
type: false,
|
|
12
|
+
};
|
package/dist/pixel-format.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { Codec } from './codec';
|
|
|
2
2
|
export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
3
3
|
export type PixelFormat = (typeof validPixelFormats)[number];
|
|
4
4
|
export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
|
|
5
|
-
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "
|
|
5
|
+
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
6
6
|
export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
|
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 "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
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, audioCodec, extension, preferLossless, }: {
|
|
6
6
|
codec: T_1;
|
|
7
|
-
audioCodec: "
|
|
7
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
8
8
|
extension: string;
|
|
9
9
|
preferLossless: boolean;
|
|
10
10
|
}) => void;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ export type InternalRenderMediaOptions = {
|
|
|
78
78
|
serveUrl: string;
|
|
79
79
|
concurrency: number | string | null;
|
|
80
80
|
colorSpace: ColorSpace;
|
|
81
|
+
finishRenderProgress: () => void;
|
|
81
82
|
} & MoreRenderMediaOptions;
|
|
82
83
|
type Prettify<T> = {
|
|
83
84
|
[K in keyof T]: T[K];
|
|
@@ -133,6 +134,7 @@ export type RenderMediaOptions = Prettify<{
|
|
|
133
134
|
concurrency?: number | string | null;
|
|
134
135
|
logLevel?: LogLevel;
|
|
135
136
|
colorSpace?: ColorSpace;
|
|
137
|
+
repro?: boolean;
|
|
136
138
|
}> & Partial<MoreRenderMediaOptions>;
|
|
137
139
|
type RenderMediaResult = {
|
|
138
140
|
buffer: Buffer | null;
|
|
@@ -144,5 +146,5 @@ export declare const internalRenderMedia: (args_0: InternalRenderMediaOptions) =
|
|
|
144
146
|
* @description Render a video from a composition
|
|
145
147
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
146
148
|
*/
|
|
147
|
-
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, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
149
|
+
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, }: RenderMediaOptions) => Promise<RenderMediaResult>;
|
|
148
150
|
export {};
|
package/dist/render-media.js
CHANGED
|
@@ -34,6 +34,7 @@ const prespawn_ffmpeg_1 = require("./prespawn-ffmpeg");
|
|
|
34
34
|
const prestitcher_memory_usage_1 = require("./prestitcher-memory-usage");
|
|
35
35
|
const prores_profile_1 = require("./prores-profile");
|
|
36
36
|
const render_frames_1 = require("./render-frames");
|
|
37
|
+
const repro_1 = require("./repro");
|
|
37
38
|
const stitch_frames_to_video_1 = require("./stitch-frames-to-video");
|
|
38
39
|
const validate_1 = require("./validate");
|
|
39
40
|
const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
|
|
@@ -46,7 +47,18 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
|
46
47
|
const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
|
|
47
48
|
const x264_preset_1 = require("./x264-preset");
|
|
48
49
|
const SLOWEST_FRAME_COUNT = 10;
|
|
49
|
-
const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, 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, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
50
|
+
const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, serializedInputPropsWithCustomSchema, 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, concurrency, disallowParallelEncoding, everyNthFrame, imageFormat: provisionalImageFormat, indent, jpegQuality, numberOfGifLoops, onCtrlCExit, preferLossless, serveUrl, server: reusedServer, logLevel, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, colorSpace, repro, finishRenderProgress, }) => {
|
|
51
|
+
if (repro) {
|
|
52
|
+
(0, repro_1.enableRepro)({
|
|
53
|
+
serveUrl,
|
|
54
|
+
compositionName: composition.id,
|
|
55
|
+
serializedInputPropsWithCustomSchema,
|
|
56
|
+
serializedResolvedPropsWithCustomSchema,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
(0, repro_1.disableRepro)();
|
|
61
|
+
}
|
|
50
62
|
(0, jpeg_quality_1.validateJpegQuality)(jpegQuality);
|
|
51
63
|
(0, crf_1.validateQualitySettings)({
|
|
52
64
|
crf,
|
|
@@ -395,7 +407,20 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
|
|
|
395
407
|
buffer,
|
|
396
408
|
slowestFrames,
|
|
397
409
|
};
|
|
398
|
-
|
|
410
|
+
finishRenderProgress();
|
|
411
|
+
if ((0, repro_1.isReproEnabled)()) {
|
|
412
|
+
(0, repro_1.getReproWriter)()
|
|
413
|
+
.onRenderSucceed({ indent, logLevel, output: absoluteOutputLocation })
|
|
414
|
+
.then(() => {
|
|
415
|
+
resolve(result);
|
|
416
|
+
})
|
|
417
|
+
.catch((err) => {
|
|
418
|
+
logger_1.Log.errorAdvanced({ indent, logLevel }, 'Could not create reproduction', err);
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
resolve(result);
|
|
423
|
+
}
|
|
399
424
|
})
|
|
400
425
|
.catch((err) => {
|
|
401
426
|
/**
|
|
@@ -447,7 +472,7 @@ exports.internalRenderMedia = (0, wrap_with_error_handling_1.wrapWithErrorHandli
|
|
|
447
472
|
* @description Render a video from a composition
|
|
448
473
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
449
474
|
*/
|
|
450
|
-
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, }) => {
|
|
475
|
+
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, }) => {
|
|
451
476
|
var _a, _b;
|
|
452
477
|
if (quality !== undefined) {
|
|
453
478
|
console.warn(`The "quality" option has been renamed. Please use "jpegQuality" instead.`);
|
|
@@ -506,6 +531,8 @@ const renderMedia = ({ proResProfile, x264Preset, crf, composition, inputProps,
|
|
|
506
531
|
}).serializedString,
|
|
507
532
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
508
533
|
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
|
|
534
|
+
repro: repro !== null && repro !== void 0 ? repro : false,
|
|
535
|
+
finishRenderProgress: () => undefined,
|
|
509
536
|
});
|
|
510
537
|
};
|
|
511
538
|
exports.renderMedia = renderMedia;
|
package/dist/repro.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LogLevel } from './log-level';
|
|
2
|
+
type ReproWriter = {
|
|
3
|
+
start: (options: {
|
|
4
|
+
serveUrl: string;
|
|
5
|
+
serializedInputPropsWithCustomSchema: string;
|
|
6
|
+
serializedResolvedPropsWithCustomSchema: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
writeLine: (level: string, ...args: Parameters<typeof console.log>[]) => void;
|
|
9
|
+
onRenderSucceed: (options: {
|
|
10
|
+
output: string | null;
|
|
11
|
+
logLevel: LogLevel;
|
|
12
|
+
indent: boolean;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
export declare const getReproWriter: () => ReproWriter;
|
|
16
|
+
export declare const writeInRepro: (level: string, message?: any, ...optionalParams: any[]) => void;
|
|
17
|
+
export declare const enableRepro: ({ serveUrl, compositionName, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, }: {
|
|
18
|
+
serveUrl: string;
|
|
19
|
+
compositionName: string;
|
|
20
|
+
serializedInputPropsWithCustomSchema: string;
|
|
21
|
+
serializedResolvedPropsWithCustomSchema: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
export declare const disableRepro: () => void;
|
|
24
|
+
export declare const isReproEnabled: () => boolean;
|
|
25
|
+
export {};
|
package/dist/repro.js
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.isReproEnabled = exports.disableRepro = exports.enableRepro = exports.writeInRepro = exports.getReproWriter = void 0;
|
|
30
|
+
const node_child_process_1 = require("node:child_process");
|
|
31
|
+
const node_fs_1 = __importStar(require("node:fs"));
|
|
32
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
33
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
34
|
+
const version_1 = require("remotion/version");
|
|
35
|
+
const chalk_1 = require("./chalk");
|
|
36
|
+
const find_closest_package_json_1 = require("./find-closest-package-json");
|
|
37
|
+
const is_serve_url_1 = require("./is-serve-url");
|
|
38
|
+
const logger_1 = require("./logger");
|
|
39
|
+
const REPRO_DIR = '.remotionrepro';
|
|
40
|
+
const LOG_FILE_NAME = 'logs.txt';
|
|
41
|
+
const INPUT_DIR = 'bundle';
|
|
42
|
+
const OUTPUT_DIR = 'output';
|
|
43
|
+
const LINE_SPLIT = '\n';
|
|
44
|
+
const getZipFileName = (name) => `remotion-repro-${name}-${Date.now()}.zip`;
|
|
45
|
+
const readyDirSync = (dir) => {
|
|
46
|
+
let items;
|
|
47
|
+
try {
|
|
48
|
+
items = node_fs_1.default.readdirSync(dir);
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
return node_fs_1.default.mkdirSync(dir, { recursive: true });
|
|
52
|
+
}
|
|
53
|
+
items.forEach((item) => {
|
|
54
|
+
item = node_path_1.default.join(dir, item);
|
|
55
|
+
node_fs_1.default.rmSync(item, { recursive: true, force: true });
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const zipFolder = ({ sourceFolder, targetZip, indent, logLevel, }) => {
|
|
59
|
+
const platform = node_os_1.default.platform();
|
|
60
|
+
try {
|
|
61
|
+
logger_1.Log.infoAdvanced({ indent, logLevel }, '+ Creating reproduction ZIP');
|
|
62
|
+
if (platform === 'win32') {
|
|
63
|
+
(0, node_child_process_1.execSync)(`powershell.exe Compress-Archive -Path "${sourceFolder}" -DestinationPath "${targetZip}"`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
(0, node_child_process_1.execSync)(`zip -r "${targetZip}" "${sourceFolder}"`);
|
|
67
|
+
}
|
|
68
|
+
(0, node_fs_1.rmSync)(sourceFolder, { recursive: true });
|
|
69
|
+
logger_1.Log.infoAdvanced({ indent, logLevel }, `${chalk_1.chalk.blue(`+ Repro: ${targetZip}`)}`);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
logger_1.Log.errorAdvanced({ indent, logLevel }, `Failed to zip repro folder, The repro folder is ${sourceFolder}. You can try manually zip it.`);
|
|
73
|
+
logger_1.Log.errorAdvanced({ indent, logLevel }, error);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const reproWriter = (name) => {
|
|
77
|
+
const root = (0, find_closest_package_json_1.findRemotionRoot)();
|
|
78
|
+
const reproFolder = node_path_1.default.join(root, REPRO_DIR);
|
|
79
|
+
const logPath = node_path_1.default.join(reproFolder, LOG_FILE_NAME);
|
|
80
|
+
const zipFile = node_path_1.default.join(root, getZipFileName(name));
|
|
81
|
+
readyDirSync(reproFolder);
|
|
82
|
+
const reproLogWriteStream = node_fs_1.default.createWriteStream(logPath, { flags: 'a' });
|
|
83
|
+
const serializeArgs = (args) => JSON.stringify(args);
|
|
84
|
+
const writeLine = (level, ...args) => {
|
|
85
|
+
if (!args.length)
|
|
86
|
+
return;
|
|
87
|
+
const startTime = new Date().toISOString();
|
|
88
|
+
const line = `[${startTime}] ${level} ${serializeArgs(args)}`;
|
|
89
|
+
reproLogWriteStream.write(line + LINE_SPLIT);
|
|
90
|
+
};
|
|
91
|
+
const start = ({ serveUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, }) => {
|
|
92
|
+
const isServe = (0, is_serve_url_1.isServeUrl)(serveUrl);
|
|
93
|
+
if (!isServe) {
|
|
94
|
+
const inputDir = node_path_1.default.resolve(reproFolder, INPUT_DIR);
|
|
95
|
+
readyDirSync(inputDir);
|
|
96
|
+
node_fs_1.default.cpSync(serveUrl, inputDir, { recursive: true });
|
|
97
|
+
}
|
|
98
|
+
const serializedProps = node_path_1.default.resolve(reproFolder, 'input-props.json');
|
|
99
|
+
node_fs_1.default.writeFileSync(serializedProps, serializedInputPropsWithCustomSchema);
|
|
100
|
+
const serializedResolvedProps = node_path_1.default.resolve(reproFolder, 'resolved-props.json');
|
|
101
|
+
node_fs_1.default.writeFileSync(serializedResolvedProps, serializedResolvedPropsWithCustomSchema);
|
|
102
|
+
writeLine('info', [`Args: ${JSON.stringify(process.argv)}`]);
|
|
103
|
+
writeLine('info', [`Node/Bun version: ${process.version}`]);
|
|
104
|
+
writeLine('info', [`OS: ${process.platform}-${process.arch}`]);
|
|
105
|
+
writeLine('info', [`Serve URL: ${serveUrl}`]);
|
|
106
|
+
writeLine('info', [`Remotion version: ${version_1.VERSION}`]);
|
|
107
|
+
};
|
|
108
|
+
const onRenderSucceed = ({ indent, logLevel, output, }) => {
|
|
109
|
+
return new Promise((resolve, reject) => {
|
|
110
|
+
try {
|
|
111
|
+
if (output) {
|
|
112
|
+
const outputDir = node_path_1.default.resolve(reproFolder, OUTPUT_DIR);
|
|
113
|
+
readyDirSync(outputDir);
|
|
114
|
+
const fileName = node_path_1.default.basename(output);
|
|
115
|
+
const targetPath = node_path_1.default.join(outputDir, fileName);
|
|
116
|
+
node_fs_1.default.copyFileSync(output, targetPath);
|
|
117
|
+
}
|
|
118
|
+
(0, exports.disableRepro)();
|
|
119
|
+
reproLogWriteStream.end(() => {
|
|
120
|
+
reproLogWriteStream.close(() => {
|
|
121
|
+
zipFolder({
|
|
122
|
+
sourceFolder: reproFolder,
|
|
123
|
+
targetZip: zipFile,
|
|
124
|
+
indent,
|
|
125
|
+
logLevel,
|
|
126
|
+
});
|
|
127
|
+
resolve();
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
logger_1.Log.error(`repro render success error:`);
|
|
133
|
+
logger_1.Log.error(error);
|
|
134
|
+
reject(error);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
return {
|
|
139
|
+
start,
|
|
140
|
+
writeLine,
|
|
141
|
+
onRenderSucceed,
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
let reproWriteInstance = null;
|
|
145
|
+
const getReproWriter = () => {
|
|
146
|
+
if (!reproWriteInstance) {
|
|
147
|
+
throw new Error('reproWriteInstance is not initialized');
|
|
148
|
+
}
|
|
149
|
+
return reproWriteInstance;
|
|
150
|
+
};
|
|
151
|
+
exports.getReproWriter = getReproWriter;
|
|
152
|
+
const writeInRepro = (level, ...args) => {
|
|
153
|
+
if ((0, exports.isReproEnabled)()) {
|
|
154
|
+
(0, exports.getReproWriter)().writeLine(level, ...args);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
exports.writeInRepro = writeInRepro;
|
|
158
|
+
let shouldRepro = false;
|
|
159
|
+
const enableRepro = ({ serveUrl, compositionName, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, }) => {
|
|
160
|
+
shouldRepro = true;
|
|
161
|
+
reproWriteInstance = reproWriter(compositionName);
|
|
162
|
+
(0, exports.getReproWriter)().start({
|
|
163
|
+
serveUrl,
|
|
164
|
+
serializedInputPropsWithCustomSchema,
|
|
165
|
+
serializedResolvedPropsWithCustomSchema,
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
exports.enableRepro = enableRepro;
|
|
169
|
+
const disableRepro = () => {
|
|
170
|
+
shouldRepro = false;
|
|
171
|
+
};
|
|
172
|
+
exports.disableRepro = disableRepro;
|
|
173
|
+
const isReproEnabled = () => shouldRepro;
|
|
174
|
+
exports.isReproEnabled = isReproEnabled;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "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.89",
|
|
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.89"
|
|
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-
|
|
44
|
-
"@remotion/compositor-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-linux-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.89",
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "4.0.89",
|
|
45
|
+
"@remotion/compositor-darwin-x64": "4.0.89",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.89",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.89",
|
|
48
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.89",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.89"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
package/dist/does-have-m2-bug.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.warnAboutM2Bug = void 0;
|
|
4
|
-
const node_os_1 = require("node:os");
|
|
5
|
-
const warnAboutM2Bug = (codec, pixelFormat) => {
|
|
6
|
-
const isM2 = (0, node_os_1.cpus)().find((c) => c.model.includes('Apple M2'));
|
|
7
|
-
if (codec === 'prores' && pixelFormat === 'yuv422p10le' && isM2) {
|
|
8
|
-
console.warn();
|
|
9
|
-
console.warn('⚠️ Known issue: Apple M2 CPUs currently suffer from a bug where transparent ProRes videos have flickering. https://github.com/remotion-dev/remotion/issues/1929');
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.warnAboutM2Bug = warnAboutM2Bug;
|