@remotion/renderer 3.3.51 → 3.3.52
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 +43 -42
- package/dist/client.js +1 -0
- package/dist/file-extensions.js +2 -2
- package/dist/get-audio-codec-name.d.ts +2 -0
- package/dist/get-audio-codec-name.js +28 -0
- package/dist/index.d.ts +3 -3
- package/dist/validate-frame.d.ts +1 -0
- package/dist/validate-frame.js +24 -0
- package/package.json +10 -10
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const BrowserSafeApis: {
|
|
2
|
-
getFileExtensionFromCodec: <T extends "
|
|
2
|
+
getFileExtensionFromCodec: <T extends "aac" | "mp3" | "gif" | "wav" | "h264" | "h265" | "vp8" | "vp9" | "prores" | "h264-mkv">(codec: T, audioCodec: "aac" | "pcm-16" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
3
3
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
4
|
-
getDefaultCrfForCodec: (codec: "
|
|
5
|
-
getValidCrfRanges: (codec: "
|
|
6
|
-
isAudioCodec: (codec: "
|
|
4
|
+
getDefaultCrfForCodec: (codec: "aac" | "mp3" | "gif" | "wav" | "h264" | "h265" | "vp8" | "vp9" | "prores" | "h264-mkv") => number;
|
|
5
|
+
getValidCrfRanges: (codec: "aac" | "mp3" | "gif" | "wav" | "h264" | "h265" | "vp8" | "vp9" | "prores" | "h264-mkv") => [number, number];
|
|
6
|
+
isAudioCodec: (codec: "aac" | "mp3" | "gif" | "wav" | "h264" | "h265" | "vp8" | "vp9" | "prores" | "h264-mkv" | undefined) => boolean;
|
|
7
7
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
8
8
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
9
9
|
supportedAudioCodecs: {
|
|
@@ -19,7 +19,7 @@ export declare const BrowserSafeApis: {
|
|
|
19
19
|
readonly wav: readonly ["pcm-16"];
|
|
20
20
|
};
|
|
21
21
|
defaultFileExtensionMap: {
|
|
22
|
-
|
|
22
|
+
aac: {
|
|
23
23
|
default: import("./file-extensions").FileExtension;
|
|
24
24
|
forAudioCodec: {
|
|
25
25
|
aac: {
|
|
@@ -32,49 +32,49 @@ export declare const BrowserSafeApis: {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
mp3: {
|
|
36
36
|
default: import("./file-extensions").FileExtension;
|
|
37
37
|
forAudioCodec: {
|
|
38
|
-
|
|
38
|
+
"pcm-16": {
|
|
39
39
|
possible: import("./file-extensions").FileExtension[];
|
|
40
40
|
default: import("./file-extensions").FileExtension;
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
mp3: {
|
|
43
43
|
possible: import("./file-extensions").FileExtension[];
|
|
44
44
|
default: import("./file-extensions").FileExtension;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
gif: {
|
|
49
|
+
default: import("./file-extensions").FileExtension;
|
|
50
|
+
forAudioCodec: {};
|
|
51
|
+
};
|
|
52
|
+
wav: {
|
|
49
53
|
default: import("./file-extensions").FileExtension;
|
|
50
54
|
forAudioCodec: {
|
|
51
55
|
"pcm-16": {
|
|
52
56
|
possible: import("./file-extensions").FileExtension[];
|
|
53
57
|
default: import("./file-extensions").FileExtension;
|
|
54
58
|
};
|
|
55
|
-
opus: {
|
|
56
|
-
possible: import("./file-extensions").FileExtension[];
|
|
57
|
-
default: import("./file-extensions").FileExtension;
|
|
58
|
-
};
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
h264: {
|
|
62
62
|
default: import("./file-extensions").FileExtension;
|
|
63
63
|
forAudioCodec: {
|
|
64
|
-
|
|
64
|
+
aac: {
|
|
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
|
};
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
h265: {
|
|
75
75
|
default: import("./file-extensions").FileExtension;
|
|
76
76
|
forAudioCodec: {
|
|
77
|
-
|
|
77
|
+
aac: {
|
|
78
78
|
possible: import("./file-extensions").FileExtension[];
|
|
79
79
|
default: import("./file-extensions").FileExtension;
|
|
80
80
|
};
|
|
@@ -84,26 +84,30 @@ export declare const BrowserSafeApis: {
|
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
vp8: {
|
|
88
88
|
default: import("./file-extensions").FileExtension;
|
|
89
89
|
forAudioCodec: {
|
|
90
|
-
|
|
90
|
+
"pcm-16": {
|
|
91
91
|
possible: import("./file-extensions").FileExtension[];
|
|
92
92
|
default: import("./file-extensions").FileExtension;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
opus: {
|
|
95
95
|
possible: import("./file-extensions").FileExtension[];
|
|
96
96
|
default: import("./file-extensions").FileExtension;
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
vp9: {
|
|
101
101
|
default: import("./file-extensions").FileExtension;
|
|
102
102
|
forAudioCodec: {
|
|
103
103
|
"pcm-16": {
|
|
104
104
|
possible: import("./file-extensions").FileExtension[];
|
|
105
105
|
default: import("./file-extensions").FileExtension;
|
|
106
106
|
};
|
|
107
|
+
opus: {
|
|
108
|
+
possible: import("./file-extensions").FileExtension[];
|
|
109
|
+
default: import("./file-extensions").FileExtension;
|
|
110
|
+
};
|
|
107
111
|
};
|
|
108
112
|
};
|
|
109
113
|
prores: {
|
|
@@ -128,12 +132,24 @@ export declare const BrowserSafeApis: {
|
|
|
128
132
|
};
|
|
129
133
|
};
|
|
130
134
|
};
|
|
131
|
-
gif: {
|
|
132
|
-
default: import("./file-extensions").FileExtension;
|
|
133
|
-
forAudioCodec: {};
|
|
134
|
-
};
|
|
135
135
|
};
|
|
136
136
|
defaultAudioCodecs: {
|
|
137
|
+
aac: {
|
|
138
|
+
compressed: "aac" | "pcm-16" | null;
|
|
139
|
+
lossless: "aac" | "pcm-16" | null;
|
|
140
|
+
};
|
|
141
|
+
mp3: {
|
|
142
|
+
compressed: "pcm-16" | "mp3" | null;
|
|
143
|
+
lossless: "pcm-16" | "mp3" | null;
|
|
144
|
+
};
|
|
145
|
+
gif: {
|
|
146
|
+
compressed: null;
|
|
147
|
+
lossless: null;
|
|
148
|
+
};
|
|
149
|
+
wav: {
|
|
150
|
+
compressed: "pcm-16" | null;
|
|
151
|
+
lossless: "pcm-16" | null;
|
|
152
|
+
};
|
|
137
153
|
h264: {
|
|
138
154
|
compressed: "aac" | "pcm-16" | null;
|
|
139
155
|
lossless: "aac" | "pcm-16" | null;
|
|
@@ -150,18 +166,6 @@ export declare const BrowserSafeApis: {
|
|
|
150
166
|
compressed: "pcm-16" | "opus" | null;
|
|
151
167
|
lossless: "pcm-16" | "opus" | null;
|
|
152
168
|
};
|
|
153
|
-
mp3: {
|
|
154
|
-
compressed: "mp3" | "pcm-16" | null;
|
|
155
|
-
lossless: "mp3" | "pcm-16" | null;
|
|
156
|
-
};
|
|
157
|
-
aac: {
|
|
158
|
-
compressed: "aac" | "pcm-16" | null;
|
|
159
|
-
lossless: "aac" | "pcm-16" | null;
|
|
160
|
-
};
|
|
161
|
-
wav: {
|
|
162
|
-
compressed: "pcm-16" | null;
|
|
163
|
-
lossless: "pcm-16" | null;
|
|
164
|
-
};
|
|
165
169
|
prores: {
|
|
166
170
|
compressed: "aac" | "pcm-16" | null;
|
|
167
171
|
lossless: "aac" | "pcm-16" | null;
|
|
@@ -170,9 +174,6 @@ export declare const BrowserSafeApis: {
|
|
|
170
174
|
compressed: "pcm-16" | null;
|
|
171
175
|
lossless: "pcm-16" | null;
|
|
172
176
|
};
|
|
173
|
-
gif: {
|
|
174
|
-
compressed: null;
|
|
175
|
-
lossless: null;
|
|
176
|
-
};
|
|
177
177
|
};
|
|
178
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "aac" | "mp3" | "gif" | "wav" | "h264" | "h265" | "vp8" | "vp9" | "prores" | "h264-mkv">;
|
|
178
179
|
};
|
package/dist/client.js
CHANGED
|
@@ -19,4 +19,5 @@ exports.BrowserSafeApis = {
|
|
|
19
19
|
supportedAudioCodecs: file_extensions_1.supportedAudioCodecs,
|
|
20
20
|
defaultFileExtensionMap: file_extensions_1.defaultFileExtensionMap,
|
|
21
21
|
defaultAudioCodecs: audio_codec_1.defaultAudioCodecs,
|
|
22
|
+
defaultCodecsForFileExtension: get_extension_from_codec_1.defaultCodecsForFileExtension,
|
|
22
23
|
};
|
package/dist/file-extensions.js
CHANGED
|
@@ -40,8 +40,8 @@ exports.defaultFileExtensionMap = {
|
|
|
40
40
|
h264: {
|
|
41
41
|
default: 'mp4',
|
|
42
42
|
forAudioCodec: {
|
|
43
|
-
'pcm-16': { possible: ['mkv'], default: 'mkv' },
|
|
44
|
-
aac: { possible: ['mp4', 'mkv'], default: 'mp4' },
|
|
43
|
+
'pcm-16': { possible: ['mkv', 'mov'], default: 'mkv' },
|
|
44
|
+
aac: { possible: ['mp4', 'mkv', 'mov'], default: 'mp4' },
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
h265: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAudioCodecName = void 0;
|
|
4
|
+
const is_audio_codec_1 = require("./is-audio-codec");
|
|
5
|
+
const getAudioCodecName = (codec) => {
|
|
6
|
+
if (!(0, is_audio_codec_1.isAudioCodec)(codec)) {
|
|
7
|
+
// The mkv container supports WAV, but MP4 does only support
|
|
8
|
+
// AAC. Choose MKV codec for better quality because we can put in lossless audio
|
|
9
|
+
if (codec === 'h264-mkv') {
|
|
10
|
+
return 'pcm_s16le';
|
|
11
|
+
}
|
|
12
|
+
if (codec === 'vp8' || codec === 'vp9') {
|
|
13
|
+
return 'libopus';
|
|
14
|
+
}
|
|
15
|
+
return 'aac';
|
|
16
|
+
}
|
|
17
|
+
if (codec === 'aac') {
|
|
18
|
+
return 'aac';
|
|
19
|
+
}
|
|
20
|
+
if (codec === 'mp3') {
|
|
21
|
+
return 'libmp3lame';
|
|
22
|
+
}
|
|
23
|
+
if (codec === 'wav') {
|
|
24
|
+
return 'pcm_s16le';
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
exports.getAudioCodecName = getAudioCodecName;
|
package/dist/index.d.ts
CHANGED
|
@@ -119,8 +119,8 @@ export declare const RenderInternals: {
|
|
|
119
119
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
120
120
|
DEFAULT_BROWSER: import("./browser").Browser;
|
|
121
121
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
122
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
123
|
-
validateOpenGlRenderer: (option: "
|
|
122
|
+
DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
123
|
+
validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | null) => "angle" | "swangle" | "egl" | "swiftshader" | null;
|
|
124
124
|
validImageFormats: readonly ["png", "jpeg", "none"];
|
|
125
125
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
126
126
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
@@ -129,7 +129,7 @@ export declare const RenderInternals: {
|
|
|
129
129
|
DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
130
130
|
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
|
|
131
131
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
132
|
-
isEqualOrBelowLogLevel: (currentLevel: "
|
|
132
|
+
isEqualOrBelowLogLevel: (currentLevel: "error" | "verbose" | "info" | "warn", level: "error" | "verbose" | "info" | "warn") => boolean;
|
|
133
133
|
isValidLogLevel: (level: string) => boolean;
|
|
134
134
|
perf: typeof perf;
|
|
135
135
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateFrame: (frame: number, durationInFrames: number) => void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFrame = void 0;
|
|
4
|
+
const validateFrame = (frame, durationInFrames) => {
|
|
5
|
+
if (typeof frame === 'undefined') {
|
|
6
|
+
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
7
|
+
}
|
|
8
|
+
if (typeof frame !== 'number') {
|
|
9
|
+
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
10
|
+
}
|
|
11
|
+
if (!Number.isFinite(frame)) {
|
|
12
|
+
throw new RangeError(`Frame ${frame} is not finite`);
|
|
13
|
+
}
|
|
14
|
+
if (frame % 1 !== 0) {
|
|
15
|
+
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
16
|
+
}
|
|
17
|
+
if (frame < 0 && frame < -durationInFrames) {
|
|
18
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
19
|
+
}
|
|
20
|
+
if (frame > durationInFrames - 1) {
|
|
21
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.validateFrame = validateFrame;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.52",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"execa": "5.1.1",
|
|
26
26
|
"extract-zip": "2.0.1",
|
|
27
|
-
"remotion": "3.3.
|
|
27
|
+
"remotion": "3.3.52",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.7.0"
|
|
30
30
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"vitest": "0.24.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
53
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
54
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
55
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
56
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
57
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
58
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
52
|
+
"@remotion/compositor-darwin-arm64": "3.3.52",
|
|
53
|
+
"@remotion/compositor-darwin-x64": "3.3.52",
|
|
54
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.52",
|
|
55
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.52",
|
|
56
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.52",
|
|
57
|
+
"@remotion/compositor-linux-x64-musl": "3.3.52",
|
|
58
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.52"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"remotion",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "b48dff6c96081c924ae3bbc37f2f00bdd53e6e1f"
|
|
71
71
|
}
|