@remotion/renderer 4.0.157 → 4.0.160
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/Cargo.lock +31 -5
- package/Cargo.toml +1 -1
- package/dist/browser/Browser.js +2 -0
- package/dist/browser-instances.d.ts +4 -0
- package/dist/browser-instances.js +21 -0
- package/dist/call-ffmpeg.js +7 -2
- package/dist/client.d.ts +70 -70
- package/dist/compositor/compositor.js +13 -2
- package/dist/compositor/get-explicit-env.d.ts +3 -0
- package/dist/compositor/get-explicit-env.js +13 -0
- package/dist/crf.js +2 -1
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -1
- package/dist/open-browser.d.ts +0 -1
- package/dist/open-browser.js +3 -12
- package/dist/options/audio-codec.d.ts +5 -5
- package/dist/options/color-space.d.ts +3 -3
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +14 -14
- package/dist/options/options-map.d.ts +17 -17
- package/dist/options/video-codec.d.ts +1 -1
- package/dist/options/x264-preset.js +4 -1
- package/dist/pixel-format.d.ts +1 -1
- package/dist/pure.d.ts +3 -3
- package/dist/render-media.js +53 -57
- package/dist/set-props-and-env.js +9 -0
- package/dist/stitch-frames-to-video.js +2 -2
- package/dist/succeed-or-cancel.d.ts +6 -0
- package/dist/succeed-or-cancel.js +23 -0
- package/dist/validate-even-dimensions-with-codec.js +4 -1
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
package/Cargo.lock
CHANGED
|
@@ -247,6 +247,15 @@ dependencies = [
|
|
|
247
247
|
"str-buf",
|
|
248
248
|
]
|
|
249
249
|
|
|
250
|
+
[[package]]
|
|
251
|
+
name = "fdeflate"
|
|
252
|
+
version = "0.3.4"
|
|
253
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
254
|
+
checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645"
|
|
255
|
+
dependencies = [
|
|
256
|
+
"simd-adler32",
|
|
257
|
+
]
|
|
258
|
+
|
|
250
259
|
[[package]]
|
|
251
260
|
name = "ffmpeg-next"
|
|
252
261
|
version = "6.0.0"
|
|
@@ -374,7 +383,7 @@ dependencies = [
|
|
|
374
383
|
"color_quant",
|
|
375
384
|
"num-rational 0.4.1",
|
|
376
385
|
"num-traits",
|
|
377
|
-
"png 0.17.
|
|
386
|
+
"png 0.17.13",
|
|
378
387
|
"tiff 0.9.0",
|
|
379
388
|
]
|
|
380
389
|
|
|
@@ -519,6 +528,16 @@ dependencies = [
|
|
|
519
528
|
"adler",
|
|
520
529
|
]
|
|
521
530
|
|
|
531
|
+
[[package]]
|
|
532
|
+
name = "miniz_oxide"
|
|
533
|
+
version = "0.7.3"
|
|
534
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
535
|
+
checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae"
|
|
536
|
+
dependencies = [
|
|
537
|
+
"adler",
|
|
538
|
+
"simd-adler32",
|
|
539
|
+
]
|
|
540
|
+
|
|
522
541
|
[[package]]
|
|
523
542
|
name = "mp4"
|
|
524
543
|
version = "0.13.0"
|
|
@@ -722,14 +741,15 @@ dependencies = [
|
|
|
722
741
|
|
|
723
742
|
[[package]]
|
|
724
743
|
name = "png"
|
|
725
|
-
version = "0.17.
|
|
744
|
+
version = "0.17.13"
|
|
726
745
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
727
|
-
checksum = "
|
|
746
|
+
checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1"
|
|
728
747
|
dependencies = [
|
|
729
748
|
"bitflags",
|
|
730
749
|
"crc32fast",
|
|
750
|
+
"fdeflate",
|
|
731
751
|
"flate2",
|
|
732
|
-
"miniz_oxide 0.
|
|
752
|
+
"miniz_oxide 0.7.3",
|
|
733
753
|
]
|
|
734
754
|
|
|
735
755
|
[[package]]
|
|
@@ -814,7 +834,7 @@ dependencies = [
|
|
|
814
834
|
"jpeg-encoder",
|
|
815
835
|
"lazy_static",
|
|
816
836
|
"mp4",
|
|
817
|
-
"png 0.17.
|
|
837
|
+
"png 0.17.13",
|
|
818
838
|
"rayon",
|
|
819
839
|
"serde",
|
|
820
840
|
"serde_json",
|
|
@@ -882,6 +902,12 @@ version = "1.3.0"
|
|
|
882
902
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
883
903
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
884
904
|
|
|
905
|
+
[[package]]
|
|
906
|
+
name = "simd-adler32"
|
|
907
|
+
version = "0.3.7"
|
|
908
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
909
|
+
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
|
910
|
+
|
|
885
911
|
[[package]]
|
|
886
912
|
name = "smallvec"
|
|
887
913
|
version = "1.11.0"
|
package/Cargo.toml
CHANGED
package/dist/browser/Browser.js
CHANGED
|
@@ -28,6 +28,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
28
28
|
var _HeadlessBrowser_instances, _HeadlessBrowser_defaultViewport, _HeadlessBrowser_closeCallback, _HeadlessBrowser_defaultContext, _HeadlessBrowser_contexts, _HeadlessBrowser_targets, _HeadlessBrowser_targetCreated, _HeadlessBrowser_targetDestroyed, _HeadlessBrowser_targetInfoChanged, _BrowserContext_browser;
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.BrowserContext = exports.HeadlessBrowser = void 0;
|
|
31
|
+
const browser_instances_1 = require("../browser-instances");
|
|
31
32
|
const assert_1 = require("./assert");
|
|
32
33
|
const EventEmitter_1 = require("./EventEmitter");
|
|
33
34
|
const Target_1 = require("./Target");
|
|
@@ -141,6 +142,7 @@ class HeadlessBrowser extends EventEmitter_1.EventEmitter {
|
|
|
141
142
|
});
|
|
142
143
|
this.disconnect();
|
|
143
144
|
this.emit(silent ? "closed-silent" /* BrowserEmittedEvents.ClosedSilent */ : "closed" /* BrowserEmittedEvents.Closed */);
|
|
145
|
+
(0, browser_instances_1.removeHeadlessBrowser)(this);
|
|
144
146
|
}
|
|
145
147
|
disconnect() {
|
|
146
148
|
this.connection.dispose();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HeadlessBrowser } from './browser/Browser';
|
|
2
|
+
export declare const killAllBrowsers: () => Promise<void>;
|
|
3
|
+
export declare const addHeadlessBrowser: (browser: HeadlessBrowser) => void;
|
|
4
|
+
export declare const removeHeadlessBrowser: (browser: HeadlessBrowser) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeHeadlessBrowser = exports.addHeadlessBrowser = exports.killAllBrowsers = void 0;
|
|
4
|
+
const browserInstances = [];
|
|
5
|
+
const killAllBrowsers = async () => {
|
|
6
|
+
for (const browser of browserInstances) {
|
|
7
|
+
try {
|
|
8
|
+
await browser.close(true, 'info', false);
|
|
9
|
+
}
|
|
10
|
+
catch (err) { }
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.killAllBrowsers = killAllBrowsers;
|
|
14
|
+
const addHeadlessBrowser = (browser) => {
|
|
15
|
+
browserInstances.push(browser);
|
|
16
|
+
};
|
|
17
|
+
exports.addHeadlessBrowser = addHeadlessBrowser;
|
|
18
|
+
const removeHeadlessBrowser = (browser) => {
|
|
19
|
+
browserInstances.splice(browserInstances.indexOf(browser), 1);
|
|
20
|
+
};
|
|
21
|
+
exports.removeHeadlessBrowser = removeHeadlessBrowser;
|
package/dist/call-ffmpeg.js
CHANGED
|
@@ -8,6 +8,7 @@ const execa_1 = __importDefault(require("execa"));
|
|
|
8
8
|
const node_child_process_1 = require("node:child_process");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
11
|
+
const get_explicit_env_1 = require("./compositor/get-explicit-env");
|
|
11
12
|
const make_file_executable_1 = require("./compositor/make-file-executable");
|
|
12
13
|
const truthy_1 = require("./truthy");
|
|
13
14
|
const callFf = ({ args, bin, indent, logLevel, options, binariesDirectory, cancelSignal, }) => {
|
|
@@ -18,8 +19,10 @@ const callFf = ({ args, bin, indent, logLevel, options, binariesDirectory, cance
|
|
|
18
19
|
binariesDirectory,
|
|
19
20
|
});
|
|
20
21
|
(0, make_file_executable_1.makeFileExecutableIfItIsNot)(executablePath);
|
|
22
|
+
const cwd = path_1.default.dirname(executablePath);
|
|
21
23
|
const task = (0, execa_1.default)(executablePath, args.filter(truthy_1.truthy), {
|
|
22
|
-
cwd
|
|
24
|
+
cwd,
|
|
25
|
+
env: (0, get_explicit_env_1.getExplicitEnv)(cwd),
|
|
23
26
|
...options,
|
|
24
27
|
});
|
|
25
28
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
|
@@ -36,8 +39,10 @@ const callFfNative = ({ args, bin, indent, logLevel, options, binariesDirectory,
|
|
|
36
39
|
binariesDirectory,
|
|
37
40
|
});
|
|
38
41
|
(0, make_file_executable_1.makeFileExecutableIfItIsNot)(executablePath);
|
|
42
|
+
const cwd = path_1.default.dirname(executablePath);
|
|
39
43
|
const task = (0, node_child_process_1.spawn)(executablePath, args.filter(truthy_1.truthy), {
|
|
40
|
-
cwd
|
|
44
|
+
cwd,
|
|
45
|
+
env: (0, get_explicit_env_1.getExplicitEnv)(cwd),
|
|
41
46
|
...options,
|
|
42
47
|
});
|
|
43
48
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
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" | "h264-ts" | "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", "h264-ts", "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" | "h264-ts" | "gif") => number;
|
|
7
|
+
getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif") => [number, number];
|
|
8
|
+
isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "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" | "h264-ts" | "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
|
DEFAULT_JPEG_QUALITY: number;
|
|
19
19
|
DEFAULT_COLOR_SPACE: "default";
|
|
@@ -35,11 +35,11 @@ export declare const BrowserSafeApis: {
|
|
|
35
35
|
h264: {
|
|
36
36
|
default: import("./file-extensions").FileExtension;
|
|
37
37
|
forAudioCodec: {
|
|
38
|
-
|
|
38
|
+
aac: {
|
|
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
|
};
|
|
@@ -65,11 +65,11 @@ export declare const BrowserSafeApis: {
|
|
|
65
65
|
vp8: {
|
|
66
66
|
default: import("./file-extensions").FileExtension;
|
|
67
67
|
forAudioCodec: {
|
|
68
|
-
|
|
68
|
+
opus: {
|
|
69
69
|
possible: import("./file-extensions").FileExtension[];
|
|
70
70
|
default: import("./file-extensions").FileExtension;
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
"pcm-16": {
|
|
73
73
|
possible: import("./file-extensions").FileExtension[];
|
|
74
74
|
default: import("./file-extensions").FileExtension;
|
|
75
75
|
};
|
|
@@ -78,20 +78,20 @@ export declare const BrowserSafeApis: {
|
|
|
78
78
|
vp9: {
|
|
79
79
|
default: import("./file-extensions").FileExtension;
|
|
80
80
|
forAudioCodec: {
|
|
81
|
-
|
|
81
|
+
opus: {
|
|
82
82
|
possible: import("./file-extensions").FileExtension[];
|
|
83
83
|
default: import("./file-extensions").FileExtension;
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
"pcm-16": {
|
|
86
86
|
possible: import("./file-extensions").FileExtension[];
|
|
87
87
|
default: import("./file-extensions").FileExtension;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
prores: {
|
|
92
92
|
default: import("./file-extensions").FileExtension;
|
|
93
93
|
forAudioCodec: {
|
|
94
|
-
|
|
94
|
+
aac: {
|
|
95
95
|
possible: import("./file-extensions").FileExtension[];
|
|
96
96
|
default: import("./file-extensions").FileExtension;
|
|
97
97
|
};
|
|
@@ -114,22 +114,22 @@ export declare const BrowserSafeApis: {
|
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
mp3: {
|
|
118
118
|
default: import("./file-extensions").FileExtension;
|
|
119
119
|
forAudioCodec: {
|
|
120
|
+
mp3: {
|
|
121
|
+
possible: import("./file-extensions").FileExtension[];
|
|
122
|
+
default: import("./file-extensions").FileExtension;
|
|
123
|
+
};
|
|
120
124
|
"pcm-16": {
|
|
121
125
|
possible: import("./file-extensions").FileExtension[];
|
|
122
126
|
default: import("./file-extensions").FileExtension;
|
|
123
127
|
};
|
|
124
128
|
};
|
|
125
129
|
};
|
|
126
|
-
|
|
130
|
+
wav: {
|
|
127
131
|
default: import("./file-extensions").FileExtension;
|
|
128
132
|
forAudioCodec: {
|
|
129
|
-
aac: {
|
|
130
|
-
possible: import("./file-extensions").FileExtension[];
|
|
131
|
-
default: import("./file-extensions").FileExtension;
|
|
132
|
-
};
|
|
133
133
|
"pcm-16": {
|
|
134
134
|
possible: import("./file-extensions").FileExtension[];
|
|
135
135
|
default: import("./file-extensions").FileExtension;
|
|
@@ -169,37 +169,37 @@ export declare const BrowserSafeApis: {
|
|
|
169
169
|
};
|
|
170
170
|
defaultAudioCodecs: {
|
|
171
171
|
h264: {
|
|
172
|
-
compressed: "
|
|
173
|
-
lossless: "
|
|
172
|
+
compressed: "aac" | "mp3" | "pcm-16" | null;
|
|
173
|
+
lossless: "aac" | "mp3" | "pcm-16" | null;
|
|
174
174
|
};
|
|
175
175
|
h265: {
|
|
176
176
|
compressed: "aac" | "pcm-16" | null;
|
|
177
177
|
lossless: "aac" | "pcm-16" | null;
|
|
178
178
|
};
|
|
179
179
|
vp8: {
|
|
180
|
-
compressed: "
|
|
181
|
-
lossless: "
|
|
180
|
+
compressed: "opus" | "pcm-16" | null;
|
|
181
|
+
lossless: "opus" | "pcm-16" | null;
|
|
182
182
|
};
|
|
183
183
|
vp9: {
|
|
184
|
-
compressed: "
|
|
185
|
-
lossless: "
|
|
184
|
+
compressed: "opus" | "pcm-16" | null;
|
|
185
|
+
lossless: "opus" | "pcm-16" | null;
|
|
186
186
|
};
|
|
187
|
-
|
|
188
|
-
compressed: "
|
|
189
|
-
lossless: "
|
|
187
|
+
prores: {
|
|
188
|
+
compressed: "aac" | "pcm-16" | null;
|
|
189
|
+
lossless: "aac" | "pcm-16" | null;
|
|
190
190
|
};
|
|
191
191
|
aac: {
|
|
192
192
|
compressed: "aac" | "pcm-16" | null;
|
|
193
193
|
lossless: "aac" | "pcm-16" | null;
|
|
194
194
|
};
|
|
195
|
+
mp3: {
|
|
196
|
+
compressed: "mp3" | "pcm-16" | null;
|
|
197
|
+
lossless: "mp3" | "pcm-16" | null;
|
|
198
|
+
};
|
|
195
199
|
wav: {
|
|
196
200
|
compressed: "pcm-16" | null;
|
|
197
201
|
lossless: "pcm-16" | null;
|
|
198
202
|
};
|
|
199
|
-
prores: {
|
|
200
|
-
compressed: "aac" | "pcm-16" | null;
|
|
201
|
-
lossless: "aac" | "pcm-16" | null;
|
|
202
|
-
};
|
|
203
203
|
"h264-mkv": {
|
|
204
204
|
compressed: "mp3" | "pcm-16" | null;
|
|
205
205
|
lossless: "mp3" | "pcm-16" | null;
|
|
@@ -213,10 +213,10 @@ export declare const BrowserSafeApis: {
|
|
|
213
213
|
lossless: null;
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "
|
|
217
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
216
|
+
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif">;
|
|
217
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
|
|
218
218
|
codec: T_1;
|
|
219
|
-
audioCodecSetting: "
|
|
219
|
+
audioCodecSetting: "opus" | "aac" | "mp3" | "pcm-16" | null;
|
|
220
220
|
extension: string;
|
|
221
221
|
preferLossless: boolean;
|
|
222
222
|
separateAudioTo: string | null;
|
|
@@ -224,12 +224,12 @@ export declare const BrowserSafeApis: {
|
|
|
224
224
|
options: {
|
|
225
225
|
audioCodecOption: {
|
|
226
226
|
cliFlag: "audio-codec";
|
|
227
|
-
setConfig: (audioCodec: "
|
|
227
|
+
setConfig: (audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => void;
|
|
228
228
|
getValue: ({ commandLine }: {
|
|
229
229
|
commandLine: Record<string, unknown>;
|
|
230
230
|
}) => {
|
|
231
231
|
source: string;
|
|
232
|
-
value: "
|
|
232
|
+
value: "opus" | "aac" | "mp3" | "pcm-16";
|
|
233
233
|
} | {
|
|
234
234
|
source: string;
|
|
235
235
|
value: null;
|
|
@@ -238,7 +238,7 @@ export declare const BrowserSafeApis: {
|
|
|
238
238
|
docLink: string;
|
|
239
239
|
name: string;
|
|
240
240
|
ssrName: "audioCodec";
|
|
241
|
-
type: "
|
|
241
|
+
type: "opus" | "aac" | "mp3" | "pcm-16";
|
|
242
242
|
};
|
|
243
243
|
scaleOption: {
|
|
244
244
|
name: string;
|
|
@@ -357,17 +357,17 @@ export declare const BrowserSafeApis: {
|
|
|
357
357
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
358
358
|
ssrName: string;
|
|
359
359
|
docLink: string;
|
|
360
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
360
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
361
361
|
getValue: ({ commandLine }: {
|
|
362
362
|
commandLine: Record<string, unknown>;
|
|
363
363
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
364
364
|
outName: string | null;
|
|
365
365
|
downloadName: string | null;
|
|
366
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
367
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
368
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
366
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
367
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
368
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
369
369
|
}) => {
|
|
370
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
370
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
371
371
|
source: string;
|
|
372
372
|
};
|
|
373
373
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -406,14 +406,14 @@ export declare const BrowserSafeApis: {
|
|
|
406
406
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
407
407
|
docLink: string;
|
|
408
408
|
ssrName: string;
|
|
409
|
-
type: "
|
|
409
|
+
type: "bt709" | "bt2020-ncl" | "default" | null;
|
|
410
410
|
getValue: ({ commandLine }: {
|
|
411
411
|
commandLine: Record<string, unknown>;
|
|
412
412
|
}) => {
|
|
413
413
|
source: string;
|
|
414
|
-
value: "
|
|
414
|
+
value: "bt709" | "bt2020-ncl" | "default";
|
|
415
415
|
};
|
|
416
|
-
setConfig: (value: "
|
|
416
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
417
417
|
};
|
|
418
418
|
deleteAfterOption: {
|
|
419
419
|
name: string;
|
|
@@ -467,19 +467,19 @@ export declare const BrowserSafeApis: {
|
|
|
467
467
|
cliFlag: "gl";
|
|
468
468
|
docLink: string;
|
|
469
469
|
name: string;
|
|
470
|
-
type: "
|
|
470
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
471
471
|
ssrName: string;
|
|
472
472
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
473
473
|
getValue: ({ commandLine }: {
|
|
474
474
|
commandLine: Record<string, unknown>;
|
|
475
475
|
}) => {
|
|
476
|
-
value: "
|
|
476
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
477
477
|
source: string;
|
|
478
478
|
} | {
|
|
479
479
|
value: null;
|
|
480
480
|
source: string;
|
|
481
481
|
};
|
|
482
|
-
setConfig: (value: "
|
|
482
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
483
483
|
};
|
|
484
484
|
enableLambdaInsights: {
|
|
485
485
|
name: string;
|
|
@@ -900,14 +900,14 @@ export declare const BrowserSafeApis: {
|
|
|
900
900
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
901
901
|
docLink: string;
|
|
902
902
|
ssrName: string;
|
|
903
|
-
type: "
|
|
903
|
+
type: "bt709" | "bt2020-ncl" | "default" | null;
|
|
904
904
|
getValue: ({ commandLine }: {
|
|
905
905
|
commandLine: Record<string, unknown>;
|
|
906
906
|
}) => {
|
|
907
907
|
source: string;
|
|
908
|
-
value: "
|
|
908
|
+
value: "bt709" | "bt2020-ncl" | "default";
|
|
909
909
|
};
|
|
910
|
-
setConfig: (value: "
|
|
910
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
911
911
|
};
|
|
912
912
|
readonly codec: {
|
|
913
913
|
name: string;
|
|
@@ -915,17 +915,17 @@ export declare const BrowserSafeApis: {
|
|
|
915
915
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
916
916
|
ssrName: string;
|
|
917
917
|
docLink: string;
|
|
918
|
-
type: "h264" | "h265" | "vp8" | "vp9" | "
|
|
918
|
+
type: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
919
919
|
getValue: ({ commandLine }: {
|
|
920
920
|
commandLine: Record<string, unknown>;
|
|
921
921
|
}, { compositionCodec, configFile, downloadName, outName, uiCodec, }: {
|
|
922
922
|
outName: string | null;
|
|
923
923
|
downloadName: string | null;
|
|
924
|
-
configFile: "h264" | "h265" | "vp8" | "vp9" | "
|
|
925
|
-
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
926
|
-
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
924
|
+
configFile: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
925
|
+
uiCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
926
|
+
compositionCodec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif" | null;
|
|
927
927
|
}) => {
|
|
928
|
-
value: "h264" | "h265" | "vp8" | "vp9" | "
|
|
928
|
+
value: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif";
|
|
929
929
|
source: string;
|
|
930
930
|
};
|
|
931
931
|
setConfig: (newCodec: import("./codec").CodecOrUndefined) => void;
|
|
@@ -1079,12 +1079,12 @@ export declare const BrowserSafeApis: {
|
|
|
1079
1079
|
};
|
|
1080
1080
|
readonly audioCodec: {
|
|
1081
1081
|
cliFlag: "audio-codec";
|
|
1082
|
-
setConfig: (audioCodec: "
|
|
1082
|
+
setConfig: (audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => void;
|
|
1083
1083
|
getValue: ({ commandLine }: {
|
|
1084
1084
|
commandLine: Record<string, unknown>;
|
|
1085
1085
|
}) => {
|
|
1086
1086
|
source: string;
|
|
1087
|
-
value: "
|
|
1087
|
+
value: "opus" | "aac" | "mp3" | "pcm-16";
|
|
1088
1088
|
} | {
|
|
1089
1089
|
source: string;
|
|
1090
1090
|
value: null;
|
|
@@ -1093,7 +1093,7 @@ export declare const BrowserSafeApis: {
|
|
|
1093
1093
|
docLink: string;
|
|
1094
1094
|
name: string;
|
|
1095
1095
|
ssrName: "audioCodec";
|
|
1096
|
-
type: "
|
|
1096
|
+
type: "opus" | "aac" | "mp3" | "pcm-16";
|
|
1097
1097
|
};
|
|
1098
1098
|
readonly onBrowserDownload: {
|
|
1099
1099
|
name: string;
|
|
@@ -1640,14 +1640,14 @@ export declare const BrowserSafeApis: {
|
|
|
1640
1640
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1641
1641
|
docLink: string;
|
|
1642
1642
|
ssrName: string;
|
|
1643
|
-
type: "
|
|
1643
|
+
type: "bt709" | "bt2020-ncl" | "default" | null;
|
|
1644
1644
|
getValue: ({ commandLine }: {
|
|
1645
1645
|
commandLine: Record<string, unknown>;
|
|
1646
1646
|
}) => {
|
|
1647
1647
|
source: string;
|
|
1648
|
-
value: "
|
|
1648
|
+
value: "bt709" | "bt2020-ncl" | "default";
|
|
1649
1649
|
};
|
|
1650
|
-
setConfig: (value: "
|
|
1650
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
1651
1651
|
};
|
|
1652
1652
|
readonly muted: {
|
|
1653
1653
|
name: string;
|
|
@@ -1904,14 +1904,14 @@ export declare const BrowserSafeApis: {
|
|
|
1904
1904
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
1905
1905
|
docLink: string;
|
|
1906
1906
|
ssrName: string;
|
|
1907
|
-
type: "
|
|
1907
|
+
type: "bt709" | "bt2020-ncl" | "default" | null;
|
|
1908
1908
|
getValue: ({ commandLine }: {
|
|
1909
1909
|
commandLine: Record<string, unknown>;
|
|
1910
1910
|
}) => {
|
|
1911
1911
|
source: string;
|
|
1912
|
-
value: "
|
|
1912
|
+
value: "bt709" | "bt2020-ncl" | "default";
|
|
1913
1913
|
};
|
|
1914
|
-
setConfig: (value: "
|
|
1914
|
+
setConfig: (value: "bt709" | "bt2020-ncl" | "default" | null) => void;
|
|
1915
1915
|
};
|
|
1916
1916
|
readonly audioBitrate: {
|
|
1917
1917
|
name: string;
|
|
@@ -2249,9 +2249,9 @@ export declare const BrowserSafeApis: {
|
|
|
2249
2249
|
};
|
|
2250
2250
|
};
|
|
2251
2251
|
};
|
|
2252
|
-
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
2253
|
-
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "
|
|
2252
|
+
codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
2253
|
+
codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif") => boolean;
|
|
2254
2254
|
logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
2255
2255
|
getOutputCodecOrUndefined: () => import("./codec").CodecOrUndefined;
|
|
2256
|
-
getExtensionFromAudioCodec: (audioCodec: "
|
|
2256
|
+
getExtensionFromAudioCodec: (audioCodec: "opus" | "aac" | "mp3" | "pcm-16") => "opus" | "aac" | "mp3" | "wav";
|
|
2257
2257
|
};
|
|
@@ -37,10 +37,18 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
|
|
|
37
37
|
});
|
|
38
38
|
(0, make_file_executable_1.makeFileExecutableIfItIsNot)(bin);
|
|
39
39
|
const fullCommand = (0, compose_1.serializeCommand)(type, payload);
|
|
40
|
+
const cwd = node_path_1.default.dirname(bin);
|
|
40
41
|
const child = (0, node_child_process_1.spawn)(bin, [JSON.stringify(fullCommand)], {
|
|
41
|
-
cwd
|
|
42
|
+
cwd,
|
|
43
|
+
env: process.platform === 'darwin'
|
|
44
|
+
? {
|
|
45
|
+
// Should work out of the box, but sometimes it doesn't
|
|
46
|
+
// https://github.com/remotion-dev/remotion/issues/3862
|
|
47
|
+
DYLD_LIBRARY_PATH: cwd,
|
|
48
|
+
}
|
|
49
|
+
: undefined,
|
|
42
50
|
});
|
|
43
|
-
|
|
51
|
+
let stderrChunks = [];
|
|
44
52
|
let outputBuffer = Buffer.from('');
|
|
45
53
|
const separator = Buffer.from('remotion_buffer:');
|
|
46
54
|
const waiters = new Map();
|
|
@@ -168,6 +176,9 @@ const startCompositor = ({ type, payload, logLevel, indent, binariesDirectory =
|
|
|
168
176
|
waiters.clear();
|
|
169
177
|
reject === null || reject === void 0 ? void 0 : reject(error);
|
|
170
178
|
}
|
|
179
|
+
// Need to manually free up memory
|
|
180
|
+
outputBuffer = Buffer.from('');
|
|
181
|
+
stderrChunks = [];
|
|
171
182
|
});
|
|
172
183
|
return {
|
|
173
184
|
waitForDone: () => {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getExplicitEnv = void 0;
|
|
4
|
+
const getExplicitEnv = (cwd) => {
|
|
5
|
+
return process.platform === 'darwin'
|
|
6
|
+
? {
|
|
7
|
+
// Should work out of the box, but sometimes it doesn't
|
|
8
|
+
// https://github.com/remotion-dev/remotion/issues/3862
|
|
9
|
+
DYLD_LIBRARY_PATH: cwd,
|
|
10
|
+
}
|
|
11
|
+
: undefined;
|
|
12
|
+
};
|
|
13
|
+
exports.getExplicitEnv = getExplicitEnv;
|
package/dist/crf.js
CHANGED
|
@@ -74,7 +74,8 @@ const validateQualitySettings = ({ codec, crf, videoBitrate, encodingMaxRate, en
|
|
|
74
74
|
throw new TypeError('Expected CRF to be a number, but is ' + JSON.stringify(crf));
|
|
75
75
|
}
|
|
76
76
|
const range = (0, exports.getValidCrfRanges)(codec);
|
|
77
|
-
if (crf === 0 &&
|
|
77
|
+
if (crf === 0 &&
|
|
78
|
+
(codec === 'h264' || codec === 'h264-mkv' || codec === 'h264-ts')) {
|
|
78
79
|
throw new TypeError("Setting the CRF to 0 with a H264 codec is not supported anymore because of it's inconsistencies between platforms. Videos with CRF 0 cannot be played on iOS/macOS. 0 is a extreme value with inefficient settings which you probably do not want. Set CRF to a higher value to fix this error.");
|
|
79
80
|
}
|
|
80
81
|
if (crf < range[0] || crf > range[1]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Codec } from './codec';
|
|
2
2
|
import type { FileExtension } from './file-extensions';
|
|
3
3
|
import type { AudioCodec } from './options/audio-codec';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|