@remotion/renderer 4.0.176 → 4.0.178
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 +18 -9
- package/bunfig.toml +2 -0
- package/dist/assets/read-file.js +10 -5
- package/dist/client.d.ts +3 -3
- package/dist/compositor/payloads.d.ts +1 -1
- package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
- package/dist/get-cpu-count.d.ts +1 -0
- package/dist/get-cpu-count.js +3 -2
- package/dist/index.d.ts +7 -7
- package/dist/options/gl.d.ts +3 -3
- package/dist/options/index.d.ts +3 -3
- package/dist/port-config.d.ts +2 -2
- package/happydom.ts +6 -0
- package/package.json +17 -26
package/README.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
# @remotion/renderer
|
|
2
|
+
|
|
3
|
+
Render Remotion videos using Node.js or Bun
|
|
4
|
+
|
|
5
|
+
[](https://npmcharts.com/compare/@remotion/renderer?minimal=true)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @remotion/renderer --save-exact
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
|
|
14
|
+
Remove the `^` character from the version number to use the exact version.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
See the [documentation](https://www.remotion.dev/docs/renderer) for more information.
|
package/bunfig.toml
ADDED
package/dist/assets/read-file.js
CHANGED
|
@@ -19,11 +19,16 @@ const getClient = (url) => {
|
|
|
19
19
|
};
|
|
20
20
|
const readFileWithoutRedirect = (url) => {
|
|
21
21
|
return new Promise((resolve, reject) => {
|
|
22
|
-
getClient(url)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const client = getClient(url);
|
|
23
|
+
client(url,
|
|
24
|
+
// Bun 1.1.16 does not support the `headers` option
|
|
25
|
+
typeof Bun === 'undefined'
|
|
26
|
+
? {
|
|
27
|
+
headers: {
|
|
28
|
+
'user-agent': 'Mozilla/5.0 (@remotion/renderer - https://remotion.dev)',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
: {}, (res) => {
|
|
27
32
|
resolve(res);
|
|
28
33
|
}).on('error', (err) => {
|
|
29
34
|
return reject(err);
|
package/dist/client.d.ts
CHANGED
|
@@ -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;
|
|
@@ -31,7 +31,7 @@ export type VideoMetadata = {
|
|
|
31
31
|
fps: number;
|
|
32
32
|
width: number;
|
|
33
33
|
height: number;
|
|
34
|
-
durationInSeconds: number;
|
|
34
|
+
durationInSeconds: number | null;
|
|
35
35
|
codec: 'h264' | 'h265' | 'vp8' | 'vp9' | 'av1' | 'prores' | 'unknown';
|
|
36
36
|
canPlayInVideoTag: boolean;
|
|
37
37
|
supportsSeeking: boolean;
|
|
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
|
|
|
4
4
|
filters: PreprocessedAudioTrack[];
|
|
5
5
|
downloadMap: DownloadMap;
|
|
6
6
|
}) => Promise<{
|
|
7
|
-
complexFilterFlag: [
|
|
7
|
+
complexFilterFlag: [
|
|
8
|
+
string,
|
|
9
|
+
string
|
|
10
|
+
] | null;
|
|
8
11
|
cleanup: () => void;
|
|
9
12
|
}>;
|
package/dist/get-cpu-count.d.ts
CHANGED
package/dist/get-cpu-count.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// docker run --cpuset-cpus="0,1" to assign only 2 CPUs.
|
|
4
4
|
// However, Node.js returns the core count of the host system (up to 96!)
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCpuCount = void 0;
|
|
6
|
+
exports.getCpuCount = exports.getConcurrencyFromNProc = void 0;
|
|
7
7
|
const node_child_process_1 = require("node:child_process");
|
|
8
8
|
const node_os_1 = require("node:os");
|
|
9
9
|
// We also get it from nproc and use the minimum of the two.
|
|
@@ -15,9 +15,10 @@ const getConcurrencyFromNProc = () => {
|
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
+
exports.getConcurrencyFromNProc = getConcurrencyFromNProc;
|
|
18
19
|
const getCpuCount = () => {
|
|
19
20
|
const node = (0, node_os_1.cpus)().length;
|
|
20
|
-
const nproc = getConcurrencyFromNProc();
|
|
21
|
+
const nproc = (0, exports.getConcurrencyFromNProc)();
|
|
21
22
|
if (nproc === null) {
|
|
22
23
|
return node;
|
|
23
24
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -141,8 +141,8 @@ export declare const RenderInternals: {
|
|
|
141
141
|
validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
142
142
|
DEFAULT_BROWSER: "chrome";
|
|
143
143
|
validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
|
|
144
|
-
DEFAULT_OPENGL_RENDERER: "
|
|
145
|
-
validateOpenGlRenderer: (option: unknown) => "
|
|
144
|
+
DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
145
|
+
validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
146
146
|
validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
|
|
147
147
|
DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
148
148
|
validateJpegQuality: (q: unknown) => void;
|
|
@@ -338,7 +338,7 @@ export declare const RenderInternals: {
|
|
|
338
338
|
makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
|
|
339
339
|
defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">;
|
|
340
340
|
getExecutablePath: ({ indent, logLevel, type, binariesDirectory, }: {
|
|
341
|
-
type: "
|
|
341
|
+
type: "compositor" | "ffmpeg" | "ffprobe";
|
|
342
342
|
indent: boolean;
|
|
343
343
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
344
344
|
binariesDirectory: string | null;
|
|
@@ -354,8 +354,8 @@ export declare const RenderInternals: {
|
|
|
354
354
|
}) => execa.ExecaChildProcess<string>;
|
|
355
355
|
validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
|
|
356
356
|
validVideoImageFormats: readonly ["png", "jpeg", "none"];
|
|
357
|
-
DEFAULT_STILL_IMAGE_FORMAT: "
|
|
358
|
-
DEFAULT_VIDEO_IMAGE_FORMAT: "
|
|
357
|
+
DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
|
|
358
|
+
DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
|
|
359
359
|
DEFAULT_JPEG_QUALITY: number;
|
|
360
360
|
chalk: {
|
|
361
361
|
enabled: () => boolean;
|
|
@@ -454,7 +454,7 @@ export declare const RenderInternals: {
|
|
|
454
454
|
frame: number;
|
|
455
455
|
serializedInputPropsWithCustomSchema: string;
|
|
456
456
|
serializedResolvedPropsWithCustomSchema: string;
|
|
457
|
-
imageFormat: "
|
|
457
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
458
458
|
jpegQuality: number;
|
|
459
459
|
puppeteerInstance: HeadlessBrowser | null;
|
|
460
460
|
envVariables: Record<string, string>;
|
|
@@ -755,7 +755,7 @@ export declare const RenderInternals: {
|
|
|
755
755
|
onFrameUpdate: ((framesRendered: number, frameIndex: number, timeToRenderInMilliseconds: number) => void) | null;
|
|
756
756
|
outputDir: string | null;
|
|
757
757
|
envVariables: Record<string, string>;
|
|
758
|
-
imageFormat: "
|
|
758
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
759
759
|
jpegQuality: number;
|
|
760
760
|
frameRange: import("./frame-range").FrameRange | null;
|
|
761
761
|
everyNthFrame: number;
|
package/dist/options/gl.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
|
|
2
2
|
export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
|
|
3
3
|
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
4
|
-
export declare const getChromiumOpenGlRenderer: () => "
|
|
4
|
+
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
5
5
|
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
6
6
|
export declare const glOption: {
|
|
7
7
|
cliFlag: "gl";
|
|
8
8
|
docLink: string;
|
|
9
9
|
name: string;
|
|
10
|
-
type: "
|
|
10
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
11
11
|
ssrName: string;
|
|
12
12
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
getValue: ({ commandLine }: {
|
|
14
14
|
commandLine: Record<string, unknown>;
|
|
15
15
|
}) => {
|
|
16
|
-
value: "
|
|
16
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
17
17
|
source: string;
|
|
18
18
|
} | {
|
|
19
19
|
value: null;
|
package/dist/options/index.d.ts
CHANGED
|
@@ -245,19 +245,19 @@ export declare const allOptions: {
|
|
|
245
245
|
cliFlag: "gl";
|
|
246
246
|
docLink: string;
|
|
247
247
|
name: string;
|
|
248
|
-
type: "
|
|
248
|
+
type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
|
|
249
249
|
ssrName: string;
|
|
250
250
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
251
251
|
getValue: ({ commandLine }: {
|
|
252
252
|
commandLine: Record<string, unknown>;
|
|
253
253
|
}) => {
|
|
254
|
-
value: "
|
|
254
|
+
value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
|
|
255
255
|
source: string;
|
|
256
256
|
} | {
|
|
257
257
|
value: null;
|
|
258
258
|
source: string;
|
|
259
259
|
};
|
|
260
|
-
setConfig: (value: "
|
|
260
|
+
setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
|
|
261
261
|
};
|
|
262
262
|
enableLambdaInsights: {
|
|
263
263
|
name: string;
|
package/dist/port-config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
/// <reference types="bun-types" />
|
|
3
4
|
/// <reference types="node" />
|
|
4
5
|
/// <reference types="node" />
|
|
5
6
|
/// <reference types="node" />
|
|
6
7
|
/// <reference types="bun-types" />
|
|
7
8
|
/// <reference types="bun-types" />
|
|
8
|
-
/// <reference types="node" />
|
|
9
9
|
import type { NetworkInterfaceInfo } from 'os';
|
|
10
10
|
import os from 'os';
|
|
11
11
|
type PortConfig = {
|
|
@@ -13,7 +13,7 @@ type PortConfig = {
|
|
|
13
13
|
hostsToTry: string[];
|
|
14
14
|
};
|
|
15
15
|
export declare const getPortConfig: (preferIpv4: boolean) => PortConfig;
|
|
16
|
-
export declare const getHostToBind: (flattened: os.NetworkInterfaceInfo[], preferIpv4: boolean) => "0.0.0.0"
|
|
16
|
+
export declare const getHostToBind: (flattened: os.NetworkInterfaceInfo[], preferIpv4: boolean) => "::" | "0.0.0.0";
|
|
17
17
|
export declare const getHostsToTry: (flattened: os.NetworkInterfaceInfo[]) => string[];
|
|
18
18
|
export declare const flattenNetworkInterfaces: (networkInterfaces: NodeJS.Dict<NetworkInterfaceInfo[]>) => NetworkInterfaceInfo[];
|
|
19
19
|
export declare const isIpV6Supported: (flattened: os.NetworkInterfaceInfo[]) => boolean;
|
package/happydom.ts
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
+
"repository": {
|
|
3
|
+
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
|
+
},
|
|
2
5
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "
|
|
6
|
+
"version": "4.0.178",
|
|
7
|
+
"description": "Render Remotion videos using Node.js or Bun",
|
|
5
8
|
"main": "dist/index.js",
|
|
6
9
|
"types": "dist/index.d.ts",
|
|
7
10
|
"sideEffects": false,
|
|
8
11
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
9
12
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
|
-
"repository": {
|
|
11
|
-
"url": "https://github.com/remotion-dev/remotion"
|
|
12
|
-
},
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
15
15
|
},
|
|
@@ -18,39 +18,29 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.178"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
25
25
|
"react-dom": ">=16.8.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@jonny/eslint-config": "3.0.281",
|
|
29
28
|
"@testing-library/dom": "^8.16.0",
|
|
30
29
|
"@testing-library/react": "13.3.0",
|
|
31
|
-
"@
|
|
32
|
-
"@types/progress": "2.0.5",
|
|
33
|
-
"@types/bun": "1.0.12",
|
|
34
|
-
"@types/react": "18.3.1",
|
|
35
|
-
"@types/react-dom": "18.3.0",
|
|
36
|
-
"jsdom": "^24.0.0",
|
|
37
|
-
"eslint": "8.56.0",
|
|
38
|
-
"prettier": "3.2.5",
|
|
39
|
-
"prettier-plugin-organize-imports": "3.2.4",
|
|
30
|
+
"@happy-dom/global-registrator": "14.5.1",
|
|
40
31
|
"react": "18.3.1",
|
|
41
32
|
"react-dom": "18.3.1",
|
|
42
|
-
"vitest": "0.31.1",
|
|
43
33
|
"@types/ws": "8.5.10",
|
|
44
|
-
"@remotion/streaming": "4.0.
|
|
34
|
+
"@remotion/streaming": "4.0.178"
|
|
45
35
|
},
|
|
46
36
|
"optionalDependencies": {
|
|
47
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-
|
|
50
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-
|
|
52
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
37
|
+
"@remotion/compositor-darwin-arm64": "4.0.178",
|
|
38
|
+
"@remotion/compositor-darwin-x64": "4.0.178",
|
|
39
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.178",
|
|
40
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.178",
|
|
41
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.178",
|
|
42
|
+
"@remotion/compositor-linux-x64-musl": "4.0.178",
|
|
43
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.178"
|
|
54
44
|
},
|
|
55
45
|
"keywords": [
|
|
56
46
|
"remotion",
|
|
@@ -62,10 +52,11 @@
|
|
|
62
52
|
"publishConfig": {
|
|
63
53
|
"access": "public"
|
|
64
54
|
},
|
|
55
|
+
"homepage": "https://www.remotion.dev/docs/renderer",
|
|
65
56
|
"scripts": {
|
|
66
57
|
"formatting": "prettier src --check",
|
|
67
58
|
"lint": "eslint src --ext ts,tsx",
|
|
68
|
-
"test": "
|
|
59
|
+
"test": "bun test src",
|
|
69
60
|
"build": "node build.mjs --debug",
|
|
70
61
|
"build-all": "node build.mjs --all"
|
|
71
62
|
}
|