@remotion/renderer 4.0.116 → 4.0.117
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 +48 -48
- package/dist/compositor/payloads.d.ts +1 -0
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/ffmpeg-args.js +10 -2
- package/dist/index.d.ts +30 -32
- package/dist/offthread-video-server.d.ts +1 -0
- package/dist/offthread-video-server.js +12 -3
- package/dist/options/index.d.ts +5 -5
- package/dist/options/options-map.d.ts +5 -5
- package/dist/options/video-codec.d.ts +1 -1
- 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/take-frame-and-compose.d.ts +0 -1
- package/package.json +9 -9
package/dist/client.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export { AvailableOptions, TypeOfOption } from './options';
|
|
2
2
|
export declare const BrowserSafeApis: {
|
|
3
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
3
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
|
|
4
4
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
5
5
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
6
|
-
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
7
|
-
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
8
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
6
|
+
getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
9
9
|
proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
|
|
10
10
|
x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
11
11
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
12
12
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
13
|
-
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
13
|
+
validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
14
14
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
15
15
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
16
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
16
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
17
17
|
DEFAULT_TIMEOUT: number;
|
|
18
18
|
supportedAudioCodecs: {
|
|
19
19
|
readonly h264: readonly ["aac", "pcm-16", "mp3"];
|
|
@@ -31,11 +31,11 @@ export declare const BrowserSafeApis: {
|
|
|
31
31
|
h264: {
|
|
32
32
|
default: import("./file-extensions").FileExtension;
|
|
33
33
|
forAudioCodec: {
|
|
34
|
-
|
|
34
|
+
aac: {
|
|
35
35
|
possible: import("./file-extensions").FileExtension[];
|
|
36
36
|
default: import("./file-extensions").FileExtension;
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
mp3: {
|
|
39
39
|
possible: import("./file-extensions").FileExtension[];
|
|
40
40
|
default: import("./file-extensions").FileExtension;
|
|
41
41
|
};
|
|
@@ -61,11 +61,11 @@ export declare const BrowserSafeApis: {
|
|
|
61
61
|
vp8: {
|
|
62
62
|
default: import("./file-extensions").FileExtension;
|
|
63
63
|
forAudioCodec: {
|
|
64
|
-
|
|
64
|
+
opus: {
|
|
65
65
|
possible: import("./file-extensions").FileExtension[];
|
|
66
66
|
default: import("./file-extensions").FileExtension;
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
"pcm-16": {
|
|
69
69
|
possible: import("./file-extensions").FileExtension[];
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
};
|
|
@@ -74,20 +74,20 @@ export declare const BrowserSafeApis: {
|
|
|
74
74
|
vp9: {
|
|
75
75
|
default: import("./file-extensions").FileExtension;
|
|
76
76
|
forAudioCodec: {
|
|
77
|
-
|
|
77
|
+
opus: {
|
|
78
78
|
possible: import("./file-extensions").FileExtension[];
|
|
79
79
|
default: import("./file-extensions").FileExtension;
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
"pcm-16": {
|
|
82
82
|
possible: import("./file-extensions").FileExtension[];
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
prores: {
|
|
88
88
|
default: import("./file-extensions").FileExtension;
|
|
89
89
|
forAudioCodec: {
|
|
90
|
-
|
|
90
|
+
aac: {
|
|
91
91
|
possible: import("./file-extensions").FileExtension[];
|
|
92
92
|
default: import("./file-extensions").FileExtension;
|
|
93
93
|
};
|
|
@@ -110,22 +110,22 @@ export declare const BrowserSafeApis: {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
mp3: {
|
|
114
114
|
default: import("./file-extensions").FileExtension;
|
|
115
115
|
forAudioCodec: {
|
|
116
|
+
mp3: {
|
|
117
|
+
possible: import("./file-extensions").FileExtension[];
|
|
118
|
+
default: import("./file-extensions").FileExtension;
|
|
119
|
+
};
|
|
116
120
|
"pcm-16": {
|
|
117
121
|
possible: import("./file-extensions").FileExtension[];
|
|
118
122
|
default: import("./file-extensions").FileExtension;
|
|
119
123
|
};
|
|
120
124
|
};
|
|
121
125
|
};
|
|
122
|
-
|
|
126
|
+
wav: {
|
|
123
127
|
default: import("./file-extensions").FileExtension;
|
|
124
128
|
forAudioCodec: {
|
|
125
|
-
aac: {
|
|
126
|
-
possible: import("./file-extensions").FileExtension[];
|
|
127
|
-
default: import("./file-extensions").FileExtension;
|
|
128
|
-
};
|
|
129
129
|
"pcm-16": {
|
|
130
130
|
possible: import("./file-extensions").FileExtension[];
|
|
131
131
|
default: import("./file-extensions").FileExtension;
|
|
@@ -152,37 +152,37 @@ export declare const BrowserSafeApis: {
|
|
|
152
152
|
};
|
|
153
153
|
defaultAudioCodecs: {
|
|
154
154
|
h264: {
|
|
155
|
-
compressed: "
|
|
156
|
-
lossless: "
|
|
155
|
+
compressed: "aac" | "mp3" | "pcm-16" | null;
|
|
156
|
+
lossless: "aac" | "mp3" | "pcm-16" | null;
|
|
157
157
|
};
|
|
158
158
|
h265: {
|
|
159
159
|
compressed: "aac" | "pcm-16" | null;
|
|
160
160
|
lossless: "aac" | "pcm-16" | null;
|
|
161
161
|
};
|
|
162
162
|
vp8: {
|
|
163
|
-
compressed: "
|
|
164
|
-
lossless: "
|
|
163
|
+
compressed: "opus" | "pcm-16" | null;
|
|
164
|
+
lossless: "opus" | "pcm-16" | null;
|
|
165
165
|
};
|
|
166
166
|
vp9: {
|
|
167
|
-
compressed: "
|
|
168
|
-
lossless: "
|
|
167
|
+
compressed: "opus" | "pcm-16" | null;
|
|
168
|
+
lossless: "opus" | "pcm-16" | null;
|
|
169
169
|
};
|
|
170
|
-
|
|
171
|
-
compressed: "
|
|
172
|
-
lossless: "
|
|
170
|
+
prores: {
|
|
171
|
+
compressed: "aac" | "pcm-16" | null;
|
|
172
|
+
lossless: "aac" | "pcm-16" | null;
|
|
173
173
|
};
|
|
174
174
|
aac: {
|
|
175
175
|
compressed: "aac" | "pcm-16" | null;
|
|
176
176
|
lossless: "aac" | "pcm-16" | null;
|
|
177
177
|
};
|
|
178
|
+
mp3: {
|
|
179
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
180
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
181
|
+
};
|
|
178
182
|
wav: {
|
|
179
183
|
compressed: "pcm-16" | null;
|
|
180
184
|
lossless: "pcm-16" | null;
|
|
181
185
|
};
|
|
182
|
-
prores: {
|
|
183
|
-
compressed: "aac" | "pcm-16" | null;
|
|
184
|
-
lossless: "aac" | "pcm-16" | null;
|
|
185
|
-
};
|
|
186
186
|
"h264-mkv": {
|
|
187
187
|
compressed: "mp3" | "pcm-16" | null;
|
|
188
188
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -192,10 +192,10 @@ export declare const BrowserSafeApis: {
|
|
|
192
192
|
lossless: null;
|
|
193
193
|
};
|
|
194
194
|
};
|
|
195
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
196
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
195
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
196
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
197
197
|
codec: T_1;
|
|
198
|
-
audioCodec: "
|
|
198
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
199
199
|
extension: string;
|
|
200
200
|
preferLossless: boolean;
|
|
201
201
|
}) => void;
|
|
@@ -314,17 +314,17 @@ export declare const BrowserSafeApis: {
|
|
|
314
314
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
315
315
|
ssrName: string;
|
|
316
316
|
docLink: string;
|
|
317
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
317
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
318
318
|
getValue: ({ commandLine }: {
|
|
319
319
|
commandLine: Record<string, unknown>;
|
|
320
320
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
321
321
|
outName: string | null;
|
|
322
322
|
downloadName: string | null;
|
|
323
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
324
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
325
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
323
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
324
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
325
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
326
326
|
}) => {
|
|
327
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
327
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
328
328
|
source: string;
|
|
329
329
|
};
|
|
330
330
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -742,17 +742,17 @@ export declare const BrowserSafeApis: {
|
|
|
742
742
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
743
743
|
ssrName: string;
|
|
744
744
|
docLink: string;
|
|
745
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
745
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
746
746
|
getValue: ({ commandLine }: {
|
|
747
747
|
commandLine: Record<string, unknown>;
|
|
748
748
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
749
749
|
outName: string | null;
|
|
750
750
|
downloadName: string | null;
|
|
751
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
752
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
753
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
751
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
752
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
753
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
754
754
|
}) => {
|
|
755
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
755
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
756
756
|
source: string;
|
|
757
757
|
};
|
|
758
758
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -1761,8 +1761,8 @@ export declare const BrowserSafeApis: {
|
|
|
1761
1761
|
};
|
|
1762
1762
|
};
|
|
1763
1763
|
};
|
|
1764
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
1765
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
1764
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
1765
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
1766
1766
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
1767
1767
|
getOutputCodecOrUndefined: () => import("./codec").CodecOrUndefined;
|
|
1768
1768
|
};
|
|
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
|
|
|
4
4
|
filters: PreprocessedAudioTrack[];
|
|
5
5
|
downloadMap: DownloadMap;
|
|
6
6
|
}) => Promise<{
|
|
7
|
-
complexFilterFlag: [
|
|
7
|
+
complexFilterFlag: [
|
|
8
|
+
string,
|
|
9
|
+
string
|
|
10
|
+
] | null;
|
|
8
11
|
cleanup: () => void;
|
|
9
12
|
}>;
|
package/dist/ffmpeg-args.js
CHANGED
|
@@ -35,7 +35,11 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
|
|
|
35
35
|
['-color_primaries:v', 'bt709'],
|
|
36
36
|
['-color_trc:v', 'bt709'],
|
|
37
37
|
['-color_range', 'tv'],
|
|
38
|
-
hasPreencoded
|
|
38
|
+
hasPreencoded
|
|
39
|
+
? []
|
|
40
|
+
: // https://www.canva.dev/blog/engineering/a-journey-through-colour-space-with-ffmpeg/
|
|
41
|
+
// "Color range" section
|
|
42
|
+
['-vf', 'zscale=matrix=709:matrixin=709:range=limited'],
|
|
39
43
|
]
|
|
40
44
|
: colorSpace === 'bt2020-ncl'
|
|
41
45
|
? [
|
|
@@ -45,7 +49,11 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
|
|
|
45
49
|
['-color_range', 'tv'],
|
|
46
50
|
hasPreencoded
|
|
47
51
|
? []
|
|
48
|
-
: [
|
|
52
|
+
: [
|
|
53
|
+
'-vf',
|
|
54
|
+
// ChatGPT: Therefore, just like BT.709, BT.2020 also uses the limited range where the digital code value for black is at 16,16,16 and not 0,0,0 in an 8-bit video system.
|
|
55
|
+
'zscale=matrix=2020_ncl:matrixin=2020_ncl:range=limited',
|
|
56
|
+
],
|
|
49
57
|
]
|
|
50
58
|
: [];
|
|
51
59
|
return [
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import execa from 'execa';
|
|
4
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
5
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -68,10 +66,10 @@ export declare const RenderInternals: {
|
|
|
68
66
|
width: number;
|
|
69
67
|
height: number;
|
|
70
68
|
scale: number;
|
|
71
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
69
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
72
70
|
wantsImageSequence: boolean;
|
|
73
71
|
}) => void;
|
|
74
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
72
|
+
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
|
|
75
73
|
tmpDir: (str: string) => string;
|
|
76
74
|
deleteDirectory: (directory: string) => void;
|
|
77
75
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -128,7 +126,7 @@ export declare const RenderInternals: {
|
|
|
128
126
|
};
|
|
129
127
|
registerErrorSymbolicationLock: () => number;
|
|
130
128
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
131
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
129
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
132
130
|
mimeContentType: typeof mimeContentType;
|
|
133
131
|
mimeLookup: typeof mimeLookup;
|
|
134
132
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -142,11 +140,11 @@ export declare const RenderInternals: {
|
|
|
142
140
|
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
143
141
|
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
144
142
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
145
|
-
DEFAULT_PIXEL_FORMAT: "yuv420p" | "
|
|
143
|
+
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
146
144
|
validateJpegQuality: (q: unknown) => void;
|
|
147
145
|
DEFAULT_TIMEOUT: number;
|
|
148
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
149
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
146
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
147
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
|
|
150
148
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
151
149
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
152
150
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -163,10 +161,10 @@ export declare const RenderInternals: {
|
|
|
163
161
|
output: string;
|
|
164
162
|
onProgress: (p: number) => void;
|
|
165
163
|
numberOfFrames: number;
|
|
166
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
164
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
167
165
|
fps: number;
|
|
168
166
|
numberOfGifLoops: number | null;
|
|
169
|
-
audioCodec: "
|
|
167
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
170
168
|
audioBitrate: string | null;
|
|
171
169
|
indent: boolean;
|
|
172
170
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
@@ -174,19 +172,19 @@ export declare const RenderInternals: {
|
|
|
174
172
|
getMinConcurrency: () => number;
|
|
175
173
|
getMaxConcurrency: () => number;
|
|
176
174
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
177
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
175
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
178
176
|
preferLossless: boolean;
|
|
179
|
-
}) => "
|
|
177
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
180
178
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
181
179
|
defaultFileExtensionMap: {
|
|
182
180
|
h264: {
|
|
183
181
|
default: import("./file-extensions").FileExtension;
|
|
184
182
|
forAudioCodec: {
|
|
185
|
-
|
|
183
|
+
aac: {
|
|
186
184
|
possible: import("./file-extensions").FileExtension[];
|
|
187
185
|
default: import("./file-extensions").FileExtension;
|
|
188
186
|
};
|
|
189
|
-
|
|
187
|
+
mp3: {
|
|
190
188
|
possible: import("./file-extensions").FileExtension[];
|
|
191
189
|
default: import("./file-extensions").FileExtension;
|
|
192
190
|
};
|
|
@@ -212,11 +210,11 @@ export declare const RenderInternals: {
|
|
|
212
210
|
vp8: {
|
|
213
211
|
default: import("./file-extensions").FileExtension;
|
|
214
212
|
forAudioCodec: {
|
|
215
|
-
|
|
213
|
+
opus: {
|
|
216
214
|
possible: import("./file-extensions").FileExtension[];
|
|
217
215
|
default: import("./file-extensions").FileExtension;
|
|
218
216
|
};
|
|
219
|
-
|
|
217
|
+
"pcm-16": {
|
|
220
218
|
possible: import("./file-extensions").FileExtension[];
|
|
221
219
|
default: import("./file-extensions").FileExtension;
|
|
222
220
|
};
|
|
@@ -225,20 +223,20 @@ export declare const RenderInternals: {
|
|
|
225
223
|
vp9: {
|
|
226
224
|
default: import("./file-extensions").FileExtension;
|
|
227
225
|
forAudioCodec: {
|
|
228
|
-
|
|
226
|
+
opus: {
|
|
229
227
|
possible: import("./file-extensions").FileExtension[];
|
|
230
228
|
default: import("./file-extensions").FileExtension;
|
|
231
229
|
};
|
|
232
|
-
|
|
230
|
+
"pcm-16": {
|
|
233
231
|
possible: import("./file-extensions").FileExtension[];
|
|
234
232
|
default: import("./file-extensions").FileExtension;
|
|
235
233
|
};
|
|
236
234
|
};
|
|
237
235
|
};
|
|
238
|
-
|
|
236
|
+
prores: {
|
|
239
237
|
default: import("./file-extensions").FileExtension;
|
|
240
238
|
forAudioCodec: {
|
|
241
|
-
|
|
239
|
+
aac: {
|
|
242
240
|
possible: import("./file-extensions").FileExtension[];
|
|
243
241
|
default: import("./file-extensions").FileExtension;
|
|
244
242
|
};
|
|
@@ -261,22 +259,22 @@ export declare const RenderInternals: {
|
|
|
261
259
|
};
|
|
262
260
|
};
|
|
263
261
|
};
|
|
264
|
-
|
|
262
|
+
mp3: {
|
|
265
263
|
default: import("./file-extensions").FileExtension;
|
|
266
264
|
forAudioCodec: {
|
|
265
|
+
mp3: {
|
|
266
|
+
possible: import("./file-extensions").FileExtension[];
|
|
267
|
+
default: import("./file-extensions").FileExtension;
|
|
268
|
+
};
|
|
267
269
|
"pcm-16": {
|
|
268
270
|
possible: import("./file-extensions").FileExtension[];
|
|
269
271
|
default: import("./file-extensions").FileExtension;
|
|
270
272
|
};
|
|
271
273
|
};
|
|
272
274
|
};
|
|
273
|
-
|
|
275
|
+
wav: {
|
|
274
276
|
default: import("./file-extensions").FileExtension;
|
|
275
277
|
forAudioCodec: {
|
|
276
|
-
aac: {
|
|
277
|
-
possible: import("./file-extensions").FileExtension[];
|
|
278
|
-
default: import("./file-extensions").FileExtension;
|
|
279
|
-
};
|
|
280
278
|
"pcm-16": {
|
|
281
279
|
possible: import("./file-extensions").FileExtension[];
|
|
282
280
|
default: import("./file-extensions").FileExtension;
|
|
@@ -313,9 +311,9 @@ export declare const RenderInternals: {
|
|
|
313
311
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
314
312
|
readonly wav: readonly ["pcm-16"];
|
|
315
313
|
};
|
|
316
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
317
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
318
|
-
getExecutablePath: (type: "
|
|
314
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
|
|
315
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
316
|
+
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
|
|
319
317
|
callFf: ({ args, bin, indent, logLevel, options, }: {
|
|
320
318
|
bin: "ffmpeg" | "ffprobe";
|
|
321
319
|
args: (string | null)[];
|
|
@@ -325,8 +323,8 @@ export declare const RenderInternals: {
|
|
|
325
323
|
}) => execa.ExecaChildProcess<string>;
|
|
326
324
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
327
325
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
328
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
329
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
326
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
327
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
330
328
|
DEFAULT_JPEG_QUALITY: number;
|
|
331
329
|
chalk: {
|
|
332
330
|
enabled: () => boolean;
|
|
@@ -421,7 +419,7 @@ export declare const RenderInternals: {
|
|
|
421
419
|
frame: number;
|
|
422
420
|
serializedInputPropsWithCustomSchema: string;
|
|
423
421
|
serializedResolvedPropsWithCustomSchema: string;
|
|
424
|
-
imageFormat: "
|
|
422
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
425
423
|
jpegQuality: number;
|
|
426
424
|
puppeteerInstance: HeadlessBrowser | null;
|
|
427
425
|
envVariables: Record<string, string>;
|
|
@@ -6,6 +6,7 @@ export declare const extractUrlAndSourceFromUrl: (url: string) => {
|
|
|
6
6
|
src: string;
|
|
7
7
|
time: number;
|
|
8
8
|
transparent: boolean;
|
|
9
|
+
toneMapped: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const startOffthreadVideoServer: ({ downloadMap, concurrency, logLevel, indent, offthreadVideoCacheSizeInBytes, }: {
|
|
11
12
|
downloadMap: DownloadMap;
|
|
@@ -23,10 +23,15 @@ const extractUrlAndSourceFromUrl = (url) => {
|
|
|
23
23
|
throw new Error('Did not get `time` parameter');
|
|
24
24
|
}
|
|
25
25
|
const transparent = params.get('transparent');
|
|
26
|
+
const toneMapped = params.get('toneMapped');
|
|
27
|
+
if (!toneMapped) {
|
|
28
|
+
throw new Error('Did not get `toneMapped` parameter');
|
|
29
|
+
}
|
|
26
30
|
return {
|
|
27
31
|
src,
|
|
28
32
|
time: parseFloat(time),
|
|
29
33
|
transparent: transparent === 'true',
|
|
34
|
+
toneMapped: toneMapped === 'true',
|
|
30
35
|
};
|
|
31
36
|
};
|
|
32
37
|
exports.extractUrlAndSourceFromUrl = extractUrlAndSourceFromUrl;
|
|
@@ -61,7 +66,7 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
61
66
|
response.end();
|
|
62
67
|
return;
|
|
63
68
|
}
|
|
64
|
-
const { src, time, transparent } = (0, exports.extractUrlAndSourceFromUrl)(req.url);
|
|
69
|
+
const { src, time, transparent, toneMapped } = (0, exports.extractUrlAndSourceFromUrl)(req.url);
|
|
65
70
|
response.setHeader('access-control-allow-origin', '*');
|
|
66
71
|
if (transparent) {
|
|
67
72
|
response.setHeader('content-type', `image/png`);
|
|
@@ -96,12 +101,16 @@ const startOffthreadVideoServer = ({ downloadMap, concurrency, logLevel, indent,
|
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
extractStart = Date.now();
|
|
99
|
-
|
|
104
|
+
compositor
|
|
105
|
+
.executeCommand('ExtractFrame', {
|
|
100
106
|
src: to,
|
|
101
107
|
original_src: src,
|
|
102
108
|
time,
|
|
103
109
|
transparent,
|
|
104
|
-
|
|
110
|
+
tone_mapped: toneMapped,
|
|
111
|
+
})
|
|
112
|
+
.then(resolve)
|
|
113
|
+
.catch(reject);
|
|
105
114
|
});
|
|
106
115
|
})
|
|
107
116
|
.then((readable) => {
|
package/dist/options/index.d.ts
CHANGED
|
@@ -114,17 +114,17 @@ export declare const allOptions: {
|
|
|
114
114
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
115
115
|
ssrName: string;
|
|
116
116
|
docLink: string;
|
|
117
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
117
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
118
118
|
getValue: ({ commandLine }: {
|
|
119
119
|
commandLine: Record<string, unknown>;
|
|
120
120
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
121
121
|
outName: string | null;
|
|
122
122
|
downloadName: string | null;
|
|
123
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
124
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
125
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
123
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
124
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
125
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
126
126
|
}) => {
|
|
127
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
127
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
128
128
|
source: string;
|
|
129
129
|
};
|
|
130
130
|
setConfig: (newCodec: import("..").CodecOrUndefined) => void;
|
|
@@ -123,17 +123,17 @@ export declare const optionsMap: {
|
|
|
123
123
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
124
124
|
ssrName: string;
|
|
125
125
|
docLink: string;
|
|
126
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
126
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
127
127
|
getValue: ({ commandLine }: {
|
|
128
128
|
commandLine: Record<string, unknown>;
|
|
129
129
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
130
130
|
outName: string | null;
|
|
131
131
|
downloadName: string | null;
|
|
132
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
133
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
134
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
132
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
133
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
134
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null;
|
|
135
135
|
}) => {
|
|
136
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
136
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
137
137
|
source: string;
|
|
138
138
|
};
|
|
139
139
|
setConfig: (newCodec: import("..").CodecOrUndefined) => void;
|
|
@@ -6,7 +6,7 @@ export declare const videoCodecOption: {
|
|
|
6
6
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
ssrName: string;
|
|
8
8
|
docLink: string;
|
|
9
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
9
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
10
10
|
getValue: ({ commandLine }: {
|
|
11
11
|
commandLine: Record<string, unknown>;
|
|
12
12
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.117",
|
|
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.117"
|
|
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-linux-arm64-gnu": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-
|
|
46
|
-
"@remotion/compositor-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.117",
|
|
44
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.117",
|
|
45
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.117",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.117",
|
|
47
|
+
"@remotion/compositor-linux-x64-musl": "4.0.117",
|
|
48
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.117",
|
|
49
|
+
"@remotion/compositor-darwin-x64": "4.0.117"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|