@remotion/renderer 4.0.47 → 4.0.49
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/LICENSE.md +7 -3
- package/dist/client.d.ts +37 -37
- package/dist/compositor/payloads.d.ts +6 -0
- package/dist/extract-audio.d.ts +6 -0
- package/dist/extract-audio.js +19 -0
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-port.d.ts +12 -1
- package/dist/get-port.js +39 -25
- package/dist/get-video-metadata.d.ts +1 -0
- package/dist/index.d.ts +38 -32
- package/dist/index.js +3 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/serve-static.js +9 -2
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
- package/dist/options/render-expiry-days.d.ts +0 -8
- package/dist/options/render-expiry-days.js +0 -14
- package/dist/presets-profile.d.ts +0 -7
- package/dist/presets-profile.js +0 -27
package/LICENSE.md
CHANGED
|
@@ -7,7 +7,7 @@ Depending on the type of your legal entity, you are granted permission to use Re
|
|
|
7
7
|
|
|
8
8
|
## Free license
|
|
9
9
|
|
|
10
|
-
Copyright © 2023 [Remotion](https://www.remotion.dev
|
|
10
|
+
Copyright © 2023 [Remotion](https://www.remotion.dev)
|
|
11
11
|
|
|
12
12
|
### Eligibility
|
|
13
13
|
|
|
@@ -36,6 +36,10 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
|
36
36
|
|
|
37
37
|
## Company license
|
|
38
38
|
|
|
39
|
-
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
|
|
39
|
+
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
|
|
40
40
|
|
|
41
|
-
Visit [remotion.pro](https://www.remotion.pro) for pricing and to buy a license.
|
|
41
|
+
Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
|
|
42
|
+
|
|
43
|
+
### FAQs
|
|
44
|
+
|
|
45
|
+
Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
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" | 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"];
|
|
@@ -26,11 +26,11 @@ export declare const BrowserSafeApis: {
|
|
|
26
26
|
h264: {
|
|
27
27
|
default: import("./file-extensions").FileExtension;
|
|
28
28
|
forAudioCodec: {
|
|
29
|
-
|
|
29
|
+
aac: {
|
|
30
30
|
possible: import("./file-extensions").FileExtension[];
|
|
31
31
|
default: import("./file-extensions").FileExtension;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
mp3: {
|
|
34
34
|
possible: import("./file-extensions").FileExtension[];
|
|
35
35
|
default: import("./file-extensions").FileExtension;
|
|
36
36
|
};
|
|
@@ -56,11 +56,11 @@ export declare const BrowserSafeApis: {
|
|
|
56
56
|
vp8: {
|
|
57
57
|
default: import("./file-extensions").FileExtension;
|
|
58
58
|
forAudioCodec: {
|
|
59
|
-
|
|
59
|
+
opus: {
|
|
60
60
|
possible: import("./file-extensions").FileExtension[];
|
|
61
61
|
default: import("./file-extensions").FileExtension;
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
"pcm-16": {
|
|
64
64
|
possible: import("./file-extensions").FileExtension[];
|
|
65
65
|
default: import("./file-extensions").FileExtension;
|
|
66
66
|
};
|
|
@@ -69,20 +69,20 @@ export declare const BrowserSafeApis: {
|
|
|
69
69
|
vp9: {
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
forAudioCodec: {
|
|
72
|
-
|
|
72
|
+
opus: {
|
|
73
73
|
possible: import("./file-extensions").FileExtension[];
|
|
74
74
|
default: import("./file-extensions").FileExtension;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
"pcm-16": {
|
|
77
77
|
possible: import("./file-extensions").FileExtension[];
|
|
78
78
|
default: import("./file-extensions").FileExtension;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
prores: {
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
forAudioCodec: {
|
|
85
|
-
|
|
85
|
+
aac: {
|
|
86
86
|
possible: import("./file-extensions").FileExtension[];
|
|
87
87
|
default: import("./file-extensions").FileExtension;
|
|
88
88
|
};
|
|
@@ -105,22 +105,22 @@ export declare const BrowserSafeApis: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
mp3: {
|
|
109
109
|
default: import("./file-extensions").FileExtension;
|
|
110
110
|
forAudioCodec: {
|
|
111
|
+
mp3: {
|
|
112
|
+
possible: import("./file-extensions").FileExtension[];
|
|
113
|
+
default: import("./file-extensions").FileExtension;
|
|
114
|
+
};
|
|
111
115
|
"pcm-16": {
|
|
112
116
|
possible: import("./file-extensions").FileExtension[];
|
|
113
117
|
default: import("./file-extensions").FileExtension;
|
|
114
118
|
};
|
|
115
119
|
};
|
|
116
120
|
};
|
|
117
|
-
|
|
121
|
+
wav: {
|
|
118
122
|
default: import("./file-extensions").FileExtension;
|
|
119
123
|
forAudioCodec: {
|
|
120
|
-
aac: {
|
|
121
|
-
possible: import("./file-extensions").FileExtension[];
|
|
122
|
-
default: import("./file-extensions").FileExtension;
|
|
123
|
-
};
|
|
124
124
|
"pcm-16": {
|
|
125
125
|
possible: import("./file-extensions").FileExtension[];
|
|
126
126
|
default: import("./file-extensions").FileExtension;
|
|
@@ -147,37 +147,37 @@ export declare const BrowserSafeApis: {
|
|
|
147
147
|
};
|
|
148
148
|
defaultAudioCodecs: {
|
|
149
149
|
h264: {
|
|
150
|
-
compressed: "
|
|
151
|
-
lossless: "
|
|
150
|
+
compressed: "aac" | "mp3" | "pcm-16" | null;
|
|
151
|
+
lossless: "aac" | "mp3" | "pcm-16" | null;
|
|
152
152
|
};
|
|
153
153
|
h265: {
|
|
154
154
|
compressed: "aac" | "pcm-16" | null;
|
|
155
155
|
lossless: "aac" | "pcm-16" | null;
|
|
156
156
|
};
|
|
157
157
|
vp8: {
|
|
158
|
-
compressed: "
|
|
159
|
-
lossless: "
|
|
158
|
+
compressed: "opus" | "pcm-16" | null;
|
|
159
|
+
lossless: "opus" | "pcm-16" | null;
|
|
160
160
|
};
|
|
161
161
|
vp9: {
|
|
162
|
-
compressed: "
|
|
163
|
-
lossless: "
|
|
162
|
+
compressed: "opus" | "pcm-16" | null;
|
|
163
|
+
lossless: "opus" | "pcm-16" | null;
|
|
164
164
|
};
|
|
165
|
-
|
|
166
|
-
compressed: "
|
|
167
|
-
lossless: "
|
|
165
|
+
prores: {
|
|
166
|
+
compressed: "aac" | "pcm-16" | null;
|
|
167
|
+
lossless: "aac" | "pcm-16" | null;
|
|
168
168
|
};
|
|
169
169
|
aac: {
|
|
170
170
|
compressed: "aac" | "pcm-16" | null;
|
|
171
171
|
lossless: "aac" | "pcm-16" | null;
|
|
172
172
|
};
|
|
173
|
+
mp3: {
|
|
174
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
175
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
176
|
+
};
|
|
173
177
|
wav: {
|
|
174
178
|
compressed: "pcm-16" | null;
|
|
175
179
|
lossless: "pcm-16" | null;
|
|
176
180
|
};
|
|
177
|
-
prores: {
|
|
178
|
-
compressed: "aac" | "pcm-16" | null;
|
|
179
|
-
lossless: "aac" | "pcm-16" | null;
|
|
180
|
-
};
|
|
181
181
|
"h264-mkv": {
|
|
182
182
|
compressed: "mp3" | "pcm-16" | null;
|
|
183
183
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -187,10 +187,10 @@ export declare const BrowserSafeApis: {
|
|
|
187
187
|
lossless: null;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
191
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
190
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
191
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
192
192
|
codec: T_1;
|
|
193
|
-
audioCodec: "
|
|
193
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
194
194
|
extension: string;
|
|
195
195
|
preferLossless: boolean;
|
|
196
196
|
}) => void;
|
|
@@ -281,7 +281,7 @@ export declare const BrowserSafeApis: {
|
|
|
281
281
|
description: () => JSX.Element;
|
|
282
282
|
docLink: string;
|
|
283
283
|
ssrName: string;
|
|
284
|
-
type: "
|
|
284
|
+
type: "bt709" | "default";
|
|
285
285
|
};
|
|
286
286
|
deleteAfterOption: {
|
|
287
287
|
name: string;
|
|
@@ -391,6 +391,6 @@ export declare const BrowserSafeApis: {
|
|
|
391
391
|
type: number | null;
|
|
392
392
|
}];
|
|
393
393
|
};
|
|
394
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
395
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
394
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
395
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
396
396
|
};
|
|
@@ -36,6 +36,8 @@ export type VideoMetadata = {
|
|
|
36
36
|
canPlayInVideoTag: boolean;
|
|
37
37
|
supportsSeeking: boolean;
|
|
38
38
|
colorSpace: 'rgb' | 'bt601' | 'bt709' | 'bt2020-ncl' | 'bt2020-cl' | 'fcc' | 'bt470bg' | 'smpte170m' | 'smpte240m' | 'ycgco' | 'smpte2085' | 'chroma-derived-ncl' | 'chroma-derived-cl' | 'ictcp' | 'unknown';
|
|
39
|
+
audioCodec: null | 'opus' | 'aac' | 'mp3' | 'pcm-f16le' | 'pcm-f24le' | 'pcm-f32be' | 'pcm-s16be' | 'pcm-s16le' | 'pcm-f32le' | 'pcm-s32be' | 'pcm-s32le' | 'pcm-s64be' | 'pcm-s64le' | 'pcm-u16be' | 'pcm-u16le' | 'pcm-u24be' | 'pcm-u24le' | 'pcm-u32be' | 'pcm-u32le' | 'pcm-u8' | 'pcm-f64be' | 'pcm-s24be' | 'pcm-s24le' | 'pcm-s8' | 'pcm-s16be-planar' | 'pcm-s8-planar' | 'pcm-s24le-planar' | 'pcm-s32le-planar' | 'unknown';
|
|
40
|
+
audioFileExtension: string | null;
|
|
39
41
|
};
|
|
40
42
|
type SilentPart = {
|
|
41
43
|
startInSeconds: number;
|
|
@@ -88,6 +90,10 @@ export type CompositorCommand = {
|
|
|
88
90
|
GetVideoMetadata: {
|
|
89
91
|
src: string;
|
|
90
92
|
};
|
|
93
|
+
ExtractAudio: {
|
|
94
|
+
input_path: string;
|
|
95
|
+
output_path: string;
|
|
96
|
+
};
|
|
91
97
|
VideoMetadata: VideoMetadata;
|
|
92
98
|
};
|
|
93
99
|
export type CompositorCommandSerialized<T extends keyof CompositorCommand> = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractAudio = void 0;
|
|
4
|
+
const compositor_1 = require("./compositor/compositor");
|
|
5
|
+
const extractAudio = async (options) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const compositor = (0, compositor_1.startLongRunningCompositor)({
|
|
8
|
+
maximumFrameCacheItemsInBytes: null,
|
|
9
|
+
logLevel: (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
10
|
+
indent: false,
|
|
11
|
+
});
|
|
12
|
+
await compositor.executeCommand('ExtractAudio', {
|
|
13
|
+
input_path: options.videoSource,
|
|
14
|
+
output_path: options.audioOutput,
|
|
15
|
+
});
|
|
16
|
+
compositor.finishCommands();
|
|
17
|
+
await compositor.waitForDone();
|
|
18
|
+
};
|
|
19
|
+
exports.extractAudio = extractAudio;
|
|
@@ -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" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
package/dist/get-port.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
type PortStatus = 'available' | 'unavailable';
|
|
2
|
+
export declare const testPortAvailableOnMultipleHosts: ({ hosts, port, }: {
|
|
3
|
+
port: number;
|
|
4
|
+
hosts: string[];
|
|
5
|
+
}) => Promise<PortStatus>;
|
|
6
|
+
export declare const getDesiredPort: ({ desiredPort, from, hostsToTry, to, }: {
|
|
7
|
+
desiredPort: number | undefined;
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
hostsToTry: string[];
|
|
11
|
+
}) => Promise<{
|
|
2
12
|
port: number;
|
|
3
13
|
didUsePort: () => void;
|
|
4
14
|
}>;
|
|
15
|
+
export {};
|
package/dist/get-port.js
CHANGED
|
@@ -3,48 +3,62 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getDesiredPort = void 0;
|
|
6
|
+
exports.getDesiredPort = exports.testPortAvailableOnMultipleHosts = void 0;
|
|
7
7
|
const net_1 = __importDefault(require("net"));
|
|
8
8
|
const locks_1 = require("./locks");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const isPortAvailableOnHost = ({ portToTry, host, }) => {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
let status = 'unavailable';
|
|
12
|
+
const socket = new net_1.default.Socket();
|
|
13
|
+
socket.on('connect', () => {
|
|
14
|
+
status = 'unavailable';
|
|
15
|
+
socket.destroy();
|
|
16
|
+
});
|
|
17
|
+
socket.setTimeout(3000);
|
|
18
|
+
socket.on('timeout', () => {
|
|
19
|
+
status = 'unavailable';
|
|
20
|
+
socket.destroy();
|
|
21
|
+
resolve(status);
|
|
22
|
+
});
|
|
23
|
+
socket.on('error', () => {
|
|
24
|
+
status = 'available';
|
|
25
|
+
});
|
|
26
|
+
socket.on('close', () => resolve(status));
|
|
27
|
+
socket.connect(portToTry, host);
|
|
16
28
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
socket.on('close', () => resolve(status));
|
|
27
|
-
socket.connect(portToTry, host);
|
|
28
|
-
});
|
|
29
|
-
const getPort = async (from, to) => {
|
|
29
|
+
};
|
|
30
|
+
const testPortAvailableOnMultipleHosts = async ({ hosts, port, }) => {
|
|
31
|
+
const results = await Promise.all(hosts.map((host) => {
|
|
32
|
+
return isPortAvailableOnHost({ portToTry: port, host });
|
|
33
|
+
}));
|
|
34
|
+
return results.every((r) => r === 'available') ? 'available' : 'unavailable';
|
|
35
|
+
};
|
|
36
|
+
exports.testPortAvailableOnMultipleHosts = testPortAvailableOnMultipleHosts;
|
|
37
|
+
const getPort = async ({ from, to, hostsToTest, }) => {
|
|
30
38
|
const ports = makeRange(from, to);
|
|
31
39
|
for (const port of ports) {
|
|
32
|
-
if ((await
|
|
40
|
+
if ((await (0, exports.testPortAvailableOnMultipleHosts)({
|
|
41
|
+
port,
|
|
42
|
+
hosts: hostsToTest,
|
|
43
|
+
})) === 'available') {
|
|
33
44
|
return port;
|
|
34
45
|
}
|
|
35
46
|
}
|
|
36
47
|
throw new Error('No available ports found');
|
|
37
48
|
};
|
|
38
49
|
const portLocks = (0, locks_1.createLock)({ timeout: 10000 });
|
|
39
|
-
const getDesiredPort = async (desiredPort, from, to) => {
|
|
50
|
+
const getDesiredPort = async ({ desiredPort, from, hostsToTry, to, }) => {
|
|
40
51
|
await portLocks.waitForAllToBeDone();
|
|
41
52
|
const lockPortSelection = portLocks.lock();
|
|
42
53
|
const didUsePort = () => portLocks.unlock(lockPortSelection);
|
|
43
54
|
if (typeof desiredPort !== 'undefined' &&
|
|
44
|
-
(await
|
|
55
|
+
(await (0, exports.testPortAvailableOnMultipleHosts)({
|
|
56
|
+
port: desiredPort,
|
|
57
|
+
hosts: ['::', '::1'],
|
|
58
|
+
})) === 'available') {
|
|
45
59
|
return { port: desiredPort, didUsePort };
|
|
46
60
|
}
|
|
47
|
-
const actualPort = await getPort(from, to);
|
|
61
|
+
const actualPort = await getPort({ from, to, hostsToTest: hostsToTry });
|
|
48
62
|
// If did specify a port but did not get that one, fail hard.
|
|
49
63
|
if (desiredPort && desiredPort !== actualPort) {
|
|
50
64
|
throw new Error(`You specified port ${desiredPort} to be used for the HTTP server, but it is not available. Choose a different port or remove the setting to let Remotion automatically select a free port.`);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VideoMetadata } from './compositor/payloads';
|
|
2
2
|
import type { LogLevel } from './log-level';
|
|
3
|
+
export { VideoMetadata } from './compositor/payloads';
|
|
3
4
|
export declare const getVideoMetadata: (videoSource: string, options?: {
|
|
4
5
|
logLevel?: LogLevel;
|
|
5
6
|
}) => Promise<VideoMetadata>;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,12 +14,13 @@ export type { HeadlessBrowser } from './browser/Browser';
|
|
|
14
14
|
export { Codec, CodecOrUndefined } from './codec';
|
|
15
15
|
export { Crf } from './crf';
|
|
16
16
|
export { ErrorWithStackFrame } from './error-handling/handle-javascript-exception';
|
|
17
|
+
export { extractAudio } from './extract-audio';
|
|
17
18
|
export type { FfmpegOverrideFn } from './ffmpeg-override';
|
|
18
19
|
export { FileExtension } from './file-extensions';
|
|
19
20
|
export { FrameRange } from './frame-range';
|
|
20
21
|
export { getCompositions, GetCompositionsOptions } from './get-compositions';
|
|
21
22
|
export { getSilentParts } from './get-silent-parts';
|
|
22
|
-
export { getVideoMetadata } from './get-video-metadata';
|
|
23
|
+
export { getVideoMetadata, VideoMetadata } from './get-video-metadata';
|
|
23
24
|
export { ImageFormat, StillImageFormat, validateSelectedPixelFormatAndImageFormatCombination, VideoImageFormat, } from './image-format';
|
|
24
25
|
export type { LogLevel } from './log-level';
|
|
25
26
|
export { CancelSignal, makeCancelSignal } from './make-cancel-signal';
|
|
@@ -60,10 +61,10 @@ export declare const RenderInternals: {
|
|
|
60
61
|
width: number;
|
|
61
62
|
height: number;
|
|
62
63
|
scale: number;
|
|
63
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
64
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
64
65
|
wantsImageSequence: boolean;
|
|
65
66
|
}) => void;
|
|
66
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
67
|
+
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;
|
|
67
68
|
tmpDir: (str: string) => string;
|
|
68
69
|
deleteDirectory: (directory: string) => void;
|
|
69
70
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
@@ -88,7 +89,12 @@ export declare const RenderInternals: {
|
|
|
88
89
|
SymbolicateableError: typeof SymbolicateableError;
|
|
89
90
|
getFramesToRender: (frameRange: [number, number], everyNthFrame: number) => number[];
|
|
90
91
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
91
|
-
getDesiredPort: (desiredPort
|
|
92
|
+
getDesiredPort: ({ desiredPort, from, hostsToTry, to, }: {
|
|
93
|
+
desiredPort: number | undefined;
|
|
94
|
+
from: number;
|
|
95
|
+
to: number;
|
|
96
|
+
hostsToTry: string[];
|
|
97
|
+
}) => Promise<{
|
|
92
98
|
port: number;
|
|
93
99
|
didUsePort: () => void;
|
|
94
100
|
}>;
|
|
@@ -113,7 +119,7 @@ export declare const RenderInternals: {
|
|
|
113
119
|
};
|
|
114
120
|
registerErrorSymbolicationLock: () => number;
|
|
115
121
|
unlockErrorSymbolicationLock: (id: number) => void;
|
|
116
|
-
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
122
|
+
canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
|
|
117
123
|
mimeContentType: typeof mimeContentType;
|
|
118
124
|
mimeLookup: typeof mimeLookup;
|
|
119
125
|
validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
|
|
@@ -124,14 +130,14 @@ export declare const RenderInternals: {
|
|
|
124
130
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
125
131
|
DEFAULT_BROWSER: "chrome";
|
|
126
132
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
127
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
128
|
-
validateOpenGlRenderer: (option: "
|
|
133
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
134
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
129
135
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
130
136
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
131
137
|
validateJpegQuality: (q: number | undefined) => void;
|
|
132
138
|
DEFAULT_TIMEOUT: number;
|
|
133
|
-
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "
|
|
134
|
-
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
139
|
+
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
140
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
135
141
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
136
142
|
isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
|
|
137
143
|
isValidLogLevel: (level: string) => boolean;
|
|
@@ -148,28 +154,28 @@ export declare const RenderInternals: {
|
|
|
148
154
|
output: string;
|
|
149
155
|
onProgress: (p: number) => void;
|
|
150
156
|
numberOfFrames: number;
|
|
151
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
157
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
152
158
|
fps: number;
|
|
153
159
|
numberOfGifLoops: number | null;
|
|
154
|
-
audioCodec: "
|
|
160
|
+
audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
155
161
|
audioBitrate: string | null;
|
|
156
162
|
}) => Promise<void>;
|
|
157
163
|
getMinConcurrency: () => number;
|
|
158
164
|
getMaxConcurrency: () => number;
|
|
159
165
|
getDefaultAudioCodec: ({ codec, preferLossless, }: {
|
|
160
|
-
codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
166
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
|
|
161
167
|
preferLossless: boolean;
|
|
162
|
-
}) => "
|
|
168
|
+
}) => "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
163
169
|
validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
|
|
164
170
|
defaultFileExtensionMap: {
|
|
165
171
|
h264: {
|
|
166
172
|
default: import("./file-extensions").FileExtension;
|
|
167
173
|
forAudioCodec: {
|
|
168
|
-
|
|
174
|
+
aac: {
|
|
169
175
|
possible: import("./file-extensions").FileExtension[];
|
|
170
176
|
default: import("./file-extensions").FileExtension;
|
|
171
177
|
};
|
|
172
|
-
|
|
178
|
+
mp3: {
|
|
173
179
|
possible: import("./file-extensions").FileExtension[];
|
|
174
180
|
default: import("./file-extensions").FileExtension;
|
|
175
181
|
};
|
|
@@ -195,11 +201,11 @@ export declare const RenderInternals: {
|
|
|
195
201
|
vp8: {
|
|
196
202
|
default: import("./file-extensions").FileExtension;
|
|
197
203
|
forAudioCodec: {
|
|
198
|
-
|
|
204
|
+
opus: {
|
|
199
205
|
possible: import("./file-extensions").FileExtension[];
|
|
200
206
|
default: import("./file-extensions").FileExtension;
|
|
201
207
|
};
|
|
202
|
-
|
|
208
|
+
"pcm-16": {
|
|
203
209
|
possible: import("./file-extensions").FileExtension[];
|
|
204
210
|
default: import("./file-extensions").FileExtension;
|
|
205
211
|
};
|
|
@@ -208,20 +214,20 @@ export declare const RenderInternals: {
|
|
|
208
214
|
vp9: {
|
|
209
215
|
default: import("./file-extensions").FileExtension;
|
|
210
216
|
forAudioCodec: {
|
|
211
|
-
|
|
217
|
+
opus: {
|
|
212
218
|
possible: import("./file-extensions").FileExtension[];
|
|
213
219
|
default: import("./file-extensions").FileExtension;
|
|
214
220
|
};
|
|
215
|
-
|
|
221
|
+
"pcm-16": {
|
|
216
222
|
possible: import("./file-extensions").FileExtension[];
|
|
217
223
|
default: import("./file-extensions").FileExtension;
|
|
218
224
|
};
|
|
219
225
|
};
|
|
220
226
|
};
|
|
221
|
-
|
|
227
|
+
prores: {
|
|
222
228
|
default: import("./file-extensions").FileExtension;
|
|
223
229
|
forAudioCodec: {
|
|
224
|
-
|
|
230
|
+
aac: {
|
|
225
231
|
possible: import("./file-extensions").FileExtension[];
|
|
226
232
|
default: import("./file-extensions").FileExtension;
|
|
227
233
|
};
|
|
@@ -244,22 +250,22 @@ export declare const RenderInternals: {
|
|
|
244
250
|
};
|
|
245
251
|
};
|
|
246
252
|
};
|
|
247
|
-
|
|
253
|
+
mp3: {
|
|
248
254
|
default: import("./file-extensions").FileExtension;
|
|
249
255
|
forAudioCodec: {
|
|
256
|
+
mp3: {
|
|
257
|
+
possible: import("./file-extensions").FileExtension[];
|
|
258
|
+
default: import("./file-extensions").FileExtension;
|
|
259
|
+
};
|
|
250
260
|
"pcm-16": {
|
|
251
261
|
possible: import("./file-extensions").FileExtension[];
|
|
252
262
|
default: import("./file-extensions").FileExtension;
|
|
253
263
|
};
|
|
254
264
|
};
|
|
255
265
|
};
|
|
256
|
-
|
|
266
|
+
wav: {
|
|
257
267
|
default: import("./file-extensions").FileExtension;
|
|
258
268
|
forAudioCodec: {
|
|
259
|
-
aac: {
|
|
260
|
-
possible: import("./file-extensions").FileExtension[];
|
|
261
|
-
default: import("./file-extensions").FileExtension;
|
|
262
|
-
};
|
|
263
269
|
"pcm-16": {
|
|
264
270
|
possible: import("./file-extensions").FileExtension[];
|
|
265
271
|
default: import("./file-extensions").FileExtension;
|
|
@@ -296,8 +302,8 @@ export declare const RenderInternals: {
|
|
|
296
302
|
readonly vp9: readonly ["opus", "pcm-16"];
|
|
297
303
|
readonly wav: readonly ["pcm-16"];
|
|
298
304
|
};
|
|
299
|
-
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
300
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
305
|
+
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
|
|
306
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
|
|
301
307
|
getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
|
|
302
308
|
callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
|
|
303
309
|
dynamicLibraryPathOptions: () => {
|
|
@@ -314,8 +320,8 @@ export declare const RenderInternals: {
|
|
|
314
320
|
};
|
|
315
321
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
316
322
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
317
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
318
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
323
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
324
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
|
|
319
325
|
DEFAULT_JPEG_QUALITY: number;
|
|
320
326
|
chalk: {
|
|
321
327
|
enabled: () => boolean;
|
|
@@ -428,7 +434,7 @@ export declare const RenderInternals: {
|
|
|
428
434
|
frame: number;
|
|
429
435
|
serializedInputPropsWithCustomSchema: string;
|
|
430
436
|
serializedResolvedPropsWithCustomSchema: string;
|
|
431
|
-
imageFormat: "
|
|
437
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
432
438
|
jpegQuality: number;
|
|
433
439
|
puppeteerInstance: HeadlessBrowser | null;
|
|
434
440
|
envVariables: Record<string, string>;
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.ErrorWithStackFrame = void 0;
|
|
29
|
+
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.selectComposition = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getVideoMetadata = exports.getSilentParts = exports.getCompositions = exports.extractAudio = exports.ErrorWithStackFrame = void 0;
|
|
30
30
|
const execa_1 = __importDefault(require("execa"));
|
|
31
31
|
const download_file_1 = require("./assets/download-file");
|
|
32
32
|
const audio_codec_1 = require("./audio-codec");
|
|
@@ -85,6 +85,8 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
|
85
85
|
const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
|
|
86
86
|
var handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
87
87
|
Object.defineProperty(exports, "ErrorWithStackFrame", { enumerable: true, get: function () { return handle_javascript_exception_1.ErrorWithStackFrame; } });
|
|
88
|
+
var extract_audio_1 = require("./extract-audio");
|
|
89
|
+
Object.defineProperty(exports, "extractAudio", { enumerable: true, get: function () { return extract_audio_1.extractAudio; } });
|
|
88
90
|
var get_compositions_2 = require("./get-compositions");
|
|
89
91
|
Object.defineProperty(exports, "getCompositions", { enumerable: true, get: function () { return get_compositions_2.getCompositions; } });
|
|
90
92
|
var get_silent_parts_1 = require("./get-silent-parts");
|
package/dist/serve-static.js
CHANGED
|
@@ -45,13 +45,20 @@ const serveStatic = async (path, options) => {
|
|
|
45
45
|
});
|
|
46
46
|
let selectedPort = null;
|
|
47
47
|
const maxTries = 5;
|
|
48
|
+
// Default Node.js host, but explicity
|
|
49
|
+
const host = '::';
|
|
48
50
|
for (let i = 0; i < maxTries; i++) {
|
|
49
51
|
try {
|
|
50
52
|
selectedPort = await new Promise((resolve, reject) => {
|
|
51
53
|
var _a;
|
|
52
|
-
(0, get_port_1.getDesiredPort)(
|
|
54
|
+
(0, get_port_1.getDesiredPort)({
|
|
55
|
+
desiredPort: (_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined,
|
|
56
|
+
from: 3000,
|
|
57
|
+
to: 3100,
|
|
58
|
+
hostsToTry: ['::', '::1'],
|
|
59
|
+
})
|
|
53
60
|
.then(({ port, didUsePort }) => {
|
|
54
|
-
server.listen(port);
|
|
61
|
+
server.listen({ port, host });
|
|
55
62
|
server.on('listening', () => {
|
|
56
63
|
resolve(port);
|
|
57
64
|
return didUsePort();
|
|
@@ -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" | "prores" | "aac" | "mp3" | "wav" | "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.49",
|
|
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.49"
|
|
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-darwin-x64": "4.0.
|
|
45
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.49",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.49",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.49",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.49",
|
|
47
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.49",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.49",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.49"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAfterOption = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
exports.deleteAfterOption = {
|
|
6
|
-
name: 'Render expiry days',
|
|
7
|
-
cliFlag: 'delete-after',
|
|
8
|
-
description: () => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
|
|
10
|
-
},
|
|
11
|
-
ssrName: 'deleteAfter',
|
|
12
|
-
docLink: 'https://www.remotion.dev/docs/autodelete',
|
|
13
|
-
type: 0,
|
|
14
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Codec } from './codec';
|
|
2
|
-
export declare const x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
|
|
3
|
-
export type x264Preset = typeof x264PresetOptions[number];
|
|
4
|
-
export declare const validateSelectedCodecAndPresetCombination: ({ codec, x264Preset, }: {
|
|
5
|
-
codec: Codec;
|
|
6
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
7
|
-
}) => void;
|
package/dist/presets-profile.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSelectedCodecAndPresetCombination = exports.x264PresetOptions = void 0;
|
|
4
|
-
exports.x264PresetOptions = [
|
|
5
|
-
'ultrafast',
|
|
6
|
-
'superfast',
|
|
7
|
-
'veryfast',
|
|
8
|
-
'faster',
|
|
9
|
-
'fast',
|
|
10
|
-
'medium',
|
|
11
|
-
'slow',
|
|
12
|
-
'slower',
|
|
13
|
-
'veryslow',
|
|
14
|
-
'placebo',
|
|
15
|
-
];
|
|
16
|
-
const validateSelectedCodecAndPresetCombination = ({ codec, x264Preset, }) => {
|
|
17
|
-
if (typeof x264Preset !== 'undefined' && codec !== 'h264') {
|
|
18
|
-
throw new TypeError(`You have set a Preset profile but the codec is "${codec}". Set the codec to "h264" or remove the Preset profile.`);
|
|
19
|
-
}
|
|
20
|
-
if (x264Preset !== undefined &&
|
|
21
|
-
!exports.x264PresetOptions.includes(x264Preset)) {
|
|
22
|
-
throw new TypeError(`The Preset profile "${x264Preset}" is not valid. Valid options are ${exports.x264PresetOptions
|
|
23
|
-
.map((p) => `"${p}"`)
|
|
24
|
-
.join(', ')}`);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.validateSelectedCodecAndPresetCombination = validateSelectedCodecAndPresetCombination;
|