@remotion/renderer 4.0.160 → 4.0.163
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 +12 -12
- package/dist/compositor/compositor.js +13 -5
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +33 -33
- package/dist/is-serve-url.js +3 -0
- package/dist/options/color-space.d.ts +3 -3
- package/dist/options/index.d.ts +3 -3
- package/dist/options/options-map.d.ts +9 -9
- package/dist/pixel-format.d.ts +1 -1
- package/dist/print-useful-error-message.js +4 -0
- package/dist/pure.d.ts +3 -3
- package/dist/seek-to-frame.js +20 -10
- package/dist/streaming.d.ts +5 -0
- package/dist/streaming.js +106 -0
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/dist/client.d.ts
CHANGED
|
@@ -406,14 +406,14 @@ export declare const BrowserSafeApis: {
|
|
|
406
406
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
407
407
|
docLink: string;
|
|
408
408
|
ssrName: string;
|
|
409
|
-
type: "
|
|
409
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
410
410
|
getValue: ({ commandLine }: {
|
|
411
411
|
commandLine: Record<string, unknown>;
|
|
412
412
|
}) => {
|
|
413
413
|
source: string;
|
|
414
|
-
value: "
|
|
414
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
415
415
|
};
|
|
416
|
-
setConfig: (value: "
|
|
416
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
417
417
|
};
|
|
418
418
|
deleteAfterOption: {
|
|
419
419
|
name: string;
|
|
@@ -900,14 +900,14 @@ export declare const BrowserSafeApis: {
|
|
|
900
900
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
901
901
|
docLink: string;
|
|
902
902
|
ssrName: string;
|
|
903
|
-
type: "
|
|
903
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
904
904
|
getValue: ({ commandLine }: {
|
|
905
905
|
commandLine: Record<string, unknown>;
|
|
906
906
|
}) => {
|
|
907
907
|
source: string;
|
|
908
|
-
value: "
|
|
908
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
909
909
|
};
|
|
910
|
-
setConfig: (value: "
|
|
910
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
911
911
|
};
|
|
912
912
|
readonly codec: {
|
|
913
913
|
name: string;
|
|
@@ -1640,14 +1640,14 @@ export declare const BrowserSafeApis: {
|
|
|
1640
1640
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1641
1641
|
docLink: string;
|
|
1642
1642
|
ssrName: string;
|
|
1643
|
-
type: "
|
|
1643
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
1644
1644
|
getValue: ({ commandLine }: {
|
|
1645
1645
|
commandLine: Record<string, unknown>;
|
|
1646
1646
|
}) => {
|
|
1647
1647
|
source: string;
|
|
1648
|
-
value: "
|
|
1648
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
1649
1649
|
};
|
|
1650
|
-
setConfig: (value: "
|
|
1650
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
1651
1651
|
};
|
|
1652
1652
|
readonly muted: {
|
|
1653
1653
|
name: string;
|
|
@@ -1904,14 +1904,14 @@ export declare const BrowserSafeApis: {
|
|
|
1904
1904
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1905
1905
|
docLink: string;
|
|
1906
1906
|
ssrName: string;
|
|
1907
|
-
type: "
|
|
1907
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
1908
1908
|
getValue: ({ commandLine }: {
|
|
1909
1909
|
commandLine: Record<string, unknown>;
|
|
1910
1910
|
}) => {
|
|
1911
1911
|
source: string;
|
|
1912
|
-
value: "
|
|
1912
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
1913
1913
|
};
|
|
1914
|
-
setConfig: (value: "
|
|
1914
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
1915
1915
|
};
|
|
1916
1916
|
readonly audioBitrate: {
|
|
1917
1917
|
name: string;
|
|
@@ -53,6 +53,7 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
|
|
|
53
53
|
const separator = Buffer.from('remotion_buffer:');
|
|
54
54
|
const waiters = new Map();
|
|
55
55
|
const onMessage = (statusType, nonce, data) => {
|
|
56
|
+
// Nonce '0' just means that the message should be logged
|
|
56
57
|
if (nonce === '0') {
|
|
57
58
|
logger_1.Log.verbose({ indent, logLevel, tag: 'compositor' }, data.toString('utf8'));
|
|
58
59
|
}
|
|
@@ -83,32 +84,39 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
|
|
|
83
84
|
let nonceString = '';
|
|
84
85
|
let lengthString = '';
|
|
85
86
|
let statusString = '';
|
|
86
|
-
// Each message from Rust is prefixed with `remotion_buffer
|
|
87
|
+
// Each message from Rust is prefixed with `remotion_buffer:{[nonce]}:{[length]}`
|
|
87
88
|
// Let's read the buffer to extract the nonce, and if the full length is available,
|
|
88
89
|
// we'll extract the data and pass it to the callback.
|
|
89
90
|
// eslint-disable-next-line no-constant-condition
|
|
90
91
|
while (true) {
|
|
92
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
91
95
|
const nextDigit = outputBuffer[separatorIndex];
|
|
96
|
+
separatorIndex++;
|
|
92
97
|
// 0x3a is the character ":"
|
|
93
98
|
if (nextDigit === 0x3a) {
|
|
94
|
-
separatorIndex++;
|
|
95
99
|
break;
|
|
96
100
|
}
|
|
97
|
-
separatorIndex++;
|
|
98
101
|
nonceString += String.fromCharCode(nextDigit);
|
|
99
102
|
}
|
|
100
103
|
// eslint-disable-next-line no-constant-condition
|
|
101
104
|
while (true) {
|
|
105
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
102
108
|
const nextDigit = outputBuffer[separatorIndex];
|
|
109
|
+
separatorIndex++;
|
|
103
110
|
if (nextDigit === 0x3a) {
|
|
104
|
-
separatorIndex++;
|
|
105
111
|
break;
|
|
106
112
|
}
|
|
107
|
-
separatorIndex++;
|
|
108
113
|
lengthString += String.fromCharCode(nextDigit);
|
|
109
114
|
}
|
|
110
115
|
// eslint-disable-next-line no-constant-condition
|
|
111
116
|
while (true) {
|
|
117
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
112
120
|
const nextDigit = outputBuffer[separatorIndex];
|
|
113
121
|
if (nextDigit === 0x3a) {
|
|
114
122
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
2
|
import type { FileExtension } from './file-extensions';
|
|
3
3
|
import type { AudioCodec } from './options/audio-codec';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "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" | "h264-ts" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/index.d.ts
CHANGED
|
@@ -69,10 +69,10 @@ export declare const RenderInternals: {
|
|
|
69
69
|
width: number;
|
|
70
70
|
height: number;
|
|
71
71
|
scale: number;
|
|
72
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
72
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
73
73
|
wantsImageSequence: boolean;
|
|
74
74
|
}) => void;
|
|
75
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
75
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
|
|
76
76
|
tmpDir: (str: string) => string;
|
|
77
77
|
deleteDirectory: (directory: string) => void;
|
|
78
78
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -129,7 +129,7 @@ export declare const RenderInternals: {
|
|
|
129
129
|
};
|
|
130
130
|
registerErrorSymbolicationLock: () => number;
|
|
131
131
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
132
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
132
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
133
133
|
mimeContentType: typeof mimeContentType;
|
|
134
134
|
mimeLookup: typeof mimeLookup;
|
|
135
135
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -143,11 +143,11 @@ export declare const RenderInternals: {
|
|
|
143
143
|
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
144
144
|
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
145
145
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
146
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
146
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
147
147
|
validateJpegQuality: (q: unknown) => void;
|
|
148
148
|
DEFAULT_TIMEOUT: number;
|
|
149
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
150
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
149
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
150
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null | undefined) => boolean;
|
|
151
151
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
152
152
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
153
153
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -164,10 +164,10 @@ export declare const RenderInternals: {
|
|
|
164
164
|
output: string;
|
|
165
165
|
onProgress: (p: number) => void;
|
|
166
166
|
numberOfFrames: number;
|
|
167
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
167
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
168
168
|
fps: number;
|
|
169
169
|
numberOfGifLoops: number | null;
|
|
170
|
-
resolvedAudioCodec: "
|
|
170
|
+
resolvedAudioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
171
171
|
audioBitrate: string | null;
|
|
172
172
|
indent: boolean;
|
|
173
173
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -181,18 +181,18 @@ export declare const RenderInternals: {
|
|
|
181
181
|
getMinConcurrency: () => number;
|
|
182
182
|
getMaxConcurrency: () => number;
|
|
183
183
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
184
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
184
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
185
185
|
preferLossless: boolean;
|
|
186
|
-
}) => "
|
|
186
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
187
187
|
defaultFileExtensionMap: {
|
|
188
188
|
h264: {
|
|
189
189
|
default: import("./file-extensions").FileExtension;
|
|
190
190
|
forAudioCodec: {
|
|
191
|
-
|
|
191
|
+
aac: {
|
|
192
192
|
possible: import("./file-extensions").FileExtension[];
|
|
193
193
|
default: import("./file-extensions").FileExtension;
|
|
194
194
|
};
|
|
195
|
-
|
|
195
|
+
mp3: {
|
|
196
196
|
possible: import("./file-extensions").FileExtension[];
|
|
197
197
|
default: import("./file-extensions").FileExtension;
|
|
198
198
|
};
|
|
@@ -218,11 +218,11 @@ export declare const RenderInternals: {
|
|
|
218
218
|
vp8: {
|
|
219
219
|
default: import("./file-extensions").FileExtension;
|
|
220
220
|
forAudioCodec: {
|
|
221
|
-
|
|
221
|
+
opus: {
|
|
222
222
|
possible: import("./file-extensions").FileExtension[];
|
|
223
223
|
default: import("./file-extensions").FileExtension;
|
|
224
224
|
};
|
|
225
|
-
|
|
225
|
+
"pcm-16": {
|
|
226
226
|
possible: import("./file-extensions").FileExtension[];
|
|
227
227
|
default: import("./file-extensions").FileExtension;
|
|
228
228
|
};
|
|
@@ -231,20 +231,20 @@ export declare const RenderInternals: {
|
|
|
231
231
|
vp9: {
|
|
232
232
|
default: import("./file-extensions").FileExtension;
|
|
233
233
|
forAudioCodec: {
|
|
234
|
-
|
|
234
|
+
opus: {
|
|
235
235
|
possible: import("./file-extensions").FileExtension[];
|
|
236
236
|
default: import("./file-extensions").FileExtension;
|
|
237
237
|
};
|
|
238
|
-
|
|
238
|
+
"pcm-16": {
|
|
239
239
|
possible: import("./file-extensions").FileExtension[];
|
|
240
240
|
default: import("./file-extensions").FileExtension;
|
|
241
241
|
};
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
prores: {
|
|
245
245
|
default: import("./file-extensions").FileExtension;
|
|
246
246
|
forAudioCodec: {
|
|
247
|
-
|
|
247
|
+
aac: {
|
|
248
248
|
possible: import("./file-extensions").FileExtension[];
|
|
249
249
|
default: import("./file-extensions").FileExtension;
|
|
250
250
|
};
|
|
@@ -267,22 +267,22 @@ export declare const RenderInternals: {
|
|
|
267
267
|
};
|
|
268
268
|
};
|
|
269
269
|
};
|
|
270
|
-
|
|
270
|
+
mp3: {
|
|
271
271
|
default: import("./file-extensions").FileExtension;
|
|
272
272
|
forAudioCodec: {
|
|
273
|
+
mp3: {
|
|
274
|
+
possible: import("./file-extensions").FileExtension[];
|
|
275
|
+
default: import("./file-extensions").FileExtension;
|
|
276
|
+
};
|
|
273
277
|
"pcm-16": {
|
|
274
278
|
possible: import("./file-extensions").FileExtension[];
|
|
275
279
|
default: import("./file-extensions").FileExtension;
|
|
276
280
|
};
|
|
277
281
|
};
|
|
278
282
|
};
|
|
279
|
-
|
|
283
|
+
wav: {
|
|
280
284
|
default: import("./file-extensions").FileExtension;
|
|
281
285
|
forAudioCodec: {
|
|
282
|
-
aac: {
|
|
283
|
-
possible: import("./file-extensions").FileExtension[];
|
|
284
|
-
default: import("./file-extensions").FileExtension;
|
|
285
|
-
};
|
|
286
286
|
"pcm-16": {
|
|
287
287
|
possible: import("./file-extensions").FileExtension[];
|
|
288
288
|
default: import("./file-extensions").FileExtension;
|
|
@@ -334,10 +334,10 @@ export declare const RenderInternals: {
|
|
|
334
334
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
335
335
|
readonly wav: readonly ["pcm-16"];
|
|
336
336
|
};
|
|
337
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
338
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
337
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
338
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif">;
|
|
339
339
|
getExecutablePath: ({ indent, logLevel, type, binariesDirectory, }: {
|
|
340
|
-
type: "
|
|
340
|
+
type: "compositor" | "ffmpeg" | "ffprobe";
|
|
341
341
|
indent: boolean;
|
|
342
342
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
343
343
|
binariesDirectory: string | null;
|
|
@@ -771,21 +771,21 @@ export declare const RenderInternals: {
|
|
|
771
771
|
hostsToTry: string[];
|
|
772
772
|
};
|
|
773
773
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
774
|
-
getExtensionFromAudioCodec: (audioCodec: "
|
|
774
|
+
getExtensionFromAudioCodec: (audioCodec: "opus" | "aac" | "mp3" | "pcm-16") => "opus" | "aac" | "mp3" | "wav";
|
|
775
775
|
makeFileExecutableIfItIsNot: (path: string) => void;
|
|
776
776
|
resolveAudioCodec: ({ codec, setting, preferLossless, separateAudioTo, }: {
|
|
777
|
-
setting: "
|
|
778
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
777
|
+
setting: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
778
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
779
779
|
preferLossless: boolean;
|
|
780
780
|
separateAudioTo: string | null;
|
|
781
|
-
}) => "
|
|
781
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
782
782
|
getShouldRenderAudio: ({ codec, assetsInfo, enforceAudioTrack, muted, }: {
|
|
783
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
783
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
784
784
|
assetsInfo: import("./assets/download-map").RenderAssetInfo | null;
|
|
785
785
|
enforceAudioTrack: boolean;
|
|
786
786
|
muted: boolean;
|
|
787
787
|
}) => "yes" | "maybe" | "no";
|
|
788
|
-
codecSupportsMedia: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
788
|
+
codecSupportsMedia: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif") => {
|
|
789
789
|
video: boolean;
|
|
790
790
|
audio: boolean;
|
|
791
791
|
};
|
package/dist/is-serve-url.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isServeUrl = void 0;
|
|
4
4
|
const isServeUrl = (potentialUrl) => {
|
|
5
|
+
if (typeof potentialUrl === 'undefined') {
|
|
6
|
+
throw new Error('serveUrl is undefined');
|
|
7
|
+
}
|
|
5
8
|
// Theoretically not a valid URL but handle the most basic cases of forgetting protocol in front
|
|
6
9
|
if (potentialUrl.startsWith('www.') ||
|
|
7
10
|
potentialUrl.includes('amazonaws.com')) {
|
|
@@ -7,13 +7,13 @@ export declare const colorSpaceOption: {
|
|
|
7
7
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
docLink: string;
|
|
9
9
|
ssrName: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
11
11
|
getValue: ({ commandLine }: {
|
|
12
12
|
commandLine: Record<string, unknown>;
|
|
13
13
|
}) => {
|
|
14
14
|
source: string;
|
|
15
|
-
value: "
|
|
15
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
16
16
|
};
|
|
17
|
-
setConfig: (value: "
|
|
17
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
18
18
|
};
|
|
19
19
|
export declare const validateColorSpace: (option: unknown) => void;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -184,14 +184,14 @@ export declare const allOptions: {
|
|
|
184
184
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
185
185
|
docLink: string;
|
|
186
186
|
ssrName: string;
|
|
187
|
-
type: "
|
|
187
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
188
188
|
getValue: ({ commandLine }: {
|
|
189
189
|
commandLine: Record<string, unknown>;
|
|
190
190
|
}) => {
|
|
191
191
|
source: string;
|
|
192
|
-
value: "
|
|
192
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
193
193
|
};
|
|
194
|
-
setConfig: (value: "
|
|
194
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
195
195
|
};
|
|
196
196
|
deleteAfterOption: {
|
|
197
197
|
name: string;
|
|
@@ -108,14 +108,14 @@ export declare const optionsMap: {
|
|
|
108
108
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
109
109
|
docLink: string;
|
|
110
110
|
ssrName: string;
|
|
111
|
-
type: "
|
|
111
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
112
112
|
getValue: ({ commandLine }: {
|
|
113
113
|
commandLine: Record<string, unknown>;
|
|
114
114
|
}) => {
|
|
115
115
|
source: string;
|
|
116
|
-
value: "
|
|
116
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
117
117
|
};
|
|
118
|
-
setConfig: (value: "
|
|
118
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
119
119
|
};
|
|
120
120
|
readonly codec: {
|
|
121
121
|
name: string;
|
|
@@ -848,14 +848,14 @@ export declare const optionsMap: {
|
|
|
848
848
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
849
849
|
docLink: string;
|
|
850
850
|
ssrName: string;
|
|
851
|
-
type: "
|
|
851
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
852
852
|
getValue: ({ commandLine }: {
|
|
853
853
|
commandLine: Record<string, unknown>;
|
|
854
854
|
}) => {
|
|
855
855
|
source: string;
|
|
856
|
-
value: "
|
|
856
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
857
857
|
};
|
|
858
|
-
setConfig: (value: "
|
|
858
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
859
859
|
};
|
|
860
860
|
readonly muted: {
|
|
861
861
|
name: string;
|
|
@@ -1112,14 +1112,14 @@ export declare const optionsMap: {
|
|
|
1112
1112
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1113
1113
|
docLink: string;
|
|
1114
1114
|
ssrName: string;
|
|
1115
|
-
type: "
|
|
1115
|
+
type: "default" | "bt709" | "bt2020-ncl" | null;
|
|
1116
1116
|
getValue: ({ commandLine }: {
|
|
1117
1117
|
commandLine: Record<string, unknown>;
|
|
1118
1118
|
}) => {
|
|
1119
1119
|
source: string;
|
|
1120
|
-
value: "
|
|
1120
|
+
value: "default" | "bt709" | "bt2020-ncl";
|
|
1121
1121
|
};
|
|
1122
|
-
setConfig: (value: "
|
|
1122
|
+
setConfig: (value: "default" | "bt709" | "bt2020-ncl" | null) => void;
|
|
1123
1123
|
};
|
|
1124
1124
|
readonly audioBitrate: {
|
|
1125
1125
|
name: string;
|
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;
|
|
@@ -73,5 +73,9 @@ const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
73
73
|
logger_1.Log.info({ indent, logLevel }, '💡 This error might be fixed by changing your Node version:');
|
|
74
74
|
logger_1.Log.info({ indent, logLevel }, ' https://github.com/remotion-dev/remotion/issues/2452');
|
|
75
75
|
}
|
|
76
|
+
if (err.message.includes('routines::unsupported')) {
|
|
77
|
+
logger_1.Log.info({ indent, logLevel }, '💡 This error might happen if using Cloud Run with credentials that have a newline at the end or are otherwise badly encoded.');
|
|
78
|
+
logger_1.Log.info({ indent, logLevel }, ' https://github.com/remotion-dev/remotion/issues/3864');
|
|
79
|
+
}
|
|
76
80
|
};
|
|
77
81
|
exports.printUsefulErrorMessage = printUsefulErrorMessage;
|
package/dist/pure.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export declare const NoReactAPIs: {
|
|
|
4
4
|
indent: boolean;
|
|
5
5
|
}, ...unknown[]], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
|
|
6
6
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
7
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
+
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;
|
|
8
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
9
9
|
codec: T_1;
|
|
10
|
-
audioCodecSetting: "
|
|
10
|
+
audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
11
11
|
extension: string;
|
|
12
12
|
preferLossless: boolean;
|
|
13
13
|
separateAudioTo: string | null;
|
package/dist/seek-to-frame.js
CHANGED
|
@@ -95,17 +95,27 @@ const waitForReady = ({ page, timeoutInMilliseconds, frame, indent, logLevel, })
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
|
+
const onDisposedPromise = new Promise((_, reject) => {
|
|
99
|
+
const onDispose = () => {
|
|
100
|
+
reject(new Error('Target closed (page disposed)'));
|
|
101
|
+
};
|
|
102
|
+
page.on("disposed" /* PageEmittedEvents.Disposed */, onDispose);
|
|
103
|
+
cleanups.push(() => {
|
|
104
|
+
page.off("disposed" /* PageEmittedEvents.Disposed */, onDispose);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const onClosedSilentPromise = new Promise((_, reject) => {
|
|
108
|
+
const onClosedSilent = () => {
|
|
109
|
+
reject(new Error('Target closed'));
|
|
110
|
+
};
|
|
111
|
+
page.browser.on("closed-silent" /* BrowserEmittedEvents.ClosedSilent */, onClosedSilent);
|
|
112
|
+
cleanups.push(() => {
|
|
113
|
+
page.browser.off("closed-silent" /* BrowserEmittedEvents.ClosedSilent */, onClosedSilent);
|
|
114
|
+
});
|
|
115
|
+
});
|
|
98
116
|
return Promise.race([
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
reject(new Error('Target closed (page disposed)'));
|
|
102
|
-
});
|
|
103
|
-
}),
|
|
104
|
-
new Promise((_, reject) => {
|
|
105
|
-
page.browser.on("closed-silent" /* BrowserEmittedEvents.ClosedSilent */, () => {
|
|
106
|
-
reject(new Error('Target closed'));
|
|
107
|
-
});
|
|
108
|
-
}),
|
|
117
|
+
onDisposedPromise,
|
|
118
|
+
onClosedSilentPromise,
|
|
109
119
|
waitForReadyProm,
|
|
110
120
|
]).finally(() => {
|
|
111
121
|
cleanups.forEach((cleanup) => {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeStreamer = void 0;
|
|
4
|
+
const makeStreamer = (onMessage) => {
|
|
5
|
+
const separatorStr = 'remotion_buffer:';
|
|
6
|
+
const separator = new Uint8Array(separatorStr.length);
|
|
7
|
+
for (let i = 0; i < separatorStr.length; i++) {
|
|
8
|
+
separator[i] = separatorStr.charCodeAt(i);
|
|
9
|
+
}
|
|
10
|
+
let unprocessedBuffers = [];
|
|
11
|
+
let outputBuffer = new Uint8Array(0);
|
|
12
|
+
let missingData = null;
|
|
13
|
+
const processInput = () => {
|
|
14
|
+
let separatorIndex = outputBuffer.indexOf(separator[0]); // Start checking for the first byte of the separator
|
|
15
|
+
if (separatorIndex === -1 ||
|
|
16
|
+
outputBuffer
|
|
17
|
+
.subarray(separatorIndex, separatorIndex + separator.length)
|
|
18
|
+
.toString() !== separator.toString()) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
separatorIndex += separator.length;
|
|
22
|
+
let nonceString = '';
|
|
23
|
+
let lengthString = '';
|
|
24
|
+
let statusString = '';
|
|
25
|
+
// eslint-disable-next-line no-constant-condition
|
|
26
|
+
while (true) {
|
|
27
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const nextDigit = outputBuffer[separatorIndex];
|
|
31
|
+
separatorIndex++;
|
|
32
|
+
if (nextDigit === 0x3a) {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
nonceString += String.fromCharCode(nextDigit);
|
|
36
|
+
}
|
|
37
|
+
// eslint-disable-next-line no-constant-condition
|
|
38
|
+
while (true) {
|
|
39
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const nextDigit = outputBuffer[separatorIndex];
|
|
43
|
+
separatorIndex++;
|
|
44
|
+
if (nextDigit === 0x3a) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
lengthString += String.fromCharCode(nextDigit);
|
|
48
|
+
}
|
|
49
|
+
// eslint-disable-next-line no-constant-condition
|
|
50
|
+
while (true) {
|
|
51
|
+
if (separatorIndex > outputBuffer.length - 1) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const nextDigit = outputBuffer[separatorIndex];
|
|
55
|
+
if (nextDigit === 0x3a) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
separatorIndex++;
|
|
59
|
+
statusString += String.fromCharCode(nextDigit);
|
|
60
|
+
}
|
|
61
|
+
const length = Number(lengthString);
|
|
62
|
+
const status = Number(statusString);
|
|
63
|
+
const dataLength = outputBuffer.length - separatorIndex - 1;
|
|
64
|
+
if (dataLength < length) {
|
|
65
|
+
missingData = {
|
|
66
|
+
dataMissing: length - dataLength,
|
|
67
|
+
};
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const data = outputBuffer.subarray(separatorIndex + 1, separatorIndex + 1 + Number(lengthString));
|
|
71
|
+
onMessage(status === 1 ? 'error' : 'success', nonceString, data);
|
|
72
|
+
missingData = null;
|
|
73
|
+
outputBuffer = outputBuffer.subarray(separatorIndex + Number(lengthString) + 1);
|
|
74
|
+
processInput();
|
|
75
|
+
};
|
|
76
|
+
const onData = (data) => {
|
|
77
|
+
unprocessedBuffers.push(data);
|
|
78
|
+
const separatorIndex = data.indexOf(separator[0]);
|
|
79
|
+
if (separatorIndex === -1) {
|
|
80
|
+
if (missingData) {
|
|
81
|
+
missingData.dataMissing -= data.length;
|
|
82
|
+
}
|
|
83
|
+
if (!missingData || missingData.dataMissing > 0) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
unprocessedBuffers.unshift(outputBuffer);
|
|
88
|
+
outputBuffer = new Uint8Array(unprocessedBuffers.reduce((acc, val) => acc + val.length, 0));
|
|
89
|
+
let offset = 0;
|
|
90
|
+
for (const buf of unprocessedBuffers) {
|
|
91
|
+
outputBuffer.set(buf, offset);
|
|
92
|
+
offset += buf.length;
|
|
93
|
+
}
|
|
94
|
+
unprocessedBuffers = [];
|
|
95
|
+
processInput();
|
|
96
|
+
};
|
|
97
|
+
return {
|
|
98
|
+
onData,
|
|
99
|
+
getOutputBuffer: () => outputBuffer,
|
|
100
|
+
clear: () => {
|
|
101
|
+
unprocessedBuffers = [];
|
|
102
|
+
outputBuffer = new Uint8Array(0);
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
exports.makeStreamer = makeStreamer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './options/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" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodecSetting: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.163",
|
|
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.163"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@types/ws": "8.5.10"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-
|
|
50
|
-
"@remotion/compositor-linux-
|
|
51
|
-
"@remotion/compositor-
|
|
52
|
-
"@remotion/compositor-
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.163",
|
|
47
|
+
"@remotion/compositor-darwin-arm64": "4.0.163",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.163",
|
|
49
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.163",
|
|
50
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.163",
|
|
51
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.163",
|
|
52
|
+
"@remotion/compositor-linux-x64-musl": "4.0.163"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"remotion",
|