@remotion/renderer 4.0.48 → 4.0.50
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/error-handling/handle-javascript-exception.d.ts +2 -1
- package/dist/error-handling/handle-javascript-exception.js +3 -1
- package/dist/error-handling/symbolicate-error.js +1 -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.js +1 -1
- package/dist/get-silent-parts.d.ts +1 -1
- package/dist/get-video-metadata.d.ts +1 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +5 -1
- package/dist/is-ipv6-supported.d.ts +1 -0
- package/dist/is-ipv6-supported.js +26 -0
- package/dist/logger.d.ts +1 -1
- package/dist/options/color-space.d.ts +1 -1
- package/dist/options/render-expiry-days.d.ts +8 -0
- package/dist/options/render-expiry-days.js +14 -0
- package/dist/presets-profile.d.ts +7 -0
- package/dist/presets-profile.js +27 -0
- package/dist/serve-static.js +6 -3
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
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> = {
|
|
@@ -5,12 +5,13 @@ export declare class ErrorWithStackFrame extends Error {
|
|
|
5
5
|
frame: number | null;
|
|
6
6
|
name: string;
|
|
7
7
|
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
8
|
-
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }: {
|
|
8
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }: {
|
|
9
9
|
message: string;
|
|
10
10
|
symbolicatedStackFrames: SymbolicatedStackFrame[] | null;
|
|
11
11
|
frame: number | null;
|
|
12
12
|
name: string;
|
|
13
13
|
delayRenderCall: SymbolicatedStackFrame[] | null;
|
|
14
|
+
stack: string | undefined;
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
export declare const handleJavascriptException: ({ page, onError, frame, }: {
|
|
@@ -4,12 +4,14 @@ exports.handleJavascriptException = exports.ErrorWithStackFrame = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const symbolicateable_error_1 = require("./symbolicateable-error");
|
|
6
6
|
class ErrorWithStackFrame extends Error {
|
|
7
|
-
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }) {
|
|
7
|
+
constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }) {
|
|
8
8
|
super(message);
|
|
9
9
|
this.symbolicatedStackFrames = symbolicatedStackFrames;
|
|
10
10
|
this.frame = frame;
|
|
11
11
|
this.name = name;
|
|
12
12
|
this.delayRenderCall = delayRenderCall;
|
|
13
|
+
// If error symbolication did not yield any stack frames, we print the original stack
|
|
14
|
+
this.stack = stack;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
exports.ErrorWithStackFrame = ErrorWithStackFrame;
|
|
@@ -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.js
CHANGED
|
@@ -54,7 +54,7 @@ const getDesiredPort = async ({ desiredPort, from, hostsToTry, to, }) => {
|
|
|
54
54
|
if (typeof desiredPort !== 'undefined' &&
|
|
55
55
|
(await (0, exports.testPortAvailableOnMultipleHosts)({
|
|
56
56
|
port: desiredPort,
|
|
57
|
-
hosts: ['
|
|
57
|
+
hosts: ['::', '::1'],
|
|
58
58
|
})) === 'available') {
|
|
59
59
|
return { port: desiredPort, didUsePort };
|
|
60
60
|
}
|
|
@@ -3,6 +3,6 @@ import type { LogLevel } from './log-level';
|
|
|
3
3
|
export declare const getSilentParts: ({ src, noiseThresholdInDecibels: passedNoiseThresholdInDecibels, minDurationInSeconds: passedMinDuration, logLevel, }: {
|
|
4
4
|
src: string;
|
|
5
5
|
minDurationInSeconds?: number | undefined;
|
|
6
|
-
logLevel?: "
|
|
6
|
+
logLevel?: "verbose" | "info" | "warn" | "error" | undefined;
|
|
7
7
|
noiseThresholdInDecibels?: number | undefined;
|
|
8
8
|
}) => Promise<GetSilentPartsResponse>;
|
|
@@ -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
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import execa from 'execa';
|
|
4
2
|
import { HeadlessBrowser } from './browser/Browser';
|
|
5
3
|
import { SymbolicateableError } from './error-handling/symbolicateable-error';
|
|
@@ -14,12 +12,13 @@ export type { HeadlessBrowser } from './browser/Browser';
|
|
|
14
12
|
export { Codec, CodecOrUndefined } from './codec';
|
|
15
13
|
export { Crf } from './crf';
|
|
16
14
|
export { ErrorWithStackFrame } from './error-handling/handle-javascript-exception';
|
|
15
|
+
export { extractAudio } from './extract-audio';
|
|
17
16
|
export type { FfmpegOverrideFn } from './ffmpeg-override';
|
|
18
17
|
export { FileExtension } from './file-extensions';
|
|
19
18
|
export { FrameRange } from './frame-range';
|
|
20
19
|
export { getCompositions, GetCompositionsOptions } from './get-compositions';
|
|
21
20
|
export { getSilentParts } from './get-silent-parts';
|
|
22
|
-
export { getVideoMetadata } from './get-video-metadata';
|
|
21
|
+
export { getVideoMetadata, VideoMetadata } from './get-video-metadata';
|
|
23
22
|
export { ImageFormat, StillImageFormat, validateSelectedPixelFormatAndImageFormatCombination, VideoImageFormat, } from './image-format';
|
|
24
23
|
export type { LogLevel } from './log-level';
|
|
25
24
|
export { CancelSignal, makeCancelSignal } from './make-cancel-signal';
|
|
@@ -129,8 +128,8 @@ export declare const RenderInternals: {
|
|
|
129
128
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
130
129
|
DEFAULT_BROWSER: "chrome";
|
|
131
130
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
132
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
133
|
-
validateOpenGlRenderer: (option: "
|
|
131
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
132
|
+
validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | null;
|
|
134
133
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
135
134
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
136
135
|
validateJpegQuality: (q: number | undefined) => void;
|
|
@@ -319,8 +318,8 @@ export declare const RenderInternals: {
|
|
|
319
318
|
};
|
|
320
319
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
321
320
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
322
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
323
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
321
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
322
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
324
323
|
DEFAULT_JPEG_QUALITY: number;
|
|
325
324
|
chalk: {
|
|
326
325
|
enabled: () => boolean;
|
|
@@ -433,7 +432,7 @@ export declare const RenderInternals: {
|
|
|
433
432
|
frame: number;
|
|
434
433
|
serializedInputPropsWithCustomSchema: string;
|
|
435
434
|
serializedResolvedPropsWithCustomSchema: string;
|
|
436
|
-
imageFormat: "
|
|
435
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
437
436
|
jpegQuality: number;
|
|
438
437
|
puppeteerInstance: HeadlessBrowser | null;
|
|
439
438
|
envVariables: Record<string, string>;
|
|
@@ -523,4 +522,5 @@ export declare const RenderInternals: {
|
|
|
523
522
|
}>;
|
|
524
523
|
validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
|
|
525
524
|
copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
525
|
+
isIpV6Supported: () => boolean;
|
|
526
526
|
};
|
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");
|
|
@@ -60,6 +60,7 @@ const get_local_browser_executable_1 = require("./get-local-browser-executable")
|
|
|
60
60
|
const get_port_1 = require("./get-port");
|
|
61
61
|
const image_format_1 = require("./image-format");
|
|
62
62
|
const is_audio_codec_1 = require("./is-audio-codec");
|
|
63
|
+
const is_ipv6_supported_1 = require("./is-ipv6-supported");
|
|
63
64
|
const is_serve_url_1 = require("./is-serve-url");
|
|
64
65
|
const jpeg_quality_1 = require("./jpeg-quality");
|
|
65
66
|
const log_level_1 = require("./log-level");
|
|
@@ -85,6 +86,8 @@ const validate_videobitrate_1 = require("./validate-videobitrate");
|
|
|
85
86
|
const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
|
|
86
87
|
var handle_javascript_exception_1 = require("./error-handling/handle-javascript-exception");
|
|
87
88
|
Object.defineProperty(exports, "ErrorWithStackFrame", { enumerable: true, get: function () { return handle_javascript_exception_1.ErrorWithStackFrame; } });
|
|
89
|
+
var extract_audio_1 = require("./extract-audio");
|
|
90
|
+
Object.defineProperty(exports, "extractAudio", { enumerable: true, get: function () { return extract_audio_1.extractAudio; } });
|
|
88
91
|
var get_compositions_2 = require("./get-compositions");
|
|
89
92
|
Object.defineProperty(exports, "getCompositions", { enumerable: true, get: function () { return get_compositions_2.getCompositions; } });
|
|
90
93
|
var get_silent_parts_1 = require("./get-silent-parts");
|
|
@@ -189,6 +192,7 @@ exports.RenderInternals = {
|
|
|
189
192
|
internalRenderMedia: render_media_1.internalRenderMedia,
|
|
190
193
|
validOpenGlRenderers: validate_opengl_renderer_1.validOpenGlRenderers,
|
|
191
194
|
copyImageToClipboard: copy_to_clipboard_1.copyImageToClipboard,
|
|
195
|
+
isIpV6Supported: is_ipv6_supported_1.isIpV6Supported,
|
|
192
196
|
};
|
|
193
197
|
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
194
198
|
(0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isIpV6Supported: () => boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isIpV6Supported = void 0;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
let cache = null;
|
|
9
|
+
const calculate = () => {
|
|
10
|
+
const interfaces = os_1.default.networkInterfaces();
|
|
11
|
+
for (const iface in interfaces) {
|
|
12
|
+
for (const configuration of interfaces[iface]) {
|
|
13
|
+
if (configuration.family === 'IPv6' && !configuration.internal) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
const isIpV6Supported = () => {
|
|
21
|
+
if (cache === null) {
|
|
22
|
+
cache = calculate();
|
|
23
|
+
}
|
|
24
|
+
return cache;
|
|
25
|
+
};
|
|
26
|
+
exports.isIpV6Supported = isIpV6Supported;
|
package/dist/logger.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export declare const Log: {
|
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: VerboseLogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const getLogLevel: () => "
|
|
22
|
+
export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
23
23
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
24
24
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,27 @@
|
|
|
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;
|
package/dist/serve-static.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.serveStatic = void 0;
|
|
7
7
|
const node_http_1 = __importDefault(require("node:http"));
|
|
8
8
|
const get_port_1 = require("./get-port");
|
|
9
|
+
const is_ipv6_supported_1 = require("./is-ipv6-supported");
|
|
9
10
|
const offthread_video_server_1 = require("./offthread-video-server");
|
|
10
11
|
const serve_handler_1 = require("./serve-handler");
|
|
11
12
|
const serveStatic = async (path, options) => {
|
|
@@ -45,8 +46,10 @@ const serveStatic = async (path, options) => {
|
|
|
45
46
|
});
|
|
46
47
|
let selectedPort = null;
|
|
47
48
|
const maxTries = 5;
|
|
48
|
-
|
|
49
|
-
const
|
|
49
|
+
const host = (0, is_ipv6_supported_1.isIpV6Supported)() ? '::' : '0.0.0.0';
|
|
50
|
+
const hostsToTry = (0, is_ipv6_supported_1.isIpV6Supported)()
|
|
51
|
+
? ['::', '::1']
|
|
52
|
+
: ['0.0.0.0', '127.0.0.1'];
|
|
50
53
|
for (let i = 0; i < maxTries; i++) {
|
|
51
54
|
try {
|
|
52
55
|
selectedPort = await new Promise((resolve, reject) => {
|
|
@@ -55,7 +58,7 @@ const serveStatic = async (path, options) => {
|
|
|
55
58
|
desiredPort: (_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined,
|
|
56
59
|
from: 3000,
|
|
57
60
|
to: 3100,
|
|
58
|
-
hostsToTry
|
|
61
|
+
hostsToTry,
|
|
59
62
|
})
|
|
60
63
|
.then(({ port, didUsePort }) => {
|
|
61
64
|
server.listen({ port, host });
|
|
@@ -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.50",
|
|
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.50"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-
|
|
44
|
-
"@remotion/compositor-darwin-
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.50",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.50",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.50",
|
|
46
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.50",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.50",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.50",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.50"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|