@remotion/cli 4.0.513 → 4.0.515

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,9 +1,13 @@
1
+ type CtrlCHandler = () => number | Promise<number>;
1
2
  export declare const cleanupBeforeQuit: ({ indent, logLevel, }: {
2
3
  indent: boolean;
3
4
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
4
5
  }) => void;
5
6
  export declare const registerCleanupJob: (label: string, job: () => void) => void;
6
- export declare const handleCtrlC: ({ indent, logLevel, }: {
7
+ export declare const registerCtrlCHandler: (handler: CtrlCHandler) => () => void;
8
+ export declare const handleCtrlC: ({ indent, logLevel, exit, }: {
7
9
  indent: boolean;
8
10
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
9
- }) => void;
11
+ exit?: ((exitCode: number) => void) | undefined;
12
+ }) => () => NodeJS.Process;
13
+ export {};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleCtrlC = exports.registerCleanupJob = exports.cleanupBeforeQuit = void 0;
3
+ exports.handleCtrlC = exports.registerCtrlCHandler = exports.registerCleanupJob = exports.cleanupBeforeQuit = void 0;
4
4
  const log_1 = require("./log");
5
5
  const cleanupJobs = [];
6
+ let ctrlCHandler = null;
6
7
  const cleanupBeforeQuit = ({ indent, logLevel, }) => {
7
8
  log_1.Log.verbose({ indent, logLevel }, 'Cleaning up...');
8
9
  const time = Date.now();
@@ -17,11 +18,45 @@ const registerCleanupJob = (label, job) => {
17
18
  cleanupJobs.push({ job, label });
18
19
  };
19
20
  exports.registerCleanupJob = registerCleanupJob;
20
- const handleCtrlC = ({ indent, logLevel, }) => {
21
- process.on('SIGINT', () => {
21
+ const registerCtrlCHandler = (handler) => {
22
+ ctrlCHandler = handler;
23
+ return () => {
24
+ if (ctrlCHandler === handler) {
25
+ ctrlCHandler = null;
26
+ }
27
+ };
28
+ };
29
+ exports.registerCtrlCHandler = registerCtrlCHandler;
30
+ const handleCtrlC = ({ indent, logLevel, exit = process.exit, }) => {
31
+ let handlingCtrlC = false;
32
+ let forceExited = false;
33
+ const listener = async () => {
34
+ if (handlingCtrlC) {
35
+ forceExited = true;
36
+ exit(130);
37
+ return;
38
+ }
39
+ handlingCtrlC = true;
22
40
  log_1.Log.info({ indent: false, logLevel });
41
+ let exitCode = 0;
42
+ const handler = ctrlCHandler;
43
+ ctrlCHandler = null;
44
+ try {
45
+ if (handler) {
46
+ exitCode = await handler();
47
+ }
48
+ }
49
+ catch (err) {
50
+ log_1.Log.error({ indent: false, logLevel }, err instanceof Error ? err.message : String(err));
51
+ exitCode = 1;
52
+ }
53
+ if (forceExited) {
54
+ return;
55
+ }
23
56
  (0, exports.cleanupBeforeQuit)({ indent, logLevel });
24
- process.exit(0);
25
- });
57
+ exit(exitCode);
58
+ };
59
+ process.on('SIGINT', listener);
60
+ return () => process.removeListener('SIGINT', listener);
26
61
  };
27
62
  exports.handleCtrlC = handleCtrlC;
@@ -62,7 +62,8 @@ declare global {
62
62
  */
63
63
  readonly setInteractivityEnabled: (enabled: boolean) => void;
64
64
  /**
65
- * @deprecated HTML-in-canvas is now enabled by default when supported. This method is a no-op and can be removed.
65
+ * Allow the experimental HTML-in-canvas capture path in Studio client-side renders.
66
+ * @default false
66
67
  */
67
68
  readonly setAllowHtmlInCanvasEnabled: (enabled: boolean) => void;
68
69
  /**
@@ -403,6 +404,10 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
403
404
  * Set whether S3 buckets should be allowed to expire.
404
405
  */
405
406
  setEnableFolderExpiry: (value: boolean | null) => void;
407
+ /**
408
+ * Allow `npx remotion lambda render` to cancel a render when Ctrl+C is pressed.
409
+ */
410
+ setEnableCancellation: (value: boolean) => void;
406
411
  /**
407
412
  * Set whether Lambda Insights should be enabled when deploying a function.
408
413
  */
@@ -495,7 +500,7 @@ export declare const ConfigInternals: {
495
500
  getWebpackCaching: () => boolean;
496
501
  getOutputLocation: () => string | null;
497
502
  setStillFrame: (frame: number) => void;
498
- getMaxTimelineTracks: () => number;
503
+ getMaxTimelineTracks: () => number | null;
499
504
  defaultOverrideFunction: WebpackOverrideFn;
500
505
  defaultBundlerOverrideFunction: BundlerOverrideFn;
501
506
  defaultRspackOverrideFunction: RspackOverrideFn;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConfigInternals = exports.Config = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const studio_server_1 = require("@remotion/studio-server");
6
- const log_1 = require("../log");
7
6
  const browser_1 = require("./browser");
8
7
  const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
9
8
  const concurrency_1 = require("./concurrency");
@@ -18,10 +17,7 @@ const preview_server_1 = require("./preview-server");
18
17
  const still_frame_1 = require("./still-frame");
19
18
  const webpack_caching_1 = require("./webpack-caching");
20
19
  const webpack_poll_1 = require("./webpack-poll");
21
- const { benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
22
- const setAllowHtmlInCanvasEnabled = (_enabled) => {
23
- log_1.Log.warn({ indent: false, logLevel: 'info' }, 'Config.setAllowHtmlInCanvasEnabled() is now a no-op because HTML-in-canvas is enabled by default when supported. You can remove this option from your config file.');
24
- };
20
+ const { allowHtmlInCanvasOption, benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableCancellationOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
25
21
  exports.Config = {
26
22
  get Bundling() {
27
23
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -44,7 +40,7 @@ exports.Config = {
44
40
  setMaxTimelineTracks: studio_server_1.StudioServerInternals.setMaxTimelineTracks,
45
41
  setKeyboardShortcutsEnabled: keyboardShortcutsOption.setConfig,
46
42
  setInteractivityEnabled: interactivityOption.setConfig,
47
- setAllowHtmlInCanvasEnabled,
43
+ setAllowHtmlInCanvasEnabled: allowHtmlInCanvasOption.setConfig,
48
44
  setRspack: rspackOption.setConfig,
49
45
  setExperimentalRspackEnabled: rspackOption.setConfig,
50
46
  setNumberOfSharedAudioTags: numberOfSharedAudioTagsOption.setConfig,
@@ -119,6 +115,7 @@ exports.Config = {
119
115
  setDisallowParallelEncoding: disallowParallelEncodingOption.setConfig,
120
116
  setBeepOnFinish: beepOnFinishOption.setConfig,
121
117
  setEnableFolderExpiry: folderExpiryOption.setConfig,
118
+ setEnableCancellation: enableCancellationOption.setConfig,
122
119
  setRepro: reproOption.setConfig,
123
120
  setLambdaInsights: enableLambdaInsights.setConfig,
124
121
  setBinariesDirectory: binariesDirectoryOption.setConfig,
@@ -2,17 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EXTRA_PACKAGES_DOCS = exports.EXTRA_PACKAGES = void 0;
4
4
  exports.EXTRA_PACKAGES = {
5
- mediabunny: '1.50.8',
6
- '@mediabunny/ac3': '1.50.8',
7
- '@mediabunny/mp3-encoder': '1.50.8',
8
- '@mediabunny/aac-encoder': '1.50.8',
9
- '@mediabunny/flac-encoder': '1.50.8',
10
- '@mediabunny/prores': '1.50.8',
5
+ mediabunny: '1.55.1',
6
+ '@mediabunny/ac3': '1.55.1',
7
+ '@mediabunny/dts': '1.55.1',
8
+ '@mediabunny/mp3-encoder': '1.55.1',
9
+ '@mediabunny/aac-encoder': '1.55.1',
10
+ '@mediabunny/flac-encoder': '1.55.1',
11
+ '@mediabunny/prores': '1.55.1',
11
12
  zod: '4.4.3',
12
13
  };
13
14
  exports.EXTRA_PACKAGES_DOCS = {
14
15
  mediabunny: 'https://www.remotion.dev/docs/mediabunny/version',
15
16
  '@mediabunny/ac3': 'https://www.remotion.dev/docs/mediabunny/formats#ac-3-and-e-ac-3',
17
+ '@mediabunny/dts': 'https://mediabunny.dev/guide/extensions/dts',
16
18
  '@mediabunny/mp3-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
17
19
  '@mediabunny/aac-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
18
20
  '@mediabunny/flac-encoder': 'https://www.remotion.dev/docs/mediabunny/version',
@@ -5,9 +5,9 @@ const renderer_1 = require("@remotion/renderer");
5
5
  const client_1 = require("@remotion/renderer/client");
6
6
  const config_1 = require("./config");
7
7
  const parsed_cli_1 = require("./parsed-cli");
8
- const { x264Option, gopSizeOption, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, concurrencyOption, offthreadVideoThreadsOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, chromeModeOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, publicLicenseKeyOption, stillImageFormatOption, videoImageFormatOption, sampleRateOption, } = client_1.BrowserSafeApis.options;
8
+ const { allowHtmlInCanvasOption, x264Option, gopSizeOption, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, concurrencyOption, offthreadVideoThreadsOption, scaleOption, jpegQualityOption, videoBitrateOption, crfOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, chromeModeOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, publicLicenseKeyOption, stillImageFormatOption, videoImageFormatOption, sampleRateOption, } = client_1.BrowserSafeApis.options;
9
9
  const getRenderDefaults = (logLevel) => {
10
- var _a;
10
+ var _a, _b, _c, _d, _e, _f;
11
11
  const defaultJpegQuality = jpegQualityOption.getValue({
12
12
  commandLine: parsed_cli_1.parsedCli,
13
13
  }).value;
@@ -38,6 +38,7 @@ const getRenderDefaults = (logLevel) => {
38
38
  const videoBitrate = videoBitrateOption.getValue({
39
39
  commandLine: parsed_cli_1.parsedCli,
40
40
  }).value;
41
+ const crf = (_b = crfOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _b !== void 0 ? _b : null;
41
42
  const enforceAudioTrack = enforceAudioOption.getValue({
42
43
  commandLine: parsed_cli_1.parsedCli,
43
44
  }).value;
@@ -113,14 +114,25 @@ const getRenderDefaults = (logLevel) => {
113
114
  const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
114
115
  const metadata = config_1.ConfigInternals.getMetadata();
115
116
  const outputLocation = config_1.ConfigInternals.getOutputLocation();
117
+ const allowHtmlInCanvas = allowHtmlInCanvasOption.getValue({
118
+ commandLine: parsed_cli_1.parsedCli,
119
+ }).value;
116
120
  const maxConcurrency = renderer_1.RenderInternals.getMaxConcurrency();
117
121
  const minConcurrency = renderer_1.RenderInternals.getMinConcurrency();
122
+ const configFileRenderDefaults = {
123
+ codec: defaultCodec !== null && defaultCodec !== void 0 ? defaultCodec : null,
124
+ proResProfile: (_c = proResProfileOption.getValue({ commandLine: {} }).value) !== null && _c !== void 0 ? _c : null,
125
+ stillImageFormat: (_d = stillImageFormatOption.getValue({ commandLine: {} }).value) !== null && _d !== void 0 ? _d : null,
126
+ videoImageFormat: (_e = videoImageFormatOption.getValue({ commandLine: {} }).value) !== null && _e !== void 0 ? _e : null,
127
+ x264Preset: (_f = x264Option.getValue({ commandLine: {} }).value) !== null && _f !== void 0 ? _f : null,
128
+ };
118
129
  return {
119
130
  darkMode,
120
131
  jpegQuality: defaultJpegQuality !== null && defaultJpegQuality !== void 0 ? defaultJpegQuality : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
121
132
  scale: defaultScale !== null && defaultScale !== void 0 ? defaultScale : 1,
122
133
  logLevel,
123
134
  codec: defaultCodec !== null && defaultCodec !== void 0 ? defaultCodec : 'h264',
135
+ crf,
124
136
  concurrency,
125
137
  maxConcurrency,
126
138
  minConcurrency,
@@ -158,7 +170,9 @@ const getRenderDefaults = (logLevel) => {
158
170
  mediaCacheSizeInBytes,
159
171
  publicLicenseKey,
160
172
  outputLocation,
173
+ allowHtmlInCanvas,
161
174
  sampleRate: sampleRateOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
175
+ configFileRenderDefaults,
162
176
  };
163
177
  };
164
178
  exports.getRenderDefaults = getRenderDefaults;
@@ -0,0 +1,4 @@
1
+ export declare const getVideoImageFormat: ({ codec, uiImageFormat, }: {
2
+ codec: import("@remotion/renderer").CodecOrUndefined;
3
+ uiImageFormat: "jpeg" | "none" | "png" | null;
4
+ }) => "jpeg" | "none" | "png";
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVideoImageFormat = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
5
+ const pure_1 = require("@remotion/renderer/pure");
6
+ const parsed_cli_1 = require("./parsed-cli");
7
+ const getVideoImageFormat = ({ codec, uiImageFormat, }) => {
8
+ if (uiImageFormat !== null) {
9
+ return uiImageFormat;
10
+ }
11
+ const configured = client_1.BrowserSafeApis.options.videoImageFormatOption.getValue({
12
+ commandLine: parsed_cli_1.parsedCli,
13
+ }).value;
14
+ if (configured !== null) {
15
+ return configured;
16
+ }
17
+ if (pure_1.NoReactAPIs.isAudioCodec(codec)) {
18
+ return 'none';
19
+ }
20
+ if (codec === 'h264' ||
21
+ codec === 'h264-mkv' ||
22
+ codec === 'h264-ts' ||
23
+ codec === 'h265' ||
24
+ codec === 'av1' ||
25
+ codec === 'vp8' ||
26
+ codec === 'vp9' ||
27
+ codec === 'prores' ||
28
+ codec === 'gif') {
29
+ return 'jpeg';
30
+ }
31
+ if (codec === undefined) {
32
+ return 'png';
33
+ }
34
+ throw new Error('Unrecognized codec ' + codec);
35
+ };
36
+ exports.getVideoImageFormat = getVideoImageFormat;
package/dist/index.d.ts CHANGED
@@ -186,4 +186,10 @@ export declare const CliInternals: {
186
186
  disableGitSource: boolean;
187
187
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
188
188
  }) => import("@remotion/studio-shared").GitSource | null;
189
+ handleCtrlC: ({ indent, logLevel, exit, }: {
190
+ indent: boolean;
191
+ logLevel: "error" | "info" | "trace" | "verbose" | "warn";
192
+ exit?: ((exitCode: number) => void) | undefined;
193
+ }) => () => NodeJS.Process;
194
+ registerCtrlCHandler: (handler: () => number | Promise<number>) => () => void;
189
195
  };
package/dist/index.js CHANGED
@@ -203,4 +203,6 @@ exports.CliInternals = {
203
203
  makeHyperlink: make_link_1.makeHyperlink,
204
204
  supportsHyperlink: is_supported_1.supportsHyperlink,
205
205
  getGitSource: get_github_repository_1.getGitSource,
206
+ handleCtrlC: cleanup_before_quit_1.handleCtrlC,
207
+ registerCtrlCHandler: cleanup_before_quit_1.registerCtrlCHandler,
206
208
  };
@@ -100,6 +100,7 @@ exports.listOfRemotionPackages = [
100
100
  '@remotion/studio-protocol',
101
101
  '@remotion/light-leaks',
102
102
  '@remotion/mac-cursors',
103
+ '@remotion/maptiler',
103
104
  '@remotion/rough-notation',
104
105
  '@remotion/starburst',
105
106
  '@remotion/vercel',
@@ -1,6 +1,21 @@
1
1
  import type { AudioCodec, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
2
  import type { TypeOfOption } from '@remotion/renderer/client';
3
- declare const benchmarkConcurrenciesOption: {
3
+ declare const allowHtmlInCanvasOption: {
4
+ name: string;
5
+ cliFlag: "allow-html-in-canvas";
6
+ description: () => import("react/jsx-runtime").JSX.Element;
7
+ ssrName: null;
8
+ docLink: string;
9
+ type: boolean;
10
+ getValue: ({ commandLine }: {
11
+ commandLine: Record<string, unknown>;
12
+ }) => {
13
+ value: boolean;
14
+ source: string;
15
+ };
16
+ setConfig(value: boolean): void;
17
+ id: "allow-html-in-canvas";
18
+ }, benchmarkConcurrenciesOption: {
4
19
  name: string;
5
20
  cliFlag: "concurrencies";
6
21
  description: () => import("react/jsx-runtime").JSX.Element;
@@ -32,6 +47,8 @@ declare const benchmarkConcurrenciesOption: {
32
47
  source: string;
33
48
  };
34
49
  setConfig(value: boolean): void;
50
+ getConfigValue: () => boolean | null;
51
+ reset: () => void;
35
52
  id: "beep-on-finish";
36
53
  }, colorSpaceOption: {
37
54
  name: string;
@@ -165,6 +182,21 @@ declare const benchmarkConcurrenciesOption: {
165
182
  };
166
183
  setConfig: (value: boolean | null) => void;
167
184
  id: "enable-folder-expiry";
185
+ }, enableCancellationOption: {
186
+ name: string;
187
+ cliFlag: "enable-cancellation";
188
+ description: () => import("react/jsx-runtime").JSX.Element;
189
+ ssrName: null;
190
+ docLink: string;
191
+ type: boolean;
192
+ setConfig: (value: boolean) => void;
193
+ getValue: ({ commandLine }: {
194
+ commandLine: Record<string, unknown>;
195
+ }) => {
196
+ value: boolean;
197
+ source: string;
198
+ };
199
+ id: "enable-cancellation";
168
200
  }, enableMultiprocessOnLinuxOption: {
169
201
  name: string;
170
202
  cliFlag: "enable-multiprocess-on-linux";
@@ -335,6 +367,8 @@ declare const benchmarkConcurrenciesOption: {
335
367
  source: string;
336
368
  };
337
369
  setConfig: (profile: AudioContextLatencyCategory | null) => void;
370
+ getConfigValue: () => AudioContextLatencyCategory | null;
371
+ reset: () => void;
338
372
  id: "audio-latency-hint";
339
373
  }, darkModeOption: {
340
374
  name: string;
@@ -440,6 +474,8 @@ declare const benchmarkConcurrenciesOption: {
440
474
  source: string;
441
475
  };
442
476
  setConfig(value: number): void;
477
+ getConfigValue: () => number | null;
478
+ reset: () => void;
443
479
  id: "number-of-shared-audio-tags";
444
480
  }, ipv4Option: {
445
481
  name: string;
@@ -717,6 +753,8 @@ declare const benchmarkConcurrenciesOption: {
717
753
  source: string;
718
754
  };
719
755
  setConfig(value: boolean): void;
756
+ getConfigValue: () => boolean | null;
757
+ reset: () => void;
720
758
  id: "disable-keyboard-shortcuts";
721
759
  }, interactivityOption: {
722
760
  name: string;
@@ -732,6 +770,8 @@ declare const benchmarkConcurrenciesOption: {
732
770
  source: string;
733
771
  };
734
772
  setConfig(value: boolean): void;
773
+ getConfigValue: () => boolean | null;
774
+ reset: () => void;
735
775
  id: "disable-interactivity";
736
776
  }, imageSequencePatternOption: {
737
777
  name: string;
@@ -808,6 +848,8 @@ declare const benchmarkConcurrenciesOption: {
808
848
  source: string;
809
849
  };
810
850
  setConfig: (newLogLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
851
+ getConfigValue: () => "error" | "info" | "trace" | "verbose" | "warn" | null;
852
+ reset: () => void;
811
853
  type: "error" | "info" | "trace" | "verbose" | "warn";
812
854
  id: "log";
813
855
  }, videoCodecOption: {
@@ -1190,6 +1232,8 @@ declare const benchmarkConcurrenciesOption: {
1190
1232
  source: string;
1191
1233
  };
1192
1234
  setConfig(value: boolean): void;
1235
+ getConfigValue: () => boolean | null;
1236
+ reset: () => void;
1193
1237
  id: "rspack";
1194
1238
  }, skipSkillsOption: {
1195
1239
  name: string;
@@ -1211,6 +1255,7 @@ declare const benchmarkConcurrenciesOption: {
1211
1255
  id: "skip-skills";
1212
1256
  };
1213
1257
  export type CommandLineOptions = {
1258
+ [allowHtmlInCanvasOption.cliFlag]: TypeOfOption<typeof allowHtmlInCanvasOption> | null;
1214
1259
  [browserExecutableOption.cliFlag]: TypeOfOption<typeof browserExecutableOption>;
1215
1260
  [pixelFormatOption.cliFlag]: TypeOfOption<typeof pixelFormatOption>;
1216
1261
  ['image-format']: VideoImageFormat | StillImageFormat;
@@ -1283,6 +1328,7 @@ export type CommandLineOptions = {
1283
1328
  [ipv4Option.cliFlag]: TypeOfOption<typeof ipv4Option> | null;
1284
1329
  [deleteAfterOption.cliFlag]: TypeOfOption<typeof deleteAfterOption>;
1285
1330
  [folderExpiryOption.cliFlag]: TypeOfOption<typeof folderExpiryOption>;
1331
+ [enableCancellationOption.cliFlag]: TypeOfOption<typeof enableCancellationOption> | null;
1286
1332
  [enableMultiprocessOnLinuxOption.cliFlag]: TypeOfOption<typeof enableMultiprocessOnLinuxOption>;
1287
1333
  [reproOption.cliFlag]: TypeOfOption<typeof reproOption> | null;
1288
1334
  [imageSequencePatternOption.cliFlag]: TypeOfOption<typeof imageSequencePatternOption>;
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.quietFlagProvided = exports.parsedCli = exports.BooleanFlags = void 0;
7
7
  const client_1 = require("@remotion/renderer/client");
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
- const { benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
9
+ const { allowHtmlInCanvasOption, benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableCancellationOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
10
10
  exports.BooleanFlags = [
11
+ allowHtmlInCanvasOption.cliFlag,
11
12
  overwriteOption.cliFlag,
12
13
  imageSequenceOption.cliFlag,
13
14
  'help',
@@ -26,6 +27,7 @@ exports.BooleanFlags = [
26
27
  disableGitSourceOption.cliFlag,
27
28
  disallowParallelEncodingOption.cliFlag,
28
29
  forSeamlessAacConcatenationOption.cliFlag,
30
+ enableCancellationOption.cliFlag,
29
31
  reproOption.cliFlag,
30
32
  isProductionOption.cliFlag,
31
33
  forceNewStudioOption.cliFlag,
@@ -37,6 +39,7 @@ exports.BooleanFlags = [
37
39
  exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
38
40
  boolean: exports.BooleanFlags,
39
41
  default: {
42
+ [allowHtmlInCanvasOption.cliFlag]: null,
40
43
  [overwriteOption.cliFlag]: null,
41
44
  [bundleCacheOption.cliFlag]: null,
42
45
  [darkModeOption.cliFlag]: null,
@@ -54,6 +57,7 @@ exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
54
57
  [forceNewStudioOption.cliFlag]: null,
55
58
  [experimentalKeepAudioContextAliveOption.cliFlag]: null,
56
59
  [mutedOption.cliFlag]: null,
60
+ [enableCancellationOption.cliFlag]: null,
57
61
  [rspackOption.cliFlag]: null,
58
62
  },
59
63
  });
package/dist/skills.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.skillsCommand = exports.printSkillsHelp = void 0;
4
4
  const node_child_process_1 = require("node:child_process");
5
+ const studio_server_1 = require("@remotion/studio-server");
5
6
  const chalk_1 = require("./chalk");
6
7
  const log_1 = require("./log");
7
8
  const remotion_skill_names_1 = require("./remotion-skill-names");
@@ -47,6 +48,7 @@ const skillsCommand = (args, logLevel, { cwd, environment, }) => {
47
48
  cwd,
48
49
  env: environment,
49
50
  stdio: 'inherit',
51
+ ...studio_server_1.StudioServerInternals.getPackageManagerSpawnOptions(),
50
52
  });
51
53
  return new Promise((resolve, reject) => {
52
54
  child.on('exit', (code) => {
package/dist/studio.js CHANGED
@@ -17,7 +17,7 @@ const get_render_defaults_1 = require("./get-render-defaults");
17
17
  const log_1 = require("./log");
18
18
  const parsed_cli_1 = require("./parsed-cli");
19
19
  const queue_1 = require("./render-queue/queue");
20
- const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
20
+ const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, beepOnFinishOption, logLevelOption, } = client_1.BrowserSafeApis.options;
21
21
  const studioCommand = async (remotionRoot, args, logLevel) => {
22
22
  var _a, _b, _c;
23
23
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
@@ -97,6 +97,18 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
97
97
  publicLicenseKey: publicLicenseKeyOption.getValue({
98
98
  commandLine: parsed_cli_1.parsedCli,
99
99
  }).value,
100
+ configFileStudioSettings: {
101
+ askAIEnabled: askAIOption.getConfigValue(),
102
+ audioLatencyHint: audioLatencyHintOption.getConfigValue(),
103
+ beepOnFinish: beepOnFinishOption.getConfigValue(),
104
+ enableCrossSiteIsolation: enableCrossSiteIsolationOption.getConfigValue(),
105
+ interactivityEnabled: interactivityOption.getConfigValue(),
106
+ keyboardShortcutsEnabled: keyboardShortcutsOption.getConfigValue(),
107
+ logLevel: logLevelOption.getConfigValue(),
108
+ maxTimelineTracks: studio_server_1.StudioServerInternals.getConfiguredMaxTimelineTracks(),
109
+ numberOfSharedAudioTags: numberOfSharedAudioTagsOption.getConfigValue(),
110
+ rspack: rspackOption.getConfigValue(),
111
+ },
100
112
  };
101
113
  };
102
114
  const getNumberOfAudioTags = () => numberOfSharedAudioTagsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
package/dist/upgrade.js CHANGED
@@ -176,17 +176,21 @@ const runPackageManagerCommand = async ({ manager, command, logLevel, }) => {
176
176
  stdio: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'info')
177
177
  ? 'inherit'
178
178
  : 'ignore',
179
+ ...studio_server_1.StudioServerInternals.getPackageManagerSpawnOptions(),
179
180
  });
180
- await new Promise((resolve) => {
181
+ await new Promise((resolve, reject) => {
182
+ task.on('error', (err) => {
183
+ reject(err);
184
+ });
181
185
  task.on('close', (code) => {
182
186
  if (code === 0) {
183
187
  resolve();
184
188
  }
185
189
  else if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'info')) {
186
- throw new Error('Failed to upgrade Remotion, see logs above');
190
+ reject(new Error('Failed to upgrade Remotion, see logs above'));
187
191
  }
188
192
  else {
189
- throw new Error('Failed to upgrade Remotion, run with --log=info info to see logs');
193
+ reject(new Error('Failed to upgrade Remotion, run with --log=info info to see logs'));
190
194
  }
191
195
  });
192
196
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.513",
6
+ "version": "4.0.515",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -37,18 +37,18 @@
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
39
  "@babel/parser": "7.24.1",
40
- "@remotion/bundler": "4.0.513",
41
- "@remotion/media-utils": "4.0.513",
42
- "@remotion/player": "4.0.513",
43
- "@remotion/renderer": "4.0.513",
44
- "@remotion/studio-shared": "4.0.513",
45
- "@remotion/studio-server": "4.0.513",
46
- "@remotion/studio": "4.0.513",
40
+ "@remotion/bundler": "4.0.515",
41
+ "@remotion/media-utils": "4.0.515",
42
+ "@remotion/player": "4.0.515",
43
+ "@remotion/renderer": "4.0.515",
44
+ "@remotion/studio-shared": "4.0.515",
45
+ "@remotion/studio-server": "4.0.515",
46
+ "@remotion/studio": "4.0.515",
47
47
  "dotenv": "17.3.1",
48
48
  "minimist": "1.2.6",
49
49
  "prompts": "2.4.2",
50
50
  "semver": "7.5.3",
51
- "remotion": "4.0.513"
51
+ "remotion": "4.0.515"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=16.8.0",
@@ -60,14 +60,14 @@
60
60
  "@types/prettier": "2.7.2",
61
61
  "@types/semver": "7.5.3",
62
62
  "@types/node": "20.12.14",
63
- "@remotion/zod-types": "4.0.513",
64
- "@remotion/tailwind-v4": "4.0.513",
65
- "@remotion/enable-scss": "4.0.513",
66
- "@remotion/skia": "4.0.513",
63
+ "@remotion/zod-types": "4.0.515",
64
+ "@remotion/tailwind-v4": "4.0.515",
65
+ "@remotion/enable-scss": "4.0.515",
66
+ "@remotion/skia": "4.0.515",
67
67
  "react": "19.2.3",
68
68
  "react-dom": "19.2.3",
69
69
  "zod": "4.4.3",
70
- "@remotion/eslint-config-internal": "4.0.513",
70
+ "@remotion/eslint-config-internal": "4.0.515",
71
71
  "eslint": "9.19.0",
72
72
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
73
73
  },