@remotion/renderer 4.0.0-alpha4 → 4.0.0-alpha6
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/README.md +5 -43
- package/dist/assets/download-and-map-assets-to-file.js +6 -6
- package/dist/assets/download-file.d.ts +3 -2
- package/dist/assets/download-file.js +18 -3
- package/dist/assets/download-map.d.ts +0 -26
- package/dist/assets/download-map.js +7 -12
- package/dist/assets/get-audio-channels.d.ts +1 -2
- package/dist/assets/get-audio-channels.js +5 -9
- package/dist/assets/read-file.d.ts +1 -1
- package/dist/assets/read-file.js +2 -2
- package/dist/assets/sanitize-filepath.js +2 -2
- package/dist/audio-codec.d.ts +4 -3
- package/dist/audio-codec.js +3 -9
- package/dist/browser/BrowserFetcher.d.ts +0 -1
- package/dist/browser/BrowserFetcher.js +14 -15
- package/dist/browser/BrowserRunner.d.ts +1 -1
- package/dist/browser/BrowserRunner.js +10 -4
- package/dist/browser/FrameManager.js +2 -3
- package/dist/browser/LaunchOptions.d.ts +1 -0
- package/dist/browser/Launcher.js +6 -5
- package/dist/browser/NodeWebSocketTransport.js +4 -4
- package/dist/browser/devtools-commands.d.ts +5 -1
- package/dist/browser/devtools-types.d.ts +78 -0
- package/dist/browser/get-download-destination.js +8 -8
- package/dist/browser/is-target-closed-err.d.ts +1 -0
- package/dist/browser/is-target-closed-err.js +9 -0
- package/dist/call-ffmpeg.d.ts +14 -0
- package/dist/call-ffmpeg.js +40 -0
- package/dist/check-apple-silicon.js +2 -45
- package/dist/client.d.ts +79 -42
- package/dist/client.js +27 -1
- package/dist/codec-supports-media.d.ts +2 -1
- package/dist/codec-supports-media.js +20 -5
- package/dist/combine-videos.d.ts +0 -3
- package/dist/combine-videos.js +9 -13
- package/dist/compositor/compose.d.ts +3 -1
- package/dist/compositor/compose.js +41 -18
- package/dist/compositor/compositor.d.ts +12 -0
- package/dist/compositor/compositor.js +204 -0
- package/dist/compositor/get-executable-path.d.ts +1 -1
- package/dist/compositor/get-executable-path.js +27 -8
- package/dist/compositor/make-nonce.d.ts +1 -0
- package/dist/compositor/make-nonce.js +8 -0
- package/dist/compositor/payloads.d.ts +34 -7
- package/dist/create-ffmpeg-complex-filter.d.ts +5 -5
- package/dist/create-ffmpeg-complex-filter.js +2 -4
- package/dist/create-ffmpeg-merge-filter.d.ts +2 -5
- package/dist/create-ffmpeg-merge-filter.js +2 -10
- package/dist/create-silent-audio.d.ts +1 -4
- package/dist/create-silent-audio.js +3 -7
- package/dist/crf.js +8 -2
- package/dist/delete-directory.js +18 -18
- package/dist/does-have-m2-bug.js +2 -2
- package/dist/ensure-output-directory.js +5 -5
- package/dist/ffmpeg-filter-file.js +7 -7
- package/dist/file-extensions.d.ts +1 -12
- package/dist/file-extensions.js +8 -14
- package/dist/find-closest-package-json.js +6 -6
- package/dist/get-compositions.d.ts +3 -5
- package/dist/get-compositions.js +8 -11
- package/dist/get-concurrency.js +3 -3
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-extension-of-filename.js +2 -2
- package/dist/get-frame-padded-index.d.ts +2 -1
- package/dist/get-local-browser-executable.js +4 -4
- package/dist/get-video-threads-flag.js +3 -3
- package/dist/guess-extension-for-media.d.ts +1 -3
- package/dist/guess-extension-for-media.js +4 -8
- package/dist/image-format.d.ts +12 -6
- package/dist/image-format.js +16 -13
- package/dist/index.d.ts +80 -61
- package/dist/index.js +15 -17
- package/dist/jpeg-quality.d.ts +1 -0
- package/dist/jpeg-quality.js +21 -0
- package/dist/merge-audio-track.d.ts +0 -2
- package/dist/merge-audio-track.js +5 -12
- package/dist/mime-types.js +2 -2
- package/dist/offthread-video-server.d.ts +9 -9
- package/dist/offthread-video-server.js +65 -58
- package/dist/open-browser.d.ts +1 -0
- package/dist/open-browser.js +7 -6
- package/dist/options/audio-bitrate.d.ts +2 -0
- package/dist/options/audio-bitrate.js +11 -0
- package/dist/options/crf.d.ts +2 -0
- package/dist/options/crf.js +11 -0
- package/dist/options/enforce-audio.d.ts +2 -0
- package/dist/options/enforce-audio.js +11 -0
- package/dist/options/jpeg-quality.d.ts +2 -0
- package/dist/options/jpeg-quality.js +11 -0
- package/dist/options/mute.d.ts +2 -0
- package/dist/options/mute.js +11 -0
- package/dist/options/option.d.ts +8 -0
- package/dist/options/option.js +2 -0
- package/dist/options/scale.d.ts +2 -0
- package/dist/options/scale.js +11 -0
- package/dist/options/video-bitrate.d.ts +2 -0
- package/dist/options/video-bitrate.js +11 -0
- package/dist/options/video-codec.d.ts +2 -0
- package/dist/options/video-codec.js +11 -0
- package/dist/perf.d.ts +1 -1
- package/dist/perf.js +9 -7
- package/dist/prepare-server.d.ts +3 -4
- package/dist/prepare-server.js +9 -9
- package/dist/preprocess-audio-track.d.ts +0 -4
- package/dist/preprocess-audio-track.js +4 -8
- package/dist/prespawn-ffmpeg.d.ts +6 -9
- package/dist/prespawn-ffmpeg.js +7 -12
- package/dist/prestitcher-memory-usage.d.ts +0 -4
- package/dist/prestitcher-memory-usage.js +4 -5
- package/dist/prores-profile.d.ts +1 -2
- package/dist/prores-profile.js +4 -4
- package/dist/provide-screenshot.d.ts +4 -5
- package/dist/provide-screenshot.js +2 -2
- package/dist/puppeteer-screenshot.d.ts +3 -3
- package/dist/puppeteer-screenshot.js +10 -33
- package/dist/render-frames.d.ts +13 -25
- package/dist/render-frames.js +34 -45
- package/dist/render-media.d.ts +16 -18
- package/dist/render-media.js +42 -52
- package/dist/render-still.d.ts +12 -8
- package/dist/render-still.js +30 -18
- package/dist/resolve-asset-src.js +2 -2
- package/dist/screenshot-dom-element.d.ts +4 -5
- package/dist/screenshot-dom-element.js +6 -3
- package/dist/screenshot-task.d.ts +2 -3
- package/dist/screenshot-task.js +40 -25
- package/dist/serve-handler/index.d.ts +1 -1
- package/dist/serve-handler/index.js +21 -19
- package/dist/serve-handler/is-path-inside.js +3 -3
- package/dist/serve-static.d.ts +2 -3
- package/dist/serve-static.js +26 -22
- package/dist/stitch-frames-to-video.d.ts +2 -12
- package/dist/stitch-frames-to-video.js +37 -46
- package/dist/take-frame-and-compose.d.ts +4 -5
- package/dist/take-frame-and-compose.js +15 -9
- package/dist/tmp-dir.js +7 -8
- package/dist/validate-concurrency.d.ts +2 -0
- package/dist/validate-concurrency.js +11 -5
- package/dist/validate-output-filename.d.ts +1 -1
- package/dist/validate-puppeteer-timeout.js +1 -0
- package/install-toolchain.mjs +36 -0
- package/package.json +11 -10
- package/types/ws/index.d.ts +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateConcurrency = void 0;
|
|
3
|
+
exports.getMinConcurrency = exports.getMaxConcurrency = exports.validateConcurrency = void 0;
|
|
4
4
|
const validateConcurrency = (value, setting) => {
|
|
5
5
|
if (typeof value === 'undefined') {
|
|
6
6
|
return;
|
|
@@ -15,11 +15,11 @@ const validateConcurrency = (value, setting) => {
|
|
|
15
15
|
if (value % 1 !== 0) {
|
|
16
16
|
throw new Error(setting + ' must be an integer, but is ' + value);
|
|
17
17
|
}
|
|
18
|
-
if (value <
|
|
19
|
-
throw new Error(setting
|
|
18
|
+
if (value < (0, exports.getMinConcurrency)()) {
|
|
19
|
+
throw new Error(`${setting} must be at least ${(0, exports.getMinConcurrency)()}, but is ${JSON.stringify(value)}`);
|
|
20
20
|
}
|
|
21
|
-
if (value >
|
|
22
|
-
throw new Error(`${setting} is set higher than the amount of CPU cores available. Available CPU cores: ${
|
|
21
|
+
if (value > (0, exports.getMaxConcurrency)()) {
|
|
22
|
+
throw new Error(`${setting} is set higher than the amount of CPU cores available. Available CPU cores: ${(0, exports.getMaxConcurrency)()}, value set: ${value}`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
else if (!/^\d+(\.\d+)?%$/.test(value)) {
|
|
@@ -27,3 +27,9 @@ const validateConcurrency = (value, setting) => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
exports.validateConcurrency = validateConcurrency;
|
|
30
|
+
const getMaxConcurrency = () => {
|
|
31
|
+
return require('os').cpus().length;
|
|
32
|
+
};
|
|
33
|
+
exports.getMaxConcurrency = getMaxConcurrency;
|
|
34
|
+
const getMinConcurrency = () => 1;
|
|
35
|
+
exports.getMinConcurrency = getMinConcurrency;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
|
@@ -8,6 +8,7 @@ const validatePuppeteerTimeout = (timeoutInMilliseconds) => {
|
|
|
8
8
|
if (typeof timeoutInMilliseconds !== 'number') {
|
|
9
9
|
throw new TypeError(`'timeoutInMilliseconds' should be a number, but is: ${JSON.stringify(timeoutInMilliseconds)}`);
|
|
10
10
|
}
|
|
11
|
+
// Value also appears in packages/cli/src/editor/components/RenderModal/RenderModalAdvanced.tsx
|
|
11
12
|
if (timeoutInMilliseconds < 7000 && process.env.NODE_ENV !== 'test') {
|
|
12
13
|
throw new TypeError(`'timeoutInMilliseconds' should be bigger or equal than 7000, but is ${timeoutInMilliseconds}`);
|
|
13
14
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {execSync} from 'node:child_process';
|
|
2
|
+
import {existsSync, mkdirSync, unlinkSync} from 'node:fs';
|
|
3
|
+
import {toolchains} from './toolchains.mjs';
|
|
4
|
+
|
|
5
|
+
const unpatched = [
|
|
6
|
+
'x86_64-apple-darwin',
|
|
7
|
+
'aarch64-apple-darwin',
|
|
8
|
+
'x86_64-pc-windows-gnu',
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
for (const toolchain of toolchains) {
|
|
12
|
+
process.stdout.write(toolchain + '...');
|
|
13
|
+
|
|
14
|
+
execSync(
|
|
15
|
+
`curl https://remotion-ffmpeg-binaries.s3.eu-central-1.amazonaws.com/${toolchain}.zip -o ${toolchain}.zip`
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
if (!existsSync('toolchains')) {
|
|
19
|
+
mkdirSync('toolchains');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (!existsSync('toolchains/' + toolchain)) {
|
|
23
|
+
mkdirSync('toolchains/' + toolchain);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
execSync(`tar -xzf ../../${toolchain}.zip`, {
|
|
27
|
+
cwd: `toolchains/${toolchain}`,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
unlinkSync(`${toolchain}.zip`);
|
|
31
|
+
process.stdout.write('Done.\n');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
for (const target of unpatched) {
|
|
35
|
+
execSync(`rustup target add ${target}`);
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-alpha6",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"execa": "5.1.1",
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
|
-
"remotion": "4.0.0-
|
|
19
|
+
"remotion": "4.0.0-alpha6",
|
|
20
20
|
"source-map": "^0.8.0-beta.0",
|
|
21
21
|
"ws": "8.7.0"
|
|
22
22
|
},
|
|
@@ -38,16 +38,17 @@
|
|
|
38
38
|
"react": "18.0.0",
|
|
39
39
|
"react-dom": "18.0.0",
|
|
40
40
|
"typescript": "^4.7.0",
|
|
41
|
-
"vitest": "0.24.3"
|
|
41
|
+
"vitest": "0.24.3",
|
|
42
|
+
"zod": "^3.21.4"
|
|
42
43
|
},
|
|
43
44
|
"optionalDependencies": {
|
|
44
|
-
"@remotion/compositor-darwin-arm64": "4.0.0-
|
|
45
|
-
"@remotion/compositor-darwin-x64": "4.0.0-
|
|
46
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.0-
|
|
47
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.0-
|
|
48
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.0-
|
|
49
|
-
"@remotion/compositor-linux-x64-musl": "4.0.0-
|
|
50
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.0-
|
|
45
|
+
"@remotion/compositor-darwin-arm64": "4.0.0-alpha6",
|
|
46
|
+
"@remotion/compositor-darwin-x64": "4.0.0-alpha6",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha6",
|
|
48
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.0-alpha6",
|
|
49
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.0-alpha6",
|
|
50
|
+
"@remotion/compositor-linux-x64-musl": "4.0.0-alpha6",
|
|
51
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.0-alpha6"
|
|
51
52
|
},
|
|
52
53
|
"keywords": [
|
|
53
54
|
"remotion",
|
package/types/ws/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
/* eslint-disable no-dupe-class-members */
|
|
7
7
|
/// <reference types="node" />
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import type {Server as HTTPSServer} from 'https';
|
|
10
|
+
import {EventEmitter} from 'node:events';
|
|
10
11
|
import type {
|
|
11
12
|
Agent,
|
|
12
13
|
ClientRequest,
|
|
@@ -14,12 +15,11 @@ import type {
|
|
|
14
15
|
IncomingMessage,
|
|
15
16
|
OutgoingHttpHeaders,
|
|
16
17
|
Server as HTTPServer,
|
|
17
|
-
} from 'http';
|
|
18
|
-
import type {
|
|
18
|
+
} from 'node:http';
|
|
19
|
+
import type {URL} from 'node:url';
|
|
20
|
+
import type {ZlibOptions} from 'node:zlib';
|
|
19
21
|
import type {Duplex, DuplexOptions} from 'stream';
|
|
20
22
|
import type {SecureContextOptions} from 'tls';
|
|
21
|
-
import type {URL} from 'url';
|
|
22
|
-
import type {ZlibOptions} from 'zlib';
|
|
23
23
|
declare class WebSocket extends EventEmitter {
|
|
24
24
|
/** The connection is not yet open. */
|
|
25
25
|
static readonly CONNECTING: 0;
|