@remotion/renderer 4.0.49 → 4.0.50

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.
@@ -5,12 +5,13 @@ export declare class ErrorWithStackFrame extends Error {
5
5
  frame: number | null;
6
6
  name: string;
7
7
  delayRenderCall: SymbolicatedStackFrame[] | null;
8
- constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }: {
8
+ constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }: {
9
9
  message: string;
10
10
  symbolicatedStackFrames: SymbolicatedStackFrame[] | null;
11
11
  frame: number | null;
12
12
  name: string;
13
13
  delayRenderCall: SymbolicatedStackFrame[] | null;
14
+ stack: string | undefined;
14
15
  });
15
16
  }
16
17
  export declare const handleJavascriptException: ({ page, onError, frame, }: {
@@ -4,12 +4,14 @@ exports.handleJavascriptException = exports.ErrorWithStackFrame = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const symbolicateable_error_1 = require("./symbolicateable-error");
6
6
  class ErrorWithStackFrame extends Error {
7
- constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, }) {
7
+ constructor({ message, symbolicatedStackFrames, frame, name, delayRenderCall, stack, }) {
8
8
  super(message);
9
9
  this.symbolicatedStackFrames = symbolicatedStackFrames;
10
10
  this.frame = frame;
11
11
  this.name = name;
12
12
  this.delayRenderCall = delayRenderCall;
13
+ // If error symbolication did not yield any stack frames, we print the original stack
14
+ this.stack = stack;
13
15
  }
14
16
  }
15
17
  exports.ErrorWithStackFrame = ErrorWithStackFrame;
@@ -18,6 +18,7 @@ const symbolicateError = async (symbolicateableError) => {
18
18
  frame: symbolicateableError.frame,
19
19
  name: symbolicateableError.name,
20
20
  delayRenderCall: delayRenderFrames,
21
+ stack: symbolicateableError.stack,
21
22
  });
22
23
  return symbolicatedErr;
23
24
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
1
  import execa from 'execa';
4
2
  import { HeadlessBrowser } from './browser/Browser';
5
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -61,10 +59,10 @@ export declare const RenderInternals: {
61
59
  width: number;
62
60
  height: number;
63
61
  scale: number;
64
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
62
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
65
63
  wantsImageSequence: boolean;
66
64
  }) => void;
67
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
65
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
68
66
  tmpDir: (str: string) => string;
69
67
  deleteDirectory: (directory: string) => void;
70
68
  isServeUrl: (potentialUrl: string) => boolean;
@@ -119,7 +117,7 @@ export declare const RenderInternals: {
119
117
  };
120
118
  registerErrorSymbolicationLock: () => number;
121
119
  unlockErrorSymbolicationLock: (id: number) => void;
122
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
120
+ canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
123
121
  mimeContentType: typeof mimeContentType;
124
122
  mimeLookup: typeof mimeLookup;
125
123
  validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
@@ -136,8 +134,8 @@ export declare const RenderInternals: {
136
134
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
137
135
  validateJpegQuality: (q: number | undefined) => void;
138
136
  DEFAULT_TIMEOUT: number;
139
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
140
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | undefined) => boolean;
137
+ DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
138
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | undefined) => boolean;
141
139
  logLevels: readonly ["verbose", "info", "warn", "error"];
142
140
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
143
141
  isValidLogLevel: (level: string) => boolean;
@@ -154,28 +152,28 @@ export declare const RenderInternals: {
154
152
  output: string;
155
153
  onProgress: (p: number) => void;
156
154
  numberOfFrames: number;
157
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
155
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
158
156
  fps: number;
159
157
  numberOfGifLoops: number | null;
160
- audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
158
+ audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
161
159
  audioBitrate: string | null;
162
160
  }) => Promise<void>;
163
161
  getMinConcurrency: () => number;
164
162
  getMaxConcurrency: () => number;
165
163
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
166
- codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
164
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
167
165
  preferLossless: boolean;
168
- }) => "opus" | "aac" | "mp3" | "pcm-16" | null;
166
+ }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
169
167
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
170
168
  defaultFileExtensionMap: {
171
169
  h264: {
172
170
  default: import("./file-extensions").FileExtension;
173
171
  forAudioCodec: {
174
- aac: {
172
+ mp3: {
175
173
  possible: import("./file-extensions").FileExtension[];
176
174
  default: import("./file-extensions").FileExtension;
177
175
  };
178
- mp3: {
176
+ aac: {
179
177
  possible: import("./file-extensions").FileExtension[];
180
178
  default: import("./file-extensions").FileExtension;
181
179
  };
@@ -201,11 +199,11 @@ export declare const RenderInternals: {
201
199
  vp8: {
202
200
  default: import("./file-extensions").FileExtension;
203
201
  forAudioCodec: {
204
- opus: {
202
+ "pcm-16": {
205
203
  possible: import("./file-extensions").FileExtension[];
206
204
  default: import("./file-extensions").FileExtension;
207
205
  };
208
- "pcm-16": {
206
+ opus: {
209
207
  possible: import("./file-extensions").FileExtension[];
210
208
  default: import("./file-extensions").FileExtension;
211
209
  };
@@ -214,20 +212,20 @@ export declare const RenderInternals: {
214
212
  vp9: {
215
213
  default: import("./file-extensions").FileExtension;
216
214
  forAudioCodec: {
217
- opus: {
215
+ "pcm-16": {
218
216
  possible: import("./file-extensions").FileExtension[];
219
217
  default: import("./file-extensions").FileExtension;
220
218
  };
221
- "pcm-16": {
219
+ opus: {
222
220
  possible: import("./file-extensions").FileExtension[];
223
221
  default: import("./file-extensions").FileExtension;
224
222
  };
225
223
  };
226
224
  };
227
- prores: {
225
+ mp3: {
228
226
  default: import("./file-extensions").FileExtension;
229
227
  forAudioCodec: {
230
- aac: {
228
+ mp3: {
231
229
  possible: import("./file-extensions").FileExtension[];
232
230
  default: import("./file-extensions").FileExtension;
233
231
  };
@@ -250,22 +248,22 @@ export declare const RenderInternals: {
250
248
  };
251
249
  };
252
250
  };
253
- mp3: {
251
+ wav: {
254
252
  default: import("./file-extensions").FileExtension;
255
253
  forAudioCodec: {
256
- mp3: {
257
- possible: import("./file-extensions").FileExtension[];
258
- default: import("./file-extensions").FileExtension;
259
- };
260
254
  "pcm-16": {
261
255
  possible: import("./file-extensions").FileExtension[];
262
256
  default: import("./file-extensions").FileExtension;
263
257
  };
264
258
  };
265
259
  };
266
- wav: {
260
+ prores: {
267
261
  default: import("./file-extensions").FileExtension;
268
262
  forAudioCodec: {
263
+ aac: {
264
+ possible: import("./file-extensions").FileExtension[];
265
+ default: import("./file-extensions").FileExtension;
266
+ };
269
267
  "pcm-16": {
270
268
  possible: import("./file-extensions").FileExtension[];
271
269
  default: import("./file-extensions").FileExtension;
@@ -302,8 +300,8 @@ export declare const RenderInternals: {
302
300
  readonly vp9: readonly ["opus", "pcm-16"];
303
301
  readonly wav: readonly ["pcm-16"];
304
302
  };
305
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
306
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
303
+ makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
304
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
307
305
  getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd") => string;
308
306
  callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
309
307
  dynamicLibraryPathOptions: () => {
@@ -321,7 +319,7 @@ export declare const RenderInternals: {
321
319
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
322
320
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
323
321
  DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
324
- DEFAULT_VIDEO_IMAGE_FORMAT: "none" | "png" | "jpeg";
322
+ DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
325
323
  DEFAULT_JPEG_QUALITY: number;
326
324
  chalk: {
327
325
  enabled: () => boolean;
@@ -524,4 +522,5 @@ export declare const RenderInternals: {
524
522
  }>;
525
523
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan"];
526
524
  copyImageToClipboard: (src: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
525
+ isIpV6Supported: () => boolean;
527
526
  };
package/dist/index.js CHANGED
@@ -60,6 +60,7 @@ 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");
63
64
  const is_serve_url_1 = require("./is-serve-url");
64
65
  const jpeg_quality_1 = require("./jpeg-quality");
65
66
  const log_level_1 = require("./log-level");
@@ -191,6 +192,7 @@ exports.RenderInternals = {
191
192
  internalRenderMedia: render_media_1.internalRenderMedia,
192
193
  validOpenGlRenderers: validate_opengl_renderer_1.validOpenGlRenderers,
193
194
  copyImageToClipboard: copy_to_clipboard_1.copyImageToClipboard,
195
+ isIpV6Supported: is_ipv6_supported_1.isIpV6Supported,
194
196
  };
195
197
  // Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
196
198
  (0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
@@ -0,0 +1 @@
1
+ export declare const isIpV6Supported: () => boolean;
@@ -0,0 +1,26 @@
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;
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,27 @@
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;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.serveStatic = void 0;
7
7
  const node_http_1 = __importDefault(require("node:http"));
8
8
  const get_port_1 = require("./get-port");
9
+ const is_ipv6_supported_1 = require("./is-ipv6-supported");
9
10
  const offthread_video_server_1 = require("./offthread-video-server");
10
11
  const serve_handler_1 = require("./serve-handler");
11
12
  const serveStatic = async (path, options) => {
@@ -45,8 +46,10 @@ const serveStatic = async (path, options) => {
45
46
  });
46
47
  let selectedPort = null;
47
48
  const maxTries = 5;
48
- // Default Node.js host, but explicity
49
- const host = '::';
49
+ const host = (0, is_ipv6_supported_1.isIpV6Supported)() ? '::' : '0.0.0.0';
50
+ const hostsToTry = (0, is_ipv6_supported_1.isIpV6Supported)()
51
+ ? ['::', '::1']
52
+ : ['0.0.0.0', '127.0.0.1'];
50
53
  for (let i = 0; i < maxTries; i++) {
51
54
  try {
52
55
  selectedPort = await new Promise((resolve, reject) => {
@@ -55,7 +58,7 @@ const serveStatic = async (path, options) => {
55
58
  desiredPort: (_a = options === null || options === void 0 ? void 0 : options.port) !== null && _a !== void 0 ? _a : undefined,
56
59
  from: 3000,
57
60
  to: 3100,
58
- hostsToTry: ['::', '::1'],
61
+ hostsToTry,
59
62
  })
60
63
  .then(({ port, didUsePort }) => {
61
64
  server.listen({ port, host });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.49",
3
+ "version": "4.0.50",
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.49"
21
+ "remotion": "4.0.50"
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-arm64": "4.0.49",
44
- "@remotion/compositor-darwin-x64": "4.0.49",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.49",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.49",
47
- "@remotion/compositor-linux-x64-gnu": "4.0.49",
48
- "@remotion/compositor-linux-x64-musl": "4.0.49",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.49"
43
+ "@remotion/compositor-darwin-arm64": "4.0.50",
44
+ "@remotion/compositor-darwin-x64": "4.0.50",
45
+ "@remotion/compositor-linux-x64-gnu": "4.0.50",
46
+ "@remotion/compositor-linux-arm64-musl": "4.0.50",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.50",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.50",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.50"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",