@remotion/cli 4.0.246 → 4.0.247

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.
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, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, } = client_1.BrowserSafeApis.options;
25
+ const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, } = client_1.BrowserSafeApis.options;
26
26
  const getValidConcurrency = (cliConcurrency) => {
27
27
  const { concurrencies } = parsed_cli_1.parsedCli;
28
28
  if (!concurrencies) {
@@ -117,6 +117,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
117
117
  const headless = headlessOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
118
118
  const publicPath = publicPathOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
119
119
  const publicDir = publicDirOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
120
+ const chromeMode = chromeModeOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
120
121
  const chromiumOptions = {
121
122
  disableWebSecurity,
122
123
  enableMultiProcessOnLinux,
@@ -136,6 +137,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
136
137
  indent,
137
138
  logLevel,
138
139
  onBrowserDownload,
140
+ chromeMode,
139
141
  });
140
142
  const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
141
143
  browser: 'chrome',
@@ -146,6 +148,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
146
148
  viewport: null,
147
149
  logLevel,
148
150
  onBrowserDownload,
151
+ chromeMode,
149
152
  });
150
153
  const { urlOrBundle: bundleLocation, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
151
154
  fullPath: fullEntryPoint,
@@ -196,6 +199,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
196
199
  commandLine: parsed_cli_1.parsedCli,
197
200
  }).value,
198
201
  onBrowserDownload,
202
+ chromeMode,
199
203
  });
200
204
  const ids = (remainingArgs[0]
201
205
  ? String(remainingArgs[0])
@@ -342,6 +346,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
342
346
  hardwareAcceleration: hardwareAccelerationOption.getValue({
343
347
  commandLine: parsed_cli_1.parsedCli,
344
348
  }).value,
349
+ chromeMode,
345
350
  }, (run, progress) => {
346
351
  benchmarkProgress.update(makeBenchmarkProgressBar({
347
352
  totalRuns: runs,
@@ -30,10 +30,6 @@ const ensureCommand = async (logLevel) => {
30
30
  log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
31
31
  return;
32
32
  }
33
- if (status.type === 'local-browser') {
34
- log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
35
- return;
36
- }
37
33
  if (status.type === 'local-puppeteer-browser') {
38
34
  log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
39
35
  }
@@ -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, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, } = client_1.BrowserSafeApis.options;
16
+ const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, } = 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,
@@ -54,6 +54,9 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
54
54
  commandLine: parsed_cli_1.parsedCli,
55
55
  }).value;
56
56
  const publicDir = publicDirOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
57
+ const chromeMode = chromeModeOption.getValue({
58
+ commandLine: parsed_cli_1.parsedCli,
59
+ }).value;
57
60
  const { urlOrBundle: bundled, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
58
61
  remotionRoot,
59
62
  fullPath: file,
@@ -98,6 +101,7 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
98
101
  logLevel,
99
102
  quiet: (0, parsed_cli_1.quietFlagProvided)(),
100
103
  }),
104
+ chromeMode,
101
105
  });
102
106
  (0, print_compositions_1.printCompositions)(compositions, logLevel);
103
107
  };
@@ -1,5 +1,5 @@
1
1
  import type { WebpackConfiguration } from '@remotion/bundler';
2
- import type { BrowserExecutable, CodecOrUndefined, ColorSpace, Crf, DeleteAfter, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
+ import type { BrowserExecutable, ChromeMode, CodecOrUndefined, ColorSpace, Crf, DeleteAfter, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
3
3
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
4
4
  import type { Concurrency } from './concurrency';
5
5
  import type { WebpackOverrideFn } from './override-webpack';
@@ -324,6 +324,10 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
324
324
  *
325
325
  */
326
326
  setHardwareAcceleration: (hardwareAccelerationOption: HardwareAccelerationOption) => void;
327
+ /**
328
+ * Choose between using Chrome Headless Shell or Chrome for Testing
329
+ */
330
+ setChromeMode: (chromeMode: ChromeMode) => void;
327
331
  /**
328
332
  * @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
329
333
  */
@@ -42,7 +42,7 @@ const user_agent_1 = require("./user-agent");
42
42
  const webpack_caching_2 = require("./webpack-caching");
43
43
  const webpack_poll_1 = require("./webpack-poll");
44
44
  const width_1 = require("./width");
45
- const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, } = client_1.BrowserSafeApis.options;
45
+ const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, } = client_1.BrowserSafeApis.options;
46
46
  exports.Config = {
47
47
  get Bundling() {
48
48
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -107,6 +107,7 @@ exports.Config = {
107
107
  setEnforceAudioTrack: enforceAudioOption.setConfig,
108
108
  setOutputLocation: output_location_2.setOutputLocation,
109
109
  setOverwriteOutput: overwriteOption.setConfig,
110
+ setChromeMode: chromeModeOption.setConfig,
110
111
  setPixelFormat: pixel_format_2.setPixelFormat,
111
112
  setCodec: videoCodecOption.setConfig,
112
113
  setCrf: crfOption.setConfig,
@@ -1,6 +1,6 @@
1
- import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
1
+ import type { BrowserExecutable, ChromeMode, ChromiumOptions, HeadlessBrowser, LogLevel, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
2
2
  import type { VideoConfig } from 'remotion';
3
- export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
3
+ export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }: {
4
4
  args: (string | number)[];
5
5
  compositionIdFromUi: string | null;
6
6
  serializedInputPropsWithCustomSchema: string;
@@ -17,6 +17,7 @@ export declare const getCompositionId: ({ args, compositionIdFromUi, serializedI
17
17
  offthreadVideoCacheSizeInBytes: number | null;
18
18
  binariesDirectory: string | null;
19
19
  onBrowserDownload: OnBrowserDownload;
20
+ chromeMode: ChromeMode;
20
21
  }) => Promise<{
21
22
  compositionId: string;
22
23
  reason: string;
@@ -23,7 +23,7 @@ const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
23
23
  reason: 'Passed as argument',
24
24
  };
25
25
  };
26
- const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }) => {
26
+ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }) => {
27
27
  const compNameResult = getCompName({
28
28
  cliArgs: args,
29
29
  compositionIdFromUi,
@@ -47,6 +47,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
47
47
  binariesDirectory,
48
48
  onBrowserDownload,
49
49
  onServeUrlVisited: () => undefined,
50
+ chromeMode,
50
51
  });
51
52
  if (propsSize > 10000000) {
52
53
  log_1.Log.warn({
@@ -81,6 +82,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
81
82
  offthreadVideoCacheSizeInBytes,
82
83
  binariesDirectory,
83
84
  onBrowserDownload,
85
+ chromeMode,
84
86
  });
85
87
  const { compositionId, reason } = await (0, show_compositions_picker_1.showSingleCompositionsPicker)(comps, logLevel);
86
88
  if (compositionId && typeof compositionId === 'string') {
@@ -1,6 +1,6 @@
1
- import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
1
+ import type { BrowserExecutable, ChromeMode, ChromiumOptions, HeadlessBrowser, LogLevel, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
2
2
  import type { VideoConfig } from 'remotion';
3
- export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
3
+ export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }: {
4
4
  height: number | null;
5
5
  width: number | null;
6
6
  args: (string | number)[];
@@ -19,6 +19,7 @@ export declare const getCompositionWithDimensionOverride: ({ height, width, args
19
19
  offthreadVideoCacheSizeInBytes: number | null;
20
20
  binariesDirectory: string | null;
21
21
  onBrowserDownload: OnBrowserDownload;
22
+ chromeMode: ChromeMode;
22
23
  }) => Promise<{
23
24
  compositionId: string;
24
25
  reason: string;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCompositionWithDimensionOverride = void 0;
4
4
  const get_composition_id_1 = require("./get-composition-id");
5
- const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }) => {
5
+ const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }) => {
6
6
  const returnValue = await (0, get_composition_id_1.getCompositionId)({
7
7
  args,
8
8
  compositionIdFromUi,
@@ -20,6 +20,7 @@ const getCompositionWithDimensionOverride = async ({ height, width, args, compos
20
20
  offthreadVideoCacheSizeInBytes,
21
21
  binariesDirectory,
22
22
  onBrowserDownload,
23
+ chromeMode,
23
24
  });
24
25
  return {
25
26
  ...returnValue,
@@ -5,7 +5,7 @@ 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, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, } = client_1.BrowserSafeApis.options;
8
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, chromeModeOption, } = client_1.BrowserSafeApis.options;
9
9
  const getRenderDefaults = () => {
10
10
  var _a;
11
11
  const defaultJpegQuality = jpegQualityOption.getValue({
@@ -76,6 +76,9 @@ const getRenderDefaults = () => {
76
76
  const hardwareAcceleration = hardwareAccelerationOption.getValue({
77
77
  commandLine: parsed_cli_1.parsedCli,
78
78
  }).value;
79
+ const chromeMode = chromeModeOption.getValue({
80
+ commandLine: parsed_cli_1.parsedCli,
81
+ }).value;
79
82
  const everyNthFrame = config_1.ConfigInternals.getEveryNthFrame();
80
83
  const stillImageFormat = config_1.ConfigInternals.getUserPreferredStillImageFormat();
81
84
  const videoImageFormat = config_1.ConfigInternals.getUserPreferredVideoImageFormat();
@@ -121,6 +124,7 @@ const getRenderDefaults = () => {
121
124
  forSeamlessAacConcatenation,
122
125
  metadata,
123
126
  hardwareAcceleration,
127
+ chromeMode,
124
128
  };
125
129
  };
126
130
  exports.getRenderDefaults = getRenderDefaults;
package/dist/gpu.js CHANGED
@@ -9,7 +9,7 @@ const get_cli_options_1 = require("./get-cli-options");
9
9
  const log_1 = require("./log");
10
10
  const parsed_cli_1 = require("./parsed-cli");
11
11
  exports.GPU_COMMAND = 'gpu';
12
- const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, } = client_1.BrowserSafeApis.options;
12
+ const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, chromeModeOption, } = client_1.BrowserSafeApis.options;
13
13
  const gpuCommand = async (logLevel) => {
14
14
  const { browserExecutable, disableWebSecurity, ignoreCertificateErrors, userAgent, } = (0, get_cli_options_1.getCliOptions)({
15
15
  isStill: false,
@@ -26,6 +26,21 @@ const gpuCommand = async (logLevel) => {
26
26
  const headless = headlessOption.getValue({
27
27
  commandLine: parsed_cli_1.parsedCli,
28
28
  }).value;
29
+ const chromeMode = chromeModeOption.getValue({
30
+ commandLine: parsed_cli_1.parsedCli,
31
+ }).value;
32
+ const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
33
+ quiet: (0, parsed_cli_1.quietFlagProvided)(),
34
+ indent: false,
35
+ logLevel,
36
+ });
37
+ await renderer_1.RenderInternals.internalEnsureBrowser({
38
+ browserExecutable,
39
+ indent: false,
40
+ logLevel,
41
+ onBrowserDownload,
42
+ chromeMode,
43
+ });
29
44
  const chromiumOptions = {
30
45
  disableWebSecurity,
31
46
  enableMultiProcessOnLinux,
@@ -45,6 +60,7 @@ const gpuCommand = async (logLevel) => {
45
60
  logLevel,
46
61
  quiet: (0, parsed_cli_1.quietFlagProvided)(),
47
62
  }),
63
+ chromeMode,
48
64
  });
49
65
  for (const { feature, status } of statuses) {
50
66
  log_1.Log.info({ indent: false, logLevel }, `${feature}: ${colorStatus(status)}`);
package/dist/index.d.ts CHANGED
@@ -138,7 +138,7 @@ export declare const CliInternals: {
138
138
  shouldUseNonOverlayingLogger: ({ logLevel, }: {
139
139
  logLevel: import("@remotion/renderer").LogLevel;
140
140
  }) => boolean;
141
- getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
141
+ getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, chromeMode, }: {
142
142
  height: number | null;
143
143
  width: number | null;
144
144
  args: (string | number)[];
@@ -157,6 +157,7 @@ export declare const CliInternals: {
157
157
  offthreadVideoCacheSizeInBytes: number | null;
158
158
  binariesDirectory: string | null;
159
159
  onBrowserDownload: import("@remotion/renderer").OnBrowserDownload;
160
+ chromeMode: import("@remotion/renderer").ChromeMode;
160
161
  }) => Promise<{
161
162
  compositionId: string;
162
163
  reason: string;
@@ -1,7 +1,7 @@
1
- import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, ColorSpace, Crf, FfmpegOverrideFn, FrameRange, LogLevel, NumberOfGifLoops, PixelFormat, ProResProfile, VideoImageFormat, X264Preset } from '@remotion/renderer';
1
+ import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromeMode, ChromiumOptions, Codec, ColorSpace, Crf, FfmpegOverrideFn, FrameRange, LogLevel, NumberOfGifLoops, PixelFormat, ProResProfile, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
3
3
  import type { JobProgressCallback } from '@remotion/studio-server';
4
- export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, }: {
4
+ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, }: {
5
5
  remotionRoot: string;
6
6
  fullEntryPoint: string;
7
7
  entryPointReason: string;
@@ -56,4 +56,5 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
56
56
  publicPath: string | null;
57
57
  metadata: Record<string, string> | null;
58
58
  hardwareAcceleration: HardwareAccelerationOption;
59
+ chromeMode: ChromeMode;
59
60
  }) => Promise<void>;
@@ -51,7 +51,7 @@ const setup_cache_1 = require("../setup-cache");
51
51
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
52
52
  const truthy_1 = require("../truthy");
53
53
  const user_passed_output_location_1 = require("../user-passed-output-location");
54
- const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, }) => {
54
+ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, }) => {
55
55
  var _a;
56
56
  const isVerbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');
57
57
  (0, progress_bar_1.printFact)('verbose')({
@@ -74,6 +74,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
74
74
  indent,
75
75
  logLevel,
76
76
  onBrowserDownload,
77
+ chromeMode,
77
78
  });
78
79
  const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
79
80
  browser,
@@ -84,6 +85,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
84
85
  viewport: null,
85
86
  logLevel,
86
87
  onBrowserDownload,
88
+ chromeMode,
87
89
  });
88
90
  let isUsingParallelEncoding = false;
89
91
  const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
@@ -188,6 +190,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
188
190
  offthreadVideoCacheSizeInBytes,
189
191
  binariesDirectory,
190
192
  onBrowserDownload,
193
+ chromeMode,
191
194
  });
192
195
  const { onArtifact } = (0, on_artifact_1.handleOnArtifact)({
193
196
  artifactState,
@@ -330,6 +333,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
330
333
  forSeamlessAacConcatenation,
331
334
  onBrowserDownload,
332
335
  onArtifact,
336
+ chromeMode,
333
337
  });
334
338
  log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
335
339
  return;
@@ -416,6 +420,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
416
420
  onArtifact,
417
421
  metadata: metadata !== null && metadata !== void 0 ? metadata : null,
418
422
  hardwareAcceleration,
423
+ chromeMode,
419
424
  });
420
425
  if (!updatesDontOverwrite) {
421
426
  updateRenderProgress({ newline: true, printToConsole: true });
@@ -1,6 +1,6 @@
1
- import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
1
+ import type { Browser, BrowserExecutable, CancelSignal, ChromeMode, ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
2
2
  import type { JobProgressCallback } from '@remotion/studio-server';
3
- export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, }: {
3
+ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, }: {
4
4
  remotionRoot: string;
5
5
  fullEntryPoint: string;
6
6
  entryPointReason: string;
@@ -30,4 +30,5 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
30
30
  offthreadVideoCacheSizeInBytes: number | null;
31
31
  binariesDirectory: string | null;
32
32
  publicPath: string | null;
33
+ chromeMode: ChromeMode;
33
34
  }) => Promise<void>;
@@ -27,7 +27,7 @@ const setup_cache_1 = require("../setup-cache");
27
27
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
28
28
  const truthy_1 = require("../truthy");
29
29
  const user_passed_output_location_1 = require("../user-passed-output-location");
30
- const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, }) => {
30
+ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, }) => {
31
31
  var _a, _b;
32
32
  const isVerbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');
33
33
  log_1.Log.verbose({ indent, logLevel }, chalk_1.chalk.gray(`Entry point = ${fullEntryPoint} (${entryPointReason})`));
@@ -59,6 +59,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
59
59
  indent,
60
60
  logLevel,
61
61
  onBrowserDownload,
62
+ chromeMode,
62
63
  });
63
64
  const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
64
65
  browser,
@@ -69,6 +70,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
69
70
  viewport: null,
70
71
  logLevel,
71
72
  onBrowserDownload,
73
+ chromeMode,
72
74
  });
73
75
  const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
74
76
  fullPath: fullEntryPoint,
@@ -132,6 +134,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
132
134
  offthreadVideoCacheSizeInBytes,
133
135
  binariesDirectory,
134
136
  onBrowserDownload,
137
+ chromeMode,
135
138
  });
136
139
  const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalStillImageFormat)({
137
140
  cliFlag: (_a = parsed_cli_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
@@ -240,6 +243,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
240
243
  binariesDirectory,
241
244
  onBrowserDownload,
242
245
  onArtifact,
246
+ chromeMode,
243
247
  });
244
248
  aggregate.rendering = {
245
249
  frames: 1,
@@ -51,6 +51,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
51
51
  offthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
52
52
  binariesDirectory: job.binariesDirectory,
53
53
  publicPath: null,
54
+ chromeMode: job.chromeMode,
54
55
  });
55
56
  };
56
57
  exports.processStill = processStill;
@@ -77,6 +77,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
77
77
  publicPath: null,
78
78
  metadata: job.metadata,
79
79
  hardwareAcceleration: job.type === 'video' ? job.hardwareAcceleration : 'disable',
80
+ chromeMode: job.chromeMode,
80
81
  });
81
82
  };
82
83
  exports.processVideoJob = processVideoJob;
package/dist/render.js CHANGED
@@ -11,7 +11,7 @@ const get_cli_options_1 = require("./get-cli-options");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
13
13
  const render_1 = require("./render-flows/render");
14
- const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, } = client_1.BrowserSafeApis.options;
14
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, } = client_1.BrowserSafeApis.options;
15
15
  const render = async (remotionRoot, args, logLevel) => {
16
16
  const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)({ args, remotionRoot, logLevel, allowDirectory: true });
17
17
  if (!file) {
@@ -88,6 +88,7 @@ const render = async (remotionRoot, args, logLevel) => {
88
88
  }).value;
89
89
  const metadata = metadataOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
90
90
  const publicPath = publicPathOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
91
+ const chromeMode = chromeModeOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
91
92
  const chromiumOptions = {
92
93
  disableWebSecurity,
93
94
  enableMultiProcessOnLinux,
@@ -162,6 +163,7 @@ const render = async (remotionRoot, args, logLevel) => {
162
163
  publicPath,
163
164
  metadata,
164
165
  hardwareAcceleration,
166
+ chromeMode,
165
167
  });
166
168
  };
167
169
  exports.render = render;
package/dist/still.js CHANGED
@@ -11,7 +11,7 @@ const get_cli_options_1 = require("./get-cli-options");
11
11
  const log_1 = require("./log");
12
12
  const parsed_cli_1 = require("./parsed-cli");
13
13
  const still_1 = require("./render-flows/still");
14
- const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, } = client_1.BrowserSafeApis.options;
14
+ const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, } = client_1.BrowserSafeApis.options;
15
15
  const still = async (remotionRoot, args, logLevel) => {
16
16
  const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)({ args, remotionRoot, logLevel, allowDirectory: true });
17
17
  if (!file) {
@@ -59,6 +59,9 @@ const still = async (remotionRoot, args, logLevel) => {
59
59
  const publicDir = publicDirOption.getValue({
60
60
  commandLine: parsed_cli_1.parsedCli,
61
61
  }).value;
62
+ const chromeMode = chromeModeOption.getValue({
63
+ commandLine: parsed_cli_1.parsedCli,
64
+ }).value;
62
65
  const chromiumOptions = {
63
66
  disableWebSecurity,
64
67
  enableMultiProcessOnLinux,
@@ -103,6 +106,7 @@ const still = async (remotionRoot, args, logLevel) => {
103
106
  offthreadVideoCacheSizeInBytes,
104
107
  binariesDirectory,
105
108
  publicPath,
109
+ chromeMode,
106
110
  });
107
111
  };
108
112
  exports.still = still;
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.246",
6
+ "version": "4.0.247",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -33,14 +33,14 @@
33
33
  "dotenv": "9.0.2",
34
34
  "minimist": "1.2.6",
35
35
  "prompts": "2.4.2",
36
- "@remotion/bundler": "4.0.246",
37
- "@remotion/media-utils": "4.0.246",
38
- "@remotion/renderer": "4.0.246",
39
- "@remotion/studio-shared": "4.0.246",
40
- "@remotion/studio-server": "4.0.246",
41
- "@remotion/player": "4.0.246",
42
- "@remotion/studio": "4.0.246",
43
- "remotion": "4.0.246"
36
+ "@remotion/bundler": "4.0.247",
37
+ "@remotion/studio-server": "4.0.247",
38
+ "@remotion/studio": "4.0.247",
39
+ "@remotion/player": "4.0.247",
40
+ "remotion": "4.0.247",
41
+ "@remotion/renderer": "4.0.247",
42
+ "@remotion/studio-shared": "4.0.247",
43
+ "@remotion/media-utils": "4.0.247"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.8.0",
@@ -54,11 +54,11 @@
54
54
  "react-dom": "19.0.0",
55
55
  "zod": "3.22.3",
56
56
  "eslint": "9.14.0",
57
- "@remotion/zod-types": "4.0.246",
58
- "@remotion/tailwind": "4.0.246",
59
- "@remotion/skia": "4.0.246",
60
- "@remotion/eslint-config-internal": "4.0.246",
61
- "@remotion/enable-scss": "4.0.246"
57
+ "@remotion/zod-types": "4.0.247",
58
+ "@remotion/tailwind": "4.0.247",
59
+ "@remotion/skia": "4.0.247",
60
+ "@remotion/eslint-config-internal": "4.0.247",
61
+ "@remotion/enable-scss": "4.0.247"
62
62
  },
63
63
  "keywords": [
64
64
  "remotion",