@remotion/renderer 4.0.83 → 4.0.85

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.
@@ -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
@@ -10,8 +10,12 @@ export declare const BrowserSafeApis: {
10
10
  proResProfileOptions: readonly ["4444-xq", "4444", "hq", "standard", "light", "proxy"];
11
11
  x264PresetOptions: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"];
12
12
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
13
+ validOpenGlRenderers: readonly ["swangle", "angle", "egl", "swiftshader", "vulkan", "angle-egl"];
13
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")[];
15
+ validVideoImageFormats: readonly ["png", "jpeg", "none"];
16
+ validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
14
17
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
18
+ DEFAULT_TIMEOUT: number;
15
19
  supportedAudioCodecs: {
16
20
  readonly h264: readonly ["aac", "pcm-16", "mp3"];
17
21
  readonly 'h264-mkv': readonly ["pcm-16", "mp3"];
@@ -283,7 +287,7 @@ export declare const BrowserSafeApis: {
283
287
  description: () => JSX.Element;
284
288
  docLink: string;
285
289
  ssrName: string;
286
- type: "default" | "bt709";
290
+ type: "default" | "bt709" | "bt2020-ncl";
287
291
  };
288
292
  deleteAfterOption: {
289
293
  name: string;
@@ -313,7 +317,7 @@ export declare const BrowserSafeApis: {
313
317
  cliFlag: "gl";
314
318
  docLink: string;
315
319
  name: string;
316
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
320
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
317
321
  ssrName: string;
318
322
  description: () => JSX.Element;
319
323
  };
@@ -341,8 +345,24 @@ export declare const BrowserSafeApis: {
341
345
  docLink: string;
342
346
  type: string | null;
343
347
  };
348
+ beepOnFinishOption: {
349
+ name: string;
350
+ cliFlag: "beep-on-finish";
351
+ description: () => JSX.Element;
352
+ ssrName: null;
353
+ docLink: string;
354
+ type: boolean;
355
+ };
356
+ numberOfGifLoopsOption: {
357
+ name: string;
358
+ cliFlag: "number-of-gif-loops";
359
+ description: () => JSX.Element;
360
+ ssrName: "numberOfGifLoops";
361
+ docLink: string;
362
+ type: number | null;
363
+ };
344
364
  };
345
- validColorSpaces: readonly ["default", "bt709"];
365
+ validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
346
366
  optionsMap: {
347
367
  readonly renderMedia: {
348
368
  readonly offthreadVideoCacheSizeInBytes: {
@@ -361,6 +381,14 @@ export declare const BrowserSafeApis: {
361
381
  docLink: string;
362
382
  type: string | null;
363
383
  };
384
+ readonly numberOfGifLoops: {
385
+ name: string;
386
+ cliFlag: "number-of-gif-loops";
387
+ description: () => JSX.Element;
388
+ ssrName: "numberOfGifLoops";
389
+ docLink: string;
390
+ type: number | null;
391
+ };
364
392
  };
365
393
  readonly renderStill: {
366
394
  readonly offthreadVideoCacheSizeInBytes: {
@@ -419,6 +447,14 @@ export declare const BrowserSafeApis: {
419
447
  docLink: string;
420
448
  type: string | null;
421
449
  };
450
+ readonly numberOfGifLoops: {
451
+ name: string;
452
+ cliFlag: "number-of-gif-loops";
453
+ description: () => JSX.Element;
454
+ ssrName: "numberOfGifLoops";
455
+ docLink: string;
456
+ type: number | null;
457
+ };
422
458
  };
423
459
  readonly renderStillOnLambda: {
424
460
  readonly offthreadVideoCacheSizeInBytes: {
@@ -449,6 +485,14 @@ export declare const BrowserSafeApis: {
449
485
  docLink: string;
450
486
  type: number | null;
451
487
  };
488
+ readonly numberOfGifLoops: {
489
+ name: string;
490
+ cliFlag: "number-of-gif-loops";
491
+ description: () => JSX.Element;
492
+ ssrName: "numberOfGifLoops";
493
+ docLink: string;
494
+ type: number | null;
495
+ };
452
496
  };
453
497
  readonly renderStillOnCloudRun: {
454
498
  readonly offthreadVideoCacheSizeInBytes: {
@@ -463,4 +507,5 @@ export declare const BrowserSafeApis: {
463
507
  };
464
508
  codecSupportsCrf: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
465
509
  codecSupportsVideoBitrate: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => boolean;
510
+ logLevels: readonly ["verbose", "info", "warn", "error"];
466
511
  };
package/dist/client.js CHANGED
@@ -2,14 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BrowserSafeApis = void 0;
4
4
  const audio_codec_1 = require("./audio-codec");
5
+ const TimeoutSettings_1 = require("./browser/TimeoutSettings");
5
6
  const codec_1 = require("./codec");
6
7
  const codec_supports_media_1 = require("./codec-supports-media");
7
8
  const crf_1 = require("./crf");
8
9
  const file_extensions_1 = require("./file-extensions");
9
10
  const get_extension_from_codec_1 = require("./get-extension-from-codec");
11
+ const image_format_1 = require("./image-format");
10
12
  const is_audio_codec_1 = require("./is-audio-codec");
13
+ const log_level_1 = require("./log-level");
11
14
  const options_1 = require("./options");
12
15
  const color_space_1 = require("./options/color-space");
16
+ const gl_1 = require("./options/gl");
13
17
  const options_map_1 = require("./options/options-map");
14
18
  const pixel_format_1 = require("./pixel-format");
15
19
  const prores_profile_1 = require("./prores-profile");
@@ -25,8 +29,12 @@ exports.BrowserSafeApis = {
25
29
  proResProfileOptions: prores_profile_1.proResProfileOptions,
26
30
  x264PresetOptions: x264_preset_1.x264PresetOptions,
27
31
  validPixelFormats: pixel_format_1.validPixelFormats,
32
+ validOpenGlRenderers: gl_1.validOpenGlRenderers,
28
33
  validPixelFormatsForCodec: pixel_format_1.validPixelFormatsForCodec,
34
+ validVideoImageFormats: image_format_1.validVideoImageFormats,
35
+ validStillImageFormats: image_format_1.validStillImageFormats,
29
36
  DEFAULT_PIXEL_FORMAT: pixel_format_1.DEFAULT_PIXEL_FORMAT,
37
+ DEFAULT_TIMEOUT: TimeoutSettings_1.DEFAULT_TIMEOUT,
30
38
  supportedAudioCodecs: audio_codec_1.supportedAudioCodecs,
31
39
  defaultFileExtensionMap: file_extensions_1.defaultFileExtensionMap,
32
40
  defaultAudioCodecs: audio_codec_1.defaultAudioCodecs,
@@ -37,4 +45,5 @@ exports.BrowserSafeApis = {
37
45
  optionsMap: options_map_1.optionsMap,
38
46
  codecSupportsCrf: codec_supports_media_1.codecSupportsCrf,
39
47
  codecSupportsVideoBitrate: codec_supports_media_1.codecSupportsVideoBitrate,
48
+ logLevels: log_level_1.logLevels,
40
49
  };
@@ -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,
@@ -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
package/dist/index.d.ts CHANGED
@@ -138,8 +138,8 @@ export declare const RenderInternals: {
138
138
  validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
139
139
  DEFAULT_BROWSER: "chrome";
140
140
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
141
- DEFAULT_OPENGL_RENDERER: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
142
- validateOpenGlRenderer: (option: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
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;
143
143
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
144
144
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
145
145
  validateJpegQuality: (q: number | undefined) => void;
@@ -330,8 +330,8 @@ export declare const RenderInternals: {
330
330
  };
331
331
  validStillImageFormats: readonly ["png", "jpeg", "pdf", "webp"];
332
332
  validVideoImageFormats: readonly ["png", "jpeg", "none"];
333
- DEFAULT_STILL_IMAGE_FORMAT: "png" | "jpeg" | "pdf" | "webp";
334
- DEFAULT_VIDEO_IMAGE_FORMAT: "png" | "jpeg" | "none";
333
+ DEFAULT_STILL_IMAGE_FORMAT: "jpeg" | "png" | "webp" | "pdf";
334
+ DEFAULT_VIDEO_IMAGE_FORMAT: "jpeg" | "png" | "none";
335
335
  DEFAULT_JPEG_QUALITY: number;
336
336
  chalk: {
337
337
  enabled: () => boolean;
@@ -430,7 +430,7 @@ export declare const RenderInternals: {
430
430
  frame: number;
431
431
  serializedInputPropsWithCustomSchema: string;
432
432
  serializedResolvedPropsWithCustomSchema: string;
433
- imageFormat: "png" | "jpeg" | "pdf" | "webp";
433
+ imageFormat: "jpeg" | "png" | "webp" | "pdf";
434
434
  jpegQuality: number;
435
435
  puppeteerInstance: HeadlessBrowser | null;
436
436
  envVariables: Record<string, string>;
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);
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const beepOnFinishOption: {
3
+ name: string;
4
+ cliFlag: "beep-on-finish";
5
+ description: () => JSX.Element;
6
+ ssrName: null;
7
+ docLink: string;
8
+ type: boolean;
9
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.beepOnFinishOption = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ exports.beepOnFinishOption = {
6
+ name: 'Beep on finish',
7
+ cliFlag: 'beep-on-finish',
8
+ description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Whether the Remotion Studio tab should beep when the render is finished." })),
9
+ ssrName: null,
10
+ docLink: 'https://www.remotion.dev/docs/config#setbeeponfinish',
11
+ type: false,
12
+ };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const validColorSpaces: readonly ["default", "bt709"];
2
+ export declare const validColorSpaces: readonly ["default", "bt709", "bt2020-ncl"];
3
3
  export type ColorSpace = (typeof validColorSpaces)[number];
4
4
  export declare const colorSpaceOption: {
5
5
  name: string;
@@ -7,6 +7,6 @@ export declare const colorSpaceOption: {
7
7
  description: () => JSX.Element;
8
8
  docLink: string;
9
9
  ssrName: string;
10
- type: "default" | "bt709";
10
+ type: "default" | "bt709" | "bt2020-ncl";
11
11
  };
12
12
  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',
@@ -4,7 +4,7 @@ export declare const glOption: {
4
4
  cliFlag: "gl";
5
5
  docLink: string;
6
6
  name: string;
7
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
7
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
8
8
  ssrName: string;
9
9
  description: () => JSX.Element;
10
10
  };
@@ -86,7 +86,7 @@ export declare const allOptions: {
86
86
  description: () => JSX.Element;
87
87
  docLink: string;
88
88
  ssrName: string;
89
- type: "default" | "bt709";
89
+ type: "default" | "bt709" | "bt2020-ncl";
90
90
  };
91
91
  deleteAfterOption: {
92
92
  name: string;
@@ -116,7 +116,7 @@ export declare const allOptions: {
116
116
  cliFlag: "gl";
117
117
  docLink: string;
118
118
  name: string;
119
- type: "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
119
+ type: "angle" | "swangle" | "egl" | "swiftshader" | "vulkan" | "angle-egl";
120
120
  ssrName: string;
121
121
  description: () => JSX.Element;
122
122
  };
@@ -144,5 +144,21 @@ export declare const allOptions: {
144
144
  docLink: string;
145
145
  type: string | null;
146
146
  };
147
+ beepOnFinishOption: {
148
+ name: string;
149
+ cliFlag: "beep-on-finish";
150
+ description: () => JSX.Element;
151
+ ssrName: null;
152
+ docLink: string;
153
+ type: boolean;
154
+ };
155
+ numberOfGifLoopsOption: {
156
+ name: string;
157
+ cliFlag: "number-of-gif-loops";
158
+ description: () => JSX.Element;
159
+ ssrName: "numberOfGifLoops";
160
+ docLink: string;
161
+ type: number | null;
162
+ };
147
163
  };
148
164
  export type AvailableOptions = keyof typeof allOptions;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.allOptions = void 0;
4
4
  const audio_bitrate_1 = require("./audio-bitrate");
5
+ const beep_on_finish_1 = require("./beep-on-finish");
5
6
  const color_space_1 = require("./color-space");
6
7
  const crf_1 = require("./crf");
7
8
  const delete_after_1 = require("./delete-after");
@@ -14,6 +15,7 @@ const folder_expiry_1 = require("./folder-expiry");
14
15
  const gl_1 = require("./gl");
15
16
  const jpeg_quality_1 = require("./jpeg-quality");
16
17
  const mute_1 = require("./mute");
18
+ const number_of_gif_loops_1 = require("./number-of-gif-loops");
17
19
  const offthreadvideo_cache_size_1 = require("./offthreadvideo-cache-size");
18
20
  const scale_1 = require("./scale");
19
21
  const video_bitrate_1 = require("./video-bitrate");
@@ -38,4 +40,6 @@ exports.allOptions = {
38
40
  enableLambdaInsights: enable_lambda_insights_1.enableLambdaInsights,
39
41
  encodingMaxRateOption: encoding_max_rate_1.encodingMaxRateOption,
40
42
  encodingBufferSizeOption: encoding_buffer_size_1.encodingBufferSizeOption,
43
+ beepOnFinishOption: beep_on_finish_1.beepOnFinishOption,
44
+ numberOfGifLoopsOption: number_of_gif_loops_1.numberOfGifLoopsOption,
41
45
  };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const numberOfGifLoopsOption: {
3
+ name: string;
4
+ cliFlag: "number-of-gif-loops";
5
+ description: () => JSX.Element;
6
+ ssrName: "numberOfGifLoops";
7
+ docLink: string;
8
+ type: number | null;
9
+ };
@@ -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
+ };
@@ -2,7 +2,7 @@ import type React from 'react';
2
2
  export type RemotionOption<SsrName extends string, Type> = {
3
3
  name: string;
4
4
  cliFlag: string;
5
- ssrName: SsrName;
5
+ ssrName: SsrName | null;
6
6
  description: (mode: 'ssr' | 'cli') => React.ReactNode;
7
7
  docLink: string;
8
8
  type: Type;
@@ -17,6 +17,14 @@ export declare const optionsMap: {
17
17
  docLink: string;
18
18
  type: string | null;
19
19
  };
20
+ readonly numberOfGifLoops: {
21
+ name: string;
22
+ cliFlag: "number-of-gif-loops";
23
+ description: () => JSX.Element;
24
+ ssrName: "numberOfGifLoops";
25
+ docLink: string;
26
+ type: number | null;
27
+ };
20
28
  };
21
29
  readonly renderStill: {
22
30
  readonly offthreadVideoCacheSizeInBytes: {
@@ -75,6 +83,14 @@ export declare const optionsMap: {
75
83
  docLink: string;
76
84
  type: string | null;
77
85
  };
86
+ readonly numberOfGifLoops: {
87
+ name: string;
88
+ cliFlag: "number-of-gif-loops";
89
+ description: () => JSX.Element;
90
+ ssrName: "numberOfGifLoops";
91
+ docLink: string;
92
+ type: number | null;
93
+ };
78
94
  };
79
95
  readonly renderStillOnLambda: {
80
96
  readonly offthreadVideoCacheSizeInBytes: {
@@ -105,6 +121,14 @@ export declare const optionsMap: {
105
121
  docLink: string;
106
122
  type: number | null;
107
123
  };
124
+ readonly numberOfGifLoops: {
125
+ name: string;
126
+ cliFlag: "number-of-gif-loops";
127
+ description: () => JSX.Element;
128
+ ssrName: "numberOfGifLoops";
129
+ docLink: string;
130
+ type: number | null;
131
+ };
108
132
  };
109
133
  readonly renderStillOnCloudRun: {
110
134
  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,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
package/dist/pure.d.ts CHANGED
@@ -1,3 +1,11 @@
1
- export declare const PureJSAPIs: {
1
+ export declare const NoReactAPIs: {
2
2
  wrapWithErrorHandling: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
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, }: {
6
+ codec: T_1;
7
+ audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
8
+ extension: string;
9
+ preferLossless: boolean;
10
+ }) => void;
3
11
  };
package/dist/pure.js CHANGED
@@ -1,7 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PureJSAPIs = void 0;
3
+ exports.NoReactAPIs = void 0;
4
+ const get_extension_from_codec_1 = require("./get-extension-from-codec");
5
+ const get_extension_of_filename_1 = require("./get-extension-of-filename");
6
+ const validate_output_filename_1 = require("./validate-output-filename");
4
7
  const wrap_with_error_handling_1 = require("./wrap-with-error-handling");
5
- exports.PureJSAPIs = {
8
+ exports.NoReactAPIs = {
6
9
  wrapWithErrorHandling: wrap_with_error_handling_1.wrapWithErrorHandling,
10
+ getExtensionOfFilename: get_extension_of_filename_1.getExtensionOfFilename,
11
+ getFileExtensionFromCodec: get_extension_from_codec_1.getFileExtensionFromCodec,
12
+ validateOutputFilename: validate_output_filename_1.validateOutputFilename,
7
13
  };
@@ -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,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ClipRegion } from 'remotion/no-react';
2
3
  import type { Page } from './browser/BrowserPage';
3
4
  import type { StillImageFormat } from './image-format';
@@ -197,7 +197,8 @@ const serveHandler = async (request, response, config) => {
197
197
  }
198
198
  const headers = getHeaders(absolutePath, stats);
199
199
  if (streamOpts !== null) {
200
- headers['Content-Range'] = `bytes ${streamOpts.start}-${streamOpts.end}/${stats.size}`;
200
+ headers['Content-Range'] =
201
+ `bytes ${streamOpts.start}-${streamOpts.end}/${stats.size}`;
201
202
  headers['Content-Length'] = String(streamOpts.end - streamOpts.start + 1);
202
203
  }
203
204
  response.writeHead(response.statusCode || 200, headers);
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
2
3
  import type { RenderAssetInfo } from './assets/download-map';
3
4
  import type { AudioCodec } from './audio-codec';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { TRenderAsset } from 'remotion/no-react';
2
3
  import type { DownloadMap } from './assets/download-map';
3
4
  import type { Page } from './browser/BrowserPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.83",
3
+ "version": "4.0.85",
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.83"
21
+ "remotion": "4.0.85"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -33,20 +33,20 @@
33
33
  "@types/react": "18.0.26",
34
34
  "@types/react-dom": "18.0.11",
35
35
  "eslint": "8.42.0",
36
- "prettier": "3.0.2",
37
- "prettier-plugin-organize-imports": "^3.2.2",
36
+ "prettier": "3.1.1",
37
+ "prettier-plugin-organize-imports": "3.2.4",
38
38
  "react": "18.2.0",
39
39
  "react-dom": "18.2.0",
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-arm64": "4.0.83",
44
- "@remotion/compositor-linux-arm64-gnu": "4.0.83",
45
- "@remotion/compositor-darwin-x64": "4.0.83",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.83",
47
- "@remotion/compositor-linux-x64-musl": "4.0.83",
48
- "@remotion/compositor-win32-x64-msvc": "4.0.83",
49
- "@remotion/compositor-linux-x64-gnu": "4.0.83"
43
+ "@remotion/compositor-darwin-arm64": "4.0.85",
44
+ "@remotion/compositor-linux-arm64-gnu": "4.0.85",
45
+ "@remotion/compositor-darwin-x64": "4.0.85",
46
+ "@remotion/compositor-linux-arm64-musl": "4.0.85",
47
+ "@remotion/compositor-win32-x64-msvc": "4.0.85",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.85",
49
+ "@remotion/compositor-linux-x64-gnu": "4.0.85"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",