@remotion/renderer 4.0.187 → 4.0.189

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
@@ -467,19 +467,19 @@ export declare const BrowserSafeApis: {
467
467
  cliFlag: "gl";
468
468
  docLink: string;
469
469
  name: string;
470
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
482
+ setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
483
483
  };
484
484
  enableLambdaInsights: {
485
485
  name: string;
@@ -604,17 +604,17 @@ export declare const BrowserSafeApis: {
604
604
  description: () => import("react/jsx-runtime").JSX.Element;
605
605
  ssrName: "x264Preset";
606
606
  docLink: string;
607
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
607
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
608
608
  getValue: ({ commandLine }: {
609
609
  commandLine: Record<string, unknown>;
610
610
  }) => {
611
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
611
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
612
612
  source: string;
613
613
  } | {
614
614
  value: null;
615
615
  source: string;
616
616
  };
617
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
617
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
618
618
  };
619
619
  logLevelOption: {
620
620
  cliFlag: "log";
@@ -879,17 +879,17 @@ export declare const BrowserSafeApis: {
879
879
  description: () => import("react/jsx-runtime").JSX.Element;
880
880
  ssrName: "x264Preset";
881
881
  docLink: string;
882
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
882
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
883
883
  getValue: ({ commandLine }: {
884
884
  commandLine: Record<string, unknown>;
885
885
  }) => {
886
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
886
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
887
887
  source: string;
888
888
  } | {
889
889
  value: null;
890
890
  source: string;
891
891
  };
892
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
892
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
893
893
  };
894
894
  readonly audioBitrate: {
895
895
  name: string;
@@ -1601,17 +1601,17 @@ export declare const BrowserSafeApis: {
1601
1601
  description: () => import("react/jsx-runtime").JSX.Element;
1602
1602
  ssrName: "x264Preset";
1603
1603
  docLink: string;
1604
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1604
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1605
1605
  getValue: ({ commandLine }: {
1606
1606
  commandLine: Record<string, unknown>;
1607
1607
  }) => {
1608
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1608
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1609
1609
  source: string;
1610
1610
  } | {
1611
1611
  value: null;
1612
1612
  source: string;
1613
1613
  };
1614
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1614
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1615
1615
  };
1616
1616
  readonly encodingMaxRate: {
1617
1617
  name: string;
@@ -1967,17 +1967,17 @@ export declare const BrowserSafeApis: {
1967
1967
  description: () => import("react/jsx-runtime").JSX.Element;
1968
1968
  ssrName: "x264Preset";
1969
1969
  docLink: string;
1970
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1970
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1971
1971
  getValue: ({ commandLine }: {
1972
1972
  commandLine: Record<string, unknown>;
1973
1973
  }) => {
1974
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1974
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1975
1975
  source: string;
1976
1976
  } | {
1977
1977
  value: null;
1978
1978
  source: string;
1979
1979
  };
1980
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1980
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1981
1981
  };
1982
1982
  readonly encodingMaxRate: {
1983
1983
  name: string;
@@ -0,0 +1 @@
1
+ export { wrapWithErrorHandling } from './wrap-with-error-handling';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wrapWithErrorHandling = void 0;
4
+ var wrap_with_error_handling_1 = require("./wrap-with-error-handling");
5
+ Object.defineProperty(exports, "wrapWithErrorHandling", { enumerable: true, get: function () { return wrap_with_error_handling_1.wrapWithErrorHandling; } });
@@ -12,7 +12,9 @@ const getPageAndCleanupFn = async ({ passedInInstance, browserExecutable, chromi
12
12
  // Close puppeteer page and don't wait for it to finish.
13
13
  // Keep browser open.
14
14
  page.close().catch((err) => {
15
- console.error('Was not able to close puppeteer page', err);
15
+ if (!err.message.includes('Target closed')) {
16
+ console.error('Was not able to close puppeteer page', err);
17
+ }
16
18
  });
17
19
  return Promise.resolve();
18
20
  },
@@ -34,7 +36,9 @@ const getPageAndCleanupFn = async ({ passedInInstance, browserExecutable, chromi
34
36
  cleanup: () => {
35
37
  // Close whole browser that was just created and don't wait for it to finish.
36
38
  browserInstance.close(true, logLevel, indent).catch((err) => {
37
- console.error('Was not able to close puppeteer page', err);
39
+ if (!err.message.includes('Target closed')) {
40
+ console.error('Was not able to close puppeteer page', err);
41
+ }
38
42
  });
39
43
  return Promise.resolve();
40
44
  },
@@ -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" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
4
+ export declare const getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
+ export declare const makeFileExtensionMap: () => Record<string, ("aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif")[]>;
6
6
  export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
@@ -6,8 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getLocalBrowser = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const node_os_1 = require("node:os");
9
+ const no_react_1 = require("remotion/no-react");
9
10
  const getSearchPathsForProduct = () => {
10
11
  var _a;
12
+ if (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
13
+ return [];
14
+ }
11
15
  return [
12
16
  (_a = process.env.PUPPETEER_EXECUTABLE_PATH) !== null && _a !== void 0 ? _a : null,
13
17
  process.platform === 'darwin'
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
145
- validateOpenGlRenderer: (option: unknown) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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;
@@ -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: "jpeg" | "png" | "webp" | "pdf";
358
- DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
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;
@@ -453,7 +453,7 @@ export declare const RenderInternals: {
453
453
  frame: number;
454
454
  serializedInputPropsWithCustomSchema: string;
455
455
  serializedResolvedPropsWithCustomSchema: string;
456
- imageFormat: "jpeg" | "png" | "webp" | "pdf";
456
+ imageFormat: "png" | "jpeg" | "pdf" | "webp";
457
457
  jpegQuality: number;
458
458
  puppeteerInstance: HeadlessBrowser | null;
459
459
  envVariables: Record<string, string>;
@@ -754,7 +754,7 @@ export declare const RenderInternals: {
754
754
  onFrameUpdate: ((framesRendered: number, frameIndex: number, timeToRenderInMilliseconds: number) => void) | null;
755
755
  outputDir: string | null;
756
756
  envVariables: Record<string, string>;
757
- imageFormat: "jpeg" | "png" | "none";
757
+ imageFormat: "png" | "jpeg" | "none";
758
758
  jpegQuality: number;
759
759
  frameRange: import("./frame-range").FrameRange | null;
760
760
  everyNthFrame: number;
@@ -767,7 +767,7 @@ export declare const RenderInternals: {
767
767
  scale: number;
768
768
  port: number | null;
769
769
  cancelSignal: import("./make-cancel-signal").CancelSignal | undefined;
770
- composition: Omit<import("remotion").VideoConfig, "defaultProps" | "props">;
770
+ composition: Omit<import("remotion").VideoConfig, "props" | "defaultProps">;
771
771
  indent: boolean;
772
772
  server: import("./prepare-server").RemotionServer | undefined;
773
773
  muted: boolean;
@@ -922,7 +922,7 @@ export declare const RenderInternals: {
922
922
  assetsInfo: import("./assets/download-map").RenderAssetInfo | null;
923
923
  enforceAudioTrack: boolean;
924
924
  muted: boolean;
925
- }) => "no" | "yes" | "maybe";
925
+ }) => "yes" | "maybe" | "no";
926
926
  codecSupportsMedia: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif") => {
927
927
  video: boolean;
928
928
  audio: boolean;
@@ -1,3 +1,4 @@
1
+ import type { NoReactInternals } from 'remotion/no-react';
1
2
  import type { Browser } from './browser';
2
3
  import type { HeadlessBrowser } from './browser/Browser';
3
4
  import type { Viewport } from './browser/PuppeteerViewport';
@@ -5,14 +6,16 @@ import { type LogLevel } from './log-level';
5
6
  import type { validOpenGlRenderers } from './options/gl';
6
7
  import type { OnBrowserDownload } from './options/on-browser-download';
7
8
  type OpenGlRenderer = (typeof validOpenGlRenderers)[number];
9
+ type OnlyV4Options = typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES extends true ? {} : {
10
+ headless?: boolean;
11
+ };
8
12
  export type ChromiumOptions = {
9
13
  ignoreCertificateErrors?: boolean;
10
14
  disableWebSecurity?: boolean;
11
15
  gl?: OpenGlRenderer | null;
12
- headless?: boolean;
13
16
  userAgent?: string | null;
14
17
  enableMultiProcessOnLinux?: boolean;
15
- };
18
+ } & OnlyV4Options;
16
19
  type InternalOpenBrowserOptions = {
17
20
  browserExecutable: string | null;
18
21
  chromiumOptions: ChromiumOptions;
@@ -23,12 +26,17 @@ type InternalOpenBrowserOptions = {
23
26
  logLevel: LogLevel;
24
27
  onBrowserDownload: OnBrowserDownload;
25
28
  };
26
- export type OpenBrowserOptions = {
29
+ type LogOptions = typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES extends true ? {
30
+ logLevel?: LogLevel;
31
+ } : {
27
32
  shouldDumpIo?: boolean;
33
+ logLevel?: LogLevel;
34
+ };
35
+ export type OpenBrowserOptions = {
28
36
  browserExecutable?: string | null;
29
37
  chromiumOptions?: ChromiumOptions;
30
38
  forceDeviceScaleFactor?: number;
31
- };
39
+ } & LogOptions;
32
40
  export declare const internalOpenBrowser: ({ browser, browserExecutable, chromiumOptions, forceDeviceScaleFactor, indent, viewport, logLevel, onBrowserDownload, }: InternalOpenBrowserOptions) => Promise<HeadlessBrowser>;
33
41
  /**
34
42
  * @description Opens a Chrome or Chromium browser instance.
@@ -154,9 +154,10 @@ exports.internalOpenBrowser = internalOpenBrowser;
154
154
  * @see [Documentation](https://www.remotion.dev/docs/renderer/open-browser)
155
155
  */
156
156
  const openBrowser = (browser, options) => {
157
- const { browserExecutable, chromiumOptions, forceDeviceScaleFactor, shouldDumpIo, } = options !== null && options !== void 0 ? options : {};
157
+ var _a;
158
+ const { browserExecutable, chromiumOptions, forceDeviceScaleFactor } = options !== null && options !== void 0 ? options : {};
158
159
  const indent = false;
159
- const logLevel = shouldDumpIo ? 'verbose' : 'info';
160
+ const logLevel = (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : ((options === null || options === void 0 ? void 0 : options.shouldDumpIo) ? 'verbose' : 'info');
160
161
  return (0, exports.internalOpenBrowser)({
161
162
  browser,
162
163
  browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
@@ -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: () => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
16
+ value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
17
17
  source: string;
18
18
  } | {
19
19
  value: null;
@@ -245,19 +245,19 @@ export declare const allOptions: {
245
245
  cliFlag: "gl";
246
246
  docLink: string;
247
247
  name: string;
248
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
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: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
260
+ setConfig: (value: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => void;
261
261
  };
262
262
  enableLambdaInsights: {
263
263
  name: string;
@@ -382,17 +382,17 @@ export declare const allOptions: {
382
382
  description: () => import("react/jsx-runtime").JSX.Element;
383
383
  ssrName: "x264Preset";
384
384
  docLink: string;
385
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
385
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
386
386
  getValue: ({ commandLine }: {
387
387
  commandLine: Record<string, unknown>;
388
388
  }) => {
389
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
389
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
390
390
  source: string;
391
391
  } | {
392
392
  value: null;
393
393
  source: string;
394
394
  };
395
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
395
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
396
396
  };
397
397
  logLevelOption: {
398
398
  cliFlag: "log";
@@ -72,17 +72,17 @@ export declare const optionsMap: {
72
72
  description: () => import("react/jsx-runtime").JSX.Element;
73
73
  ssrName: "x264Preset";
74
74
  docLink: string;
75
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
75
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
76
76
  getValue: ({ commandLine }: {
77
77
  commandLine: Record<string, unknown>;
78
78
  }) => {
79
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
79
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
80
80
  source: string;
81
81
  } | {
82
82
  value: null;
83
83
  source: string;
84
84
  };
85
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
85
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
86
86
  };
87
87
  readonly audioBitrate: {
88
88
  name: string;
@@ -794,17 +794,17 @@ export declare const optionsMap: {
794
794
  description: () => import("react/jsx-runtime").JSX.Element;
795
795
  ssrName: "x264Preset";
796
796
  docLink: string;
797
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
797
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
798
798
  getValue: ({ commandLine }: {
799
799
  commandLine: Record<string, unknown>;
800
800
  }) => {
801
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
801
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
802
802
  source: string;
803
803
  } | {
804
804
  value: null;
805
805
  source: string;
806
806
  };
807
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
807
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
808
808
  };
809
809
  readonly encodingMaxRate: {
810
810
  name: string;
@@ -1160,17 +1160,17 @@ export declare const optionsMap: {
1160
1160
  description: () => import("react/jsx-runtime").JSX.Element;
1161
1161
  ssrName: "x264Preset";
1162
1162
  docLink: string;
1163
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
1163
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
1164
1164
  getValue: ({ commandLine }: {
1165
1165
  commandLine: Record<string, unknown>;
1166
1166
  }) => {
1167
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
1167
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
1168
1168
  source: string;
1169
1169
  } | {
1170
1170
  value: null;
1171
1171
  source: string;
1172
1172
  };
1173
- setConfig: (profile: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1173
+ setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
1174
1174
  };
1175
1175
  readonly encodingMaxRate: {
1176
1176
  name: string;
@@ -11,11 +11,11 @@ export declare const x264Option: {
11
11
  description: () => import("react/jsx-runtime").JSX.Element;
12
12
  ssrName: "x264Preset";
13
13
  docLink: string;
14
- type: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
14
+ type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
15
15
  getValue: ({ commandLine }: {
16
16
  commandLine: Record<string, unknown>;
17
17
  }) => {
18
- value: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
18
+ value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
19
19
  source: string;
20
20
  } | {
21
21
  value: null;
@@ -2,5 +2,5 @@ import type { Codec } from './codec';
2
2
  export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
3
3
  export type PixelFormat = (typeof validPixelFormats)[number];
4
4
  export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
5
- export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
5
+ export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
6
6
  export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
package/dist/pure.d.ts CHANGED
@@ -1,13 +1,9 @@
1
1
  export declare const NoReactAPIs: {
2
- wrapWithErrorHandling: <A extends [{
3
- logLevel: "verbose" | "info" | "warn" | "error";
4
- indent: boolean;
5
- }, ...unknown[]], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
6
2
  getExtensionOfFilename: (filename: string | null) => string | null;
7
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
8
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
3
+ getFileExtensionFromCodec: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">(codec: T, audioCodec: "pcm-16" | "aac" | "mp3" | "opus" | null) => import("./file-extensions").FileExtension;
4
+ validateOutputFilename: <T_1 extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
9
5
  codec: T_1;
10
- audioCodecSetting: "mp3" | "aac" | "pcm-16" | "opus" | null;
6
+ audioCodecSetting: "pcm-16" | "aac" | "mp3" | "opus" | null;
11
7
  extension: string;
12
8
  preferLossless: boolean;
13
9
  separateAudioTo: string | null;
package/dist/pure.js CHANGED
@@ -4,9 +4,7 @@ exports.NoReactAPIs = void 0;
4
4
  const get_extension_from_codec_1 = require("./get-extension-from-codec");
5
5
  const get_extension_of_filename_1 = require("./get-extension-of-filename");
6
6
  const validate_output_filename_1 = require("./validate-output-filename");
7
- const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
8
7
  exports.NoReactAPIs = {
9
- wrapWithErrorHandling: wrap_with_error_handling_1.wrapWithErrorHandling,
10
8
  getExtensionOfFilename: get_extension_of_filename_1.getExtensionOfFilename,
11
9
  getFileExtensionFromCodec: get_extension_from_codec_1.getFileExtensionFromCodec,
12
10
  validateOutputFilename: validate_output_filename_1.validateOutputFilename,
@@ -409,8 +409,8 @@ const internalRenderMediaRaw = ({ proResProfile, x264Preset, crf, composition, s
409
409
  ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : null,
410
410
  audioBitrate,
411
411
  videoBitrate,
412
- encodingBufferSize,
413
- encodingMaxRate,
412
+ bufferSize: encodingBufferSize,
413
+ maxRate: encodingMaxRate,
414
414
  audioCodec,
415
415
  x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
416
416
  colorSpace,
@@ -46,7 +46,7 @@ const serveStatic = async (path, options) => {
46
46
  });
47
47
  });
48
48
  let selectedPort = null;
49
- const maxTries = 5;
49
+ const maxTries = 10;
50
50
  const portConfig = (0, port_config_1.getPortConfig)(options.forceIPv4);
51
51
  for (let i = 0; i < maxTries; i++) {
52
52
  let unlock = () => { };
@@ -15,8 +15,8 @@ import type { ProResProfile } from './prores-profile';
15
15
  type InternalStitchFramesToVideoOptions = {
16
16
  audioBitrate: string | null;
17
17
  videoBitrate: string | null;
18
- encodingMaxRate: string | null;
19
- encodingBufferSize: string | null;
18
+ maxRate: string | null;
19
+ bufferSize: string | null;
20
20
  fps: number;
21
21
  width: number;
22
22
  height: number;
@@ -44,16 +44,16 @@ type InternalStitchFramesToVideoOptions = {
44
44
  binariesDirectory: string | null;
45
45
  } & ToOptions<typeof optionsMap.stitchFramesToVideo>;
46
46
  export type StitchFramesToVideoOptions = {
47
- audioBitrate?: string | null;
48
- videoBitrate?: string | null;
49
- encodingMaxRate?: string | null;
50
- encodingBufferSize?: string | null;
51
47
  fps: number;
52
48
  width: number;
53
49
  height: number;
54
- outputLocation?: string | null;
55
- force: boolean;
56
50
  assetsInfo: RenderAssetInfo;
51
+ force?: boolean;
52
+ audioBitrate?: string | null;
53
+ videoBitrate?: string | null;
54
+ maxRate?: string | null;
55
+ bufferSize?: string | null;
56
+ outputLocation?: string | null;
57
57
  pixelFormat?: PixelFormat;
58
58
  numberOfGifLoops?: number | null;
59
59
  codec?: Codec;
@@ -78,5 +78,5 @@ export declare const internalStitchFramesToVideo: (options: InternalStitchFrames
78
78
  * @param {StitchFramesToVideoOptions} options The configuration options for stitching frames into a video
79
79
  * @returns {Promise<Buffer | null>} A promise that resolves with the video buffer or null if the output was written to a file
80
80
  */
81
- export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
81
+ export declare const stitchFramesToVideo: ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, maxRate, bufferSize, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }: StitchFramesToVideoOptions) => Promise<Buffer | null>;
82
82
  export {};
@@ -30,7 +30,7 @@ const render_has_audio_1 = require("./render-has-audio");
30
30
  const validate_1 = require("./validate");
31
31
  const validate_even_dimensions_with_codec_1 = require("./validate-even-dimensions-with-codec");
32
32
  const validate_videobitrate_1 = require("./validate-videobitrate");
33
- const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec: audioCodecSetting, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, encodingMaxRate, encodingBufferSize, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }, remotionRoot) => {
33
+ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec: audioCodecSetting, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, force, fps, height, indent, muted, onDownload, outputLocation, pixelFormat, preEncodedFileLocation, preferLossless, proResProfile, logLevel, videoBitrate, maxRate, bufferSize, width, numberOfGifLoops, onProgress, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }, remotionRoot) => {
34
34
  var _a;
35
35
  (0, validate_1.validateDimension)(height, 'height', 'passed to `stitchFramesToVideo()`');
36
36
  (0, validate_1.validateDimension)(width, 'width', 'passed to `stitchFramesToVideo()`');
@@ -47,9 +47,9 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec:
47
47
  });
48
48
  (0, validate_videobitrate_1.validateBitrate)(audioBitrate, 'audioBitrate');
49
49
  (0, validate_videobitrate_1.validateBitrate)(videoBitrate, 'videoBitrate');
50
- (0, validate_videobitrate_1.validateBitrate)(encodingMaxRate, 'encodingMaxRate');
51
- // encodingBufferSize is not a bitrate but need to be validated using the same format
52
- (0, validate_videobitrate_1.validateBitrate)(encodingBufferSize, 'encodingBufferSize');
50
+ (0, validate_videobitrate_1.validateBitrate)(maxRate, 'maxRate');
51
+ // bufferSize is not a bitrate but need to be validated using the same format
52
+ (0, validate_videobitrate_1.validateBitrate)(bufferSize, 'bufferSize');
53
53
  (0, validate_1.validateFps)(fps, 'in `stitchFramesToVideo()`', false);
54
54
  assetsInfo.downloadMap.preventCleanup();
55
55
  const proResProfileName = (0, get_prores_profile_name_1.getProResProfileName)(codec, proResProfile);
@@ -106,8 +106,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec:
106
106
  crf,
107
107
  codec,
108
108
  videoBitrate,
109
- encodingMaxRate,
110
- encodingBufferSize,
109
+ encodingMaxRate: maxRate,
110
+ encodingBufferSize: bufferSize,
111
111
  });
112
112
  (0, pixel_format_1.validateSelectedPixelFormatAndCodecCombination)(pixelFormat, codec);
113
113
  const updateProgress = (muxProgress) => {
@@ -190,8 +190,8 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec:
190
190
  codec,
191
191
  crf,
192
192
  videoBitrate,
193
- encodingMaxRate,
194
- encodingBufferSize,
193
+ encodingMaxRate: maxRate,
194
+ encodingBufferSize: bufferSize,
195
195
  hasPreencoded: Boolean(preEncodedFileLocation),
196
196
  proResProfileName,
197
197
  pixelFormat,
@@ -305,19 +305,19 @@ exports.internalStitchFramesToVideo = internalStitchFramesToVideo;
305
305
  * @param {StitchFramesToVideoOptions} options The configuration options for stitching frames into a video
306
306
  * @returns {Promise<Buffer | null>} A promise that resolves with the video buffer or null if the output was written to a file
307
307
  */
308
- const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, encodingMaxRate, encodingBufferSize, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }) => {
308
+ const stitchFramesToVideo = ({ assetsInfo, force, fps, height, width, audioBitrate, audioCodec, cancelSignal, codec, crf, enforceAudioTrack, ffmpegOverride, muted, numberOfGifLoops, onDownload, onProgress, outputLocation, pixelFormat, proResProfile, verbose, videoBitrate, maxRate, bufferSize, x264Preset, colorSpace, binariesDirectory, separateAudioTo, }) => {
309
309
  return (0, exports.internalStitchFramesToVideo)({
310
310
  assetsInfo,
311
311
  audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
312
- encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
313
- encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
312
+ maxRate: maxRate !== null && maxRate !== void 0 ? maxRate : null,
313
+ bufferSize: bufferSize !== null && bufferSize !== void 0 ? bufferSize : null,
314
314
  audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
315
315
  cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : null,
316
316
  codec: codec !== null && codec !== void 0 ? codec : codec_1.DEFAULT_CODEC,
317
317
  crf: crf !== null && crf !== void 0 ? crf : null,
318
318
  enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : false,
319
319
  ffmpegOverride: ffmpegOverride !== null && ffmpegOverride !== void 0 ? ffmpegOverride : null,
320
- force,
320
+ force: force !== null && force !== void 0 ? force : true,
321
321
  fps,
322
322
  height,
323
323
  indent: false,
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './options/audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
2
+ export declare const validateOutputFilename: <T extends "aac" | "mp3" | "h264" | "h265" | "vp8" | "vp9" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
3
3
  codec: T;
4
4
  audioCodecSetting: AudioCodec | null;
5
5
  extension: string;
@@ -0,0 +1 @@
1
+ export * from './dist/error-handling';
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/error-handling');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
4
4
  },
5
5
  "name": "@remotion/renderer",
6
- "version": "4.0.187",
6
+ "version": "4.0.189",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -18,8 +18,8 @@
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.187",
22
- "@remotion/streaming": "4.0.187"
21
+ "remotion": "4.0.189",
22
+ "@remotion/streaming": "4.0.189"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=16.8.0",
@@ -34,13 +34,13 @@
34
34
  "@types/ws": "8.5.10"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@remotion/compositor-darwin-arm64": "4.0.187",
38
- "@remotion/compositor-darwin-x64": "4.0.187",
39
- "@remotion/compositor-linux-arm64-gnu": "4.0.187",
40
- "@remotion/compositor-linux-arm64-musl": "4.0.187",
41
- "@remotion/compositor-linux-x64-gnu": "4.0.187",
42
- "@remotion/compositor-linux-x64-musl": "4.0.187",
43
- "@remotion/compositor-win32-x64-msvc": "4.0.187"
37
+ "@remotion/compositor-darwin-x64": "4.0.189",
38
+ "@remotion/compositor-linux-arm64-gnu": "4.0.189",
39
+ "@remotion/compositor-darwin-arm64": "4.0.189",
40
+ "@remotion/compositor-linux-arm64-musl": "4.0.189",
41
+ "@remotion/compositor-linux-x64-gnu": "4.0.189",
42
+ "@remotion/compositor-win32-x64-msvc": "4.0.189",
43
+ "@remotion/compositor-linux-x64-musl": "4.0.189"
44
44
  },
45
45
  "keywords": [
46
46
  "remotion",