@remotion/cli 4.0.424 → 4.0.426

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 (42) hide show
  1. package/dist/benchmark.js +46 -7
  2. package/dist/browser/ensure.js +5 -6
  3. package/dist/bundle.js +10 -3
  4. package/dist/compositions.js +18 -2
  5. package/dist/config/index.d.ts +24 -12
  6. package/dist/config/index.js +23 -51
  7. package/dist/config/number-of-shared-audio-tags.d.ts +2 -0
  8. package/dist/config/number-of-shared-audio-tags.js +12 -0
  9. package/dist/config/preview-server.js +3 -1
  10. package/dist/detect-remotion-server.d.ts +9 -0
  11. package/dist/detect-remotion-server.js +45 -0
  12. package/dist/extra-packages.js +2 -2
  13. package/dist/get-cli-options.d.ts +0 -10
  14. package/dist/get-cli-options.js +13 -33
  15. package/dist/get-composition-with-dimension-override.d.ts +3 -1
  16. package/dist/get-composition-with-dimension-override.js +3 -1
  17. package/dist/get-config-file-name.js +7 -4
  18. package/dist/get-env.js +11 -15
  19. package/dist/get-input-props.js +8 -5
  20. package/dist/get-render-defaults.js +16 -8
  21. package/dist/gpu.js +11 -7
  22. package/dist/index.d.ts +4 -12
  23. package/dist/index.js +9 -3
  24. package/dist/is-port-open.d.ts +1 -0
  25. package/dist/is-port-open.js +24 -0
  26. package/dist/list-of-remotion-packages.js +2 -0
  27. package/dist/parse-command-line.d.ts +0 -458
  28. package/dist/parse-command-line.js +0 -65
  29. package/dist/parsed-cli.d.ts +1104 -1
  30. package/dist/parsed-cli.js +24 -33
  31. package/dist/render-flows/render.d.ts +5 -1
  32. package/dist/render-flows/render.js +12 -1
  33. package/dist/render-flows/still.d.ts +5 -1
  34. package/dist/render-flows/still.js +5 -1
  35. package/dist/render-queue/process-still.js +13 -8
  36. package/dist/render-queue/process-video.js +14 -3
  37. package/dist/render.js +46 -4
  38. package/dist/setup-cache.d.ts +6 -2
  39. package/dist/setup-cache.js +5 -3
  40. package/dist/still.js +31 -3
  41. package/dist/studio.js +11 -18
  42. package/package.json +16 -16
@@ -6,47 +6,38 @@ 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 { beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, experimentalClientSideRenderingOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, } = client_1.BrowserSafeApis.options;
9
10
  exports.BooleanFlags = [
10
- 'overwrite',
11
- 'force',
12
- 'sequence',
11
+ overwriteOption.cliFlag,
12
+ imageSequenceOption.cliFlag,
13
13
  'help',
14
14
  'quiet',
15
15
  'q',
16
- 'muted',
17
- client_1.BrowserSafeApis.options.enforceAudioOption.cliFlag,
18
- // Lambda flags
19
- 'force',
20
- 'disable-chunk-optimization',
21
- 'save-browser-logs',
22
- 'disable-cloudwatch',
23
- 'enable-lambda-insights',
24
- 'yes',
25
- 'y',
26
- 'disable-web-security',
27
- client_1.BrowserSafeApis.options.darkModeOption.cliFlag,
28
- 'ignore-certificate-errors',
29
- 'disable-headless',
30
- 'disable-keyboard-shortcuts',
31
- 'default-only',
32
- 'no-open',
33
- client_1.BrowserSafeApis.options.ipv4Option.cliFlag,
34
- client_1.BrowserSafeApis.options.beepOnFinishOption.cliFlag,
35
- client_1.BrowserSafeApis.options.disableGitSourceOption.cliFlag,
36
- client_1.BrowserSafeApis.options.disallowParallelEncodingOption.cliFlag,
37
- client_1.BrowserSafeApis.options.forSeamlessAacConcatenationOption.cliFlag,
38
- 'repro',
39
- 'compatible-only',
40
- 'force-path-style',
41
- 'onlyAllocateCpuDuringRequestProcessing',
42
- client_1.BrowserSafeApis.options.isProductionOption.cliFlag,
43
- client_1.BrowserSafeApis.options.forceNewStudioOption.cliFlag,
16
+ mutedOption.cliFlag,
17
+ enforceAudioOption.cliFlag,
18
+ disableWebSecurityOption.cliFlag,
19
+ darkModeOption.cliFlag,
20
+ ignoreCertificateErrorsOption.cliFlag,
21
+ headlessOption.cliFlag,
22
+ keyboardShortcutsOption.cliFlag,
23
+ experimentalClientSideRenderingOption.cliFlag,
24
+ ipv4Option.cliFlag,
25
+ beepOnFinishOption.cliFlag,
26
+ disableGitSourceOption.cliFlag,
27
+ disallowParallelEncodingOption.cliFlag,
28
+ forSeamlessAacConcatenationOption.cliFlag,
29
+ reproOption.cliFlag,
30
+ isProductionOption.cliFlag,
31
+ forceNewStudioOption.cliFlag,
32
+ bundleCacheOption.cliFlag,
44
33
  ];
45
34
  exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
46
35
  boolean: exports.BooleanFlags,
47
36
  default: {
48
- overwrite: true,
49
- muted: null,
37
+ [overwriteOption.cliFlag]: true,
38
+ [bundleCacheOption.cliFlag]: null,
39
+ [experimentalClientSideRenderingOption.cliFlag]: null,
40
+ [mutedOption.cliFlag]: null,
50
41
  },
51
42
  });
52
43
  const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
@@ -1,6 +1,6 @@
1
1
  import type { BrowserExecutable, CancelSignal, ChromiumOptions, Crf, FfmpegOverrideFn, FrameRange, NumberOfGifLoops } from '@remotion/renderer';
2
2
  import type { JobProgressCallback } from '@remotion/studio-server';
3
- 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, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }: {
3
+ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, 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, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, shouldCache, }: {
4
4
  remotionRoot: string;
5
5
  fullEntryPoint: string;
6
6
  entryPointReason: string;
@@ -18,6 +18,8 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
18
18
  port: number | null;
19
19
  height: number | null;
20
20
  width: number | null;
21
+ fps: number | null;
22
+ durationInFrames: number | null;
21
23
  remainingArgs: (string | number)[];
22
24
  compositionIdFromUi: string | null;
23
25
  outputLocationFromUI: string | null;
@@ -60,7 +62,9 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
60
62
  audioLatencyHint: AudioContextLatencyCategory | null;
61
63
  imageSequencePattern: string | null;
62
64
  mediaCacheSizeInBytes: number | null;
65
+ rspack: boolean;
63
66
  askAIEnabled: boolean;
64
67
  experimentalClientSideRenderingEnabled: boolean;
65
68
  keyboardShortcutsEnabled: boolean;
69
+ shouldCache: boolean;
66
70
  }) => Promise<void>;
@@ -62,8 +62,13 @@ const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying
62
62
  const truthy_1 = require("../truthy");
63
63
  const user_passed_output_location_1 = require("../user-passed-output-location");
64
64
  const add_log_to_aggregate_progress_1 = require("./add-log-to-aggregate-progress");
65
- 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, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }) => {
65
+ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, fps, durationInFrames, 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, offthreadVideoThreads, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, metadata, hardwareAcceleration, chromeMode, audioLatencyHint, imageSequencePattern, mediaCacheSizeInBytes, rspack, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, shouldCache, }) => {
66
66
  var _a;
67
+ renderer_1.RenderInternals.validateConcurrency({
68
+ value: concurrency,
69
+ setting: 'concurrency',
70
+ checkIfValidForCurrentMachine: true,
71
+ });
67
72
  let bundlingProgress = null;
68
73
  let renderingProgress = null;
69
74
  let stitchingProgress = null;
@@ -185,6 +190,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
185
190
  experimentalClientSideRenderingEnabled,
186
191
  askAIEnabled,
187
192
  keyboardShortcutsEnabled,
193
+ rspack,
194
+ shouldCache,
188
195
  });
189
196
  addCleanupCallback(`Cleanup bundle`, () => cleanupBundle());
190
197
  const onDownload = (0, make_on_download_1.makeOnDownload)({
@@ -213,6 +220,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
213
220
  const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
214
221
  height,
215
222
  width,
223
+ fps,
224
+ durationInFrames,
216
225
  args: remainingArgs,
217
226
  compositionIdFromUi,
218
227
  browserExecutable,
@@ -427,6 +436,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
427
436
  ...config,
428
437
  width: width !== null && width !== void 0 ? width : config.width,
429
438
  height: height !== null && height !== void 0 ? height : config.height,
439
+ fps: fps !== null && fps !== void 0 ? fps : config.fps,
440
+ durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : config.durationInFrames,
430
441
  },
431
442
  crf: crf !== null && crf !== void 0 ? crf : null,
432
443
  envVariables,
@@ -1,6 +1,6 @@
1
1
  import type { BrowserExecutable, CancelSignal, ChromiumOptions } 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, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }: {
3
+ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, shouldCache, }: {
4
4
  remotionRoot: string;
5
5
  fullEntryPoint: string;
6
6
  entryPointReason: string;
@@ -19,6 +19,8 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
19
19
  publicDir: string | null;
20
20
  height: number | null;
21
21
  width: number | null;
22
+ fps: number | null;
23
+ durationInFrames: number | null;
22
24
  compositionIdFromUi: string | null;
23
25
  imageFormatFromUi: "jpeg" | "pdf" | "png" | "webp" | null;
24
26
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
@@ -34,7 +36,9 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
34
36
  chromeMode: "chrome-for-testing" | "headless-shell";
35
37
  audioLatencyHint: AudioContextLatencyCategory | null;
36
38
  mediaCacheSizeInBytes: number | null;
39
+ rspack: boolean;
37
40
  askAIEnabled: boolean;
38
41
  experimentalClientSideRenderingEnabled: boolean;
39
42
  keyboardShortcutsEnabled: boolean;
43
+ shouldCache: boolean;
40
44
  }) => Promise<void>;
@@ -28,7 +28,7 @@ const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying
28
28
  const truthy_1 = require("../truthy");
29
29
  const user_passed_output_location_1 = require("../user-passed-output-location");
30
30
  const add_log_to_aggregate_progress_1 = require("./add-log-to-aggregate-progress");
31
- 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, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }) => {
31
+ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, width, fps, durationInFrames, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, chromeMode, offthreadVideoThreads, audioLatencyHint, mediaCacheSizeInBytes, rspack, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, shouldCache, }) => {
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})`));
34
34
  const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
@@ -112,6 +112,8 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
112
112
  experimentalClientSideRenderingEnabled,
113
113
  askAIEnabled,
114
114
  keyboardShortcutsEnabled,
115
+ rspack,
116
+ shouldCache,
115
117
  });
116
118
  const server = await renderer_1.RenderInternals.prepareServer({
117
119
  offthreadVideoThreads: offthreadVideoThreads !== null && offthreadVideoThreads !== void 0 ? offthreadVideoThreads : renderer_1.RenderInternals.DEFAULT_RENDER_FRAMES_OFFTHREAD_VIDEO_THREADS,
@@ -131,6 +133,8 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
131
133
  const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
132
134
  height,
133
135
  width,
136
+ fps,
137
+ durationInFrames,
134
138
  args: remainingArgs,
135
139
  compositionIdFromUi,
136
140
  browserExecutable,
@@ -4,19 +4,16 @@ exports.processStill = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const preview_server_1 = require("../config/preview-server");
6
6
  const convert_entry_point_to_serve_url_1 = require("../convert-entry-point-to-serve-url");
7
- const get_cli_options_1 = require("../get-cli-options");
8
7
  const parsed_cli_1 = require("../parsed-cli");
9
8
  const still_1 = require("../render-flows/still");
10
- const { publicDirOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
9
+ const { publicDirOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, bundleCacheOption, } = client_1.BrowserSafeApis.options;
11
10
  const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, }) => {
12
11
  if (job.type !== 'still') {
13
12
  throw new Error('Expected still job');
14
13
  }
15
- const { browserExecutable } = (0, get_cli_options_1.getCliOptions)({
16
- isStill: true,
17
- logLevel: job.logLevel,
18
- indent: true,
19
- });
14
+ const browserExecutable = browserExecutableOption.getValue({
15
+ commandLine: parsed_cli_1.parsedCli,
16
+ }).value;
20
17
  const publicDir = publicDirOption.getValue({
21
18
  commandLine: parsed_cli_1.parsedCli,
22
19
  }).value;
@@ -27,6 +24,10 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
27
24
  const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
28
25
  commandLine: parsed_cli_1.parsedCli,
29
26
  }).value;
27
+ const shouldCache = bundleCacheOption.getValue({
28
+ commandLine: parsed_cli_1.parsedCli,
29
+ }).value;
30
+ const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
30
31
  const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(entryPoint);
31
32
  await (0, still_1.renderStillFlow)({
32
33
  remotionRoot,
@@ -36,6 +37,9 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
36
37
  entryPointReason: 'same as Studio',
37
38
  envVariables: job.envVariables,
38
39
  height: null,
40
+ width: null,
41
+ fps: null,
42
+ durationInFrames: null,
39
43
  fullEntryPoint,
40
44
  serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
41
45
  overwrite: true,
@@ -46,7 +50,6 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
46
50
  remainingArgs: [],
47
51
  scale: job.scale,
48
52
  stillFrame: job.frame,
49
- width: null,
50
53
  compositionIdFromUi: job.compositionId,
51
54
  imageFormatFromUi: job.imageFormat,
52
55
  logLevel: job.logLevel,
@@ -65,6 +68,8 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
65
68
  askAIEnabled,
66
69
  experimentalClientSideRenderingEnabled,
67
70
  keyboardShortcutsEnabled,
71
+ rspack,
72
+ shouldCache,
68
73
  });
69
74
  };
70
75
  exports.processStill = processStill;
@@ -7,7 +7,7 @@ const convert_entry_point_to_serve_url_1 = require("../convert-entry-point-to-se
7
7
  const get_cli_options_1 = require("../get-cli-options");
8
8
  const parsed_cli_1 = require("../parsed-cli");
9
9
  const render_1 = require("../render-flows/render");
10
- const { publicDirOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
10
+ const { publicDirOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, bundleCacheOption, } = client_1.BrowserSafeApis.options;
11
11
  const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addCleanupCallback, logLevel, }) => {
12
12
  var _a, _b, _c;
13
13
  if (job.type !== 'video' && job.type !== 'sequence') {
@@ -20,11 +20,18 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
20
20
  const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
21
21
  commandLine: parsed_cli_1.parsedCli,
22
22
  }).value;
23
- const { browserExecutable, ffmpegOverride } = (0, get_cli_options_1.getCliOptions)({
23
+ const shouldCache = bundleCacheOption.getValue({
24
+ commandLine: parsed_cli_1.parsedCli,
25
+ }).value;
26
+ const { ffmpegOverride } = (0, get_cli_options_1.getCliOptions)({
24
27
  isStill: true,
25
28
  logLevel,
26
29
  indent: true,
27
30
  });
31
+ const browserExecutable = browserExecutableOption.getValue({
32
+ commandLine: parsed_cli_1.parsedCli,
33
+ }).value;
34
+ const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
28
35
  const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(entryPoint);
29
36
  await (0, render_1.renderVideoFlow)({
30
37
  remotionRoot,
@@ -34,6 +41,9 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
34
41
  entryPointReason: 'same as Studio',
35
42
  envVariables: job.envVariables,
36
43
  height: null,
44
+ width: null,
45
+ fps: null,
46
+ durationInFrames: null,
37
47
  fullEntryPoint,
38
48
  serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
39
49
  overwrite: true,
@@ -43,7 +53,6 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
43
53
  jpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : undefined,
44
54
  remainingArgs: [],
45
55
  scale: job.scale,
46
- width: null,
47
56
  compositionIdFromUi: job.compositionId,
48
57
  logLevel: job.logLevel,
49
58
  onProgress,
@@ -90,6 +99,8 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
90
99
  experimentalClientSideRenderingEnabled: experimentalClientSideRenderingOption.getValue({ commandLine: parsed_cli_1.parsedCli })
91
100
  .value,
92
101
  keyboardShortcutsEnabled,
102
+ rspack,
103
+ shouldCache,
93
104
  });
94
105
  };
95
106
  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, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, imageSequencePatternOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
14
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, imageSequencePatternOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, concurrencyOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, } = 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) {
@@ -25,11 +25,43 @@ const render = async (remotionRoot, args, logLevel) => {
25
25
  log_1.Log.error({ indent: false, logLevel }, '--frame flag was passed to the `render` command. This flag only works with the `still` command. Did you mean `--frames`? See reference: https://www.remotion.dev/docs/cli/');
26
26
  process.exit(1);
27
27
  }
28
- const { concurrency, frameRange, shouldOutputImageSequence, inputProps, envVariables, browserExecutable, everyNthFrame, userAgent, disableWebSecurity, ignoreCertificateErrors, height, width, ffmpegOverride, proResProfile, pixelFormat, } = (0, get_cli_options_1.getCliOptions)({
28
+ const { frameRange, shouldOutputImageSequence, inputProps, envVariables, ffmpegOverride, } = (0, get_cli_options_1.getCliOptions)({
29
29
  isStill: false,
30
30
  logLevel,
31
31
  indent: false,
32
32
  });
33
+ const concurrency = concurrencyOption.getValue({
34
+ commandLine: parsed_cli_1.parsedCli,
35
+ }).value;
36
+ const height = overrideHeightOption.getValue({
37
+ commandLine: parsed_cli_1.parsedCli,
38
+ }).value;
39
+ const width = overrideWidthOption.getValue({
40
+ commandLine: parsed_cli_1.parsedCli,
41
+ }).value;
42
+ const fps = overrideFpsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
43
+ const durationInFrames = overrideDurationOption.getValue({
44
+ commandLine: parsed_cli_1.parsedCli,
45
+ }).value;
46
+ const pixelFormat = pixelFormatOption.getValue({
47
+ commandLine: parsed_cli_1.parsedCli,
48
+ }).value;
49
+ const browserExecutable = browserExecutableOption.getValue({
50
+ commandLine: parsed_cli_1.parsedCli,
51
+ }).value;
52
+ const everyNthFrame = everyNthFrameOption.getValue({
53
+ commandLine: parsed_cli_1.parsedCli,
54
+ }).value;
55
+ const proResProfile = proResProfileOption.getValue({
56
+ commandLine: parsed_cli_1.parsedCli,
57
+ }).value;
58
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
59
+ const disableWebSecurity = disableWebSecurityOption.getValue({
60
+ commandLine: parsed_cli_1.parsedCli,
61
+ }).value;
62
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
63
+ commandLine: parsed_cli_1.parsedCli,
64
+ }).value;
33
65
  const x264Preset = x264Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
34
66
  const audioBitrate = audioBitrateOption.getValue({
35
67
  commandLine: parsed_cli_1.parsedCli,
@@ -100,6 +132,7 @@ const render = async (remotionRoot, args, logLevel) => {
100
132
  const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
101
133
  commandLine: parsed_cli_1.parsedCli,
102
134
  }).value;
135
+ const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
103
136
  const chromiumOptions = {
104
137
  disableWebSecurity,
105
138
  enableMultiProcessOnLinux,
@@ -123,6 +156,12 @@ const render = async (remotionRoot, args, logLevel) => {
123
156
  const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
124
157
  commandLine: parsed_cli_1.parsedCli,
125
158
  }).value;
159
+ const shouldCache = bundleCacheOption.getValue({
160
+ commandLine: parsed_cli_1.parsedCli,
161
+ }).value;
162
+ const experimentalClientSideRenderingEnabled = experimentalClientSideRenderingOption.getValue({
163
+ commandLine: parsed_cli_1.parsedCli,
164
+ }).value;
126
165
  await (0, render_1.renderVideoFlow)({
127
166
  fullEntryPoint,
128
167
  remotionRoot,
@@ -144,6 +183,8 @@ const render = async (remotionRoot, args, logLevel) => {
144
183
  port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
145
184
  height,
146
185
  width,
186
+ fps,
187
+ durationInFrames,
147
188
  remainingArgs,
148
189
  compositionIdFromUi: null,
149
190
  entryPointReason,
@@ -190,9 +231,10 @@ const render = async (remotionRoot, args, logLevel) => {
190
231
  audioLatencyHint,
191
232
  imageSequencePattern,
192
233
  askAIEnabled,
193
- experimentalClientSideRenderingEnabled: experimentalClientSideRenderingOption.getValue({ commandLine: parsed_cli_1.parsedCli })
194
- .value,
234
+ experimentalClientSideRenderingEnabled,
195
235
  keyboardShortcutsEnabled,
236
+ rspack,
237
+ shouldCache,
196
238
  });
197
239
  };
198
240
  exports.render = render;
@@ -1,6 +1,6 @@
1
1
  import type { BundlingState, CopyingState } from '@remotion/studio-server';
2
2
  import type { GitSource } from '@remotion/studio-shared';
3
- export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, }: {
3
+ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, rspack, shouldCache, }: {
4
4
  fullPath: string;
5
5
  remotionRoot: string;
6
6
  publicDir: string | null;
@@ -22,11 +22,13 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
22
22
  experimentalClientSideRenderingEnabled: boolean;
23
23
  askAIEnabled: boolean;
24
24
  keyboardShortcutsEnabled: boolean;
25
+ rspack: boolean;
26
+ shouldCache: boolean;
25
27
  }) => Promise<{
26
28
  urlOrBundle: string;
27
29
  cleanup: () => void;
28
30
  }>;
29
- export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, }: {
31
+ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, rspack, shouldCache, }: {
30
32
  fullPath: string;
31
33
  remotionRoot: string;
32
34
  publicDir: string | null;
@@ -48,4 +50,6 @@ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgre
48
50
  experimentalClientSideRenderingEnabled: boolean;
49
51
  keyboardShortcutsEnabled: boolean;
50
52
  askAIEnabled: boolean;
53
+ rspack: boolean;
54
+ shouldCache: boolean;
51
55
  }) => Promise<string>;
@@ -13,7 +13,7 @@ const get_render_defaults_1 = require("./get-render-defaults");
13
13
  const log_1 = require("./log");
14
14
  const progress_bar_1 = require("./progress-bar");
15
15
  const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
16
- const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, }) => {
16
+ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, rspack, shouldCache, }) => {
17
17
  const isServeUrl = renderer_1.RenderInternals.isServeUrl(fullPath);
18
18
  const isBundle = (0, fs_1.existsSync)(fullPath) && (0, fs_1.existsSync)(path_1.default.join(fullPath, 'index.html'));
19
19
  if (isServeUrl || isBundle) {
@@ -51,6 +51,8 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
51
51
  experimentalClientSideRenderingEnabled,
52
52
  askAIEnabled,
53
53
  keyboardShortcutsEnabled,
54
+ rspack,
55
+ shouldCache,
54
56
  });
55
57
  return {
56
58
  urlOrBundle: bundled,
@@ -58,9 +60,8 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
58
60
  };
59
61
  };
60
62
  exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
61
- const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, }) => {
63
+ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, audioLatencyHint, experimentalClientSideRenderingEnabled, askAIEnabled, keyboardShortcutsEnabled, rspack, shouldCache, }) => {
62
64
  var _a;
63
- const shouldCache = config_1.ConfigInternals.getWebpackCaching();
64
65
  const symlinkState = {
65
66
  symlinks: [],
66
67
  };
@@ -112,6 +113,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
112
113
  publicPath,
113
114
  askAIEnabled,
114
115
  keyboardShortcutsEnabled,
116
+ rspack,
115
117
  };
116
118
  const [hash] = await bundler_1.BundlerInternals.getConfig({
117
119
  outDir: '',
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, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
14
+ const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, offthreadVideoThreadsOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, } = 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) {
@@ -25,11 +25,31 @@ const still = async (remotionRoot, args, logLevel) => {
25
25
  log_1.Log.error({ indent: false, logLevel }, '--frames flag was passed to the `still` command. This flag only works with the `render` command. Did you mean `--frame`? See reference: https://www.remotion.dev/docs/cli/');
26
26
  process.exit(1);
27
27
  }
28
- const { browserExecutable, envVariables, height, inputProps, stillFrame, width, disableWebSecurity, ignoreCertificateErrors, userAgent, } = (0, get_cli_options_1.getCliOptions)({
28
+ const { envVariables, inputProps, stillFrame } = (0, get_cli_options_1.getCliOptions)({
29
29
  isStill: true,
30
30
  logLevel,
31
31
  indent: false,
32
32
  });
33
+ const height = overrideHeightOption.getValue({
34
+ commandLine: parsed_cli_1.parsedCli,
35
+ }).value;
36
+ const width = overrideWidthOption.getValue({
37
+ commandLine: parsed_cli_1.parsedCli,
38
+ }).value;
39
+ const fps = overrideFpsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
40
+ const durationInFrames = overrideDurationOption.getValue({
41
+ commandLine: parsed_cli_1.parsedCli,
42
+ }).value;
43
+ const browserExecutable = browserExecutableOption.getValue({
44
+ commandLine: parsed_cli_1.parsedCli,
45
+ }).value;
46
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
47
+ const disableWebSecurity = disableWebSecurityOption.getValue({
48
+ commandLine: parsed_cli_1.parsedCli,
49
+ }).value;
50
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
51
+ commandLine: parsed_cli_1.parsedCli,
52
+ }).value;
33
53
  const jpegQuality = jpegQualityOption.getValue({
34
54
  commandLine: parsed_cli_1.parsedCli,
35
55
  }).value;
@@ -76,6 +96,10 @@ const still = async (remotionRoot, args, logLevel) => {
76
96
  const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
77
97
  commandLine: parsed_cli_1.parsedCli,
78
98
  }).value;
99
+ const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
100
+ const shouldCache = bundleCacheOption.getValue({
101
+ commandLine: parsed_cli_1.parsedCli,
102
+ }).value;
79
103
  const chromiumOptions = {
80
104
  disableWebSecurity,
81
105
  enableMultiProcessOnLinux,
@@ -95,6 +119,9 @@ const still = async (remotionRoot, args, logLevel) => {
95
119
  chromiumOptions,
96
120
  envVariables,
97
121
  height,
122
+ width,
123
+ fps,
124
+ durationInFrames,
98
125
  serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
99
126
  data: inputProps,
100
127
  indent: undefined,
@@ -107,7 +134,6 @@ const still = async (remotionRoot, args, logLevel) => {
107
134
  jpegQuality,
108
135
  scale,
109
136
  stillFrame,
110
- width,
111
137
  compositionIdFromUi: null,
112
138
  imageFormatFromUi: null,
113
139
  logLevel,
@@ -129,6 +155,8 @@ const still = async (remotionRoot, args, logLevel) => {
129
155
  experimentalClientSideRenderingEnabled: experimentalClientSideRenderingOption.getValue({ commandLine: parsed_cli_1.parsedCli })
130
156
  .value,
131
157
  keyboardShortcutsEnabled,
158
+ rspack,
159
+ shouldCache,
132
160
  });
133
161
  };
134
162
  exports.still = still;
package/dist/studio.js CHANGED
@@ -13,18 +13,9 @@ const get_render_defaults_1 = require("./get-render-defaults");
13
13
  const log_1 = require("./log");
14
14
  const parsed_cli_1 = require("./parsed-cli");
15
15
  const queue_1 = require("./render-queue/queue");
16
- const getPort = () => {
17
- if (parsed_cli_1.parsedCli.port) {
18
- return parsed_cli_1.parsedCli.port;
19
- }
20
- const serverPort = config_1.ConfigInternals.getStudioPort();
21
- if (serverPort) {
22
- return serverPort;
23
- }
24
- return null;
25
- };
26
- const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, } = client_1.BrowserSafeApis.options;
16
+ const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, } = client_1.BrowserSafeApis.options;
27
17
  const studioCommand = async (remotionRoot, args, logLevel) => {
18
+ var _a, _b, _c;
28
19
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
29
20
  args,
30
21
  remotionRoot,
@@ -38,7 +29,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
38
29
  log_1.Log.error({ indent: false, logLevel }, 'See https://www.remotion.dev/docs/register-root for more information.');
39
30
  process.exit(1);
40
31
  }
41
- const desiredPort = getPort();
32
+ const desiredPort = (_b = (_a = portOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getStudioPort()) !== null && _b !== void 0 ? _b : null;
42
33
  const fullEntryPath = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
43
34
  let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
44
35
  studio_server_1.StudioServerInternals.waitForLiveEventsListener().then((listener) => {
@@ -83,12 +74,16 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
83
74
  commandLine: parsed_cli_1.parsedCli,
84
75
  }).value;
85
76
  const gitSource = (0, get_github_repository_1.getGitSource)({ remotionRoot, disableGitSource, logLevel });
77
+ const useRspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
78
+ if (useRspack) {
79
+ log_1.Log.warn({ indent: false, logLevel }, 'Enabling experimental Rspack bundler.');
80
+ }
86
81
  const result = await studio_server_1.StudioServerInternals.startStudio({
87
82
  previewEntry: require.resolve('@remotion/studio/previewEntry'),
88
83
  browserArgs: parsed_cli_1.parsedCli['browser-args'],
89
- browserFlag: parsed_cli_1.parsedCli.browser,
84
+ browserFlag: (_c = browserOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _c !== void 0 ? _c : '',
90
85
  logLevel,
91
- configValueShouldOpenBrowser: config_1.ConfigInternals.getShouldOpenBrowser(),
86
+ shouldOpenBrowser: !noOpenOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
92
87
  fullEntryPath,
93
88
  getCurrentInputProps: () => inputProps,
94
89
  getEnvVariables: () => envVariables,
@@ -99,7 +94,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
99
94
  remotionRoot,
100
95
  relativePublicDir,
101
96
  webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
102
- poll: config_1.ConfigInternals.getWebpackPolling(),
97
+ poll: webpackPollOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
103
98
  getRenderDefaults: get_render_defaults_1.getRenderDefaults,
104
99
  getRenderQueue: queue_1.getRenderQueue,
105
100
  numberOfAudioTags: numberOfSharedAudioTagsOption.getValue({
@@ -110,9 +105,6 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
110
105
  cancelJob: queue_1.cancelJob,
111
106
  removeJob: queue_1.removeJob,
112
107
  },
113
- // Minimist quirk: Adding `--no-open` flag will result in {['no-open']: false, open: true}
114
- // @ts-expect-error
115
- parsedCliOpen: parsed_cli_1.parsedCli.open,
116
108
  gitSource,
117
109
  bufferStateDelayInMilliseconds: config_1.ConfigInternals.getBufferStateDelayInMilliseconds(),
118
110
  binariesDirectory,
@@ -123,6 +115,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
123
115
  enableCrossSiteIsolation,
124
116
  askAIEnabled,
125
117
  forceNew: forceNewStudioOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
118
+ rspack: useRspack,
126
119
  });
127
120
  if (result.type === 'already-running') {
128
121
  return;