@remotion/renderer 4.0.533 → 4.0.534

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 (174) hide show
  1. package/dist/aac-priming.js +6 -2
  2. package/dist/browser/BrowserFetcher.d.ts +7 -1
  3. package/dist/browser/BrowserFetcher.js +33 -13
  4. package/dist/browser/Connection.js +5 -17
  5. package/dist/browser/DOMWorld.js +19 -13
  6. package/dist/browser/devtools-commands.d.ts +13 -1
  7. package/dist/browser/devtools-types.d.ts +62 -0
  8. package/dist/browser/get-chrome-download-url.d.ts +1 -1
  9. package/dist/browser/get-chrome-download-url.js +19 -33
  10. package/dist/can-use-parallel-encoding.d.ts +0 -1
  11. package/dist/can-use-parallel-encoding.js +10 -10
  12. package/dist/client.d.ts +87 -4
  13. package/dist/client.js +2 -0
  14. package/dist/cycle-browser-tabs.js +9 -1
  15. package/dist/ensure-browser.js +30 -6
  16. package/dist/esm/client.mjs +937 -796
  17. package/dist/esm/index.mjs +4125 -3027
  18. package/dist/esm/pure.mjs +33 -9
  19. package/dist/file-extensions.js +4 -1
  20. package/dist/get-mp4-brand.d.ts +1 -0
  21. package/dist/get-mp4-brand.js +21 -0
  22. package/dist/image-format.d.ts +1 -0
  23. package/dist/image-format.js +8 -4
  24. package/dist/index.d.ts +11 -1
  25. package/dist/index.js +4 -0
  26. package/dist/memory/from-macos-sysctl.d.ts +1 -0
  27. package/dist/memory/from-macos-sysctl.js +50 -0
  28. package/dist/memory/from-proc-meminfo.d.ts +1 -1
  29. package/dist/memory/from-proc-meminfo.js +7 -4
  30. package/dist/memory/get-available-memory.js +29 -21
  31. package/dist/mux-video-and-audio.js +8 -2
  32. package/dist/next-frame-to-render.d.ts +3 -7
  33. package/dist/next-frame-to-render.js +3 -22
  34. package/dist/open-browser.js +1 -0
  35. package/dist/options/allow-html-in-canvas.js +1 -1
  36. package/dist/options/api-key.js +1 -1
  37. package/dist/options/ask-ai.js +1 -1
  38. package/dist/options/audio-bitrate.js +1 -1
  39. package/dist/options/audio-codec.js +12 -6
  40. package/dist/options/beep-on-finish.js +1 -1
  41. package/dist/options/benchmark-concurrencies.js +1 -1
  42. package/dist/options/binaries-directory.js +1 -1
  43. package/dist/options/browser-executable.js +1 -1
  44. package/dist/options/browser.js +1 -1
  45. package/dist/options/bundle-cache.js +1 -1
  46. package/dist/options/canvas-tabs.js +1 -1
  47. package/dist/options/chrome-mode.js +1 -1
  48. package/dist/options/color-space.js +1 -1
  49. package/dist/options/concurrency.js +1 -1
  50. package/dist/options/config.js +1 -1
  51. package/dist/options/crf.js +1 -1
  52. package/dist/options/cross-site-isolation.js +1 -1
  53. package/dist/options/dark-mode.js +1 -1
  54. package/dist/options/default-coding-agent.js +1 -1
  55. package/dist/options/default-editor.js +1 -1
  56. package/dist/options/delete-after.js +1 -1
  57. package/dist/options/disable-git-source.js +1 -1
  58. package/dist/options/disable-shared-memory-capture.d.ts +16 -0
  59. package/dist/options/disable-shared-memory-capture.js +29 -0
  60. package/dist/options/disable-web-security.js +1 -1
  61. package/dist/options/disallow-parallel-encoding.js +1 -1
  62. package/dist/options/enable-cancellation.js +1 -1
  63. package/dist/options/enable-lambda-insights.js +1 -1
  64. package/dist/options/enable-multiprocess-on-linux.js +1 -1
  65. package/dist/options/encoding-buffer-size.js +1 -1
  66. package/dist/options/encoding-max-rate.js +1 -1
  67. package/dist/options/enforce-audio.js +1 -1
  68. package/dist/options/env-file.js +1 -1
  69. package/dist/options/every-nth-frame.js +1 -1
  70. package/dist/options/experimental-keep-audio-context-alive.js +1 -1
  71. package/dist/options/experimental-tracks.d.ts +18 -0
  72. package/dist/options/experimental-tracks.js +42 -0
  73. package/dist/options/folder-expiry.js +1 -1
  74. package/dist/options/for-seamless-aac-concatenation.js +1 -1
  75. package/dist/options/force-new-studio.js +1 -1
  76. package/dist/options/frames.js +1 -1
  77. package/dist/options/gl.js +1 -1
  78. package/dist/options/gop-size.js +1 -1
  79. package/dist/options/hardware-acceleration.js +1 -1
  80. package/dist/options/headless.js +1 -1
  81. package/dist/options/ignore-certificate-errors.js +1 -1
  82. package/dist/options/image-sequence-pattern.d.ts +1 -1
  83. package/dist/options/image-sequence-pattern.js +1 -1
  84. package/dist/options/image-sequence.js +1 -1
  85. package/dist/options/index.d.ts +36 -2
  86. package/dist/options/index.js +4 -0
  87. package/dist/options/interactivity.js +1 -1
  88. package/dist/options/ipv4.js +1 -1
  89. package/dist/options/is-production.js +1 -1
  90. package/dist/options/jpeg-quality.js +5 -2
  91. package/dist/options/keyboard-shortcuts.js +1 -1
  92. package/dist/options/latency-hint.js +1 -1
  93. package/dist/options/license-key.js +1 -1
  94. package/dist/options/log-level.js +1 -1
  95. package/dist/options/metadata.js +1 -1
  96. package/dist/options/mute.js +1 -1
  97. package/dist/options/no-open.js +1 -1
  98. package/dist/options/number-of-gif-loops.js +1 -1
  99. package/dist/options/number-of-shared-audio-tags.js +1 -1
  100. package/dist/options/offthreadvideo-cache-size.js +1 -1
  101. package/dist/options/offthreadvideo-threads.js +1 -1
  102. package/dist/options/on-browser-download.js +1 -1
  103. package/dist/options/options-map.d.ts +49 -1
  104. package/dist/options/options-map.js +4 -0
  105. package/dist/options/out-dir.js +1 -1
  106. package/dist/options/override-duration.js +1 -1
  107. package/dist/options/override-fps.js +1 -1
  108. package/dist/options/override-height.js +1 -1
  109. package/dist/options/override-width.js +1 -1
  110. package/dist/options/overwrite.js +1 -1
  111. package/dist/options/package-manager.js +1 -1
  112. package/dist/options/pixel-format.js +1 -1
  113. package/dist/options/port.js +1 -1
  114. package/dist/options/prefer-lossless.js +1 -1
  115. package/dist/options/preview-sample-rate.js +1 -1
  116. package/dist/options/props.js +1 -1
  117. package/dist/options/prores-profile.js +1 -1
  118. package/dist/options/public-dir.js +1 -1
  119. package/dist/options/public-license-key.js +1 -1
  120. package/dist/options/public-path.js +1 -1
  121. package/dist/options/repro.js +1 -1
  122. package/dist/options/rspack.d.ts +1 -1
  123. package/dist/options/rspack.js +1 -1
  124. package/dist/options/runs.js +1 -1
  125. package/dist/options/sample-rate.js +1 -1
  126. package/dist/options/scale.js +1 -1
  127. package/dist/options/separate-audio.js +1 -1
  128. package/dist/options/skip-skills.js +1 -1
  129. package/dist/options/still-frame.js +1 -1
  130. package/dist/options/still-image-format.js +1 -1
  131. package/dist/options/throw-if-site-exists.js +1 -1
  132. package/dist/options/timeout.js +1 -1
  133. package/dist/options/user-agent.js +1 -1
  134. package/dist/options/version-flag.js +1 -1
  135. package/dist/options/video-bitrate.js +1 -1
  136. package/dist/options/video-cache-size.js +1 -1
  137. package/dist/options/video-codec.js +4 -3
  138. package/dist/options/video-image-format.js +6 -2
  139. package/dist/options/webhook-custom-data.js +1 -1
  140. package/dist/options/webpack-poll.js +1 -1
  141. package/dist/options/x264-preset.js +1 -1
  142. package/dist/prespawn-ffmpeg.d.ts +20 -0
  143. package/dist/prespawn-ffmpeg.js +152 -29
  144. package/dist/probe-shared-memory-capture.d.ts +8 -0
  145. package/dist/probe-shared-memory-capture.js +111 -0
  146. package/dist/puppeteer-screenshot.d.ts +3 -1
  147. package/dist/puppeteer-screenshot.js +1 -0
  148. package/dist/pure.d.ts +1 -1
  149. package/dist/remotion-shared-memory-ffmpeg.d.ts +26 -0
  150. package/dist/remotion-shared-memory-ffmpeg.js +312 -0
  151. package/dist/remotion-shared-memory.d.ts +49 -0
  152. package/dist/remotion-shared-memory.js +359 -0
  153. package/dist/render-frame-and-retry-target-close.d.ts +5 -2
  154. package/dist/render-frame-and-retry-target-close.js +20 -4
  155. package/dist/render-frame-with-option-to-reject.d.ts +4 -1
  156. package/dist/render-frame-with-option-to-reject.js +206 -115
  157. package/dist/render-frame.d.ts +4 -5
  158. package/dist/render-frame.js +3 -1
  159. package/dist/render-frames.d.ts +3 -0
  160. package/dist/render-frames.js +15 -18
  161. package/dist/render-media.d.ts +1 -1
  162. package/dist/render-media.js +131 -46
  163. package/dist/render-still.js +1 -0
  164. package/dist/screenshot-background.d.ts +2 -0
  165. package/dist/screenshot-background.js +20 -0
  166. package/dist/screenshot-task.d.ts +4 -2
  167. package/dist/screenshot-task.js +40 -21
  168. package/dist/seek-to-frame.js +1 -1
  169. package/dist/stitch-frames-to-video.js +71 -10
  170. package/dist/take-frame.d.ts +11 -3
  171. package/dist/take-frame.js +10 -8
  172. package/dist/validate-output-filename.d.ts +1 -1
  173. package/dist/validate-output-filename.js +10 -2
  174. package/package.json +13 -13
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.takeFrame = void 0;
4
4
  const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
5
5
  const puppeteer_screenshot_1 = require("./puppeteer-screenshot");
6
- const takeFrame = async ({ freePage, imageFormat, jpegQuality, width, height, output, scale, wantsBuffer, timeoutInMilliseconds, }) => {
7
- var _a;
6
+ const takeFrame = async ({ freePage, imageFormat, jpegQuality, width, height, output, scale, wantsBuffer, timeoutInMilliseconds, remotionSharedMemory, }) => {
7
+ var _a, _b;
8
8
  if (imageFormat === 'none') {
9
9
  return null;
10
10
  }
11
- if (imageFormat === 'png' ||
12
- imageFormat === 'pdf' ||
13
- imageFormat === 'webp') {
11
+ const captureImageFormat = (_a = remotionSharedMemory === null || remotionSharedMemory === void 0 ? void 0 : remotionSharedMemory.getImageFormat(imageFormat)) !== null && _a !== void 0 ? _a : imageFormat;
12
+ if (captureImageFormat === 'png' ||
13
+ captureImageFormat === 'pdf' ||
14
+ captureImageFormat === 'webp') {
14
15
  await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
15
16
  pageFunction: () => {
16
17
  document.body.style.background = 'transparent';
@@ -34,13 +35,14 @@ const takeFrame = async ({ freePage, imageFormat, jpegQuality, width, height, ou
34
35
  }
35
36
  const buf = await (0, puppeteer_screenshot_1.screenshot)({
36
37
  page: freePage,
37
- omitBackground: imageFormat === 'png' || imageFormat === 'webp',
38
- path: (_a = (wantsBuffer ? undefined : output)) !== null && _a !== void 0 ? _a : undefined,
39
- type: imageFormat,
38
+ omitBackground: captureImageFormat === 'png' || captureImageFormat === 'webp',
39
+ path: (_b = (wantsBuffer ? undefined : output)) !== null && _b !== void 0 ? _b : undefined,
40
+ type: captureImageFormat,
40
41
  jpegQuality,
41
42
  width,
42
43
  height,
43
44
  scale,
45
+ remotionSharedMemory,
44
46
  });
45
47
  return buf;
46
48
  };
@@ -1,7 +1,7 @@
1
1
  export declare const validateOutputFilename: <T extends "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav">({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }: {
2
2
  codec: T;
3
3
  audioCodecSetting: "aac" | "mp3" | "opus" | "pcm-16" | null;
4
- extension: string;
4
+ extension: string | null;
5
5
  preferLossless: boolean;
6
6
  separateAudioTo: string | null;
7
7
  }) => void;
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateOutputFilename = void 0;
4
+ const no_react_1 = require("remotion/no-react");
4
5
  const file_extensions_1 = require("./file-extensions");
5
6
  const audio_codec_1 = require("./options/audio-codec");
6
7
  const validateOutputFilename = ({ codec, audioCodecSetting, extension, preferLossless, separateAudioTo, }) => {
7
8
  if (!file_extensions_1.defaultFileExtensionMap[codec]) {
8
9
  throw new TypeError(`The codec "${codec}" is not supported. Supported codecs are: ${Object.keys(file_extensions_1.defaultFileExtensionMap).join(', ')}`);
9
10
  }
11
+ // File extensions are case-insensitive: `out.MP4` is a valid MP4 output.
12
+ const normalizedExtension = extension === null ? null : extension.toLowerCase();
13
+ if (no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES &&
14
+ codec === 'aac' &&
15
+ (normalizedExtension === 'mpg' || normalizedExtension === 'mpeg')) {
16
+ throw new Error('AAC output with .mpg or .mpeg extensions is not supported. Use .aac for raw ADTS AAC or .m4a for an MPEG-4 audio container.');
17
+ }
10
18
  const map = file_extensions_1.defaultFileExtensionMap[codec];
11
19
  const resolvedAudioCodec = (0, audio_codec_1.resolveAudioCodec)({
12
20
  codec,
@@ -15,7 +23,7 @@ const validateOutputFilename = ({ codec, audioCodecSetting, extension, preferLos
15
23
  separateAudioTo,
16
24
  });
17
25
  if (resolvedAudioCodec === null) {
18
- if (extension !== map.default) {
26
+ if (normalizedExtension !== map.default) {
19
27
  throw new TypeError(`When using the ${codec} codec, the output filename must end in .${map.default}.`);
20
28
  }
21
29
  return;
@@ -24,7 +32,7 @@ const validateOutputFilename = ({ codec, audioCodecSetting, extension, preferLos
24
32
  throw new Error(`Audio codec ${resolvedAudioCodec} is not supported for codec ${codec}`);
25
33
  }
26
34
  const acceptableExtensions = map.forAudioCodec[resolvedAudioCodec].possible;
27
- if (!acceptableExtensions.includes(extension) &&
35
+ if (!acceptableExtensions.includes(normalizedExtension) &&
28
36
  !separateAudioTo) {
29
37
  throw new TypeError(`When using the ${codec} codec with the ${resolvedAudioCodec} audio codec, the output filename must end in one of the following: ${acceptableExtensions.join(', ')}.`);
30
38
  }
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.533",
6
+ "version": "4.0.534",
7
7
  "description": "Render Remotion videos using Node.js or Bun",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "execa": "5.1.1",
25
- "remotion": "4.0.533",
26
- "@remotion/streaming": "4.0.533",
25
+ "remotion": "4.0.534",
26
+ "@remotion/streaming": "4.0.534",
27
27
  "source-map": "0.8.0",
28
28
  "ws": "8.21.0",
29
- "@remotion/licensing": "4.0.533"
29
+ "@remotion/licensing": "4.0.534"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=16.8.0",
@@ -40,19 +40,19 @@
40
40
  "react-dom": "19.2.3",
41
41
  "@typescript/native-preview": "7.0.0-dev.20260217.1",
42
42
  "@types/ws": "8.5.10",
43
- "@remotion/example-videos": "4.0.533",
44
- "@remotion/eslint-config-internal": "4.0.533",
43
+ "@remotion/example-videos": "4.0.534",
44
+ "@remotion/eslint-config-internal": "4.0.534",
45
45
  "eslint": "9.19.0",
46
46
  "@types/node": "20.12.14"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@remotion/compositor-darwin-arm64": "4.0.533",
50
- "@remotion/compositor-darwin-x64": "4.0.533",
51
- "@remotion/compositor-linux-arm64-gnu": "4.0.533",
52
- "@remotion/compositor-linux-arm64-musl": "4.0.533",
53
- "@remotion/compositor-linux-x64-gnu": "4.0.533",
54
- "@remotion/compositor-linux-x64-musl": "4.0.533",
55
- "@remotion/compositor-win32-x64-msvc": "4.0.533"
49
+ "@remotion/compositor-darwin-arm64": "4.0.534",
50
+ "@remotion/compositor-darwin-x64": "4.0.534",
51
+ "@remotion/compositor-linux-arm64-gnu": "4.0.534",
52
+ "@remotion/compositor-linux-arm64-musl": "4.0.534",
53
+ "@remotion/compositor-linux-x64-gnu": "4.0.534",
54
+ "@remotion/compositor-linux-x64-musl": "4.0.534",
55
+ "@remotion/compositor-win32-x64-msvc": "4.0.534"
56
56
  },
57
57
  "keywords": [
58
58
  "remotion",