@remotion/renderer 4.0.538 → 4.0.540

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.
Files changed (151) hide show
  1. package/dist/assets/download-and-map-assets-to-file.js +16 -3
  2. package/dist/assets/download-file.js +9 -2
  3. package/dist/assets/download-map.d.ts +1 -1
  4. package/dist/assets/read-file.d.ts +1 -1
  5. package/dist/assets/read-file.js +7 -7
  6. package/dist/browser/BrowserFetcher.js +4 -1
  7. package/dist/browser/BrowserPage.js +27 -8
  8. package/dist/browser/NetworkManager.js +6 -1
  9. package/dist/browser/devtools-commands.d.ts +6 -1
  10. package/dist/browser/get-chrome-download-url.d.ts +1 -1
  11. package/dist/browser/get-chrome-download-url.js +4 -1
  12. package/dist/check-version-requirements.js +6 -6
  13. package/dist/client.d.ts +459 -238
  14. package/dist/esm/client.mjs +372 -314
  15. package/dist/esm/index.mjs +393 -349
  16. package/dist/get-compositions.js +6 -3
  17. package/dist/index.d.ts +113 -41
  18. package/dist/index.js +4 -2
  19. package/dist/make-page.d.ts +3 -1
  20. package/dist/make-page.js +2 -1
  21. package/dist/merge-audio-track.d.ts +1 -1
  22. package/dist/merge-audio-track.js +24 -23
  23. package/dist/options/allow-html-in-canvas.d.ts +1 -1
  24. package/dist/options/api-key.d.ts +1 -1
  25. package/dist/options/ask-ai.d.ts +1 -1
  26. package/dist/options/ask-ai.js +1 -1
  27. package/dist/options/audio-bitrate.d.ts +1 -1
  28. package/dist/options/beep-on-finish.d.ts +1 -1
  29. package/dist/options/benchmark-concurrencies.d.ts +1 -1
  30. package/dist/options/binaries-directory.d.ts +1 -1
  31. package/dist/options/browser-executable.d.ts +1 -1
  32. package/dist/options/browser-executable.js +1 -1
  33. package/dist/options/browser.d.ts +1 -1
  34. package/dist/options/bundle-cache.d.ts +1 -1
  35. package/dist/options/canvas-tabs.d.ts +1 -1
  36. package/dist/options/chrome-mode.d.ts +1 -1
  37. package/dist/options/color-space.d.ts +1 -1
  38. package/dist/options/concurrency.d.ts +1 -1
  39. package/dist/options/config.d.ts +1 -1
  40. package/dist/options/crf.d.ts +1 -1
  41. package/dist/options/crf.js +1 -1
  42. package/dist/options/cross-site-isolation.d.ts +1 -1
  43. package/dist/options/cross-site-isolation.js +2 -2
  44. package/dist/options/dark-mode.d.ts +1 -1
  45. package/dist/options/default-coding-agent.d.ts +1 -1
  46. package/dist/options/default-editor.d.ts +1 -1
  47. package/dist/options/default-premount-in-seconds.d.ts +1 -1
  48. package/dist/options/delete-after.d.ts +1 -1
  49. package/dist/options/disable-git-source.d.ts +2 -2
  50. package/dist/options/disable-shared-memory-capture.d.ts +1 -1
  51. package/dist/options/disable-web-security.d.ts +1 -1
  52. package/dist/options/disallow-parallel-encoding.d.ts +1 -1
  53. package/dist/options/enable-cancellation.d.ts +1 -1
  54. package/dist/options/enable-lambda-insights.d.ts +1 -1
  55. package/dist/options/enable-lambda-insights.js +2 -2
  56. package/dist/options/enable-multiprocess-on-linux.d.ts +1 -1
  57. package/dist/options/enable-multiprocess-on-linux.js +2 -2
  58. package/dist/options/encoding-buffer-size.d.ts +1 -1
  59. package/dist/options/encoding-max-rate.d.ts +1 -1
  60. package/dist/options/enforce-audio.d.ts +1 -1
  61. package/dist/options/env-file.d.ts +1 -1
  62. package/dist/options/every-nth-frame.d.ts +1 -1
  63. package/dist/options/experimental-keep-audio-context-alive.d.ts +1 -1
  64. package/dist/options/folder-expiry.d.ts +1 -1
  65. package/dist/options/folder-expiry.js +1 -1
  66. package/dist/options/for-seamless-aac-concatenation.d.ts +1 -1
  67. package/dist/options/force-new-studio.d.ts +1 -1
  68. package/dist/options/frames.d.ts +1 -1
  69. package/dist/options/gl.d.ts +1 -1
  70. package/dist/options/gop-size.d.ts +1 -1
  71. package/dist/options/headless.d.ts +1 -1
  72. package/dist/options/ignore-certificate-errors.d.ts +1 -1
  73. package/dist/options/image-sequence-pattern.d.ts +1 -1
  74. package/dist/options/image-sequence.d.ts +1 -1
  75. package/dist/options/index.d.ts +119 -102
  76. package/dist/options/index.js +2 -0
  77. package/dist/options/interactivity.d.ts +1 -1
  78. package/dist/options/ipv4.d.ts +1 -1
  79. package/dist/options/is-production.d.ts +1 -1
  80. package/dist/options/is-production.js +1 -1
  81. package/dist/options/jpeg-quality.d.ts +1 -1
  82. package/dist/options/keyboard-shortcuts.d.ts +1 -1
  83. package/dist/options/latency-hint.d.ts +1 -1
  84. package/dist/options/license-key.d.ts +1 -1
  85. package/dist/options/license-key.js +1 -1
  86. package/dist/options/log-level.d.ts +1 -1
  87. package/dist/options/metadata.d.ts +1 -1
  88. package/dist/options/mute.d.ts +1 -1
  89. package/dist/options/no-open.d.ts +1 -1
  90. package/dist/options/number-of-gif-loops.d.ts +1 -1
  91. package/dist/options/number-of-shared-audio-tags.d.ts +1 -1
  92. package/dist/options/offthreadvideo-cache-size.d.ts +1 -1
  93. package/dist/options/offthreadvideo-threads.d.ts +1 -1
  94. package/dist/options/on-browser-download.d.ts +1 -1
  95. package/dist/options/options-map.d.ts +340 -136
  96. package/dist/options/options-map.js +13 -0
  97. package/dist/options/out-dir.d.ts +1 -1
  98. package/dist/options/override-duration.d.ts +1 -1
  99. package/dist/options/override-fps.d.ts +1 -1
  100. package/dist/options/override-height.d.ts +1 -1
  101. package/dist/options/override-width.d.ts +1 -1
  102. package/dist/options/overwrite.d.ts +1 -1
  103. package/dist/options/package-manager.d.ts +1 -1
  104. package/dist/options/pixel-format.d.ts +1 -1
  105. package/dist/options/port.d.ts +1 -1
  106. package/dist/options/prefer-lossless.d.ts +1 -1
  107. package/dist/options/preferred-effect-backend.d.ts +18 -0
  108. package/dist/options/preferred-effect-backend.js +28 -0
  109. package/dist/options/preserve-pitch-on-playback.d.ts +1 -1
  110. package/dist/options/preview-sample-rate.d.ts +1 -1
  111. package/dist/options/props.d.ts +1 -1
  112. package/dist/options/prores-profile.d.ts +1 -1
  113. package/dist/options/public-dir.d.ts +1 -1
  114. package/dist/options/public-license-key.d.ts +1 -1
  115. package/dist/options/public-path.d.ts +1 -1
  116. package/dist/options/repro.d.ts +1 -1
  117. package/dist/options/rspack.d.ts +1 -1
  118. package/dist/options/runs.d.ts +1 -1
  119. package/dist/options/sample-rate.d.ts +1 -1
  120. package/dist/options/scale.d.ts +1 -1
  121. package/dist/options/sequence-activity-limit.d.ts +1 -1
  122. package/dist/options/show-layer-frame-numbers.d.ts +1 -1
  123. package/dist/options/show-premounting.d.ts +1 -1
  124. package/dist/options/skip-skills.d.ts +1 -1
  125. package/dist/options/still-frame.d.ts +1 -1
  126. package/dist/options/still-image-format.d.ts +1 -1
  127. package/dist/options/throw-if-site-exists.d.ts +2 -2
  128. package/dist/options/timeout.d.ts +1 -1
  129. package/dist/options/user-agent.d.ts +1 -1
  130. package/dist/options/version-flag.d.ts +1 -1
  131. package/dist/options/video-bitrate.d.ts +1 -1
  132. package/dist/options/video-cache-size.d.ts +1 -1
  133. package/dist/options/video-codec.d.ts +1 -1
  134. package/dist/options/video-image-format.d.ts +1 -1
  135. package/dist/options/webhook-custom-data.d.ts +1 -1
  136. package/dist/options/webpack-poll.d.ts +1 -1
  137. package/dist/options/x264-preset.d.ts +1 -1
  138. package/dist/render-frames.js +6 -3
  139. package/dist/render-media.d.ts +1 -1
  140. package/dist/render-media.js +4 -2
  141. package/dist/render-still.js +6 -2
  142. package/dist/select-composition.js +6 -3
  143. package/dist/serve-handler/range-parser.js +1 -1
  144. package/dist/serve-static.js +4 -1
  145. package/dist/set-props-and-env.d.ts +2 -0
  146. package/dist/set-props-and-env.js +8 -3
  147. package/dist/stringify-ffmpeg-filter.js +6 -2
  148. package/dist/symbolicate-stacktrace.js +1 -1
  149. package/dist/validate-selected-frames.d.ts +4 -4
  150. package/dist/validate-selected-frames.js +2 -31
  151. package/package.json +15 -15
@@ -34,7 +34,7 @@ const convertGetCompositionsArgumentsToOptions = (args, enableV5BreakingChanges)
34
34
  return firstArg;
35
35
  };
36
36
  exports.convertGetCompositionsArgumentsToOptions = convertGetCompositionsArgumentsToOptions;
37
- const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCustomSchema, page, proxyPort, serveUrl, timeoutInMilliseconds, indent, logLevel, mediaCacheSizeInBytes, darkMode, }) => {
37
+ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCustomSchema, page, proxyPort, serveUrl, timeoutInMilliseconds, indent, logLevel, mediaCacheSizeInBytes, preferredEffectBackend, darkMode, }) => {
38
38
  (0, validate_puppeteer_timeout_1.validatePuppeteerTimeout)(timeoutInMilliseconds);
39
39
  await (0, set_props_and_env_1.setPropsAndEnv)({
40
40
  serializedInputPropsWithCustomSchema,
@@ -52,6 +52,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
52
52
  onServeUrlVisited: () => undefined,
53
53
  isMainTab: true,
54
54
  mediaCacheSizeInBytes,
55
+ preferredEffectBackend,
55
56
  initialMemoryAvailable: (0, get_available_memory_1.getAvailableMemory)(logLevel),
56
57
  darkMode,
57
58
  sampleRate: 48000,
@@ -103,7 +104,7 @@ const innerGetCompositions = async ({ envVariables, serializedInputPropsWithCust
103
104
  };
104
105
  });
105
106
  };
106
- const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, onLog, }) => {
107
+ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions, envVariables, indent, serializedInputPropsWithCustomSchema, onBrowserLog, port, puppeteerInstance, serveUrlOrWebpackUrl, server, timeoutInMilliseconds, logLevel, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, preferredEffectBackend, onLog, }) => {
107
108
  const { page, cleanupPage } = await (0, get_browser_instance_1.getPageAndCleanupFn)({
108
109
  passedInInstance: puppeteerInstance,
109
110
  browserExecutable,
@@ -160,6 +161,7 @@ const internalGetCompositionsRaw = async ({ browserExecutable, chromiumOptions,
160
161
  chromeMode,
161
162
  offthreadVideoThreads,
162
163
  mediaCacheSizeInBytes,
164
+ preferredEffectBackend,
163
165
  darkMode: (_a = chromiumOptions.darkMode) !== null && _a !== void 0 ? _a : false,
164
166
  });
165
167
  })
@@ -186,7 +188,7 @@ const getCompositions = (...args) => {
186
188
  if (typeof (options === null || options === void 0 ? void 0 : options.serveUrl) !== 'string' || !options.serveUrl) {
187
189
  throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
188
190
  }
189
- const { browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, logLevel: passedLogLevel, onBrowserDownload, binariesDirectory, offthreadVideoCacheSizeInBytes, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, serveUrl, } = options;
191
+ const { browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, logLevel: passedLogLevel, onBrowserDownload, binariesDirectory, offthreadVideoCacheSizeInBytes, chromeMode, offthreadVideoThreads, mediaCacheSizeInBytes, preferredEffectBackend, serveUrl, } = options;
190
192
  const indent = false;
191
193
  const logLevel = passedLogLevel !== null && passedLogLevel !== void 0 ? passedLogLevel : 'info';
192
194
  return (0, exports.internalGetCompositions)({
@@ -216,6 +218,7 @@ const getCompositions = (...args) => {
216
218
  chromeMode: chromeMode !== null && chromeMode !== void 0 ? chromeMode : 'headless-shell',
217
219
  offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : null,
218
220
  mediaCacheSizeInBytes: mediaCacheSizeInBytes !== null && mediaCacheSizeInBytes !== void 0 ? mediaCacheSizeInBytes : null,
221
+ preferredEffectBackend: preferredEffectBackend !== null && preferredEffectBackend !== void 0 ? preferredEffectBackend : 'auto',
219
222
  onLog: default_on_log_1.defaultOnLog,
220
223
  });
221
224
  };
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import { getDesiredPort } from './get-port';
23
23
  import { isServeUrl } from './is-serve-url';
24
24
  import { validateJpegQuality } from './jpeg-quality';
25
25
  import { isEqualOrBelowLogLevel, isValidLogLevel } from './log-level';
26
+ import { isUserCancelledRender } from './make-cancel-signal';
26
27
  import { mimeContentType, mimeLookup } from './mime-types';
27
28
  import { internalOpenBrowser } from './open-browser';
28
29
  import { validateOpenGlRenderer } from './options/gl';
@@ -37,7 +38,6 @@ import { getChromiumGpuInformation } from './test-gpu';
37
38
  import { tmpDir } from './tmp-dir';
38
39
  import { getMaxConcurrency, getMinConcurrency, validateConcurrency } from './validate-concurrency';
39
40
  import { validateEvenDimensionsWithCodec } from './validate-even-dimensions-with-codec';
40
- import { validateSelectedFrames } from './validate-selected-frames';
41
41
  export type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
42
42
  export type { Bitrate } from './bitrate';
43
43
  export { Browser } from './browser';
@@ -102,6 +102,7 @@ import { toMegabytes } from './to-megabytes';
102
102
  import { validatePuppeteerTimeout } from './validate-puppeteer-timeout';
103
103
  import { validateBitrate } from './validate-videobitrate';
104
104
  export declare const RenderInternals: {
105
+ isUserCancelledRender: typeof isUserCancelledRender;
105
106
  resolveConcurrency: typeof resolveConcurrency;
106
107
  serveStatic: typeof serveStatic;
107
108
  validateEvenDimensionsWithCodec: typeof validateEvenDimensionsWithCodec;
@@ -153,7 +154,10 @@ export declare const RenderInternals: {
153
154
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
154
155
  DEFAULT_BROWSER: "chrome";
155
156
  validateFrameRange: typeof validateFrameRange;
156
- validateSelectedFrames: typeof validateSelectedFrames;
157
+ validateSelectedFrames: ({ frames, durationInFrames, }: {
158
+ frames: unknown;
159
+ durationInFrames: number | null;
160
+ }) => number[];
157
161
  DEFAULT_OPENGL_RENDERER: "angle" | "angle-egl" | "egl" | "swangle" | "swiftshader" | "vulkan" | null;
158
162
  validateOpenGlRenderer: typeof validateOpenGlRenderer;
159
163
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "av1", "mp3", "aac", "wav", "prores", "h264-mkv", "h264-ts", "gif"];
@@ -448,7 +452,7 @@ export declare const RenderInternals: {
448
452
  name: string;
449
453
  addedIn: string;
450
454
  cliFlag: "media-cache-size-in-bytes";
451
- description: () => import("react/jsx-runtime").JSX.Element;
455
+ description: () => import("react").JSX.Element;
452
456
  ssrName: 'mediaCacheSizeInBytes';
453
457
  docLink: string;
454
458
  type: number | null;
@@ -464,11 +468,28 @@ export declare const RenderInternals: {
464
468
  setConfig: (size: number | null) => void;
465
469
  id: "media-cache-size-in-bytes";
466
470
  };
471
+ readonly preferredEffectBackend: {
472
+ name: string;
473
+ addedIn: string;
474
+ cliFlag: "preferred-effect-backend";
475
+ id: "preferred-effect-backend";
476
+ ssrName: string;
477
+ docLink: string;
478
+ type: import("remotion").PreferredEffectBackend;
479
+ description: () => import("react").JSX.Element;
480
+ getValue: ({ commandLine }: {
481
+ commandLine: Record<string, unknown>;
482
+ }) => {
483
+ value: import("remotion").PreferredEffectBackend;
484
+ source: string;
485
+ };
486
+ setConfig: (value: import("remotion").PreferredEffectBackend) => void;
487
+ };
467
488
  readonly offthreadVideoCacheSizeInBytes: {
468
489
  name: string;
469
490
  addedIn: string;
470
491
  cliFlag: "offthreadvideo-cache-size-in-bytes";
471
- description: () => import("react/jsx-runtime").JSX.Element;
492
+ description: () => import("react").JSX.Element;
472
493
  ssrName: 'offthreadVideoCacheSizeInBytes';
473
494
  docLink: string;
474
495
  type: number | null;
@@ -488,7 +509,7 @@ export declare const RenderInternals: {
488
509
  name: string;
489
510
  addedIn: string;
490
511
  cliFlag: "offthreadvideo-video-threads";
491
- description: () => import("react/jsx-runtime").JSX.Element;
512
+ description: () => import("react").JSX.Element;
492
513
  ssrName: 'offthreadVideoThreads';
493
514
  docLink: string;
494
515
  type: number | null;
@@ -508,7 +529,7 @@ export declare const RenderInternals: {
508
529
  name: string;
509
530
  addedIn: string;
510
531
  cliFlag: "jpeg-quality";
511
- description: () => import("react/jsx-runtime").JSX.Element;
532
+ description: () => import("react").JSX.Element;
512
533
  ssrName: string;
513
534
  docLink: string;
514
535
  type: number;
@@ -526,7 +547,7 @@ export declare const RenderInternals: {
526
547
  name: string;
527
548
  addedIn: string;
528
549
  ssrName: string;
529
- description: () => import("react/jsx-runtime").JSX.Element;
550
+ description: () => import("react").JSX.Element;
530
551
  docLink: string;
531
552
  getValue: ({ commandLine }: {
532
553
  commandLine: Record<string, unknown>;
@@ -544,7 +565,7 @@ export declare const RenderInternals: {
544
565
  name: string;
545
566
  addedIn: string;
546
567
  cliFlag: "timeout";
547
- description: () => import("react/jsx-runtime").JSX.Element;
568
+ description: () => import("react").JSX.Element;
548
569
  ssrName: 'timeoutInMilliseconds';
549
570
  docLink: string;
550
571
  type: number;
@@ -561,7 +582,7 @@ export declare const RenderInternals: {
561
582
  name: string;
562
583
  addedIn: string;
563
584
  cliFlag: "binaries-directory";
564
- description: () => import("react/jsx-runtime").JSX.Element;
585
+ description: () => import("react").JSX.Element;
565
586
  ssrName: 'binariesDirectory';
566
587
  docLink: string;
567
588
  type: string | null;
@@ -578,7 +599,7 @@ export declare const RenderInternals: {
578
599
  name: string;
579
600
  addedIn: string;
580
601
  cliFlag: "on-browser-download";
581
- description: () => import("react/jsx-runtime").JSX.Element;
602
+ description: () => import("react").JSX.Element;
582
603
  ssrName: 'onBrowserDownload';
583
604
  docLink: string;
584
605
  type: import(".").OnBrowserDownload;
@@ -591,7 +612,7 @@ export declare const RenderInternals: {
591
612
  name: string;
592
613
  addedIn: string;
593
614
  ssrName: string;
594
- description: () => import("react/jsx-runtime").JSX.Element;
615
+ description: () => import("react").JSX.Element;
595
616
  docLink: string;
596
617
  getValue: ({ commandLine }: {
597
618
  commandLine: Record<string, unknown>;
@@ -607,7 +628,7 @@ export declare const RenderInternals: {
607
628
  name: string;
608
629
  addedIn: string;
609
630
  cliFlag: "api-key";
610
- description: () => import("react/jsx-runtime").JSX.Element;
631
+ description: () => import("react").JSX.Element;
611
632
  ssrName: 'apiKey';
612
633
  docLink: string;
613
634
  type: string | null;
@@ -624,7 +645,7 @@ export declare const RenderInternals: {
624
645
  name: string;
625
646
  addedIn: string;
626
647
  cliFlag: "license-key";
627
- description: () => import("react/jsx-runtime").JSX.Element;
648
+ description: () => import("react").JSX.Element;
628
649
  ssrName: 'licenseKey';
629
650
  docLink: string;
630
651
  type: string | null;
@@ -660,7 +681,7 @@ export declare const RenderInternals: {
660
681
  name: string;
661
682
  addedIn: string;
662
683
  cliFlag: "media-cache-size-in-bytes";
663
- description: () => import("react/jsx-runtime").JSX.Element;
684
+ description: () => import("react").JSX.Element;
664
685
  ssrName: 'mediaCacheSizeInBytes';
665
686
  docLink: string;
666
687
  type: number | null;
@@ -676,11 +697,28 @@ export declare const RenderInternals: {
676
697
  setConfig: (size: number | null) => void;
677
698
  id: "media-cache-size-in-bytes";
678
699
  };
700
+ readonly preferredEffectBackend: {
701
+ name: string;
702
+ addedIn: string;
703
+ cliFlag: "preferred-effect-backend";
704
+ id: "preferred-effect-backend";
705
+ ssrName: string;
706
+ docLink: string;
707
+ type: import("remotion").PreferredEffectBackend;
708
+ description: () => import("react").JSX.Element;
709
+ getValue: ({ commandLine }: {
710
+ commandLine: Record<string, unknown>;
711
+ }) => {
712
+ value: import("remotion").PreferredEffectBackend;
713
+ source: string;
714
+ };
715
+ setConfig: (value: import("remotion").PreferredEffectBackend) => void;
716
+ };
679
717
  readonly offthreadVideoCacheSizeInBytes: {
680
718
  name: string;
681
719
  addedIn: string;
682
720
  cliFlag: "offthreadvideo-cache-size-in-bytes";
683
- description: () => import("react/jsx-runtime").JSX.Element;
721
+ description: () => import("react").JSX.Element;
684
722
  ssrName: 'offthreadVideoCacheSizeInBytes';
685
723
  docLink: string;
686
724
  type: number | null;
@@ -700,7 +738,7 @@ export declare const RenderInternals: {
700
738
  name: string;
701
739
  addedIn: string;
702
740
  cliFlag: "offthreadvideo-video-threads";
703
- description: () => import("react/jsx-runtime").JSX.Element;
741
+ description: () => import("react").JSX.Element;
704
742
  ssrName: 'offthreadVideoThreads';
705
743
  docLink: string;
706
744
  type: number | null;
@@ -721,7 +759,7 @@ export declare const RenderInternals: {
721
759
  name: string;
722
760
  addedIn: string;
723
761
  ssrName: string;
724
- description: () => import("react/jsx-runtime").JSX.Element;
762
+ description: () => import("react").JSX.Element;
725
763
  docLink: string;
726
764
  getValue: ({ commandLine }: {
727
765
  commandLine: Record<string, unknown>;
@@ -739,7 +777,7 @@ export declare const RenderInternals: {
739
777
  name: string;
740
778
  addedIn: string;
741
779
  cliFlag: "timeout";
742
- description: () => import("react/jsx-runtime").JSX.Element;
780
+ description: () => import("react").JSX.Element;
743
781
  ssrName: 'timeoutInMilliseconds';
744
782
  docLink: string;
745
783
  type: number;
@@ -756,7 +794,7 @@ export declare const RenderInternals: {
756
794
  name: string;
757
795
  addedIn: string;
758
796
  cliFlag: "binaries-directory";
759
- description: () => import("react/jsx-runtime").JSX.Element;
797
+ description: () => import("react").JSX.Element;
760
798
  ssrName: 'binariesDirectory';
761
799
  docLink: string;
762
800
  type: string | null;
@@ -773,7 +811,7 @@ export declare const RenderInternals: {
773
811
  name: string;
774
812
  addedIn: string;
775
813
  cliFlag: "on-browser-download";
776
- description: () => import("react/jsx-runtime").JSX.Element;
814
+ description: () => import("react").JSX.Element;
777
815
  ssrName: 'onBrowserDownload';
778
816
  docLink: string;
779
817
  type: import(".").OnBrowserDownload;
@@ -786,7 +824,7 @@ export declare const RenderInternals: {
786
824
  name: string;
787
825
  addedIn: string;
788
826
  ssrName: string;
789
- description: () => import("react/jsx-runtime").JSX.Element;
827
+ description: () => import("react").JSX.Element;
790
828
  docLink: string;
791
829
  getValue: ({ commandLine }: {
792
830
  commandLine: Record<string, unknown>;
@@ -819,7 +857,7 @@ export declare const RenderInternals: {
819
857
  name: string;
820
858
  addedIn: string;
821
859
  cliFlag: "media-cache-size-in-bytes";
822
- description: () => import("react/jsx-runtime").JSX.Element;
860
+ description: () => import("react").JSX.Element;
823
861
  ssrName: 'mediaCacheSizeInBytes';
824
862
  docLink: string;
825
863
  type: number | null;
@@ -835,11 +873,28 @@ export declare const RenderInternals: {
835
873
  setConfig: (size: number | null) => void;
836
874
  id: "media-cache-size-in-bytes";
837
875
  };
876
+ readonly preferredEffectBackend: {
877
+ name: string;
878
+ addedIn: string;
879
+ cliFlag: "preferred-effect-backend";
880
+ id: "preferred-effect-backend";
881
+ ssrName: string;
882
+ docLink: string;
883
+ type: import("remotion").PreferredEffectBackend;
884
+ description: () => import("react").JSX.Element;
885
+ getValue: ({ commandLine }: {
886
+ commandLine: Record<string, unknown>;
887
+ }) => {
888
+ value: import("remotion").PreferredEffectBackend;
889
+ source: string;
890
+ };
891
+ setConfig: (value: import("remotion").PreferredEffectBackend) => void;
892
+ };
838
893
  readonly offthreadVideoCacheSizeInBytes: {
839
894
  name: string;
840
895
  addedIn: string;
841
896
  cliFlag: "offthreadvideo-cache-size-in-bytes";
842
- description: () => import("react/jsx-runtime").JSX.Element;
897
+ description: () => import("react").JSX.Element;
843
898
  ssrName: 'offthreadVideoCacheSizeInBytes';
844
899
  docLink: string;
845
900
  type: number | null;
@@ -859,7 +914,7 @@ export declare const RenderInternals: {
859
914
  name: string;
860
915
  addedIn: string;
861
916
  cliFlag: "offthreadvideo-video-threads";
862
- description: () => import("react/jsx-runtime").JSX.Element;
917
+ description: () => import("react").JSX.Element;
863
918
  ssrName: 'offthreadVideoThreads';
864
919
  docLink: string;
865
920
  type: number | null;
@@ -880,7 +935,7 @@ export declare const RenderInternals: {
880
935
  name: string;
881
936
  addedIn: string;
882
937
  ssrName: string;
883
- description: () => import("react/jsx-runtime").JSX.Element;
938
+ description: () => import("react").JSX.Element;
884
939
  docLink: string;
885
940
  getValue: ({ commandLine }: {
886
941
  commandLine: Record<string, unknown>;
@@ -898,7 +953,7 @@ export declare const RenderInternals: {
898
953
  name: string;
899
954
  addedIn: string;
900
955
  cliFlag: "timeout";
901
- description: () => import("react/jsx-runtime").JSX.Element;
956
+ description: () => import("react").JSX.Element;
902
957
  ssrName: 'timeoutInMilliseconds';
903
958
  docLink: string;
904
959
  type: number;
@@ -915,7 +970,7 @@ export declare const RenderInternals: {
915
970
  name: string;
916
971
  addedIn: string;
917
972
  cliFlag: "binaries-directory";
918
- description: () => import("react/jsx-runtime").JSX.Element;
973
+ description: () => import("react").JSX.Element;
919
974
  ssrName: 'binariesDirectory';
920
975
  docLink: string;
921
976
  type: string | null;
@@ -932,7 +987,7 @@ export declare const RenderInternals: {
932
987
  name: string;
933
988
  addedIn: string;
934
989
  cliFlag: "on-browser-download";
935
- description: () => import("react/jsx-runtime").JSX.Element;
990
+ description: () => import("react").JSX.Element;
936
991
  ssrName: 'onBrowserDownload';
937
992
  docLink: string;
938
993
  type: import(".").OnBrowserDownload;
@@ -945,7 +1000,7 @@ export declare const RenderInternals: {
945
1000
  name: string;
946
1001
  addedIn: string;
947
1002
  ssrName: string;
948
- description: () => import("react/jsx-runtime").JSX.Element;
1003
+ description: () => import("react").JSX.Element;
949
1004
  docLink: string;
950
1005
  getValue: ({ commandLine }: {
951
1006
  commandLine: Record<string, unknown>;
@@ -997,7 +1052,7 @@ export declare const RenderInternals: {
997
1052
  name: string;
998
1053
  addedIn: string;
999
1054
  cliFlag: "media-cache-size-in-bytes";
1000
- description: () => import("react/jsx-runtime").JSX.Element;
1055
+ description: () => import("react").JSX.Element;
1001
1056
  ssrName: 'mediaCacheSizeInBytes';
1002
1057
  docLink: string;
1003
1058
  type: number | null;
@@ -1013,11 +1068,28 @@ export declare const RenderInternals: {
1013
1068
  setConfig: (size: number | null) => void;
1014
1069
  id: "media-cache-size-in-bytes";
1015
1070
  };
1071
+ readonly preferredEffectBackend: {
1072
+ name: string;
1073
+ addedIn: string;
1074
+ cliFlag: "preferred-effect-backend";
1075
+ id: "preferred-effect-backend";
1076
+ ssrName: string;
1077
+ docLink: string;
1078
+ type: import("remotion").PreferredEffectBackend;
1079
+ description: () => import("react").JSX.Element;
1080
+ getValue: ({ commandLine }: {
1081
+ commandLine: Record<string, unknown>;
1082
+ }) => {
1083
+ value: import("remotion").PreferredEffectBackend;
1084
+ source: string;
1085
+ };
1086
+ setConfig: (value: import("remotion").PreferredEffectBackend) => void;
1087
+ };
1016
1088
  readonly forSeamlessAacConcatenation: {
1017
1089
  name: string;
1018
1090
  addedIn: string;
1019
1091
  cliFlag: "for-seamless-aac-concatenation";
1020
- description: () => import("react/jsx-runtime").JSX.Element;
1092
+ description: () => import("react").JSX.Element;
1021
1093
  docLink: string;
1022
1094
  getValue: ({ commandLine }: {
1023
1095
  commandLine: Record<string, unknown>;
@@ -1037,7 +1109,7 @@ export declare const RenderInternals: {
1037
1109
  name: string;
1038
1110
  addedIn: string;
1039
1111
  cliFlag: "offthreadvideo-cache-size-in-bytes";
1040
- description: () => import("react/jsx-runtime").JSX.Element;
1112
+ description: () => import("react").JSX.Element;
1041
1113
  ssrName: 'offthreadVideoCacheSizeInBytes';
1042
1114
  docLink: string;
1043
1115
  type: number | null;
@@ -1057,7 +1129,7 @@ export declare const RenderInternals: {
1057
1129
  name: string;
1058
1130
  addedIn: string;
1059
1131
  cliFlag: "offthreadvideo-video-threads";
1060
- description: () => import("react/jsx-runtime").JSX.Element;
1132
+ description: () => import("react").JSX.Element;
1061
1133
  ssrName: 'offthreadVideoThreads';
1062
1134
  docLink: string;
1063
1135
  type: number | null;
@@ -1077,7 +1149,7 @@ export declare const RenderInternals: {
1077
1149
  name: string;
1078
1150
  addedIn: string;
1079
1151
  cliFlag: "jpeg-quality";
1080
- description: () => import("react/jsx-runtime").JSX.Element;
1152
+ description: () => import("react").JSX.Element;
1081
1153
  ssrName: string;
1082
1154
  docLink: string;
1083
1155
  type: number;
@@ -1095,7 +1167,7 @@ export declare const RenderInternals: {
1095
1167
  name: string;
1096
1168
  addedIn: string;
1097
1169
  ssrName: string;
1098
- description: () => import("react/jsx-runtime").JSX.Element;
1170
+ description: () => import("react").JSX.Element;
1099
1171
  docLink: string;
1100
1172
  getValue: ({ commandLine }: {
1101
1173
  commandLine: Record<string, unknown>;
@@ -1113,7 +1185,7 @@ export declare const RenderInternals: {
1113
1185
  name: string;
1114
1186
  addedIn: string;
1115
1187
  cliFlag: "timeout";
1116
- description: () => import("react/jsx-runtime").JSX.Element;
1188
+ description: () => import("react").JSX.Element;
1117
1189
  ssrName: 'timeoutInMilliseconds';
1118
1190
  docLink: string;
1119
1191
  type: number;
@@ -1130,7 +1202,7 @@ export declare const RenderInternals: {
1130
1202
  name: string;
1131
1203
  addedIn: string;
1132
1204
  cliFlag: "binaries-directory";
1133
- description: () => import("react/jsx-runtime").JSX.Element;
1205
+ description: () => import("react").JSX.Element;
1134
1206
  ssrName: 'binariesDirectory';
1135
1207
  docLink: string;
1136
1208
  type: string | null;
@@ -1147,7 +1219,7 @@ export declare const RenderInternals: {
1147
1219
  name: string;
1148
1220
  addedIn: string;
1149
1221
  cliFlag: "on-browser-download";
1150
- description: () => import("react/jsx-runtime").JSX.Element;
1222
+ description: () => import("react").JSX.Element;
1151
1223
  ssrName: 'onBrowserDownload';
1152
1224
  docLink: string;
1153
1225
  type: import(".").OnBrowserDownload;
@@ -1160,7 +1232,7 @@ export declare const RenderInternals: {
1160
1232
  name: string;
1161
1233
  addedIn: string;
1162
1234
  ssrName: string;
1163
- description: () => import("react/jsx-runtime").JSX.Element;
1235
+ description: () => import("react").JSX.Element;
1164
1236
  docLink: string;
1165
1237
  getValue: ({ commandLine }: {
1166
1238
  commandLine: Record<string, unknown>;
@@ -1177,7 +1249,7 @@ export declare const RenderInternals: {
1177
1249
  addedIn: string;
1178
1250
  cliFlag: "image-sequence-pattern";
1179
1251
  ssrName: string;
1180
- description: () => import("react/jsx-runtime").JSX.Element;
1252
+ description: () => import("react").JSX.Element;
1181
1253
  docLink: string;
1182
1254
  type: string | null;
1183
1255
  getValue: ({ commandLine }: {
@@ -1197,7 +1269,7 @@ export declare const RenderInternals: {
1197
1269
  name: string;
1198
1270
  addedIn: string;
1199
1271
  cliFlag: "sample-rate";
1200
- description: () => import("react/jsx-runtime").JSX.Element;
1272
+ description: () => import("react").JSX.Element;
1201
1273
  ssrName: 'sampleRate';
1202
1274
  docLink: string;
1203
1275
  type: number;
package/dist/index.js CHANGED
@@ -71,6 +71,7 @@ const is_serve_url_1 = require("./is-serve-url");
71
71
  const jpeg_quality_1 = require("./jpeg-quality");
72
72
  const log_level_1 = require("./log-level");
73
73
  const logger_1 = require("./logger");
74
+ const make_cancel_signal_1 = require("./make-cancel-signal");
74
75
  const mime_types_1 = require("./mime-types");
75
76
  const open_browser_1 = require("./open-browser");
76
77
  const gl_1 = require("./options/gl");
@@ -107,8 +108,8 @@ var get_video_metadata_1 = require("./get-video-metadata");
107
108
  Object.defineProperty(exports, "getVideoMetadata", { enumerable: true, get: function () { return get_video_metadata_1.getVideoMetadata; } });
108
109
  var image_format_2 = require("./image-format");
109
110
  Object.defineProperty(exports, "validateSelectedPixelFormatAndImageFormatCombination", { enumerable: true, get: function () { return image_format_2.validateSelectedPixelFormatAndImageFormatCombination; } });
110
- var make_cancel_signal_1 = require("./make-cancel-signal");
111
- Object.defineProperty(exports, "makeCancelSignal", { enumerable: true, get: function () { return make_cancel_signal_1.makeCancelSignal; } });
111
+ var make_cancel_signal_2 = require("./make-cancel-signal");
112
+ Object.defineProperty(exports, "makeCancelSignal", { enumerable: true, get: function () { return make_cancel_signal_2.makeCancelSignal; } });
112
113
  var open_browser_2 = require("./open-browser");
113
114
  Object.defineProperty(exports, "openBrowser", { enumerable: true, get: function () { return open_browser_2.openBrowser; } });
114
115
  var default_coding_agent_1 = require("./options/default-coding-agent");
@@ -146,6 +147,7 @@ const validate_puppeteer_timeout_1 = require("./validate-puppeteer-timeout");
146
147
  const validate_videobitrate_1 = require("./validate-videobitrate");
147
148
  const wait_for_symbolication_error_to_be_done_1 = require("./wait-for-symbolication-error-to-be-done");
148
149
  exports.RenderInternals = {
150
+ isUserCancelledRender: make_cancel_signal_1.isUserCancelledRender,
149
151
  resolveConcurrency: get_concurrency_1.resolveConcurrency,
150
152
  serveStatic: serve_static_1.serveStatic,
151
153
  validateEvenDimensionsWithCodec: validate_even_dimensions_with_codec_1.validateEvenDimensionsWithCodec,
@@ -1,3 +1,4 @@
1
+ import type { PreferredEffectBackend } from 'remotion';
1
2
  import type { VideoConfig } from 'remotion/no-react';
2
3
  import type { BrowserLog } from './browser-log';
3
4
  import type { OnLog, Page } from './browser/BrowserPage';
@@ -5,7 +6,7 @@ import type { SourceMapGetter } from './browser/source-map-getter';
5
6
  import type { VideoImageFormat } from './image-format';
6
7
  import type { LogLevel } from './log-level';
7
8
  import type { BrowserReplacer } from './replace-browser';
8
- export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, onLog, darkMode, sampleRate, }: {
9
+ export declare const makePage: ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, preferredEffectBackend, onLog, darkMode, sampleRate, }: {
9
10
  context: SourceMapGetter;
10
11
  initialFrame: number;
11
12
  browserReplacer: BrowserReplacer;
@@ -26,6 +27,7 @@ export declare const makePage: ({ context, initialFrame, browserReplacer, logLev
26
27
  pageIndex: number;
27
28
  isMainTab: boolean;
28
29
  mediaCacheSizeInBytes: number | null;
30
+ preferredEffectBackend: PreferredEffectBackend;
29
31
  onLog: OnLog;
30
32
  darkMode: boolean;
31
33
  sampleRate: number;
package/dist/make-page.js CHANGED
@@ -4,7 +4,7 @@ exports.makePage = void 0;
4
4
  const get_available_memory_1 = require("./memory/get-available-memory");
5
5
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
6
6
  const set_props_and_env_1 = require("./set-props-and-env");
7
- const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, onLog, darkMode, sampleRate, }) => {
7
+ const makePage = async ({ context, initialFrame, browserReplacer, logLevel, indent, pagesArray, onBrowserLog, scale, timeoutInMilliseconds, composition, proxyPort, serveUrl, muted, envVariables, serializedInputPropsWithCustomSchema, imageFormat, serializedResolvedPropsWithCustomSchema, pageIndex, isMainTab, mediaCacheSizeInBytes, preferredEffectBackend, onLog, darkMode, sampleRate, }) => {
8
8
  const page = await browserReplacer
9
9
  .getBrowser()
10
10
  .newPage({ context, logLevel, indent, pageIndex, onBrowserLog, onLog });
@@ -30,6 +30,7 @@ const makePage = async ({ context, initialFrame, browserReplacer, logLevel, inde
30
30
  onServeUrlVisited: () => undefined,
31
31
  isMainTab,
32
32
  mediaCacheSizeInBytes,
33
+ preferredEffectBackend,
33
34
  initialMemoryAvailable: (0, get_available_memory_1.getAvailableMemory)(logLevel),
34
35
  darkMode,
35
36
  sampleRate,
@@ -16,5 +16,5 @@ type Options = {
16
16
  chunkLengthInSeconds: number;
17
17
  sampleRate: number;
18
18
  };
19
- export declare const mergeAudioTrack: (options: Options) => Promise<void>;
19
+ export declare const mergeAudioTrack: ({ outName, files, downloadMap, remotionRoot, indent, logLevel, binariesDirectory, cancelSignal, onProgress, fps, chunkLengthInSeconds, sampleRate, }: Options) => Promise<void>;
20
20
  export {};
@@ -16,10 +16,13 @@ const p_limit_1 = require("./p-limit");
16
16
  const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
17
17
  const tmp_dir_1 = require("./tmp-dir");
18
18
  const truthy_1 = require("./truthy");
19
- const mergeAudioTrackUnlimited = async ({ outName, files, downloadMap, remotionRoot, indent, logLevel, binariesDirectory, cancelSignal, onProgress, fps, chunkLengthInSeconds, sampleRate, }) => {
20
- var _a;
19
+ // Limits how many FFmpeg processes mix audio at once. Only the FFmpeg calls
20
+ // take a slot: a merge that waits for its chunks to be merged first holds none,
21
+ // so concurrent renders with many audio tracks can't block each other.
22
+ const limit = (0, p_limit_1.pLimit)(3);
23
+ const mergeAudioTrack = async ({ outName, files, downloadMap, remotionRoot, indent, logLevel, binariesDirectory, cancelSignal, onProgress, fps, chunkLengthInSeconds, sampleRate, }) => {
21
24
  if (files.length === 0) {
22
- await (0, create_silent_audio_1.createSilentAudio)({
25
+ await limit(create_silent_audio_1.createSilentAudio, {
23
26
  outName,
24
27
  chunkLengthInSeconds,
25
28
  indent,
@@ -109,28 +112,26 @@ const mergeAudioTrackUnlimited = async ({ outName, files, downloadMap, remotionR
109
112
  .filter(truthy_1.truthy)
110
113
  .flat(2);
111
114
  logger_1.Log.verbose({ indent, logLevel }, `Merging audio tracks`, 'Command:', `ffmpeg ${args.join(' ')}`, 'Complex filter script:', complexFilter);
112
- const task = (0, call_ffmpeg_1.callFf)({
113
- bin: 'ffmpeg',
114
- args,
115
- indent,
116
- logLevel,
117
- binariesDirectory,
118
- cancelSignal,
119
- });
120
- (_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
121
- const utf8 = data.toString('utf8');
122
- const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(utf8, fps);
123
- if (parsed !== undefined) {
124
- onProgress(parsed / (chunkLengthInSeconds * fps));
125
- }
115
+ await limit(async () => {
116
+ var _a;
117
+ const task = (0, call_ffmpeg_1.callFf)({
118
+ bin: 'ffmpeg',
119
+ args,
120
+ indent,
121
+ logLevel,
122
+ binariesDirectory,
123
+ cancelSignal,
124
+ });
125
+ (_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
126
+ const utf8 = data.toString('utf8');
127
+ const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(utf8, fps);
128
+ if (parsed !== undefined) {
129
+ onProgress(parsed / (chunkLengthInSeconds * fps));
130
+ }
131
+ });
132
+ await task;
126
133
  });
127
- await task;
128
134
  onProgress(1);
129
135
  cleanup();
130
136
  };
131
- // Must be at least 3 because recursively called twice in mergeAudioTrack
132
- const limit = (0, p_limit_1.pLimit)(3);
133
- const mergeAudioTrack = (options) => {
134
- return limit(mergeAudioTrackUnlimited, options);
135
- };
136
137
  exports.mergeAudioTrack = mergeAudioTrack;
@@ -2,7 +2,7 @@ export declare const allowHtmlInCanvasOption: {
2
2
  name: string;
3
3
  addedIn: string;
4
4
  cliFlag: "allow-html-in-canvas";
5
- description: () => import("react/jsx-runtime").JSX.Element;
5
+ description: () => import("react").JSX.Element;
6
6
  ssrName: null;
7
7
  docLink: string;
8
8
  type: boolean;