@remotion/renderer 4.0.113 → 4.0.115

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 (79) 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 +779 -14
  4. package/dist/client.js +3 -1
  5. package/dist/combine-videos.js +1 -1
  6. package/dist/ffmpeg-args.d.ts +1 -1
  7. package/dist/get-extension-of-filename.js +2 -5
  8. package/dist/index.d.ts +50 -3
  9. package/dist/jpeg-quality.d.ts +1 -1
  10. package/dist/options/audio-bitrate.d.ts +10 -0
  11. package/dist/options/audio-bitrate.js +25 -2
  12. package/dist/options/beep-on-finish.d.ts +7 -0
  13. package/dist/options/beep-on-finish.js +24 -1
  14. package/dist/options/color-space.d.ts +7 -0
  15. package/dist/options/color-space.js +23 -0
  16. package/dist/options/crf.d.ts +9 -0
  17. package/dist/options/crf.js +33 -2
  18. package/dist/options/delete-after.d.ts +12 -1
  19. package/dist/options/delete-after.js +25 -2
  20. package/dist/options/enable-lambda-insights.d.ts +7 -0
  21. package/dist/options/enable-lambda-insights.js +24 -1
  22. package/dist/options/enable-multiprocess-on-linux.d.ts +7 -0
  23. package/dist/options/enable-multiprocess-on-linux.js +24 -1
  24. package/dist/options/encoding-buffer-size.d.ts +10 -0
  25. package/dist/options/encoding-buffer-size.js +28 -1
  26. package/dist/options/encoding-max-rate.d.ts +10 -0
  27. package/dist/options/encoding-max-rate.js +24 -1
  28. package/dist/options/enforce-audio.d.ts +7 -0
  29. package/dist/options/enforce-audio.js +25 -1
  30. package/dist/options/folder-expiry.d.ts +7 -0
  31. package/dist/options/folder-expiry.js +24 -1
  32. package/dist/options/gl.d.ts +16 -4
  33. package/dist/options/gl.js +35 -3
  34. package/dist/options/headless.d.ts +15 -0
  35. package/dist/options/headless.js +36 -0
  36. package/dist/options/index.d.ts +202 -10
  37. package/dist/options/index.js +5 -3
  38. package/dist/options/jpeg-quality.d.ts +9 -0
  39. package/dist/options/jpeg-quality.js +37 -2
  40. package/dist/options/log-level.d.ts +16 -0
  41. package/dist/options/log-level.js +32 -0
  42. package/dist/options/mute.d.ts +9 -2
  43. package/dist/options/mute.js +27 -3
  44. package/dist/options/number-of-gif-loops.d.ts +11 -0
  45. package/dist/options/number-of-gif-loops.js +31 -1
  46. package/dist/options/offthreadvideo-cache-size.d.ts +12 -1
  47. package/dist/options/offthreadvideo-cache-size.js +30 -3
  48. package/dist/options/option.d.ts +11 -3
  49. package/dist/options/options-map.d.ts +577 -3
  50. package/dist/options/options-map.js +46 -12
  51. package/dist/options/overwrite.d.ts +15 -0
  52. package/dist/options/overwrite.js +42 -0
  53. package/dist/options/repro.d.ts +11 -1
  54. package/dist/options/repro.js +25 -1
  55. package/dist/options/scale.d.ts +7 -0
  56. package/dist/options/scale.js +30 -1
  57. package/dist/options/timeout.d.ts +15 -0
  58. package/dist/options/timeout.js +44 -0
  59. package/dist/options/video-bitrate.d.ts +9 -2
  60. package/dist/options/video-bitrate.js +27 -4
  61. package/dist/options/video-codec.d.ts +16 -1
  62. package/dist/options/video-codec.js +81 -2
  63. package/dist/options/webhook-custom-data.d.ts +3 -1
  64. package/dist/options/webhook-custom-data.js +8 -1
  65. package/dist/options/x264-preset.d.ts +20 -3
  66. package/dist/options/x264-preset.js +47 -7
  67. package/dist/path-normalize.d.ts +1 -0
  68. package/dist/path-normalize.js +133 -0
  69. package/dist/prespawn-ffmpeg.d.ts +1 -1
  70. package/dist/render-frames.d.ts +1 -3
  71. package/dist/render-media.d.ts +0 -12
  72. package/dist/render-media.js +2 -2
  73. package/dist/render-still.d.ts +1 -3
  74. package/dist/select-composition.d.ts +2 -3
  75. package/dist/stitch-frames-to-video.d.ts +1 -1
  76. package/dist/stitch-frames-to-video.js +1 -1
  77. package/package.json +9 -9
  78. package/dist/does-have-m2-bug.d.ts +0 -3
  79. package/dist/does-have-m2-bug.js +0 -12
package/dist/client.js CHANGED
@@ -15,10 +15,11 @@ const options_1 = require("./options");
15
15
  const color_space_1 = require("./options/color-space");
16
16
  const gl_1 = require("./options/gl");
17
17
  const options_map_1 = require("./options/options-map");
18
+ const video_codec_1 = require("./options/video-codec");
19
+ const x264_preset_1 = require("./options/x264-preset");
18
20
  const pixel_format_1 = require("./pixel-format");
19
21
  const prores_profile_1 = require("./prores-profile");
20
22
  const validate_output_filename_1 = require("./validate-output-filename");
21
- const x264_preset_1 = require("./x264-preset");
22
23
  exports.BrowserSafeApis = {
23
24
  getFileExtensionFromCodec: get_extension_from_codec_1.getFileExtensionFromCodec,
24
25
  validCodecs: codec_1.validCodecs,
@@ -46,4 +47,5 @@ exports.BrowserSafeApis = {
46
47
  codecSupportsCrf: codec_supports_media_1.codecSupportsCrf,
47
48
  codecSupportsVideoBitrate: codec_supports_media_1.codecSupportsVideoBitrate,
48
49
  logLevels: log_level_1.logLevels,
50
+ getOutputCodecOrUndefined: video_codec_1.getOutputCodecOrUndefined,
49
51
  };
@@ -41,7 +41,7 @@ const combineVideos = async (options) => {
41
41
  resolvedAudioCodec === 'aac' ? '-cutoff' : null,
42
42
  resolvedAudioCodec === 'aac' ? '18000' : null,
43
43
  '-b:a',
44
- audioBitrate ? audioBitrate : '320k',
44
+ audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : '320k',
45
45
  codec === 'h264' ? '-movflags' : null,
46
46
  codec === 'h264' ? 'faststart' : null,
47
47
  `-metadata`,
@@ -1,7 +1,7 @@
1
1
  import type { Codec } from './codec';
2
2
  import type { ColorSpace } from './options/color-space';
3
+ import type { X264Preset } from './options/x264-preset';
3
4
  import type { PixelFormat } from './pixel-format';
4
- import type { X264Preset } from './x264-preset';
5
5
  export declare const generateFfmpegArgs: ({ hasPreencoded, proResProfileName, pixelFormat, x264Preset, codec, crf, videoBitrate, encodingMaxRate, encodingBufferSize, colorSpace, }: {
6
6
  hasPreencoded: boolean;
7
7
  proResProfileName: string | null;
@@ -1,15 +1,12 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getExtensionOfFilename = void 0;
7
- const node_path_1 = __importDefault(require("node:path"));
4
+ const path_normalize_1 = require("./path-normalize");
8
5
  const getExtensionOfFilename = (filename) => {
9
6
  if (filename === null) {
10
7
  return null;
11
8
  }
12
- const filenameArr = node_path_1.default.normalize(filename).split('.');
9
+ const filenameArr = (0, path_normalize_1.pathNormalize)(filename).split('.');
13
10
  const hasExtension = filenameArr.length >= 2;
14
11
  const filenameArrLength = filenameArr.length;
15
12
  const extension = hasExtension ? filenameArr[filenameArrLength - 1] : null;
package/dist/index.d.ts CHANGED
@@ -26,8 +26,11 @@ export { CancelSignal, makeCancelSignal } from './make-cancel-signal';
26
26
  export { openBrowser } from './open-browser';
27
27
  export type { ChromiumOptions } from './open-browser';
28
28
  export { ColorSpace } from './options/color-space';
29
+ export { DeleteAfter } from './options/delete-after';
29
30
  export { OpenGlRenderer } from './options/gl';
31
+ export { NumberOfGifLoops } from './options/number-of-gif-loops';
30
32
  export { AnyRemotionOption, RemotionOption, ToOptions } from './options/option';
33
+ export { X264Preset } from './options/x264-preset';
31
34
  export { PixelFormat } from './pixel-format';
32
35
  export { RemotionServer } from './prepare-server';
33
36
  export { ProResProfile } from './prores-profile';
@@ -39,7 +42,6 @@ export { stitchFramesToVideo, StitchFramesToVideoOptions, } from './stitch-frame
39
42
  export { SymbolicatedStackFrame } from './symbolicate-stacktrace';
40
43
  export { OnStartData, RenderFramesOutput } from './types';
41
44
  export { validateOutputFilename } from './validate-output-filename';
42
- export { X264Preset } from './x264-preset';
43
45
  export declare const RenderInternals: {
44
46
  ensureLocalBrowser: ({ indent, logLevel, preferredBrowserExecutable, }: {
45
47
  preferredBrowserExecutable: import("./browser-executable").BrowserExecutable;
@@ -136,10 +138,10 @@ export declare const RenderInternals: {
136
138
  DEFAULT_BROWSER: "chrome";
137
139
  validateFrameRange: (frameRange: import("./frame-range").FrameRange | null) => void;
138
140
  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;
141
+ validateOpenGlRenderer: (option: unknown) => "swangle" | "angle" | "egl" | "swiftshader" | "vulkan" | "angle-egl" | null;
140
142
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
141
143
  DEFAULT_PIXEL_FORMAT: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
142
- validateJpegQuality: (q: number | undefined) => void;
144
+ validateJpegQuality: (q: unknown) => void;
143
145
  DEFAULT_TIMEOUT: number;
144
146
  DEFAULT_CODEC: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
145
147
  isAudioCodec: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif" | null | undefined) => boolean;
@@ -447,6 +449,31 @@ export declare const RenderInternals: {
447
449
  ssrName: "offthreadVideoCacheSizeInBytes";
448
450
  docLink: string;
449
451
  type: number | null;
452
+ getValue: ({ commandLine }: {
453
+ commandLine: Record<string, unknown>;
454
+ }) => {
455
+ source: string;
456
+ value: number;
457
+ } | {
458
+ source: string;
459
+ value: null;
460
+ };
461
+ setConfig: (size: number | null) => void;
462
+ };
463
+ readonly jpegQuality: {
464
+ name: string;
465
+ cliFlag: "jpeg-quality";
466
+ description: () => import("react/jsx-runtime").JSX.Element;
467
+ ssrName: string;
468
+ docLink: string;
469
+ type: number;
470
+ setConfig: (q: number | undefined) => void;
471
+ getValue: ({ commandLine }: {
472
+ commandLine: Record<string, unknown>;
473
+ }) => {
474
+ source: string;
475
+ value: number;
476
+ };
450
477
  };
451
478
  }>) => Promise<{
452
479
  buffer: Buffer | null;
@@ -482,6 +509,16 @@ export declare const RenderInternals: {
482
509
  ssrName: "offthreadVideoCacheSizeInBytes";
483
510
  docLink: string;
484
511
  type: number | null;
512
+ getValue: ({ commandLine }: {
513
+ commandLine: Record<string, unknown>;
514
+ }) => {
515
+ source: string;
516
+ value: number;
517
+ } | {
518
+ source: string;
519
+ value: null;
520
+ };
521
+ setConfig: (size: number | null) => void;
485
522
  };
486
523
  }>) => Promise<{
487
524
  metadata: import("remotion").VideoConfig;
@@ -508,6 +545,16 @@ export declare const RenderInternals: {
508
545
  ssrName: "offthreadVideoCacheSizeInBytes";
509
546
  docLink: string;
510
547
  type: number | null;
548
+ getValue: ({ commandLine }: {
549
+ commandLine: Record<string, unknown>;
550
+ }) => {
551
+ source: string;
552
+ value: number;
553
+ } | {
554
+ source: string;
555
+ value: null;
556
+ };
557
+ setConfig: (size: number | null) => void;
511
558
  };
512
559
  }>) => Promise<import("remotion").VideoConfig[]>;
513
560
  internalRenderFrames: (args_0: import("./render-frames").InternalRenderFramesOptions) => Promise<import("./types").RenderFramesOutput>;
@@ -1,2 +1,2 @@
1
1
  export declare const DEFAULT_JPEG_QUALITY = 80;
2
- export declare const validateJpegQuality: (q: number | undefined) => void;
2
+ export declare const validateJpegQuality: (q: unknown) => void;
@@ -5,4 +5,14 @@ export declare const audioBitrateOption: {
5
5
  ssrName: string;
6
6
  docLink: string;
7
7
  type: string;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ value: string;
12
+ source: string;
13
+ } | {
14
+ value: null;
15
+ source: string;
16
+ };
17
+ setConfig: (value: string | null) => void;
8
18
  };
@@ -2,11 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.audioBitrateOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const cliFlag = 'audio-bitrate';
6
+ let audioBitrate = null;
5
7
  exports.audioBitrateOption = {
6
8
  name: 'Audio Bitrate',
7
- cliFlag: 'audio-bitrate',
8
- description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Specify the target bitrate for the generated video. The syntax for FFMPEGs", (0, jsx_runtime_1.jsx)("code", { children: "-b:a" }), " parameter should be used. FFMPEG may encode the video in a way that will not result in the exact audio bitrate specified. Example values: ", (0, jsx_runtime_1.jsx)("code", { children: "512K" }), " for 512 kbps, ", (0, jsx_runtime_1.jsx)("code", { children: "1M" }), " for 1 Mbps. Default: ", (0, jsx_runtime_1.jsx)("code", { children: "320k" })] })),
9
+ cliFlag,
10
+ description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Specify the target bitrate for the generated video. The syntax for FFmpeg", "'", "s ", (0, jsx_runtime_1.jsx)("code", { children: "-b:a" }), " parameter should be used. FFmpeg may encode the video in a way that will not result in the exact audio bitrate specified. Example values: ", (0, jsx_runtime_1.jsx)("code", { children: "512K" }), " for 512 kbps, ", (0, jsx_runtime_1.jsx)("code", { children: "1M" }), " for 1 Mbps. Default: ", (0, jsx_runtime_1.jsx)("code", { children: "320k" })] })),
9
11
  ssrName: 'audioBitrate',
10
12
  docLink: 'https://www.remotion.dev/docs/renderer/render-media#audiobitrate-',
11
13
  type: '0',
14
+ getValue: ({ commandLine }) => {
15
+ if (commandLine[cliFlag]) {
16
+ return {
17
+ value: commandLine[cliFlag],
18
+ source: 'cli',
19
+ };
20
+ }
21
+ if (audioBitrate) {
22
+ return {
23
+ value: audioBitrate,
24
+ source: 'config file',
25
+ };
26
+ }
27
+ return {
28
+ value: null,
29
+ source: 'default',
30
+ };
31
+ },
32
+ setConfig: (value) => {
33
+ audioBitrate = value;
34
+ },
12
35
  };
@@ -5,4 +5,11 @@ export declare const beepOnFinishOption: {
5
5
  ssrName: null;
6
6
  docLink: string;
7
7
  type: boolean;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ value: boolean;
12
+ source: string;
13
+ };
14
+ setConfig(value: boolean): void;
8
15
  };
@@ -2,11 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.beepOnFinishOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ let beepOnFinish = false;
6
+ const cliFlag = 'beep-on-finish';
5
7
  exports.beepOnFinishOption = {
6
8
  name: 'Beep on finish',
7
- cliFlag: 'beep-on-finish',
9
+ cliFlag,
8
10
  description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Whether the Remotion Studio tab should beep when the render is finished." })),
9
11
  ssrName: null,
10
12
  docLink: 'https://www.remotion.dev/docs/config#setbeeponfinish',
11
13
  type: false,
14
+ getValue: ({ commandLine }) => {
15
+ if (commandLine[cliFlag] !== undefined) {
16
+ return {
17
+ value: commandLine[cliFlag],
18
+ source: 'cli',
19
+ };
20
+ }
21
+ if (beepOnFinish !== false) {
22
+ return {
23
+ value: beepOnFinish,
24
+ source: 'config',
25
+ };
26
+ }
27
+ return {
28
+ value: false,
29
+ source: 'default',
30
+ };
31
+ },
32
+ setConfig(value) {
33
+ beepOnFinish = value;
34
+ },
12
35
  };
@@ -7,5 +7,12 @@ export declare const colorSpaceOption: {
7
7
  docLink: string;
8
8
  ssrName: string;
9
9
  type: "default" | "bt709" | "bt2020-ncl";
10
+ getValue: ({ commandLine }: {
11
+ commandLine: Record<string, unknown>;
12
+ }) => {
13
+ source: string;
14
+ value: "default" | "bt709" | "bt2020-ncl";
15
+ };
16
+ setConfig: (value: "default" | "bt709" | "bt2020-ncl") => void;
10
17
  };
11
18
  export declare const validateColorSpace: (option: unknown) => void;
@@ -3,6 +3,8 @@ 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
5
  exports.validColorSpaces = ['default', 'bt709', 'bt2020-ncl'];
6
+ let colorSpace = 'default';
7
+ const cliFlag = 'color-space';
6
8
  exports.colorSpaceOption = {
7
9
  name: 'Color space',
8
10
  cliFlag: 'color-space',
@@ -10,6 +12,27 @@ exports.colorSpaceOption = {
10
12
  docLink: 'https://www.remotion.dev/docs/renderer/render-media#colorspace',
11
13
  ssrName: 'colorSpace',
12
14
  type: 'default',
15
+ getValue: ({ commandLine }) => {
16
+ if (commandLine[cliFlag] !== undefined) {
17
+ return {
18
+ source: 'cli',
19
+ value: commandLine[cliFlag],
20
+ };
21
+ }
22
+ if (colorSpace !== 'default') {
23
+ return {
24
+ source: 'config',
25
+ value: colorSpace,
26
+ };
27
+ }
28
+ return {
29
+ source: 'default',
30
+ value: 'default',
31
+ };
32
+ },
33
+ setConfig: (value) => {
34
+ colorSpace = value;
35
+ },
13
36
  };
14
37
  const validateColorSpace = (option) => {
15
38
  if (exports.validColorSpaces.includes(option)) {
@@ -1,3 +1,5 @@
1
+ import type { Crf } from '../crf';
2
+ export declare const validateCrf: (newCrf: Crf) => void;
1
3
  export declare const crfOption: {
2
4
  name: string;
3
5
  cliFlag: "crf";
@@ -5,4 +7,11 @@ export declare const crfOption: {
5
7
  ssrName: string;
6
8
  docLink: string;
7
9
  type: number;
10
+ getValue: ({ commandLine }: {
11
+ commandLine: Record<string, unknown>;
12
+ }) => {
13
+ source: string;
14
+ value: Crf;
15
+ };
16
+ setConfig: (crf: Crf) => void;
8
17
  };
@@ -1,12 +1,43 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.crfOption = void 0;
3
+ exports.crfOption = exports.validateCrf = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ let currentCrf;
6
+ const validateCrf = (newCrf) => {
7
+ if (typeof newCrf !== 'number' && newCrf !== undefined) {
8
+ throw new TypeError('The CRF must be a number or undefined.');
9
+ }
10
+ };
11
+ exports.validateCrf = validateCrf;
12
+ const cliFlag = 'crf';
5
13
  exports.crfOption = {
6
14
  name: 'CRF',
7
- cliFlag: 'crf',
15
+ cliFlag,
8
16
  description: () => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "No matter which codec you end up using, there's always a tradeoff between file size and video quality. You can control it by setting the CRF (Constant Rate Factor). The lower the number, the better the quality, the higher the number, the smaller the file is \u2013 of course at the cost of quality." })),
9
17
  ssrName: 'crf',
10
18
  docLink: 'https://www.remotion.dev/docs/encoding/#controlling-quality-using-the-crf-setting',
11
19
  type: 0,
20
+ getValue: ({ commandLine }) => {
21
+ if (commandLine[cliFlag] !== undefined) {
22
+ (0, exports.validateCrf)(commandLine[cliFlag]);
23
+ return {
24
+ source: 'cli',
25
+ value: commandLine[cliFlag],
26
+ };
27
+ }
28
+ if (currentCrf !== null) {
29
+ return {
30
+ source: 'config',
31
+ value: currentCrf,
32
+ };
33
+ }
34
+ return {
35
+ source: 'default',
36
+ value: undefined,
37
+ };
38
+ },
39
+ setConfig: (crf) => {
40
+ (0, exports.validateCrf)(crf);
41
+ currentCrf = crf;
42
+ },
12
43
  };
@@ -1,8 +1,19 @@
1
+ export type DeleteAfter = '1-day' | '3-days' | '7-days' | '30-days';
1
2
  export declare const deleteAfterOption: {
2
3
  name: string;
3
4
  cliFlag: "delete-after";
4
5
  description: () => import("react/jsx-runtime").JSX.Element;
5
6
  ssrName: "deleteAfter";
6
7
  docLink: string;
7
- type: string | null;
8
+ type: DeleteAfter | null;
9
+ getValue: ({ commandLine }: {
10
+ commandLine: Record<string, unknown>;
11
+ }) => {
12
+ source: string;
13
+ value: DeleteAfter;
14
+ } | {
15
+ source: string;
16
+ value: null;
17
+ };
18
+ setConfig: (value: DeleteAfter | null) => void;
8
19
  };
@@ -2,13 +2,36 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteAfterOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const cliFlag = 'delete-after';
6
+ let deleteAfter = null;
5
7
  exports.deleteAfterOption = {
6
8
  name: 'Lambda render expiration',
7
- cliFlag: 'delete-after',
9
+ cliFlag,
8
10
  description: () => {
9
11
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Automatically delete the render after a certain period. Accepted values are ", (0, jsx_runtime_1.jsx)("code", { children: "1-day" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "3-days" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "7-days" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "30-days" }), ".", (0, jsx_runtime_1.jsx)("br", {}), " For this to work, your bucket needs to have", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/lambda/autodelete", children: "lifecycles enabled" }), "."] }));
10
12
  },
11
13
  ssrName: 'deleteAfter',
12
14
  docLink: 'https://www.remotion.dev/docs/lambda/autodelete',
13
- type: '',
15
+ type: '1-day',
16
+ getValue: ({ commandLine }) => {
17
+ if (commandLine[cliFlag] !== undefined) {
18
+ return {
19
+ source: 'cli',
20
+ value: commandLine[cliFlag],
21
+ };
22
+ }
23
+ if (deleteAfter !== null) {
24
+ return {
25
+ source: 'config',
26
+ value: deleteAfter,
27
+ };
28
+ }
29
+ return {
30
+ source: 'default',
31
+ value: null,
32
+ };
33
+ },
34
+ setConfig: (value) => {
35
+ deleteAfter = value;
36
+ },
14
37
  };
@@ -5,4 +5,11 @@ export declare const enableLambdaInsights: {
5
5
  ssrName: string;
6
6
  docLink: string;
7
7
  type: boolean;
8
+ setConfig: (value: boolean) => void;
9
+ getValue: ({ commandLine }: {
10
+ commandLine: Record<string, unknown>;
11
+ }) => {
12
+ value: boolean;
13
+ source: string;
14
+ };
8
15
  };
@@ -2,11 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.enableLambdaInsights = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const cliFlag = 'enable-lambda-insights';
6
+ let option = false;
5
7
  exports.enableLambdaInsights = {
6
8
  name: 'Enable Lambda Insights',
7
- cliFlag: 'enable-lambda-insights',
9
+ cliFlag,
8
10
  description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Enable", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs/lambda/insights", children: "Lambda Insights in AWS CloudWatch" }), ". For this to work, you may have to update your role permission."] })),
9
11
  ssrName: 'enableLambdaInsights',
10
12
  docLink: 'https://www.remotion.dev/docs/lambda/insights',
11
13
  type: false,
14
+ setConfig: (value) => {
15
+ option = value;
16
+ },
17
+ getValue: ({ commandLine }) => {
18
+ if (commandLine[cliFlag] !== undefined) {
19
+ return {
20
+ value: commandLine[cliFlag],
21
+ source: 'cli',
22
+ };
23
+ }
24
+ if (option) {
25
+ return {
26
+ value: option,
27
+ source: 'config',
28
+ };
29
+ }
30
+ return {
31
+ value: false,
32
+ source: 'default',
33
+ };
34
+ },
12
35
  };
@@ -5,4 +5,11 @@ export declare const enableMultiprocessOnLinuxOption: {
5
5
  ssrName: string;
6
6
  docLink: string;
7
7
  type: boolean;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ source: string;
12
+ value: boolean;
13
+ };
14
+ setConfig: (value: boolean) => void;
8
15
  };
@@ -2,11 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.enableMultiprocessOnLinuxOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ let multiProcessOnLinux = false;
6
+ const cliFlag = 'enable-multiprocess-on-linux';
5
7
  exports.enableMultiprocessOnLinuxOption = {
6
8
  name: 'Enable Multiprocess on Linux',
7
- cliFlag: 'enable-multiprocess-on-linux',
9
+ cliFlag,
8
10
  description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Removes the ", (0, jsx_runtime_1.jsx)("code", { children: '--single-process' }), " flag that gets passed to Chromium on Linux by default. This will make the render faster because multiple processes can be used, but may cause issues with some Linux distributions or if window server libraries are missing."] })),
9
11
  ssrName: 'chromiumOptions.enableMultiprocessOnLinux',
10
12
  docLink: 'https://www.remotion.dev/docs/chromium-flags',
11
13
  type: false,
14
+ getValue: ({ commandLine }) => {
15
+ if (commandLine[cliFlag] !== undefined) {
16
+ return {
17
+ source: 'cli',
18
+ value: commandLine[cliFlag],
19
+ };
20
+ }
21
+ if (multiProcessOnLinux !== false) {
22
+ return {
23
+ source: 'config',
24
+ value: multiProcessOnLinux,
25
+ };
26
+ }
27
+ return {
28
+ source: 'default',
29
+ value: false,
30
+ };
31
+ },
32
+ setConfig: (value) => {
33
+ multiProcessOnLinux = value;
34
+ },
12
35
  };
@@ -5,4 +5,14 @@ export declare const encodingBufferSizeOption: {
5
5
  ssrName: "encodingBufferSize";
6
6
  docLink: string;
7
7
  type: string | null;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ value: string;
12
+ source: string;
13
+ } | {
14
+ value: null;
15
+ source: string;
16
+ };
17
+ setConfig: (bitrate: string | null) => void;
8
18
  };
@@ -2,11 +2,38 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.encodingBufferSizeOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ * encodingBufferSize is not a bitrate, but it is a bitrate-related option and get validated like a bitrate.
7
+ */
8
+ let encodingBufferSize = null;
9
+ const setEncodingBufferSize = (bitrate) => {
10
+ encodingBufferSize = bitrate;
11
+ };
12
+ const cliFlag = 'buffer-size';
5
13
  exports.encodingBufferSizeOption = {
6
14
  name: 'FFmpeg -bufsize flag',
7
- cliFlag: 'buffer-size',
15
+ cliFlag,
8
16
  description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["The value for the ", (0, jsx_runtime_1.jsx)("code", { children: "-bufsize" }), " flag of FFmpeg. Should be used in conjunction with the encoding max rate flag."] })),
9
17
  ssrName: 'encodingBufferSize',
10
18
  docLink: 'https://www.remotion.dev/docs/renderer/render-media#encodingbuffersize',
11
19
  type: '',
20
+ getValue: ({ commandLine }) => {
21
+ if (commandLine[cliFlag] !== undefined) {
22
+ return {
23
+ value: commandLine[cliFlag],
24
+ source: 'cli',
25
+ };
26
+ }
27
+ if (encodingBufferSize !== null) {
28
+ return {
29
+ value: encodingBufferSize,
30
+ source: 'config',
31
+ };
32
+ }
33
+ return {
34
+ value: null,
35
+ source: 'default',
36
+ };
37
+ },
38
+ setConfig: setEncodingBufferSize,
12
39
  };
@@ -5,4 +5,14 @@ export declare const encodingMaxRateOption: {
5
5
  ssrName: "encodingMaxRate";
6
6
  docLink: string;
7
7
  type: string | null;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ value: string;
12
+ source: string;
13
+ } | {
14
+ value: null;
15
+ source: string;
16
+ };
17
+ setConfig: (newMaxRate: string | null) => void;
8
18
  };
@@ -2,11 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.encodingMaxRateOption = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ let encodingMaxRate = null;
6
+ const cliFlag = 'max-rate';
5
7
  exports.encodingMaxRateOption = {
6
8
  name: 'FFmpeg -maxrate flag',
7
- cliFlag: 'max-rate',
9
+ cliFlag,
8
10
  description: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["The value for the ", (0, jsx_runtime_1.jsx)("code", { children: "-maxrate" }), " flag of FFmpeg. Should be used in conjunction with the encoding buffer size flag."] })),
9
11
  ssrName: 'encodingMaxRate',
10
12
  docLink: 'https://www.remotion.dev/docs/renderer/render-media#encodingmaxrate',
11
13
  type: '',
14
+ getValue: ({ commandLine }) => {
15
+ if (commandLine[cliFlag] !== undefined) {
16
+ return {
17
+ value: commandLine[cliFlag],
18
+ source: 'cli',
19
+ };
20
+ }
21
+ if (encodingMaxRate !== null) {
22
+ return {
23
+ value: encodingMaxRate,
24
+ source: 'config',
25
+ };
26
+ }
27
+ return {
28
+ value: null,
29
+ source: 'default',
30
+ };
31
+ },
32
+ setConfig: (newMaxRate) => {
33
+ encodingMaxRate = newMaxRate;
34
+ },
12
35
  };
@@ -5,4 +5,11 @@ export declare const enforceAudioOption: {
5
5
  ssrName: string;
6
6
  docLink: string;
7
7
  type: boolean;
8
+ getValue: ({ commandLine }: {
9
+ commandLine: Record<string, unknown>;
10
+ }) => {
11
+ source: string;
12
+ value: boolean;
13
+ };
14
+ setConfig: (value: boolean) => void;
8
15
  };