@remotion/renderer 4.0.60 → 4.0.61

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 CHANGED
@@ -315,6 +315,14 @@ export declare const BrowserSafeApis: {
315
315
  ssrName: string;
316
316
  description: () => JSX.Element;
317
317
  };
318
+ enableLambdaInsights: {
319
+ name: string;
320
+ cliFlag: string;
321
+ description: () => JSX.Element;
322
+ ssrName: string;
323
+ docLink: string;
324
+ type: boolean;
325
+ };
318
326
  };
319
327
  validColorSpaces: readonly ["default", "bt709"];
320
328
  optionsMap: {
@@ -3,10 +3,6 @@ export declare const testPortAvailableOnMultipleHosts: ({ hosts, port, }: {
3
3
  port: number;
4
4
  hosts: string[];
5
5
  }) => Promise<PortStatus>;
6
- export declare const getPortConfig: () => {
7
- host: string;
8
- hostsToTry: string[];
9
- };
10
6
  export declare const getDesiredPort: ({ desiredPort, from, hostsToTry, to, }: {
11
7
  desiredPort: number | undefined;
12
8
  from: number;
package/dist/get-port.js CHANGED
@@ -3,9 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDesiredPort = exports.getPortConfig = exports.testPortAvailableOnMultipleHosts = void 0;
6
+ exports.getDesiredPort = exports.testPortAvailableOnMultipleHosts = void 0;
7
7
  const net_1 = __importDefault(require("net"));
8
- const is_ipv6_supported_1 = require("./is-ipv6-supported");
9
8
  const locks_1 = require("./locks");
10
9
  const isPortAvailableOnHost = ({ portToTry, host, }) => {
11
10
  return new Promise((resolve) => {
@@ -48,14 +47,6 @@ const getPort = async ({ from, to, hostsToTest, }) => {
48
47
  throw new Error('No available ports found');
49
48
  };
50
49
  const portLocks = (0, locks_1.createLock)({ timeout: 10000 });
51
- const getPortConfig = () => {
52
- const host = (0, is_ipv6_supported_1.isIpV6Supported)() ? '::' : '0.0.0.0';
53
- const hostsToTry = (0, is_ipv6_supported_1.isIpV6Supported)()
54
- ? ['::', '::1', '0.0.0.0', '127.0.0.1']
55
- : ['0.0.0.0', '127.0.0.1'];
56
- return { host, hostsToTry };
57
- };
58
- exports.getPortConfig = getPortConfig;
59
50
  const getDesiredPort = async ({ desiredPort, from, hostsToTry, to, }) => {
60
51
  await portLocks.waitForAllToBeDone();
61
52
  const lockPortSelection = portLocks.lock();
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="react" />
3
+ /// <reference types="node" />
3
4
  import execa from 'execa';
4
5
  import { HeadlessBrowser } from './browser/Browser';
5
6
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -519,7 +520,7 @@ export declare const RenderInternals: {
519
520
  }>;
520
521
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
521
522
  copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
522
- isIpV6Supported: () => boolean;
523
+ isIpV6Supported: (flattened: import("os").NetworkInterfaceInfo[]) => boolean;
523
524
  getChromiumGpuInformation: ({ browserExecutable, indent, logLevel, chromiumOptions, }: {
524
525
  browserExecutable: import("./browser-executable").BrowserExecutable;
525
526
  indent: boolean;
package/dist/index.js CHANGED
@@ -60,7 +60,6 @@ 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");
64
63
  const is_serve_url_1 = require("./is-serve-url");
65
64
  const jpeg_quality_1 = require("./jpeg-quality");
66
65
  const log_level_1 = require("./log-level");
@@ -71,6 +70,7 @@ const gl_1 = require("./options/gl");
71
70
  const parse_browser_error_stack_1 = require("./parse-browser-error-stack");
72
71
  const perf = __importStar(require("./perf"));
73
72
  const pixel_format_1 = require("./pixel-format");
73
+ const port_config_1 = require("./port-config");
74
74
  const prepare_server_1 = require("./prepare-server");
75
75
  const render_frames_1 = require("./render-frames");
76
76
  const render_media_1 = require("./render-media");
@@ -193,9 +193,9 @@ exports.RenderInternals = {
193
193
  internalRenderMedia: render_media_1.internalRenderMedia,
194
194
  validOpenGlRenderers: gl_1.validOpenGlRenderers,
195
195
  copyImageToClipboard: copy_to_clipboard_1.copyImageToClipboard,
196
- isIpV6Supported: is_ipv6_supported_1.isIpV6Supported,
196
+ isIpV6Supported: port_config_1.isIpV6Supported,
197
197
  getChromiumGpuInformation: test_gpu_1.getChromiumGpuInformation,
198
- getPortConfig: get_port_1.getPortConfig,
198
+ getPortConfig: port_config_1.getPortConfig,
199
199
  };
200
200
  // Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
201
201
  (0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const enableLambdaInsights: {
3
+ name: string;
4
+ cliFlag: string;
5
+ description: () => JSX.Element;
6
+ ssrName: string;
7
+ docLink: string;
8
+ type: boolean;
9
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enableLambdaInsights = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ exports.enableLambdaInsights = {
6
+ name: 'Enable Lambda Insights',
7
+ cliFlag: 'enable-lambda-insights',
8
+ description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Enable", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs/lambda/insights", children: "Lambda Insights in AWS CloudWatch" }), ". For this to work, you may have to update your role permission."] })),
9
+ ssrName: 'enableLambdaInsights',
10
+ docLink: 'https://www.remotion.dev/docs/lambda/insights',
11
+ type: false,
12
+ };
@@ -120,4 +120,12 @@ export declare const allOptions: {
120
120
  ssrName: string;
121
121
  description: () => JSX.Element;
122
122
  };
123
+ enableLambdaInsights: {
124
+ name: string;
125
+ cliFlag: string;
126
+ description: () => JSX.Element;
127
+ ssrName: string;
128
+ docLink: string;
129
+ type: boolean;
130
+ };
123
131
  };
@@ -5,6 +5,7 @@ const audio_bitrate_1 = require("./audio-bitrate");
5
5
  const color_space_1 = require("./color-space");
6
6
  const crf_1 = require("./crf");
7
7
  const delete_after_1 = require("./delete-after");
8
+ const enable_lambda_insights_1 = require("./enable-lambda-insights");
8
9
  const enable_multiprocess_on_linux_1 = require("./enable-multiprocess-on-linux");
9
10
  const enforce_audio_1 = require("./enforce-audio");
10
11
  const folder_expiry_1 = require("./folder-expiry");
@@ -32,4 +33,5 @@ exports.allOptions = {
32
33
  folderExpiryOption: folder_expiry_1.folderExpiryOption,
33
34
  enableMultiprocessOnLinuxOption: enable_multiprocess_on_linux_1.enableMultiprocessOnLinuxOption,
34
35
  glOption: gl_1.glOption,
36
+ enableLambdaInsights: enable_lambda_insights_1.enableLambdaInsights,
35
37
  };
@@ -0,0 +1,18 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ import type { NetworkInterfaceInfo } from 'os';
6
+ import os from 'os';
7
+ type PortConfig = {
8
+ host: string;
9
+ hostsToTry: string[];
10
+ };
11
+ export declare const getPortConfig: () => PortConfig;
12
+ export declare const getHostToBind: (flattened: os.NetworkInterfaceInfo[]) => "::" | "0.0.0.0";
13
+ export declare const getHostsToTry: (flattened: os.NetworkInterfaceInfo[]) => string[];
14
+ export declare const flattenNetworkInterfaces: (networkInterfaces: NodeJS.Dict<NetworkInterfaceInfo[]>) => NetworkInterfaceInfo[];
15
+ export declare const isIpV6Supported: (flattened: os.NetworkInterfaceInfo[]) => boolean;
16
+ export declare const hasIPv6LoopbackAddress: (flattened: os.NetworkInterfaceInfo[]) => boolean;
17
+ export declare const hasIpv4LoopbackAddress: (flattened: os.NetworkInterfaceInfo[]) => boolean;
18
+ export {};
@@ -0,0 +1,76 @@
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.hasIpv4LoopbackAddress = exports.hasIPv6LoopbackAddress = exports.isIpV6Supported = exports.flattenNetworkInterfaces = exports.getHostsToTry = exports.getHostToBind = exports.getPortConfig = void 0;
7
+ const os_1 = __importDefault(require("os"));
8
+ const truthy_1 = require("./truthy");
9
+ let cached = null;
10
+ const getPortConfig = () => {
11
+ if (cached) {
12
+ return cached;
13
+ }
14
+ const networkInterfaces = os_1.default.networkInterfaces();
15
+ const flattened = (0, exports.flattenNetworkInterfaces)(networkInterfaces);
16
+ const host = (0, exports.getHostToBind)(flattened);
17
+ const hostsToTry = (0, exports.getHostsToTry)(flattened);
18
+ const response = { host, hostsToTry };
19
+ cached = response;
20
+ return response;
21
+ };
22
+ exports.getPortConfig = getPortConfig;
23
+ const getHostToBind = (flattened) => {
24
+ return (0, exports.isIpV6Supported)(flattened) ? '::' : '0.0.0.0';
25
+ };
26
+ exports.getHostToBind = getHostToBind;
27
+ const getHostsToTry = (flattened) => {
28
+ return [
29
+ (0, exports.hasIPv6LoopbackAddress)(flattened) ? '::1' : null,
30
+ (0, exports.hasIpv4LoopbackAddress)(flattened) ? '127.0.0.1' : null,
31
+ (0, exports.isIpV6Supported)(flattened) ? '::' : null,
32
+ '0.0.0.0',
33
+ ].filter(truthy_1.truthy);
34
+ };
35
+ exports.getHostsToTry = getHostsToTry;
36
+ const flattenNetworkInterfaces = (networkInterfaces) => {
37
+ const result = [];
38
+ for (const iface in networkInterfaces) {
39
+ for (const configuration of networkInterfaces[iface]) {
40
+ result.push(configuration);
41
+ }
42
+ }
43
+ return result;
44
+ };
45
+ exports.flattenNetworkInterfaces = flattenNetworkInterfaces;
46
+ const isIpV6Supported = (flattened) => {
47
+ for (const configuration of flattened) {
48
+ if (configuration.family === 'IPv6' && !configuration.internal) {
49
+ return true;
50
+ }
51
+ }
52
+ return false;
53
+ };
54
+ exports.isIpV6Supported = isIpV6Supported;
55
+ const hasIPv6LoopbackAddress = (flattened) => {
56
+ for (const configuration of flattened) {
57
+ if (configuration.family === 'IPv6' &&
58
+ configuration.internal &&
59
+ configuration.address === '::1') {
60
+ return true;
61
+ }
62
+ }
63
+ return false;
64
+ };
65
+ exports.hasIPv6LoopbackAddress = hasIPv6LoopbackAddress;
66
+ const hasIpv4LoopbackAddress = (flattened) => {
67
+ for (const configuration of flattened) {
68
+ if (configuration.family === 'IPv4' &&
69
+ configuration.internal &&
70
+ configuration.address === '127.0.0.1') {
71
+ return true;
72
+ }
73
+ }
74
+ return false;
75
+ };
76
+ exports.hasIpv4LoopbackAddress = hasIpv4LoopbackAddress;
@@ -7,6 +7,7 @@ exports.serveStatic = void 0;
7
7
  const node_http_1 = __importDefault(require("node:http"));
8
8
  const get_port_1 = require("./get-port");
9
9
  const offthread_video_server_1 = require("./offthread-video-server");
10
+ const port_config_1 = require("./port-config");
10
11
  const serve_handler_1 = require("./serve-handler");
11
12
  const serveStatic = async (path, options) => {
12
13
  const { listener: offthreadRequest, close: closeCompositor, compositor, } = (0, offthread_video_server_1.startOffthreadVideoServer)({
@@ -45,7 +46,7 @@ const serveStatic = async (path, options) => {
45
46
  });
46
47
  let selectedPort = null;
47
48
  const maxTries = 5;
48
- const portConfig = (0, get_port_1.getPortConfig)();
49
+ const portConfig = (0, port_config_1.getPortConfig)();
49
50
  for (let i = 0; i < maxTries; i++) {
50
51
  try {
51
52
  selectedPort = await new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.60",
3
+ "version": "4.0.61",
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.60"
21
+ "remotion": "4.0.61"
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-darwin-x64": "4.0.60",
44
- "@remotion/compositor-linux-arm64-gnu": "4.0.60",
45
- "@remotion/compositor-linux-x64-gnu": "4.0.60",
46
- "@remotion/compositor-darwin-arm64": "4.0.60",
47
- "@remotion/compositor-linux-arm64-musl": "4.0.60",
48
- "@remotion/compositor-linux-x64-musl": "4.0.60",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.60"
43
+ "@remotion/compositor-darwin-arm64": "4.0.61",
44
+ "@remotion/compositor-darwin-x64": "4.0.61",
45
+ "@remotion/compositor-linux-arm64-musl": "4.0.61",
46
+ "@remotion/compositor-linux-x64-gnu": "4.0.61",
47
+ "@remotion/compositor-linux-x64-musl": "4.0.61",
48
+ "@remotion/compositor-linux-arm64-gnu": "4.0.61",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.61"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",
@@ -1 +0,0 @@
1
- export declare const isIpV6Supported: () => boolean;
@@ -1,26 +0,0 @@
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;
@@ -1,8 +0,0 @@
1
- export declare const deleteAfterOption: {
2
- name: string;
3
- cliFlag: "delete-after";
4
- description: () => JSX.Element;
5
- ssrName: "deleteAfter";
6
- docLink: string;
7
- type: number | null;
8
- };
@@ -1,14 +0,0 @@
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
- };
@@ -1,7 +0,0 @@
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;
@@ -1,27 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
2
- export type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
3
- export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
4
- export declare const validateOpenGlRenderer: (option: OpenGlRenderer | null) => OpenGlRenderer | null;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateOpenGlRenderer = exports.DEFAULT_OPENGL_RENDERER = exports.validOpenGlRenderers = void 0;
4
- exports.validOpenGlRenderers = [
5
- 'swangle',
6
- 'angle',
7
- 'egl',
8
- 'swiftshader',
9
- 'vulkan',
10
- ];
11
- exports.DEFAULT_OPENGL_RENDERER = null;
12
- const validateOpenGlRenderer = (option) => {
13
- if (option === null) {
14
- return null;
15
- }
16
- if (!exports.validOpenGlRenderers.includes(option)) {
17
- throw new TypeError(`${option} is not a valid GL backend. Accepted values: ${exports.validOpenGlRenderers.join(', ')}`);
18
- }
19
- return option;
20
- };
21
- exports.validateOpenGlRenderer = validateOpenGlRenderer;