@remotion/renderer 4.0.114 → 4.0.116

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 (94) hide show
  1. package/dist/browser/BrowserFetcher.js +1 -1
  2. package/dist/browser/BrowserPage.js +3 -3
  3. package/dist/browser/Connection.js +1 -1
  4. package/dist/check-apple-silicon.d.ts +3 -1
  5. package/dist/check-apple-silicon.js +32 -2
  6. package/dist/client.d.ts +1256 -14
  7. package/dist/client.js +3 -1
  8. package/dist/combine-videos.js +1 -1
  9. package/dist/ffmpeg-args.d.ts +1 -1
  10. package/dist/get-compositions.d.ts +1 -7
  11. package/dist/get-compositions.js +2 -2
  12. package/dist/get-extension-of-filename.js +2 -5
  13. package/dist/get-local-browser-executable.js +1 -1
  14. package/dist/index.d.ts +143 -16
  15. package/dist/index.js +0 -2
  16. package/dist/jpeg-quality.d.ts +1 -1
  17. package/dist/logger.d.ts +2 -6
  18. package/dist/logger.js +5 -23
  19. package/dist/options/audio-bitrate.d.ts +10 -0
  20. package/dist/options/audio-bitrate.js +25 -2
  21. package/dist/options/beep-on-finish.d.ts +7 -0
  22. package/dist/options/beep-on-finish.js +24 -1
  23. package/dist/options/color-space.d.ts +7 -0
  24. package/dist/options/color-space.js +23 -0
  25. package/dist/options/crf.d.ts +9 -0
  26. package/dist/options/crf.js +33 -2
  27. package/dist/options/delete-after.d.ts +12 -1
  28. package/dist/options/delete-after.js +25 -2
  29. package/dist/options/enable-lambda-insights.d.ts +7 -0
  30. package/dist/options/enable-lambda-insights.js +24 -1
  31. package/dist/options/enable-multiprocess-on-linux.d.ts +7 -0
  32. package/dist/options/enable-multiprocess-on-linux.js +24 -1
  33. package/dist/options/encoding-buffer-size.d.ts +10 -0
  34. package/dist/options/encoding-buffer-size.js +28 -1
  35. package/dist/options/encoding-max-rate.d.ts +10 -0
  36. package/dist/options/encoding-max-rate.js +24 -1
  37. package/dist/options/enforce-audio.d.ts +7 -0
  38. package/dist/options/enforce-audio.js +25 -1
  39. package/dist/options/folder-expiry.d.ts +7 -0
  40. package/dist/options/folder-expiry.js +24 -1
  41. package/dist/options/gl.d.ts +16 -4
  42. package/dist/options/gl.js +35 -3
  43. package/dist/options/headless.d.ts +15 -0
  44. package/dist/options/headless.js +36 -0
  45. package/dist/options/index.d.ts +259 -10
  46. package/dist/options/index.js +13 -3
  47. package/dist/options/jpeg-quality.d.ts +9 -0
  48. package/dist/options/jpeg-quality.js +37 -2
  49. package/dist/options/log-level.d.ts +16 -0
  50. package/dist/options/log-level.js +32 -0
  51. package/dist/options/mute.d.ts +9 -2
  52. package/dist/options/mute.js +27 -3
  53. package/dist/options/number-of-gif-loops.d.ts +11 -0
  54. package/dist/options/number-of-gif-loops.js +31 -1
  55. package/dist/options/offthreadvideo-cache-size.d.ts +12 -1
  56. package/dist/options/offthreadvideo-cache-size.js +30 -3
  57. package/dist/options/option.d.ts +11 -3
  58. package/dist/options/options-map.d.ts +997 -3
  59. package/dist/options/options-map.js +79 -12
  60. package/dist/options/overwrite.d.ts +15 -0
  61. package/dist/options/overwrite.js +42 -0
  62. package/dist/options/repro.d.ts +8 -1
  63. package/dist/options/repro.js +25 -1
  64. package/dist/options/scale.d.ts +7 -0
  65. package/dist/options/scale.js +30 -1
  66. package/dist/options/timeout.d.ts +15 -0
  67. package/dist/options/timeout.js +44 -0
  68. package/dist/options/video-bitrate.d.ts +9 -2
  69. package/dist/options/video-bitrate.js +27 -4
  70. package/dist/options/video-codec.d.ts +16 -1
  71. package/dist/options/video-codec.js +81 -2
  72. package/dist/options/webhook-custom-data.d.ts +3 -1
  73. package/dist/options/webhook-custom-data.js +8 -1
  74. package/dist/options/x264-preset.d.ts +20 -3
  75. package/dist/options/x264-preset.js +47 -7
  76. package/dist/path-normalize.d.ts +1 -0
  77. package/dist/path-normalize.js +133 -0
  78. package/dist/prespawn-ffmpeg.d.ts +1 -1
  79. package/dist/print-useful-error-message.d.ts +2 -1
  80. package/dist/print-useful-error-message.js +29 -29
  81. package/dist/render-frames.d.ts +1 -7
  82. package/dist/render-frames.js +1 -1
  83. package/dist/render-media.d.ts +0 -17
  84. package/dist/render-media.js +4 -4
  85. package/dist/render-still.d.ts +1 -7
  86. package/dist/render-still.js +2 -3
  87. package/dist/repro.js +6 -6
  88. package/dist/select-composition.d.ts +2 -8
  89. package/dist/stitch-frames-to-video.d.ts +1 -1
  90. package/dist/stitch-frames-to-video.js +1 -1
  91. package/dist/wrap-with-error-handling.js +1 -1
  92. package/package.json +9 -9
  93. package/dist/does-have-m2-bug.d.ts +0 -3
  94. package/dist/does-have-m2-bug.js +0 -12
@@ -120,7 +120,7 @@ const downloadBrowser = async (options) => {
120
120
  onProgress: (progress) => {
121
121
  if (progress.downloaded > lastProgress + 10000000) {
122
122
  lastProgress = progress.downloaded;
123
- logger_1.Log.infoAdvanced({ indent: options.indent, logLevel: options.logLevel }, `Downloading Thorium - ${toMegabytes(progress.downloaded)}/${toMegabytes(progress.totalSize)}`);
123
+ logger_1.Log.info({ indent: options.indent, logLevel: options.logLevel }, `Downloading Thorium - ${toMegabytes(progress.downloaded)}/${toMegabytes(progress.totalSize)}`);
124
124
  }
125
125
  },
126
126
  indent: options.indent,
@@ -133,7 +133,7 @@ class Page extends EventEmitter_1.EventEmitter {
133
133
  .join(':');
134
134
  const tag = [origPosition === null || origPosition === void 0 ? void 0 : origPosition.name, file].filter(truthy_1.truthy).join('@');
135
135
  if (log.type === 'error') {
136
- logger_1.Log.errorAdvanced({
136
+ logger_1.Log.error({
137
137
  logLevel,
138
138
  tag,
139
139
  indent,
@@ -149,10 +149,10 @@ class Page extends EventEmitter_1.EventEmitter {
149
149
  }
150
150
  else if (log.type === 'error') {
151
151
  if (log.text.includes('Failed to load resource:')) {
152
- logger_1.Log.errorAdvanced({ logLevel, tag: url, indent }, log.text);
152
+ logger_1.Log.error({ logLevel, tag: url, indent }, log.text);
153
153
  }
154
154
  else {
155
- logger_1.Log.errorAdvanced({ logLevel, tag: `console.${log.type}`, indent }, log.text);
155
+ logger_1.Log.error({ logLevel, tag: `console.${log.type}`, indent }, log.text);
156
156
  }
157
157
  }
158
158
  else {
@@ -198,7 +198,7 @@ class CDPSession extends EventEmitter_1.EventEmitter {
198
198
  var _a;
199
199
  if (__classPrivateFieldGet(this, _CDPSession_callbacks, "f").size > 100) {
200
200
  for (const callback of __classPrivateFieldGet(this, _CDPSession_callbacks, "f").values()) {
201
- logger_1.Log.info(callback.fn);
201
+ logger_1.Log.info({ indent: false, logLevel: 'info' }, callback.fn);
202
202
  }
203
203
  throw new Error('Leak detected: Too many callbacks');
204
204
  }
@@ -1 +1,3 @@
1
- export declare const checkNodeVersionAndWarnAboutRosetta: () => void;
1
+ import type { LogLevel } from './log-level';
2
+ export declare const gLibCErrorMessage: (libCString: string) => string | null;
3
+ export declare const checkNodeVersionAndWarnAboutRosetta: (logLevel: LogLevel, indent: boolean) => void;
@@ -1,12 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkNodeVersionAndWarnAboutRosetta = void 0;
4
- const checkNodeVersionAndWarnAboutRosetta = () => {
3
+ exports.checkNodeVersionAndWarnAboutRosetta = exports.gLibCErrorMessage = void 0;
4
+ const logger_1 = require("./logger");
5
+ const gLibCErrorMessage = (libCString) => {
6
+ const split = libCString.split('.');
7
+ if (split.length !== 2) {
8
+ return null;
9
+ }
10
+ if (split[0] === '2' && Number(split[1]) >= 35) {
11
+ return null;
12
+ }
13
+ if (Number(split[0]) > 2) {
14
+ return null;
15
+ }
16
+ return `Rendering videos requires glibc 2.35 or higher. Your system has glibc ${libCString}.`;
17
+ };
18
+ exports.gLibCErrorMessage = gLibCErrorMessage;
19
+ const checkLibCRequirement = (logLevel, indent) => {
20
+ const { report } = process;
21
+ if (report) {
22
+ // @ts-expect-error no types
23
+ const { glibcVersionRuntime } = report.getReport().header;
24
+ if (!glibcVersionRuntime) {
25
+ return;
26
+ }
27
+ const error = (0, exports.gLibCErrorMessage)(glibcVersionRuntime);
28
+ if (error) {
29
+ logger_1.Log.warn({ logLevel, indent }, error);
30
+ }
31
+ }
32
+ };
33
+ const checkNodeVersionAndWarnAboutRosetta = (logLevel, indent) => {
5
34
  const version = process.version.replace('v', '').split('.');
6
35
  const majorVersion = Number(version[0]);
7
36
  const requiredNodeVersion = 16;
8
37
  if (majorVersion < 16) {
9
38
  throw new Error(`Remotion requires at least Node ${requiredNodeVersion}. You currently have ${process.version}. Update your node version to ${requiredNodeVersion} to use Remotion.`);
10
39
  }
40
+ checkLibCRequirement(logLevel, indent);
11
41
  };
12
42
  exports.checkNodeVersionAndWarnAboutRosetta = checkNodeVersionAndWarnAboutRosetta;