@remotion/renderer 4.0.84 → 4.0.86

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 (42) hide show
  1. package/dist/check-apple-silicon.d.ts +3 -1
  2. package/dist/check-apple-silicon.js +32 -2
  3. package/dist/client.d.ts +73 -42
  4. package/dist/combine-videos.js +2 -3
  5. package/dist/compositor/compose.js +10 -1
  6. package/dist/ffmpeg-args.js +11 -1
  7. package/dist/get-compositions.js +3 -0
  8. package/dist/get-extension-from-codec.d.ts +2 -2
  9. package/dist/index.d.ts +28 -31
  10. package/dist/index.js +1 -1
  11. package/dist/options/audio-bitrate.d.ts +0 -1
  12. package/dist/options/beep-on-finish.d.ts +0 -1
  13. package/dist/options/color-space.d.ts +2 -3
  14. package/dist/options/color-space.js +2 -2
  15. package/dist/options/crf.d.ts +0 -1
  16. package/dist/options/enable-lambda-insights.d.ts +0 -1
  17. package/dist/options/encoding-buffer-size.d.ts +0 -1
  18. package/dist/options/encoding-max-rate.d.ts +0 -1
  19. package/dist/options/enforce-audio.d.ts +0 -1
  20. package/dist/options/gl.d.ts +1 -2
  21. package/dist/options/index.d.ts +10 -3
  22. package/dist/options/index.js +2 -0
  23. package/dist/options/jpeg-quality.d.ts +0 -1
  24. package/dist/options/number-of-gif-loops.d.ts +8 -0
  25. package/dist/options/number-of-gif-loops.js +14 -0
  26. package/dist/options/offthreadvideo-cache-size.d.ts +0 -1
  27. package/dist/options/options-map.d.ts +24 -1
  28. package/dist/options/options-map.js +4 -0
  29. package/dist/options/scale.d.ts +0 -1
  30. package/dist/options/video-bitrate.d.ts +0 -1
  31. package/dist/options/video-codec.d.ts +0 -1
  32. package/dist/pixel-format.d.ts +1 -1
  33. package/dist/provide-screenshot.d.ts +0 -1
  34. package/dist/puppeteer-screenshot.d.ts +0 -1
  35. package/dist/pure.d.ts +3 -3
  36. package/dist/render-media.d.ts +1 -5
  37. package/dist/screenshot-dom-element.d.ts +0 -1
  38. package/dist/screenshot-task.d.ts +0 -1
  39. package/dist/stitch-frames-to-video.d.ts +0 -1
  40. package/dist/take-frame-and-compose.d.ts +0 -1
  41. package/dist/validate-output-filename.d.ts +1 -1
  42. package/package.json +9 -9
@@ -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;
package/dist/client.d.ts CHANGED
@@ -1,20 +1,19 @@
1
- /// <reference types="react" />
2
1
  export { AvailableOptions } from './options';
3
2
  export declare const BrowserSafeApis: {
4
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
3
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
5
4
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
6
5
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
7
- getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number;
8
- getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => [number, number];
9
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
6
+ getDefaultCrfForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => number;
7
+ getValidCrfRanges: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => [number, number];
8
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
10
9
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
11
10
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
12
11
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
13
12
  validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
14
- validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
13
+ validPixelFormatsForCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
15
14
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
16
15
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
17
- DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
16
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
18
17
  DEFAULT_TIMEOUT: number;
19
18
  supportedAudioCodecs: {
20
19
  readonly h264: readonly ["aac", "pcm-16", "mp3"];
@@ -32,11 +31,11 @@ export declare const BrowserSafeApis: {
32
31
  h264: {
33
32
  default: import("./file-extensions").FileExtension;
34
33
  forAudioCodec: {
35
- mp3: {
34
+ aac: {
36
35
  possible: import("./file-extensions").FileExtension[];
37
36
  default: import("./file-extensions").FileExtension;
38
37
  };
39
- aac: {
38
+ mp3: {
40
39
  possible: import("./file-extensions").FileExtension[];
41
40
  default: import("./file-extensions").FileExtension;
42
41
  };
@@ -62,11 +61,11 @@ export declare const BrowserSafeApis: {
62
61
  vp8: {
63
62
  default: import("./file-extensions").FileExtension;
64
63
  forAudioCodec: {
65
- "pcm-16": {
64
+ opus: {
66
65
  possible: import("./file-extensions").FileExtension[];
67
66
  default: import("./file-extensions").FileExtension;
68
67
  };
69
- opus: {
68
+ "pcm-16": {
70
69
  possible: import("./file-extensions").FileExtension[];
71
70
  default: import("./file-extensions").FileExtension;
72
71
  };
@@ -75,20 +74,20 @@ export declare const BrowserSafeApis: {
75
74
  vp9: {
76
75
  default: import("./file-extensions").FileExtension;
77
76
  forAudioCodec: {
78
- "pcm-16": {
77
+ opus: {
79
78
  possible: import("./file-extensions").FileExtension[];
80
79
  default: import("./file-extensions").FileExtension;
81
80
  };
82
- opus: {
81
+ "pcm-16": {
83
82
  possible: import("./file-extensions").FileExtension[];
84
83
  default: import("./file-extensions").FileExtension;
85
84
  };
86
85
  };
87
86
  };
88
- mp3: {
87
+ prores: {
89
88
  default: import("./file-extensions").FileExtension;
90
89
  forAudioCodec: {
91
- mp3: {
90
+ aac: {
92
91
  possible: import("./file-extensions").FileExtension[];
93
92
  default: import("./file-extensions").FileExtension;
94
93
  };
@@ -111,22 +110,22 @@ export declare const BrowserSafeApis: {
111
110
  };
112
111
  };
113
112
  };
114
- wav: {
113
+ mp3: {
115
114
  default: import("./file-extensions").FileExtension;
116
115
  forAudioCodec: {
116
+ mp3: {
117
+ possible: import("./file-extensions").FileExtension[];
118
+ default: import("./file-extensions").FileExtension;
119
+ };
117
120
  "pcm-16": {
118
121
  possible: import("./file-extensions").FileExtension[];
119
122
  default: import("./file-extensions").FileExtension;
120
123
  };
121
124
  };
122
125
  };
123
- prores: {
126
+ wav: {
124
127
  default: import("./file-extensions").FileExtension;
125
128
  forAudioCodec: {
126
- aac: {
127
- possible: import("./file-extensions").FileExtension[];
128
- default: import("./file-extensions").FileExtension;
129
- };
130
129
  "pcm-16": {
131
130
  possible: import("./file-extensions").FileExtension[];
132
131
  default: import("./file-extensions").FileExtension;
@@ -153,37 +152,37 @@ export declare const BrowserSafeApis: {
153
152
  };
154
153
  defaultAudioCodecs: {
155
154
  h264: {
156
- compressed: "mp3" | "aac" | "pcm-16" | null;
157
- lossless: "mp3" | "aac" | "pcm-16" | null;
155
+ compressed: "aac" | "mp3" | "pcm-16" | null;
156
+ lossless: "aac" | "mp3" | "pcm-16" | null;
158
157
  };
159
158
  h265: {
160
159
  compressed: "aac" | "pcm-16" | null;
161
160
  lossless: "aac" | "pcm-16" | null;
162
161
  };
163
162
  vp8: {
164
- compressed: "pcm-16" | "opus" | null;
165
- lossless: "pcm-16" | "opus" | null;
163
+ compressed: "opus" | "pcm-16" | null;
164
+ lossless: "opus" | "pcm-16" | null;
166
165
  };
167
166
  vp9: {
168
- compressed: "pcm-16" | "opus" | null;
169
- lossless: "pcm-16" | "opus" | null;
167
+ compressed: "opus" | "pcm-16" | null;
168
+ lossless: "opus" | "pcm-16" | null;
170
169
  };
171
- mp3: {
172
- compressed: "mp3" | "pcm-16" | null;
173
- lossless: "mp3" | "pcm-16" | null;
170
+ prores: {
171
+ compressed: "aac" | "pcm-16" | null;
172
+ lossless: "aac" | "pcm-16" | null;
174
173
  };
175
174
  aac: {
176
175
  compressed: "aac" | "pcm-16" | null;
177
176
  lossless: "aac" | "pcm-16" | null;
178
177
  };
178
+ mp3: {
179
+ compressed: "mp3" | "pcm-16" | null;
180
+ lossless: "mp3" | "pcm-16" | null;
181
+ };
179
182
  wav: {
180
183
  compressed: "pcm-16" | null;
181
184
  lossless: "pcm-16" | null;
182
185
  };
183
- prores: {
184
- compressed: "aac" | "pcm-16" | null;
185
- lossless: "aac" | "pcm-16" | null;
186
- };
187
186
  "h264-mkv": {
188
187
  compressed: "mp3" | "pcm-16" | null;
189
188
  lossless: "mp3" | "pcm-16" | null;
@@ -193,10 +192,10 @@ export declare const BrowserSafeApis: {
193
192
  lossless: null;
194
193
  };
195
194
  };
196
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
197
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
195
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
196
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
198
197
  codec: T_1;
199
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
198
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
200
199
  extension: string;
201
200
  preferLossless: boolean;
202
201
  }) => void;
@@ -287,7 +286,7 @@ export declare const BrowserSafeApis: {
287
286
  description: () => JSX.Element;
288
287
  docLink: string;
289
288
  ssrName: string;
290
- type: "default" | "bt709";
289
+ type: "bt709" | "bt2020-ncl" | "default";
291
290
  };
292
291
  deleteAfterOption: {
293
292
  name: string;
@@ -317,7 +316,7 @@ export declare const BrowserSafeApis: {
317
316
  cliFlag: "gl";
318
317
  docLink: string;
319
318
  name: string;
320
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
319
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
321
320
  ssrName: string;
322
321
  description: () => JSX.Element;
323
322
  };
@@ -353,8 +352,16 @@ export declare const BrowserSafeApis: {
353
352
  docLink: string;
354
353
  type: boolean;
355
354
  };
355
+ numberOfGifLoopsOption: {
356
+ name: string;
357
+ cliFlag: "number-of-gif-loops";
358
+ description: () => JSX.Element;
359
+ ssrName: "numberOfGifLoops";
360
+ docLink: string;
361
+ type: number | null;
362
+ };
356
363
  };
357
- validColorSpaces: readonly ["default", "bt709"];
364
+ validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
358
365
  optionsMap: {
359
366
  readonly renderMedia: {
360
367
  readonly offthreadVideoCacheSizeInBytes: {
@@ -373,6 +380,14 @@ export declare const BrowserSafeApis: {
373
380
  docLink: string;
374
381
  type: string | null;
375
382
  };
383
+ readonly numberOfGifLoops: {
384
+ name: string;
385
+ cliFlag: "number-of-gif-loops";
386
+ description: () => JSX.Element;
387
+ ssrName: "numberOfGifLoops";
388
+ docLink: string;
389
+ type: number | null;
390
+ };
376
391
  };
377
392
  readonly renderStill: {
378
393
  readonly offthreadVideoCacheSizeInBytes: {
@@ -431,6 +446,14 @@ export declare const BrowserSafeApis: {
431
446
  docLink: string;
432
447
  type: string | null;
433
448
  };
449
+ readonly numberOfGifLoops: {
450
+ name: string;
451
+ cliFlag: "number-of-gif-loops";
452
+ description: () => JSX.Element;
453
+ ssrName: "numberOfGifLoops";
454
+ docLink: string;
455
+ type: number | null;
456
+ };
434
457
  };
435
458
  readonly renderStillOnLambda: {
436
459
  readonly offthreadVideoCacheSizeInBytes: {
@@ -461,6 +484,14 @@ export declare const BrowserSafeApis: {
461
484
  docLink: string;
462
485
  type: number | null;
463
486
  };
487
+ readonly numberOfGifLoops: {
488
+ name: string;
489
+ cliFlag: "number-of-gif-loops";
490
+ description: () => JSX.Element;
491
+ ssrName: "numberOfGifLoops";
492
+ docLink: string;
493
+ type: number | null;
494
+ };
464
495
  };
465
496
  readonly renderStillOnCloudRun: {
466
497
  readonly offthreadVideoCacheSizeInBytes: {
@@ -473,7 +504,7 @@ export declare const BrowserSafeApis: {
473
504
  };
474
505
  };
475
506
  };
476
- codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
477
- codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
507
+ codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
508
+ codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
478
509
  logLevels: readonly ["verbose", "info", "warn", "error"];
479
510
  };
@@ -6,6 +6,7 @@ const node_fs_1 = require("node:fs");
6
6
  const node_path_1 = require("node:path");
7
7
  const audio_codec_1 = require("./audio-codec");
8
8
  const call_ffmpeg_1 = require("./call-ffmpeg");
9
+ const convert_number_of_gif_loops_to_ffmpeg_1 = require("./convert-number-of-gif-loops-to-ffmpeg");
9
10
  const is_audio_codec_1 = require("./is-audio-codec");
10
11
  const logger_1 = require("./logger");
11
12
  const parse_ffmpeg_progress_1 = require("./parse-ffmpeg-progress");
@@ -29,9 +30,7 @@ const combineVideos = async (options) => {
29
30
  numberOfGifLoops === null ? null : '-loop',
30
31
  numberOfGifLoops === null
31
32
  ? null
32
- : typeof numberOfGifLoops === 'number'
33
- ? String(numberOfGifLoops)
34
- : '-1',
33
+ : (0, convert_number_of_gif_loops_to_ffmpeg_1.convertNumberOfGifLoopsToFfmpegSyntax)(numberOfGifLoops),
35
34
  (0, is_audio_codec_1.isAudioCodec)(codec) ? null : '-c:v',
36
35
  (0, is_audio_codec_1.isAudioCodec)(codec) ? null : codec === 'gif' ? 'gif' : 'copy',
37
36
  resolvedAudioCodec ? '-c:a' : null,
@@ -80,7 +80,16 @@ const callCompositor = (payload, indent, logLevel) => {
80
80
  Buffer.concat(stderrChunks).toString('utf-8')));
81
81
  return;
82
82
  }
83
- child.stdin.write(payload);
83
+ try {
84
+ child.stdin.write(payload);
85
+ }
86
+ catch (err) {
87
+ if (err instanceof Error && err.message.includes('EPIPE')) {
88
+ reject(new Error('Compositor stdin closed unexpectedly,' +
89
+ Buffer.concat(stderrChunks).toString('utf-8')));
90
+ return;
91
+ }
92
+ }
84
93
  child.stdin.end();
85
94
  });
86
95
  };
@@ -37,7 +37,17 @@ const generateFfmpegArgs = ({ hasPreencoded, proResProfileName, pixelFormat, x26
37
37
  ['-color_range', 'tv'],
38
38
  hasPreencoded ? [] : ['-vf', 'zscale=m=709:min=709:r=limited'],
39
39
  ]
40
- : [];
40
+ : colorSpace === 'bt2020-ncl'
41
+ ? [
42
+ ['-colorspace:v', 'bt2020nc'],
43
+ ['-color_primaries:v', 'bt2020'],
44
+ ['-color_trc:v', 'arib-std-b67'],
45
+ ['-color_range', 'tv'],
46
+ hasPreencoded
47
+ ? []
48
+ : ['-vf', 'zscale=m=2020_ncl:min=2020_ncl:r=limited'],
49
+ ]
50
+ : [];
41
51
  return [
42
52
  ['-c:v', hasPreencoded ? 'copy' : encoderName],
43
53
  // -c:v is the same as -vcodec as -codec:video
@@ -144,6 +144,9 @@ exports.internalGetCompositions = (0, wrap_with_error_handling_1.wrapWithErrorHa
144
144
  */
145
145
  const getCompositions = (serveUrlOrWebpackUrl, config) => {
146
146
  var _a;
147
+ if (!serveUrlOrWebpackUrl) {
148
+ throw new Error('No serve URL or webpack bundle directory was passed to getCompositions().');
149
+ }
147
150
  const { browserExecutable, chromiumOptions, envVariables, inputProps, onBrowserLog, port, puppeteerInstance, timeoutInMilliseconds, logLevel, } = config !== null && config !== void 0 ? config : {};
148
151
  return (0, exports.internalGetCompositions)({
149
152
  browserExecutable: browserExecutable !== null && browserExecutable !== void 0 ? browserExecutable : null,
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
2
  import type { Codec } from './codec';
3
3
  import type { FileExtension } from './file-extensions';
4
- export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
- export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
4
+ export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
5
+ export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
6
6
  export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
- /// <reference types="node" />
4
1
  import execa from 'execa';
5
2
  import { HeadlessBrowser } from './browser/Browser';
6
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -67,10 +64,10 @@ export declare const RenderInternals: {
67
64
  width: number;
68
65
  height: number;
69
66
  scale: number;
70
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
67
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
71
68
  wantsImageSequence: boolean;
72
69
  }) => void;
73
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
70
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
74
71
  tmpDir: (str: string) => string;
75
72
  deleteDirectory: (directory: string) => void;
76
73
  isServeUrl: (potentialUrl: string) => boolean;
@@ -127,7 +124,7 @@ export declare const RenderInternals: {
127
124
  };
128
125
  registerErrorSymbolicationLock: () => number;
129
126
  unlockErrorSymbolicationLock: (id: number) => void;
130
- canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
127
+ canUseParallelEncoding: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif") => boolean;
131
128
  mimeContentType: typeof mimeContentType;
132
129
  mimeLookup: typeof mimeLookup;
133
130
  validateConcurrency: ({ setting, value, checkIfValidForCurrentMachine, }: {
@@ -138,14 +135,14 @@ export declare const RenderInternals: {
138
135
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
139
136
  DEFAULT_BROWSER: "chrome";
140
137
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
141
- DEFAULT_OPENGL_RENDERER: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
142
- validateOpenGlRenderer: (option: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
138
+ DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
139
+ validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
143
140
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
144
- DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
141
+ DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
145
142
  validateJpegQuality: (q: number | undefined) => void;
146
143
  DEFAULT_TIMEOUT: number;
147
- DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
148
- isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
144
+ DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
145
+ isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif" | null | undefined) => boolean;
149
146
  logLevels: readonly ["verbose", "info", "warn", "error"];
150
147
  isEqualOrBelowLogLevel: (currentLevel: "verbose" | "info" | "warn" | "error", level: "verbose" | "info" | "warn" | "error") => boolean;
151
148
  isValidLogLevel: (level: string) => boolean;
@@ -162,10 +159,10 @@ export declare const RenderInternals: {
162
159
  output: string;
163
160
  onProgress: (p: number) => void;
164
161
  numberOfFrames: number;
165
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
162
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
166
163
  fps: number;
167
164
  numberOfGifLoops: number | null;
168
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
165
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
169
166
  audioBitrate: string | null;
170
167
  indent: boolean;
171
168
  logLevel: "verbose" | "info" | "warn" | "error";
@@ -173,19 +170,19 @@ export declare const RenderInternals: {
173
170
  getMinConcurrency: () => number;
174
171
  getMaxConcurrency: () => number;
175
172
  getDefaultAudioCodec: ({ codec, preferLossless, }: {
176
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
173
+ codec: "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif";
177
174
  preferLossless: boolean;
178
- }) => "mp3" | "aac" | "pcm-16" | "opus" | null;
175
+ }) => "opus" | "aac" | "mp3" | "pcm-16" | null;
179
176
  validAudioCodecs: readonly ["pcm-16", "aac", "mp3", "opus"];
180
177
  defaultFileExtensionMap: {
181
178
  h264: {
182
179
  default: import("./file-extensions").FileExtension;
183
180
  forAudioCodec: {
184
- mp3: {
181
+ aac: {
185
182
  possible: import("./file-extensions").FileExtension[];
186
183
  default: import("./file-extensions").FileExtension;
187
184
  };
188
- aac: {
185
+ mp3: {
189
186
  possible: import("./file-extensions").FileExtension[];
190
187
  default: import("./file-extensions").FileExtension;
191
188
  };
@@ -211,11 +208,11 @@ export declare const RenderInternals: {
211
208
  vp8: {
212
209
  default: import("./file-extensions").FileExtension;
213
210
  forAudioCodec: {
214
- "pcm-16": {
211
+ opus: {
215
212
  possible: import("./file-extensions").FileExtension[];
216
213
  default: import("./file-extensions").FileExtension;
217
214
  };
218
- opus: {
215
+ "pcm-16": {
219
216
  possible: import("./file-extensions").FileExtension[];
220
217
  default: import("./file-extensions").FileExtension;
221
218
  };
@@ -224,20 +221,20 @@ export declare const RenderInternals: {
224
221
  vp9: {
225
222
  default: import("./file-extensions").FileExtension;
226
223
  forAudioCodec: {
227
- "pcm-16": {
224
+ opus: {
228
225
  possible: import("./file-extensions").FileExtension[];
229
226
  default: import("./file-extensions").FileExtension;
230
227
  };
231
- opus: {
228
+ "pcm-16": {
232
229
  possible: import("./file-extensions").FileExtension[];
233
230
  default: import("./file-extensions").FileExtension;
234
231
  };
235
232
  };
236
233
  };
237
- mp3: {
234
+ prores: {
238
235
  default: import("./file-extensions").FileExtension;
239
236
  forAudioCodec: {
240
- mp3: {
237
+ aac: {
241
238
  possible: import("./file-extensions").FileExtension[];
242
239
  default: import("./file-extensions").FileExtension;
243
240
  };
@@ -260,22 +257,22 @@ export declare const RenderInternals: {
260
257
  };
261
258
  };
262
259
  };
263
- wav: {
260
+ mp3: {
264
261
  default: import("./file-extensions").FileExtension;
265
262
  forAudioCodec: {
263
+ mp3: {
264
+ possible: import("./file-extensions").FileExtension[];
265
+ default: import("./file-extensions").FileExtension;
266
+ };
266
267
  "pcm-16": {
267
268
  possible: import("./file-extensions").FileExtension[];
268
269
  default: import("./file-extensions").FileExtension;
269
270
  };
270
271
  };
271
272
  };
272
- prores: {
273
+ wav: {
273
274
  default: import("./file-extensions").FileExtension;
274
275
  forAudioCodec: {
275
- aac: {
276
- possible: import("./file-extensions").FileExtension[];
277
- default: import("./file-extensions").FileExtension;
278
- };
279
276
  "pcm-16": {
280
277
  possible: import("./file-extensions").FileExtension[];
281
278
  default: import("./file-extensions").FileExtension;
@@ -312,8 +309,8 @@ export declare const RenderInternals: {
312
309
  readonly vp9: readonly ["opus", "pcm-16"];
313
310
  readonly wav: readonly ["pcm-16"];
314
311
  };
315
- makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
316
- defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">;
312
+ makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif")[]>;
313
+ defaultCodecsForFileExtension: Record<import("./file-extensions").FileExtension, "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">;
317
314
  getExecutablePath: (type: "compositor" | "ffmpeg" | "ffprobe" | "ffmpeg-cwd", indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => string;
318
315
  callFf: (bin: "ffmpeg" | "ffprobe", args: (string | null)[], indent: boolean, logLevel: "verbose" | "info" | "warn" | "error", options?: execa.Options<string> | undefined) => execa.ExecaChildProcess<string>;
319
316
  dynamicLibraryPathOptions: (indent: boolean, logLevel: "verbose" | "info" | "warn" | "error") => {
package/dist/index.js CHANGED
@@ -198,4 +198,4 @@ exports.RenderInternals = {
198
198
  getPortConfig: port_config_1.getPortConfig,
199
199
  };
200
200
  // Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
201
- (0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)();
201
+ (0, check_apple_silicon_1.checkNodeVersionAndWarnAboutRosetta)('info', false);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const audioBitrateOption: {
3
2
  name: string;
4
3
  cliFlag: "audio-bitrate";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const beepOnFinishOption: {
3
2
  name: string;
4
3
  cliFlag: "beep-on-finish";
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const validColorSpaces: readonly ["default", "bt709"];
1
+ export declare const validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
3
2
  export type ColorSpace = (typeof validColorSpaces)[number];
4
3
  export declare const colorSpaceOption: {
5
4
  name: string;
@@ -7,6 +6,6 @@ export declare const colorSpaceOption: {
7
6
  description: () => JSX.Element;
8
7
  docLink: string;
9
8
  ssrName: string;
10
- type: "default" | "bt709";
9
+ type: "bt709" | "bt2020-ncl" | "default";
11
10
  };
12
11
  export declare const validateColorSpace: (option: unknown) => void;
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateColorSpace = exports.colorSpaceOption = exports.validColorSpaces = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- exports.validColorSpaces = ['default', 'bt709'];
5
+ exports.validColorSpaces = ['default', 'bt709', 'bt2020-ncl'];
6
6
  exports.colorSpaceOption = {
7
7
  name: 'Color space',
8
8
  cliFlag: 'color-space',
9
- description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Color space to use for the video. Acceptable values:", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "default", '"'] }), ",", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "bt709", '"'] }), ".", (0, jsx_runtime_1.jsx)("br", {}), "If", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "bt709", '"'] }), ' ', "is used, it is recommended to also use", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "png", '"'] }), ' ', "as the image format to have accurate color transformations throughout. Only since v4.0.83, colorspace conversion is actually performed, previously it would only tag the metadata of the video."] })),
9
+ description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Color space to use for the video. Acceptable values:", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "default", '"'] }), ",", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "bt709", '"'] }), ' ', "(since v4.0.28),", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "bt2020-ncl", '"'] }), ' ', "(since v4.0.88),", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "bt2020-cl", '"'] }), ' ', "(since v4.0.88), .", (0, jsx_runtime_1.jsx)("br", {}), "If a non-default colorspace is used, it is recommended to also use", ' ', (0, jsx_runtime_1.jsxs)("code", { children: ['"', "png", '"'] }), ' ', "as the image format to have accurate color transformations throughout. Only since v4.0.83, colorspace conversion is actually performed, previously it would only tag the metadata of the video."] })),
10
10
  docLink: 'https://www.remotion.dev/docs/renderer/render-media#colorspace',
11
11
  ssrName: 'colorSpace',
12
12
  type: 'default',
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const crfOption: {
3
2
  name: string;
4
3
  cliFlag: "crf";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const enableLambdaInsights: {
3
2
  name: string;
4
3
  cliFlag: "enable-lambda-insights";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const encodingBufferSizeOption: {
3
2
  name: string;
4
3
  cliFlag: "buffer-size";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const encodingMaxRateOption: {
3
2
  name: string;
4
3
  cliFlag: "max-rate";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const enforceAudioOption: {
3
2
  name: string;
4
3
  cliFlag: "enforce-audio-track";
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  export declare const validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
3
2
  export declare const glOption: {
4
3
  cliFlag: "gl";
5
4
  docLink: string;
6
5
  name: string;
7
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
6
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
8
7
  ssrName: string;
9
8
  description: () => JSX.Element;
10
9
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const allOptions: {
3
2
  scaleOption: {
4
3
  name: string;
@@ -86,7 +85,7 @@ export declare const allOptions: {
86
85
  description: () => JSX.Element;
87
86
  docLink: string;
88
87
  ssrName: string;
89
- type: "default" | "bt709";
88
+ type: "bt709" | "bt2020-ncl" | "default";
90
89
  };
91
90
  deleteAfterOption: {
92
91
  name: string;
@@ -116,7 +115,7 @@ export declare const allOptions: {
116
115
  cliFlag: "gl";
117
116
  docLink: string;
118
117
  name: string;
119
- type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
118
+ type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
120
119
  ssrName: string;
121
120
  description: () => JSX.Element;
122
121
  };
@@ -152,5 +151,13 @@ export declare const allOptions: {
152
151
  docLink: string;
153
152
  type: boolean;
154
153
  };
154
+ numberOfGifLoopsOption: {
155
+ name: string;
156
+ cliFlag: "number-of-gif-loops";
157
+ description: () => JSX.Element;
158
+ ssrName: "numberOfGifLoops";
159
+ docLink: string;
160
+ type: number | null;
161
+ };
155
162
  };
156
163
  export type AvailableOptions = keyof typeof allOptions;
@@ -15,6 +15,7 @@ const folder_expiry_1 = require("./folder-expiry");
15
15
  const gl_1 = require("./gl");
16
16
  const jpeg_quality_1 = require("./jpeg-quality");
17
17
  const mute_1 = require("./mute");
18
+ const number_of_gif_loops_1 = require("./number-of-gif-loops");
18
19
  const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
19
20
  const scale_1 = require("./scale");
20
21
  const video_bitrate_1 = require("./video-bitrate");
@@ -40,4 +41,5 @@ exports.allOptions = {
40
41
  encodingMaxRateOption: encoding_max_rate_1.encodingMaxRateOption,
41
42
  encodingBufferSizeOption: encoding_buffer_size_1.encodingBufferSizeOption,
42
43
  beepOnFinishOption: beep_on_finish_1.beepOnFinishOption,
44
+ numberOfGifLoopsOption: number_of_gif_loops_1.numberOfGifLoopsOption,
43
45
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const jpegQualityOption: {
3
2
  name: string;
4
3
  cliFlag: "jpeg-quality";
@@ -0,0 +1,8 @@
1
+ export declare const numberOfGifLoopsOption: {
2
+ name: string;
3
+ cliFlag: "number-of-gif-loops";
4
+ description: () => JSX.Element;
5
+ ssrName: "numberOfGifLoops";
6
+ docLink: string;
7
+ type: number | null;
8
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.numberOfGifLoopsOption = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ exports.numberOfGifLoopsOption = {
6
+ name: 'Number of GIF loops',
7
+ cliFlag: 'number-of-gif-loops',
8
+ description: () => {
9
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Allows you to set the number of loops as follows:", (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "null" }), " (or omitting in the CLI) plays the GIF indefinitely."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "0" }), " disables looping"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "1" }), " loops the GIF once (plays twice in total)"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("code", { children: "2" }), " loops the GIF twice (plays three times in total) and so on."] })] })] }));
10
+ },
11
+ ssrName: 'numberOfGifLoops',
12
+ docLink: 'https://www.remotion.dev/docs/render-as-gif#changing-the-number-of-loops',
13
+ type: 0,
14
+ };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const offthreadVideoCacheSizeInBytes: {
3
2
  name: string;
4
3
  cliFlag: "offthreadvideo-cache-size-in-bytes";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const optionsMap: {
3
2
  readonly renderMedia: {
4
3
  readonly offthreadVideoCacheSizeInBytes: {
@@ -17,6 +16,14 @@ export declare const optionsMap: {
17
16
  docLink: string;
18
17
  type: string | null;
19
18
  };
19
+ readonly numberOfGifLoops: {
20
+ name: string;
21
+ cliFlag: "number-of-gif-loops";
22
+ description: () => JSX.Element;
23
+ ssrName: "numberOfGifLoops";
24
+ docLink: string;
25
+ type: number | null;
26
+ };
20
27
  };
21
28
  readonly renderStill: {
22
29
  readonly offthreadVideoCacheSizeInBytes: {
@@ -75,6 +82,14 @@ export declare const optionsMap: {
75
82
  docLink: string;
76
83
  type: string | null;
77
84
  };
85
+ readonly numberOfGifLoops: {
86
+ name: string;
87
+ cliFlag: "number-of-gif-loops";
88
+ description: () => JSX.Element;
89
+ ssrName: "numberOfGifLoops";
90
+ docLink: string;
91
+ type: number | null;
92
+ };
78
93
  };
79
94
  readonly renderStillOnLambda: {
80
95
  readonly offthreadVideoCacheSizeInBytes: {
@@ -105,6 +120,14 @@ export declare const optionsMap: {
105
120
  docLink: string;
106
121
  type: number | null;
107
122
  };
123
+ readonly numberOfGifLoops: {
124
+ name: string;
125
+ cliFlag: "number-of-gif-loops";
126
+ description: () => JSX.Element;
127
+ ssrName: "numberOfGifLoops";
128
+ docLink: string;
129
+ type: number | null;
130
+ };
108
131
  };
109
132
  readonly renderStillOnCloudRun: {
110
133
  readonly offthreadVideoCacheSizeInBytes: {
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optionsMap = void 0;
4
+ const number_of_gif_loops_1 = require("./number-of-gif-loops");
4
5
  const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
5
6
  const video_bitrate_1 = require("./video-bitrate");
6
7
  exports.optionsMap = {
7
8
  renderMedia: {
8
9
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
9
10
  videoBitrate: video_bitrate_1.videoBitrate,
11
+ numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
10
12
  },
11
13
  renderStill: {
12
14
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
@@ -23,6 +25,7 @@ exports.optionsMap = {
23
25
  renderMediaOnLambda: {
24
26
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
25
27
  videoBitrate: video_bitrate_1.videoBitrate,
28
+ numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
26
29
  },
27
30
  renderStillOnLambda: {
28
31
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
@@ -32,6 +35,7 @@ exports.optionsMap = {
32
35
  },
33
36
  renderMediaOnCloudRun: {
34
37
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
38
+ numberOfGifLoops: number_of_gif_loops_1.numberOfGifLoopsOption,
35
39
  },
36
40
  renderStillOnCloudRun: {
37
41
  offthreadVideoCacheSizeInBytes: offthreadvideo_cache_size_1.offthreadVideoCacheSizeInBytes,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const scaleOption: {
3
2
  name: string;
4
3
  cliFlag: "scale";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const videoBitrate: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const videoCodecOption: {
3
2
  name: string;
4
3
  cliFlag: "codec";
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
package/dist/pure.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const NoReactAPIs: {
2
2
  wrapWithErrorHandling: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
3
3
  getExtensionOfFilename: (filename: string | null) => string | null;
4
- getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
5
- validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
4
+ getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">(codec: T, audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null) => import("./file-extensions").FileExtension;
5
+ validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
6
6
  codec: T_1;
7
- audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
7
+ audioCodec: "opus" | "aac" | "mp3" | "pcm-16" | null;
8
8
  extension: string;
9
9
  preferLossless: boolean;
10
10
  }) => void;
@@ -47,7 +47,6 @@ export type InternalRenderMediaOptions = {
47
47
  jpegQuality: number;
48
48
  frameRange: FrameRange | null;
49
49
  everyNthFrame: number;
50
- numberOfGifLoops: number | null;
51
50
  puppeteerInstance: HeadlessBrowser | undefined;
52
51
  overwrite: boolean;
53
52
  onProgress: RenderMediaOnProgress;
@@ -99,7 +98,6 @@ export type RenderMediaOptions = Prettify<{
99
98
  jpegQuality?: number;
100
99
  frameRange?: FrameRange | null;
101
100
  everyNthFrame?: number;
102
- numberOfGifLoops?: number | null;
103
101
  puppeteerInstance?: HeadlessBrowser;
104
102
  overwrite?: boolean;
105
103
  onProgress?: RenderMediaOnProgress;
@@ -127,7 +125,6 @@ export type RenderMediaOptions = Prettify<{
127
125
  enforceAudioTrack?: boolean;
128
126
  ffmpegOverride?: FfmpegOverrideFn;
129
127
  audioBitrate?: string | null;
130
- videoBitrate?: string | null;
131
128
  encodingMaxRate?: string | null;
132
129
  encodingBufferSize?: string | null;
133
130
  disallowParallelEncoding?: boolean;
@@ -135,9 +132,8 @@ export type RenderMediaOptions = Prettify<{
135
132
  serveUrl: string;
136
133
  concurrency?: number | string | null;
137
134
  logLevel?: LogLevel;
138
- offthreadVideoCacheSizeInBytes?: number | null;
139
135
  colorSpace?: ColorSpace;
140
- }>;
136
+ }> & Partial<MoreRenderMediaOptions>;
141
137
  type RenderMediaResult = {
142
138
  buffer: Buffer | null;
143
139
  slowestFrames: SlowFrame[];
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion/no-react';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
2
  import type { RenderAssetInfo } from './assets/download-map';
4
3
  import type { AudioCodec } from './audio-codec';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { TRenderAsset } from 'remotion/no-react';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
@@ -1,5 +1,5 @@
1
1
  import type { AudioCodec } from './audio-codec';
2
- export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
2
+ export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "prores" | "aac" | "mp3" | "wav" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
3
3
  codec: T;
4
4
  audioCodec: AudioCodec | null;
5
5
  extension: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.84",
3
+ "version": "4.0.86",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.84"
21
+ "remotion": "4.0.86"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -40,13 +40,13 @@
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-arm64": "4.0.84",
44
- "@remotion/compositor-linux-arm64-gnu": "4.0.84",
45
- "@remotion/compositor-darwin-x64": "4.0.84",
46
- "@remotion/compositor-linux-x64-gnu": "4.0.84",
47
- "@remotion/compositor-linux-arm64-musl": "4.0.84",
48
- "@remotion/compositor-linux-x64-musl": "4.0.84",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.84"
43
+ "@remotion/compositor-darwin-x64": "4.0.86",
44
+ "@remotion/compositor-darwin-arm64": "4.0.86",
45
+ "@remotion/compositor-linux-arm64-musl": "4.0.86",
46
+ "@remotion/compositor-linux-x64-gnu": "4.0.86",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.86",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.86",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.86"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",