@remotion/cli 4.0.423 → 4.0.425

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 (73) hide show
  1. package/dist/add.d.ts +1 -2
  2. package/dist/benchmark.d.ts +1 -2
  3. package/dist/benchmark.js +23 -2
  4. package/dist/browser/ensure.d.ts +1 -2
  5. package/dist/browser/ensure.js +5 -6
  6. package/dist/browser/index.d.ts +1 -2
  7. package/dist/browser-download-bar.d.ts +2 -2
  8. package/dist/bundle.d.ts +1 -2
  9. package/dist/chalk/index.js +1 -1
  10. package/dist/check-for-npm-run-flag-pass.d.ts +1 -2
  11. package/dist/cleanup-before-quit.d.ts +2 -3
  12. package/dist/cloudrun-command.d.ts +1 -2
  13. package/dist/code-frame.d.ts +2 -2
  14. package/dist/compositions.d.ts +1 -2
  15. package/dist/compositions.js +12 -2
  16. package/dist/config/image-format.d.ts +4 -5
  17. package/dist/config/index.d.ts +9 -12
  18. package/dist/config/index.js +15 -38
  19. package/dist/config/pixel-format.d.ts +2 -3
  20. package/dist/config/prores-profile.d.ts +2 -3
  21. package/dist/determine-image-format.d.ts +4 -6
  22. package/dist/determine-image-format.js +10 -17
  23. package/dist/entry-point.d.ts +1 -2
  24. package/dist/extra-packages.js +1 -1
  25. package/dist/ffmpeg.d.ts +6 -7
  26. package/dist/get-cli-options.d.ts +5 -12
  27. package/dist/get-cli-options.js +19 -22
  28. package/dist/get-composition-id.d.ts +3 -3
  29. package/dist/get-composition-with-dimension-override.d.ts +7 -5
  30. package/dist/get-composition-with-dimension-override.js +3 -1
  31. package/dist/get-env.d.ts +1 -2
  32. package/dist/get-filename.d.ts +1 -2
  33. package/dist/get-github-repository.d.ts +2 -3
  34. package/dist/get-input-props.d.ts +1 -2
  35. package/dist/get-render-defaults.js +22 -10
  36. package/dist/gpu.d.ts +1 -2
  37. package/dist/gpu.js +11 -7
  38. package/dist/image-formats.d.ts +3 -5
  39. package/dist/image-formats.js +6 -11
  40. package/dist/index.d.ts +32 -37
  41. package/dist/initialize-cli.d.ts +1 -2
  42. package/dist/lambda-command.d.ts +1 -2
  43. package/dist/log.js +1 -1
  44. package/dist/make-on-download.d.ts +2 -2
  45. package/dist/parse-command-line.d.ts +237 -15
  46. package/dist/parse-command-line.js +1 -49
  47. package/dist/parsed-cli.js +2 -2
  48. package/dist/print-compositions.d.ts +1 -2
  49. package/dist/print-error.d.ts +1 -2
  50. package/dist/print-help.d.ts +1 -2
  51. package/dist/progress-bar.d.ts +4 -4
  52. package/dist/render-flows/add-log-to-aggregate-progress.d.ts +3 -5
  53. package/dist/render-flows/render.d.ts +16 -16
  54. package/dist/render-flows/render.js +5 -1
  55. package/dist/render-flows/still.d.ts +8 -6
  56. package/dist/render-flows/still.js +7 -5
  57. package/dist/render-queue/process-still.js +7 -8
  58. package/dist/render-queue/process-video.d.ts +1 -2
  59. package/dist/render-queue/process-video.js +8 -3
  60. package/dist/render-queue/queue.d.ts +1 -2
  61. package/dist/render.d.ts +1 -2
  62. package/dist/render.js +23 -2
  63. package/dist/setup-cache.d.ts +2 -3
  64. package/dist/should-use-non-overlaying-logger.d.ts +1 -2
  65. package/dist/show-compositions-picker.d.ts +2 -5
  66. package/dist/skills.d.ts +2 -3
  67. package/dist/still.d.ts +1 -2
  68. package/dist/still.js +15 -3
  69. package/dist/studio.d.ts +1 -2
  70. package/dist/upgrade.d.ts +1 -2
  71. package/dist/versions.d.ts +2 -3
  72. package/package.json +19 -18
  73. package/remotion-cli.js +1 -1
package/dist/add.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { type LogLevel } from '@remotion/renderer';
2
1
  export declare const addCommand: ({ remotionRoot, packageManager, packageNames, logLevel, args, }: {
3
2
  remotionRoot: string;
4
3
  packageManager: string | undefined;
5
4
  packageNames: string[];
6
- logLevel: LogLevel;
5
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
7
6
  args: string[];
8
7
  }) => Promise<void>;
@@ -1,2 +1 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const benchmarkCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<void>;
1
+ export declare const benchmarkCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
package/dist/benchmark.js CHANGED
@@ -22,7 +22,7 @@ const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-
22
22
  const show_compositions_picker_1 = require("./show-compositions-picker");
23
23
  const truthy_1 = require("./truthy");
24
24
  const DEFAULT_RUNS = 3;
25
- const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
25
+ const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options;
26
26
  const getValidConcurrency = (cliConcurrency) => {
27
27
  const { concurrencies } = parsed_cli_1.parsedCli;
28
28
  if (!concurrencies) {
@@ -103,11 +103,30 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
103
103
  process.exit(1);
104
104
  }
105
105
  const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
106
- const { inputProps, envVariables, browserExecutable, proResProfile, frameRange: defaultFrameRange, pixelFormat, everyNthFrame, ffmpegOverride, height, width, concurrency: unparsedConcurrency, disableWebSecurity, userAgent, ignoreCertificateErrors, } = (0, get_cli_options_1.getCliOptions)({
106
+ const { inputProps, envVariables, frameRange: defaultFrameRange, ffmpegOverride, height, width, fps, durationInFrames, concurrency: unparsedConcurrency, } = (0, get_cli_options_1.getCliOptions)({
107
107
  isStill: false,
108
108
  logLevel,
109
109
  indent: false,
110
110
  });
111
+ const pixelFormat = pixelFormatOption.getValue({
112
+ commandLine: parsed_cli_1.parsedCli,
113
+ }).value;
114
+ const browserExecutable = browserExecutableOption.getValue({
115
+ commandLine: parsed_cli_1.parsedCli,
116
+ }).value;
117
+ const everyNthFrame = everyNthFrameOption.getValue({
118
+ commandLine: parsed_cli_1.parsedCli,
119
+ }).value;
120
+ const proResProfile = proResProfileOption.getValue({
121
+ commandLine: parsed_cli_1.parsedCli,
122
+ }).value;
123
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
124
+ const disableWebSecurity = disableWebSecurityOption.getValue({
125
+ commandLine: parsed_cli_1.parsedCli,
126
+ }).value;
127
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
128
+ commandLine: parsed_cli_1.parsedCli,
129
+ }).value;
111
130
  log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', fullEntryPoint, 'reason:', reason);
112
131
  const scale = scaleOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
113
132
  const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
@@ -304,6 +323,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
304
323
  ...composition,
305
324
  width: width !== null && width !== void 0 ? width : composition.width,
306
325
  height: height !== null && height !== void 0 ? height : composition.height,
326
+ fps: fps !== null && fps !== void 0 ? fps : composition.fps,
327
+ durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : composition.durationInFrames,
307
328
  },
308
329
  crf: configFileCrf !== null && configFileCrf !== void 0 ? configFileCrf : null,
309
330
  envVariables,
@@ -1,3 +1,2 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
1
  export declare const ENSURE_COMMAND = "ensure";
3
- export declare const ensureCommand: (logLevel: LogLevel) => Promise<void>;
2
+ export declare const ensureCommand: (logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
@@ -2,18 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureCommand = exports.ENSURE_COMMAND = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
+ const client_1 = require("@remotion/renderer/client");
5
6
  const browser_download_bar_1 = require("../browser-download-bar");
6
- const get_cli_options_1 = require("../get-cli-options");
7
7
  const log_1 = require("../log");
8
8
  const parsed_cli_1 = require("../parsed-cli");
9
+ const { browserExecutableOption } = client_1.BrowserSafeApis.options;
9
10
  exports.ENSURE_COMMAND = 'ensure';
10
11
  const ensureCommand = async (logLevel) => {
11
12
  const indent = false;
12
- const { browserExecutable } = (0, get_cli_options_1.getCliOptions)({
13
- isStill: false,
14
- logLevel,
15
- indent,
16
- });
13
+ const browserExecutable = browserExecutableOption.getValue({
14
+ commandLine: parsed_cli_1.parsedCli,
15
+ }).value;
17
16
  const status = await (0, renderer_1.ensureBrowser)({
18
17
  browserExecutable,
19
18
  logLevel,
@@ -1,3 +1,2 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
1
  export declare const BROWSER_COMMAND = "browser";
3
- export declare const browserCommand: (args: string[], logLevel: LogLevel) => Promise<void> | undefined;
2
+ export declare const browserCommand: (args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void> | undefined;
@@ -1,8 +1,8 @@
1
- import type { LogLevel, OnBrowserDownload } from '@remotion/renderer';
1
+ import type { OnBrowserDownload } from '@remotion/renderer';
2
2
  import type { BrowserDownloadState } from '@remotion/studio-shared';
3
3
  export declare const defaultBrowserDownloadProgress: ({ indent, logLevel, quiet, onProgress, }: {
4
4
  indent: boolean;
5
- logLevel: LogLevel;
5
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
6
6
  quiet: boolean;
7
7
  onProgress: (progress: BrowserDownloadState) => void;
8
8
  }) => OnBrowserDownload;
package/dist/bundle.d.ts CHANGED
@@ -1,2 +1 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const bundleCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<void>;
1
+ export declare const bundleCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.chalk = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
- exports.chalk = renderer_1.RenderInternals.chalk;
5
+ ({ chalk: exports.chalk } = renderer_1.RenderInternals);
@@ -1,5 +1,4 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
1
  export declare const checkForNpmRunFlagPass: ({ indent, logLevel, }: {
3
2
  indent: boolean;
4
- logLevel: LogLevel;
3
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
5
4
  }) => void;
@@ -1,10 +1,9 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
1
  export declare const cleanupBeforeQuit: ({ indent, logLevel, }: {
3
2
  indent: boolean;
4
- logLevel: LogLevel;
3
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
5
4
  }) => void;
6
5
  export declare const registerCleanupJob: (label: string, job: () => void) => void;
7
6
  export declare const handleCtrlC: ({ indent, logLevel, }: {
8
7
  indent: boolean;
9
- logLevel: LogLevel;
8
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
10
9
  }) => void;
@@ -1,2 +1 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const cloudrunCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<never>;
1
+ export declare const cloudrunCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<never>;
@@ -1,5 +1,5 @@
1
- import type { ErrorWithStackFrame, LogLevel } from '@remotion/renderer';
1
+ import type { ErrorWithStackFrame } from '@remotion/renderer';
2
2
  export declare const printCodeFrameAndStack: ({ symbolicated, logLevel, }: {
3
3
  symbolicated: ErrorWithStackFrame;
4
- logLevel: LogLevel;
4
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
5
5
  }) => void;
@@ -1,2 +1 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const listCompositionsCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<void>;
1
+ export declare const listCompositionsCommand: (remotionRoot: string, args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
@@ -13,7 +13,7 @@ const log_1 = require("./log");
13
13
  const parsed_cli_1 = require("./parsed-cli");
14
14
  const print_compositions_1 = require("./print-compositions");
15
15
  const setup_cache_1 = require("./setup-cache");
16
- const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
16
+ const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options;
17
17
  const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
18
18
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
19
19
  args,
@@ -28,11 +28,21 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
28
28
  process.exit(1);
29
29
  }
30
30
  log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', file, 'reason:', reason);
31
- const { browserExecutable, envVariables, inputProps, ignoreCertificateErrors, userAgent, disableWebSecurity, } = (0, get_cli_options_1.getCliOptions)({
31
+ const { envVariables, inputProps } = (0, get_cli_options_1.getCliOptions)({
32
32
  isStill: false,
33
33
  logLevel,
34
34
  indent: false,
35
35
  });
36
+ const browserExecutable = browserExecutableOption.getValue({
37
+ commandLine: parsed_cli_1.parsedCli,
38
+ }).value;
39
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
40
+ const disableWebSecurity = disableWebSecurityOption.getValue({
41
+ commandLine: parsed_cli_1.parsedCli,
42
+ }).value;
43
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
44
+ commandLine: parsed_cli_1.parsedCli,
45
+ }).value;
36
46
  const publicPath = publicPathOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
37
47
  const timeoutInMilliseconds = delayRenderTimeoutInMillisecondsOption.getValue({
38
48
  commandLine: parsed_cli_1.parsedCli,
@@ -1,5 +1,4 @@
1
- import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
- export declare const setStillImageFormat: (format: StillImageFormat) => void;
3
- export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
4
- export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
5
- export declare const getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
1
+ export declare const setStillImageFormat: (format: "jpeg" | "pdf" | "png" | "webp") => void;
2
+ export declare const setVideoImageFormat: (format: "jpeg" | "none" | "png") => void;
3
+ export declare const getUserPreferredStillImageFormat: () => "jpeg" | "pdf" | "png" | "webp" | undefined;
4
+ export declare const getUserPreferredVideoImageFormat: () => "jpeg" | "none" | "png" | undefined;
@@ -241,6 +241,14 @@ declare global {
241
241
  * Overrides the width of a composition
242
242
  */
243
243
  readonly overrideWidth: (newWidth: number) => void;
244
+ /**
245
+ * Overrides the FPS of a composition
246
+ */
247
+ readonly overrideFps: (newFps: number) => void;
248
+ /**
249
+ * Overrides the duration in frames of a composition
250
+ */
251
+ readonly overrideDuration: (newDuration: number) => void;
244
252
  /**
245
253
  * Set the ProRes profile.
246
254
  * This method is only valid if the codec has been set to 'prores'.
@@ -410,21 +418,13 @@ export declare const Config: FlatConfig;
410
418
  export declare const ConfigInternals: {
411
419
  getRange: () => FrameRange | null;
412
420
  getBrowser: () => null;
413
- getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
414
- getProResProfile: () => import("remotion")._InternalTypes["ProResProfile"] | undefined;
415
- getBrowserExecutable: () => BrowserExecutable;
416
421
  getStudioPort: () => number | undefined;
417
422
  getRendererPortFromConfigFile: () => number | null;
418
423
  getRendererPortFromConfigFileAndCliFlag: () => number | null;
419
- getChromiumDisableWebSecurity: () => boolean;
420
- getIgnoreCertificateErrors: () => boolean;
421
- getEveryNthFrame: () => number;
422
424
  getConcurrency: () => string | number | null;
423
425
  getStillFrame: () => number;
424
426
  getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
425
427
  getDotEnvLocation: () => string | null;
426
- getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
427
- getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
428
428
  getWebpackOverrideFn: () => WebpackOverrideFn;
429
429
  getWebpackCaching: () => boolean;
430
430
  getOutputLocation: () => string | null;
@@ -433,13 +433,10 @@ export declare const ConfigInternals: {
433
433
  getMaxTimelineTracks: () => number;
434
434
  defaultOverrideFunction: WebpackOverrideFn;
435
435
  getFfmpegOverrideFunction: () => import("@remotion/renderer").FfmpegOverrideFn;
436
- getHeight: () => number | null;
437
- getWidth: () => number | null;
438
436
  getMetadata: () => Record<string, string>;
439
437
  getEntryPoint: () => string | null;
440
438
  getWebpackPolling: () => number | null;
441
439
  getShouldOpenBrowser: () => boolean;
442
- getChromiumUserAgent: () => string | null;
443
440
  getBufferStateDelayInMilliseconds: () => number | null;
444
- getOutputCodecOrUndefined: () => import("@remotion/renderer/dist/codec").CodecOrUndefined;
441
+ getOutputCodecOrUndefined: () => CodecOrUndefined;
445
442
  };
@@ -2,45 +2,31 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConfigInternals = exports.Config = void 0;
4
4
  const browser_1 = require("./browser");
5
- const browser_executable_1 = require("./browser-executable");
6
- const chromium_flags_1 = require("./chromium-flags");
7
5
  const concurrency_1 = require("./concurrency");
8
6
  const env_file_1 = require("./env-file");
9
7
  const frame_range_1 = require("./frame-range");
10
- const image_format_1 = require("./image-format");
11
8
  const image_sequence_1 = require("./image-sequence");
12
9
  const output_location_1 = require("./output-location");
13
10
  const override_webpack_1 = require("./override-webpack");
14
- const pixel_format_1 = require("./pixel-format");
15
11
  const preview_server_1 = require("./preview-server");
16
- const prores_profile_1 = require("./prores-profile");
17
12
  const still_frame_1 = require("./still-frame");
18
13
  const webpack_caching_1 = require("./webpack-caching");
19
14
  const client_1 = require("@remotion/renderer/client");
20
15
  const studio_server_1 = require("@remotion/studio-server");
21
- const browser_executable_2 = require("./browser-executable");
22
16
  const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
23
- const chromium_flags_2 = require("./chromium-flags");
24
- const concurrency_2 = require("./concurrency");
25
17
  const entry_point_1 = require("./entry-point");
26
18
  const env_file_2 = require("./env-file");
27
- const every_nth_frame_1 = require("./every-nth-frame");
28
19
  const ffmpeg_override_1 = require("./ffmpeg-override");
29
20
  const frame_range_2 = require("./frame-range");
30
- const height_1 = require("./height");
31
21
  const image_sequence_2 = require("./image-sequence");
32
22
  const metadata_1 = require("./metadata");
33
23
  const open_browser_1 = require("./open-browser");
34
24
  const output_location_2 = require("./output-location");
35
25
  const override_webpack_2 = require("./override-webpack");
36
- const pixel_format_2 = require("./pixel-format");
37
26
  const preview_server_2 = require("./preview-server");
38
- const prores_profile_2 = require("./prores-profile");
39
- const user_agent_1 = require("./user-agent");
40
27
  const webpack_caching_2 = require("./webpack-caching");
41
28
  const webpack_poll_1 = require("./webpack-poll");
42
- const width_1 = require("./width");
43
- const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, } = client_1.BrowserSafeApis.options;
29
+ const { concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, } = client_1.BrowserSafeApis.options;
44
30
  exports.Config = {
45
31
  get Bundling() {
46
32
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -75,16 +61,16 @@ exports.Config = {
75
61
  setPublicDir: publicDirOption.setConfig,
76
62
  setEntryPoint: entry_point_1.setEntryPoint,
77
63
  setLevel: logLevelOption.setConfig,
78
- setBrowserExecutable: browser_executable_2.setBrowserExecutable,
64
+ setBrowserExecutable: browserExecutableOption.setConfig,
79
65
  setTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.setConfig,
80
66
  setDelayRenderTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.setConfig,
81
- setChromiumDisableWebSecurity: chromium_flags_2.setChromiumDisableWebSecurity,
82
- setChromiumIgnoreCertificateErrors: chromium_flags_2.setChromiumIgnoreCertificateErrors,
67
+ setChromiumDisableWebSecurity: disableWebSecurityOption.setConfig,
68
+ setChromiumIgnoreCertificateErrors: ignoreCertificateErrorsOption.setConfig,
83
69
  setChromiumHeadlessMode: headlessOption.setConfig,
84
70
  setChromiumOpenGlRenderer: glOption.setConfig,
85
- setChromiumUserAgent: user_agent_1.setChromiumUserAgent,
71
+ setChromiumUserAgent: userAgentOption.setConfig,
86
72
  setDotEnvLocation: env_file_2.setDotEnvLocation,
87
- setConcurrency: concurrency_2.setConcurrency,
73
+ setConcurrency: concurrencyOption.setConfig,
88
74
  setChromiumMultiProcessOnLinux: enableMultiprocessOnLinuxOption.setConfig,
89
75
  setChromiumDarkMode: darkModeOption.setConfig,
90
76
  setQuality: () => {
@@ -94,32 +80,34 @@ exports.Config = {
94
80
  throw new Error('Config.setImageFormat() has been renamed - use Config.setVideoImageFormat() instead (default "jpeg"). For rendering stills, use Config.setStillImageFormat() (default "png")');
95
81
  },
96
82
  setJpegQuality: jpegQualityOption.setConfig,
97
- setStillImageFormat: image_format_1.setStillImageFormat,
98
- setVideoImageFormat: image_format_1.setVideoImageFormat,
83
+ setStillImageFormat: stillImageFormatOption.setConfig,
84
+ setVideoImageFormat: videoImageFormatOption.setConfig,
99
85
  setMetadata: metadata_1.setMetadata,
100
86
  setEncodingMaxRate: encodingMaxRateOption.setConfig,
101
87
  setEncodingBufferSize: encodingBufferSizeOption.setConfig,
102
88
  setFrameRange: frame_range_2.setFrameRange,
103
89
  setScale: scaleOption.setConfig,
104
- setEveryNthFrame: every_nth_frame_1.setEveryNthFrame,
90
+ setEveryNthFrame: everyNthFrameOption.setConfig,
105
91
  setNumberOfGifLoops: numberOfGifLoopsOption.setConfig,
106
92
  setMuted: mutedOption.setConfig,
107
93
  setEnforceAudioTrack: enforceAudioOption.setConfig,
108
94
  setOutputLocation: output_location_2.setOutputLocation,
109
95
  setOverwriteOutput: overwriteOption.setConfig,
110
96
  setChromeMode: chromeModeOption.setConfig,
111
- setPixelFormat: pixel_format_2.setPixelFormat,
97
+ setPixelFormat: pixelFormatOption.setConfig,
112
98
  setCodec: videoCodecOption.setConfig,
113
99
  setCrf: crfOption.setConfig,
114
100
  setImageSequence: image_sequence_2.setImageSequence,
115
- setProResProfile: prores_profile_2.setProResProfile,
101
+ setProResProfile: proResProfileOption.setConfig,
116
102
  setX264Preset: x264Option.setConfig,
117
103
  setAudioBitrate: audioBitrateOption.setConfig,
118
104
  setVideoBitrate: videoBitrateOption.setConfig,
119
105
  setAudioLatencyHint: audioLatencyHintOption.setConfig,
120
106
  setForSeamlessAacConcatenation: forSeamlessAacConcatenationOption.setConfig,
121
- overrideHeight: height_1.overrideHeight,
122
- overrideWidth: width_1.overrideWidth,
107
+ overrideHeight: overrideHeightOption.setConfig,
108
+ overrideWidth: overrideWidthOption.setConfig,
109
+ overrideFps: overrideFpsOption.setConfig,
110
+ overrideDuration: overrideDurationOption.setConfig,
123
111
  overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
124
112
  setAudioCodec: audioCodecOption.setConfig,
125
113
  setOffthreadVideoCacheSizeInBytes: (size) => {
@@ -146,21 +134,13 @@ exports.Config = {
146
134
  exports.ConfigInternals = {
147
135
  getRange: frame_range_1.getRange,
148
136
  getBrowser: browser_1.getBrowser,
149
- getPixelFormat: pixel_format_1.getPixelFormat,
150
- getProResProfile: prores_profile_1.getProResProfile,
151
- getBrowserExecutable: browser_executable_1.getBrowserExecutable,
152
137
  getStudioPort: preview_server_1.getStudioPort,
153
138
  getRendererPortFromConfigFile: preview_server_1.getRendererPortFromConfigFile,
154
139
  getRendererPortFromConfigFileAndCliFlag: preview_server_1.getRendererPortFromConfigFileAndCliFlag,
155
- getChromiumDisableWebSecurity: chromium_flags_1.getChromiumDisableWebSecurity,
156
- getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
157
- getEveryNthFrame: every_nth_frame_1.getEveryNthFrame,
158
140
  getConcurrency: concurrency_1.getConcurrency,
159
141
  getStillFrame: still_frame_1.getStillFrame,
160
142
  getShouldOutputImageSequence: image_sequence_1.getShouldOutputImageSequence,
161
143
  getDotEnvLocation: env_file_1.getDotEnvLocation,
162
- getUserPreferredStillImageFormat: image_format_1.getUserPreferredStillImageFormat,
163
- getUserPreferredVideoImageFormat: image_format_1.getUserPreferredVideoImageFormat,
164
144
  getWebpackOverrideFn: override_webpack_1.getWebpackOverrideFn,
165
145
  getWebpackCaching: webpack_caching_1.getWebpackCaching,
166
146
  getOutputLocation: output_location_1.getOutputLocation,
@@ -169,13 +149,10 @@ exports.ConfigInternals = {
169
149
  getMaxTimelineTracks: studio_server_1.StudioServerInternals.getMaxTimelineTracks,
170
150
  defaultOverrideFunction: override_webpack_1.defaultOverrideFunction,
171
151
  getFfmpegOverrideFunction: ffmpeg_override_1.getFfmpegOverrideFunction,
172
- getHeight: height_1.getHeight,
173
- getWidth: width_1.getWidth,
174
152
  getMetadata: metadata_1.getMetadata,
175
153
  getEntryPoint: entry_point_1.getEntryPoint,
176
154
  getWebpackPolling: webpack_poll_1.getWebpackPolling,
177
155
  getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
178
- getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
179
156
  getBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.getBufferStateDelayInMilliseconds,
180
157
  getOutputCodecOrUndefined: client_1.BrowserSafeApis.getOutputCodecOrUndefined,
181
158
  };
@@ -1,3 +1,2 @@
1
- import type { PixelFormat } from '@remotion/renderer';
2
- export declare const setPixelFormat: (format: PixelFormat) => void;
3
- export declare const getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
1
+ export declare const setPixelFormat: (format: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le") => void;
2
+ export declare const getPixelFormat: () => "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le";
@@ -1,3 +1,2 @@
1
- import type { _InternalTypes } from 'remotion';
2
- export declare const getProResProfile: () => _InternalTypes["ProResProfile"] | undefined;
3
- export declare const setProResProfile: (profile: _InternalTypes["ProResProfile"] | undefined) => void;
1
+ export declare const getProResProfile: () => "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | undefined;
2
+ export declare const setProResProfile: (profile: "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | undefined) => void;
@@ -1,12 +1,10 @@
1
- import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
- export declare const determineFinalStillImageFormat: ({ downloadName, outName, configImageFormat, cliFlag, isLambda, fromUi, }: {
1
+ export declare const determineFinalStillImageFormat: ({ downloadName, outName, configuredImageFormat, isLambda, fromUi, }: {
3
2
  downloadName: string | null;
4
3
  outName: string | null;
5
- configImageFormat: StillImageFormat | null;
6
- cliFlag: StillImageFormat | VideoImageFormat | null;
4
+ configuredImageFormat: "jpeg" | "pdf" | "png" | "webp" | null;
7
5
  isLambda: boolean;
8
- fromUi: StillImageFormat | null;
6
+ fromUi: "jpeg" | "pdf" | "png" | "webp" | null;
9
7
  }) => {
10
- format: StillImageFormat;
8
+ format: "jpeg" | "pdf" | "png" | "webp";
11
9
  source: string;
12
10
  };
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.determineFinalStillImageFormat = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
5
+ const { cliFlag } = client_1.BrowserSafeApis.options.stillImageFormatOption;
4
6
  const deriveExtensionFromFilename = (filename) => {
5
7
  if (filename === null || filename === void 0 ? void 0 : filename.endsWith('.png')) {
6
8
  return 'png';
@@ -19,7 +21,7 @@ const deriveExtensionFromFilename = (filename) => {
19
21
  }
20
22
  return null;
21
23
  };
22
- const determineFinalStillImageFormat = ({ downloadName, outName, configImageFormat, cliFlag, isLambda, fromUi, }) => {
24
+ const determineFinalStillImageFormat = ({ downloadName, outName, configuredImageFormat, isLambda, fromUi, }) => {
23
25
  if (fromUi) {
24
26
  return { format: fromUi, source: 'via UI' };
25
27
  }
@@ -32,29 +34,20 @@ const determineFinalStillImageFormat = ({ downloadName, outName, configImageForm
32
34
  throw new TypeError(`Image format mismatch: ${outName} was given as the ${outNameDescription} and ${downloadName} was given as the download name, but the extensions don't match.`);
33
35
  }
34
36
  if (downloadNameExtension) {
35
- if (cliFlag && downloadNameExtension !== cliFlag) {
36
- throw new TypeError(`Image format mismatch: ${downloadName} was given as the download name, but --image-format=${cliFlag} was passed. The image formats must match.`);
37
+ if (configuredImageFormat &&
38
+ downloadNameExtension !== configuredImageFormat) {
39
+ throw new TypeError(`Image format mismatch: ${downloadName} was given as the download name, but the image format "${configuredImageFormat}" was configured via --${cliFlag} or Config.setStillImageFormat(). The image formats must match.`);
37
40
  }
38
41
  return { format: downloadNameExtension, source: 'Download name extension' };
39
42
  }
40
43
  if (outNameExtension) {
41
- if (cliFlag && outNameExtension !== cliFlag) {
42
- throw new TypeError(`Image format mismatch: ${outName} was given as the ${outNameDescription}, but --image-format=${cliFlag} was passed. The image formats must match.`);
44
+ if (configuredImageFormat && outNameExtension !== configuredImageFormat) {
45
+ throw new TypeError(`Image format mismatch: ${outName} was given as the ${outNameDescription}, but the image format "${configuredImageFormat}" was configured via --${cliFlag} or Config.setStillImageFormat(). The image formats must match.`);
43
46
  }
44
47
  return { format: outNameExtension, source: 'Out name extension' };
45
48
  }
46
- if (cliFlag === 'none') {
47
- throw new TypeError('The --image-format flag must not be "none" for stills.');
48
- }
49
- if (cliFlag !== null) {
50
- return { format: cliFlag, source: '--image-format flag' };
51
- }
52
- if (configImageFormat !== null) {
53
- // @ts-expect-error
54
- if (configImageFormat === 'none') {
55
- throw new Error('The still simage format in the config file must not be "none"');
56
- }
57
- return { format: configImageFormat, source: 'Config file' };
49
+ if (configuredImageFormat !== null) {
50
+ return { format: configuredImageFormat, source: `--${cliFlag} or config` };
58
51
  }
59
52
  return { format: 'png', source: 'Default' };
60
53
  };
@@ -1,9 +1,8 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
1
  type FoundReason = 'argument passed - found in cwd' | 'argument passed - found in root' | 'argument passed' | 'config file' | 'common paths' | 'none found';
3
2
  export declare const findEntryPoint: ({ args, logLevel, remotionRoot, allowDirectory, }: {
4
3
  args: (string | number)[];
5
4
  remotionRoot: string;
6
- logLevel: LogLevel;
5
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
7
6
  allowDirectory: boolean;
8
7
  }) => {
9
8
  file: string | null;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EXTRA_PACKAGES_DOCS = exports.EXTRA_PACKAGES = void 0;
4
4
  exports.EXTRA_PACKAGES = {
5
5
  zod: '3.22.3',
6
- mediabunny: '1.34.2',
6
+ mediabunny: '1.34.4',
7
7
  };
8
8
  exports.EXTRA_PACKAGES_DOCS = {
9
9
  zod: 'https://www.remotion.dev/docs/schemas#prerequisites',
package/dist/ffmpeg.d.ts CHANGED
@@ -1,13 +1,12 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const dynamicLibEnv: (indent: boolean, logLevel: LogLevel, binariesDirectory: string | null) => {
3
- DYLD_LIBRARY_PATH: string;
1
+ export declare const dynamicLibEnv: (indent: boolean, logLevel: "error" | "info" | "trace" | "verbose" | "warn", binariesDirectory: string | null) => {
4
2
  RUST_BACKTRACE: string;
3
+ DYLD_LIBRARY_PATH: string;
5
4
  } | {
6
- PATH: string;
7
5
  RUST_BACKTRACE: string;
6
+ PATH: string;
8
7
  } | {
9
- LD_LIBRARY_PATH: string;
10
8
  RUST_BACKTRACE: string;
9
+ LD_LIBRARY_PATH: string;
11
10
  };
12
- export declare const ffmpegCommand: (args: string[], logLevel: LogLevel) => never;
13
- export declare const ffprobeCommand: (args: string[], logLevel: LogLevel) => never;
11
+ export declare const ffmpegCommand: (args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => never;
12
+ export declare const ffprobeCommand: (args: string[], logLevel: "error" | "info" | "trace" | "verbose" | "warn") => never;
@@ -1,25 +1,18 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const getAndValidateAbsoluteOutputFile: (relativeOutputLocation: string, overwrite: boolean, logLevel: LogLevel) => string;
1
+ export declare const getAndValidateAbsoluteOutputFile: (relativeOutputLocation: string, overwrite: boolean, logLevel: "error" | "info" | "trace" | "verbose" | "warn") => string;
3
2
  export declare const getCliOptions: (options: {
4
3
  isStill: boolean;
5
- logLevel: LogLevel;
4
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
6
5
  indent: boolean;
7
6
  }) => {
8
- concurrency: string | number | null;
7
+ concurrency: import("@remotion/renderer").Concurrency;
9
8
  frameRange: import("@remotion/renderer").FrameRange | null;
10
9
  shouldOutputImageSequence: boolean;
11
10
  inputProps: Record<string, unknown>;
12
11
  envVariables: Record<string, string>;
13
- pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
14
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
15
- everyNthFrame: number;
16
12
  stillFrame: number;
17
- browserExecutable: import("@remotion/renderer").BrowserExecutable;
18
- userAgent: string | null;
19
- disableWebSecurity: boolean;
20
- ignoreCertificateErrors: boolean;
21
13
  ffmpegOverride: import("@remotion/renderer").FfmpegOverrideFn;
22
14
  height: number | null;
23
15
  width: number | null;
24
- configFileImageFormat: "png" | "jpeg" | "none" | undefined;
16
+ fps: number | null;
17
+ durationInFrames: number | null;
25
18
  };