@remotion/cli 4.0.424 → 4.0.425

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPortOpen = void 0;
4
+ const net_1 = require("net");
5
+ const isPortOpen = (port) => {
6
+ return new Promise((resolve, reject) => {
7
+ const server = (0, net_1.createServer)();
8
+ server.once('error', (err) => {
9
+ if (err.code === 'EADDRINUSE') {
10
+ resolve(false);
11
+ }
12
+ else {
13
+ reject(err);
14
+ }
15
+ });
16
+ server.once('listening', () => {
17
+ server.close(() => {
18
+ resolve(true);
19
+ });
20
+ });
21
+ server.listen(port);
22
+ });
23
+ };
24
+ exports.isPortOpen = isPortOpen;
@@ -1,6 +1,5 @@
1
- import type { AudioCodec, BrowserExecutable, Codec, OpenGlRenderer, PixelFormat, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
1
+ import type { AudioCodec, Codec, OpenGlRenderer, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
2
2
  import type { TypeOfOption } from '@remotion/renderer/client';
3
- import type { _InternalTypes } from 'remotion';
4
3
  declare const beepOnFinishOption: {
5
4
  name: string;
6
5
  cliFlag: "beep-on-finish";
@@ -31,6 +30,21 @@ declare const beepOnFinishOption: {
31
30
  };
32
31
  setConfig: (value: "bt2020-ncl" | "bt601" | "bt709" | "default" | null) => void;
33
32
  id: "color-space";
33
+ }, concurrencyOption: {
34
+ name: string;
35
+ cliFlag: "concurrency";
36
+ description: () => import("react/jsx-runtime").JSX.Element;
37
+ ssrName: "concurrency";
38
+ docLink: string;
39
+ type: import("@remotion/renderer").Concurrency;
40
+ getValue: ({ commandLine }: {
41
+ commandLine: Record<string, unknown>;
42
+ }) => {
43
+ source: string;
44
+ value: import("@remotion/renderer").Concurrency;
45
+ };
46
+ setConfig: (value: import("@remotion/renderer").Concurrency) => void;
47
+ id: "concurrency";
34
48
  }, disallowParallelEncodingOption: {
35
49
  name: string;
36
50
  cliFlag: "disallow-parallel-encoding";
@@ -379,19 +393,202 @@ declare const beepOnFinishOption: {
379
393
  };
380
394
  setConfig(value: boolean): void;
381
395
  id: "ipv4";
396
+ }, pixelFormatOption: {
397
+ name: string;
398
+ cliFlag: "pixel-format";
399
+ description: () => import("react/jsx-runtime").JSX.Element;
400
+ ssrName: "pixelFormat";
401
+ docLink: string;
402
+ type: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le";
403
+ getValue: ({ commandLine }: {
404
+ commandLine: Record<string, unknown>;
405
+ }) => {
406
+ source: string;
407
+ value: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le";
408
+ };
409
+ setConfig: (value: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le") => void;
410
+ id: "pixel-format";
411
+ }, browserExecutableOption: {
412
+ name: string;
413
+ cliFlag: "browser-executable";
414
+ description: () => import("react/jsx-runtime").JSX.Element;
415
+ ssrName: "browserExecutable";
416
+ docLink: string;
417
+ type: import("@remotion/renderer").BrowserExecutable;
418
+ getValue: ({ commandLine }: {
419
+ commandLine: Record<string, unknown>;
420
+ }) => {
421
+ source: string;
422
+ value: import("@remotion/renderer").BrowserExecutable;
423
+ };
424
+ setConfig: (value: import("@remotion/renderer").BrowserExecutable) => void;
425
+ id: "browser-executable";
426
+ }, everyNthFrameOption: {
427
+ name: string;
428
+ cliFlag: "every-nth-frame";
429
+ description: () => import("react/jsx-runtime").JSX.Element;
430
+ ssrName: "everyNthFrame";
431
+ docLink: string;
432
+ type: number;
433
+ getValue: ({ commandLine }: {
434
+ commandLine: Record<string, unknown>;
435
+ }) => {
436
+ source: string;
437
+ value: number;
438
+ };
439
+ setConfig: (value: number) => void;
440
+ id: "every-nth-frame";
441
+ }, proResProfileOption: {
442
+ name: string;
443
+ cliFlag: "prores-profile";
444
+ description: () => import("react/jsx-runtime").JSX.Element;
445
+ ssrName: "proResProfile";
446
+ docLink: string;
447
+ type: import("@remotion/renderer/client").ProResProfile | undefined;
448
+ getValue: ({ commandLine }: {
449
+ commandLine: Record<string, unknown>;
450
+ }) => {
451
+ source: string;
452
+ value: import("@remotion/renderer/client").ProResProfile;
453
+ } | {
454
+ source: string;
455
+ value: undefined;
456
+ };
457
+ setConfig: (value: import("@remotion/renderer/client").ProResProfile | undefined) => void;
458
+ id: "prores-profile";
459
+ }, userAgentOption: {
460
+ name: string;
461
+ cliFlag: "user-agent";
462
+ description: () => import("react/jsx-runtime").JSX.Element;
463
+ ssrName: "userAgent";
464
+ docLink: string;
465
+ type: string | null;
466
+ getValue: ({ commandLine }: {
467
+ commandLine: Record<string, unknown>;
468
+ }) => {
469
+ source: string;
470
+ value: string;
471
+ } | {
472
+ source: string;
473
+ value: null;
474
+ };
475
+ setConfig: (value: string | null) => void;
476
+ id: "user-agent";
477
+ }, disableWebSecurityOption: {
478
+ name: string;
479
+ cliFlag: "disable-web-security";
480
+ description: () => import("react/jsx-runtime").JSX.Element;
481
+ ssrName: "disableWebSecurity";
482
+ docLink: string;
483
+ type: boolean;
484
+ getValue: ({ commandLine }: {
485
+ commandLine: Record<string, unknown>;
486
+ }) => {
487
+ source: string;
488
+ value: boolean;
489
+ };
490
+ setConfig: (value: boolean) => void;
491
+ id: "disable-web-security";
492
+ }, ignoreCertificateErrorsOption: {
493
+ name: string;
494
+ cliFlag: "ignore-certificate-errors";
495
+ description: () => import("react/jsx-runtime").JSX.Element;
496
+ ssrName: "ignoreCertificateErrors";
497
+ docLink: string;
498
+ type: boolean;
499
+ getValue: ({ commandLine }: {
500
+ commandLine: Record<string, unknown>;
501
+ }) => {
502
+ source: string;
503
+ value: boolean;
504
+ };
505
+ setConfig: (value: boolean) => void;
506
+ id: "ignore-certificate-errors";
507
+ }, overrideHeightOption: {
508
+ name: string;
509
+ cliFlag: "height";
510
+ description: () => import("react/jsx-runtime").JSX.Element;
511
+ ssrName: null;
512
+ docLink: string;
513
+ type: number | null;
514
+ getValue: ({ commandLine }: {
515
+ commandLine: Record<string, unknown>;
516
+ }) => {
517
+ source: string;
518
+ value: number;
519
+ } | {
520
+ source: string;
521
+ value: null;
522
+ };
523
+ setConfig: (height: number | null) => void;
524
+ id: "height";
525
+ }, overrideWidthOption: {
526
+ name: string;
527
+ cliFlag: "width";
528
+ description: () => import("react/jsx-runtime").JSX.Element;
529
+ ssrName: null;
530
+ docLink: string;
531
+ type: number | null;
532
+ getValue: ({ commandLine }: {
533
+ commandLine: Record<string, unknown>;
534
+ }) => {
535
+ source: string;
536
+ value: number;
537
+ } | {
538
+ source: string;
539
+ value: null;
540
+ };
541
+ setConfig: (width: number | null) => void;
542
+ id: "width";
543
+ }, overrideFpsOption: {
544
+ name: string;
545
+ cliFlag: "fps";
546
+ description: () => import("react/jsx-runtime").JSX.Element;
547
+ ssrName: null;
548
+ docLink: string;
549
+ type: number | null;
550
+ getValue: ({ commandLine }: {
551
+ commandLine: Record<string, unknown>;
552
+ }) => {
553
+ source: string;
554
+ value: number;
555
+ } | {
556
+ source: string;
557
+ value: null;
558
+ };
559
+ setConfig: (fps: number | null) => void;
560
+ id: "fps";
561
+ }, overrideDurationOption: {
562
+ name: string;
563
+ cliFlag: "duration";
564
+ description: () => import("react/jsx-runtime").JSX.Element;
565
+ ssrName: null;
566
+ docLink: string;
567
+ type: number | null;
568
+ getValue: ({ commandLine }: {
569
+ commandLine: Record<string, unknown>;
570
+ }) => {
571
+ source: string;
572
+ value: number;
573
+ } | {
574
+ source: string;
575
+ value: null;
576
+ };
577
+ setConfig: (duration: number | null) => void;
578
+ id: "duration";
382
579
  };
383
580
  export type CommandLineOptions = {
384
- ['browser-executable']: BrowserExecutable;
385
- ['pixel-format']: PixelFormat;
581
+ [browserExecutableOption.cliFlag]: TypeOfOption<typeof browserExecutableOption>;
582
+ [pixelFormatOption.cliFlag]: TypeOfOption<typeof pixelFormatOption>;
386
583
  ['image-format']: VideoImageFormat | StillImageFormat;
387
- ['prores-profile']: _InternalTypes['ProResProfile'];
584
+ [proResProfileOption.cliFlag]: TypeOfOption<typeof proResProfileOption>;
388
585
  [x264Option.cliFlag]: TypeOfOption<typeof x264Option>;
389
586
  ['bundle-cache']: string;
390
587
  ['env-file']: string;
391
- ['ignore-certificate-errors']: string;
588
+ [ignoreCertificateErrorsOption.cliFlag]: TypeOfOption<typeof ignoreCertificateErrorsOption>;
392
589
  [darkModeOption.cliFlag]: TypeOfOption<typeof darkModeOption>;
393
- ['disable-web-security']: string;
394
- ['every-nth-frame']: number;
590
+ [disableWebSecurityOption.cliFlag]: TypeOfOption<typeof disableWebSecurityOption>;
591
+ [everyNthFrameOption.cliFlag]: TypeOfOption<typeof everyNthFrameOption>;
395
592
  [numberOfGifLoopsOption.cliFlag]: TypeOfOption<typeof numberOfGifLoopsOption>;
396
593
  [numberOfSharedAudioTagsOption.cliFlag]: TypeOfOption<typeof numberOfSharedAudioTagsOption>;
397
594
  [offthreadVideoCacheSizeInBytesOption.cliFlag]: TypeOfOption<typeof offthreadVideoCacheSizeInBytesOption>;
@@ -400,7 +597,7 @@ export type CommandLineOptions = {
400
597
  [beepOnFinishOption.cliFlag]: TypeOfOption<typeof beepOnFinishOption>;
401
598
  version: string;
402
599
  codec: Codec;
403
- concurrency: number;
600
+ [concurrencyOption.cliFlag]: TypeOfOption<typeof concurrencyOption>;
404
601
  timeout: number;
405
602
  config: string;
406
603
  ['public-dir']: string;
@@ -431,8 +628,10 @@ export type CommandLineOptions = {
431
628
  ['disable-keyboard-shortcuts']: boolean;
432
629
  ['enable-experimental-client-side-rendering']: boolean;
433
630
  muted: boolean;
434
- height: number;
435
- width: number;
631
+ [overrideHeightOption.cliFlag]: TypeOfOption<typeof overrideHeightOption>;
632
+ [overrideWidthOption.cliFlag]: TypeOfOption<typeof overrideWidthOption>;
633
+ [overrideFpsOption.cliFlag]: TypeOfOption<typeof overrideFpsOption>;
634
+ [overrideDurationOption.cliFlag]: TypeOfOption<typeof overrideDurationOption>;
436
635
  runs: number;
437
636
  concurrencies: string;
438
637
  [enforceAudioOption.cliFlag]: TypeOfOption<typeof enforceAudioOption>;
@@ -442,7 +641,7 @@ export type CommandLineOptions = {
442
641
  ['no-open']: boolean;
443
642
  ['browser']: string;
444
643
  ['browser-args']: string;
445
- ['user-agent']: string;
644
+ [userAgentOption.cliFlag]: TypeOfOption<typeof userAgentOption>;
446
645
  ['out-dir']: string;
447
646
  [audioLatencyHintOption.cliFlag]: AudioContextLatencyCategory;
448
647
  [ipv4Option.cliFlag]: TypeOfOption<typeof ipv4Option>;
@@ -3,40 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseCommandLine = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const config_1 = require("./config");
6
- const log_1 = require("./log");
7
6
  const parsed_cli_1 = require("./parsed-cli");
8
- const { beepOnFinishOption, colorSpaceOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, } = client_1.BrowserSafeApis.options;
7
+ 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, } = client_1.BrowserSafeApis.options;
9
8
  const parseCommandLine = () => {
10
- if (parsed_cli_1.parsedCli['pixel-format']) {
11
- config_1.Config.setPixelFormat(parsed_cli_1.parsedCli['pixel-format']);
12
- }
13
- if (parsed_cli_1.parsedCli['browser-executable']) {
14
- config_1.Config.setBrowserExecutable(parsed_cli_1.parsedCli['browser-executable']);
15
- }
16
9
  if (typeof parsed_cli_1.parsedCli['bundle-cache'] !== 'undefined') {
17
10
  config_1.Config.setCachingEnabled(parsed_cli_1.parsedCli['bundle-cache'] !== 'false');
18
11
  }
19
- if (parsed_cli_1.parsedCli['disable-web-security']) {
20
- config_1.Config.setChromiumDisableWebSecurity(true);
21
- }
22
- if (parsed_cli_1.parsedCli['ignore-certificate-errors']) {
23
- config_1.Config.setChromiumIgnoreCertificateErrors(true);
24
- }
25
- if (parsed_cli_1.parsedCli[darkModeOption.cliFlag]) {
26
- config_1.Config.setChromiumDarkMode(parsed_cli_1.parsedCli[darkModeOption.cliFlag]);
27
- }
28
- if (parsed_cli_1.parsedCli['user-agent']) {
29
- config_1.Config.setChromiumUserAgent(parsed_cli_1.parsedCli['user-agent']);
30
- }
31
- if (parsed_cli_1.parsedCli.concurrency) {
32
- config_1.Config.setConcurrency(parsed_cli_1.parsedCli.concurrency);
33
- }
34
- if (parsed_cli_1.parsedCli.height) {
35
- config_1.Config.overrideHeight(parsed_cli_1.parsedCli.height);
36
- }
37
- if (parsed_cli_1.parsedCli.width) {
38
- config_1.Config.overrideWidth(parsed_cli_1.parsedCli.width);
39
- }
40
12
  if (parsed_cli_1.parsedCli.frames) {
41
13
  config_1.ConfigInternals.setFrameRangeFromCli(parsed_cli_1.parsedCli.frames);
42
14
  }
@@ -49,30 +21,10 @@ const parseCommandLine = () => {
49
21
  if (parsed_cli_1.parsedCli.sequence) {
50
22
  config_1.Config.setImageSequence(true);
51
23
  }
52
- if (parsed_cli_1.parsedCli['every-nth-frame']) {
53
- config_1.Config.setEveryNthFrame(parsed_cli_1.parsedCli['every-nth-frame']);
54
- }
55
- if (parsed_cli_1.parsedCli['prores-profile']) {
56
- config_1.Config.setProResProfile(String(parsed_cli_1.parsedCli['prores-profile']));
57
- }
58
24
  if (parsed_cli_1.parsedCli['license-key'] &&
59
25
  parsed_cli_1.parsedCli['license-key'].startsWith('rm_pub_')) {
60
26
  config_1.Config.setPublicLicenseKey(parsed_cli_1.parsedCli['license-key']);
61
27
  }
62
- if (parsed_cli_1.parsedCli['public-license-key']) {
63
- config_1.Config.setPublicLicenseKey(parsed_cli_1.parsedCli['public-license-key']);
64
- }
65
- if (typeof parsed_cli_1.parsedCli.quality !== 'undefined') {
66
- log_1.Log.warn({ indent: false, logLevel: 'info' }, 'The --quality flag has been renamed to --jpeg-quality instead.');
67
- config_1.Config.setJpegQuality(parsed_cli_1.parsedCli.quality);
68
- }
69
- if (typeof parsed_cli_1.parsedCli.scale !== 'undefined') {
70
- config_1.Config.setScale(parsed_cli_1.parsedCli.scale);
71
- }
72
- if (typeof parsed_cli_1.parsedCli['enable-experimental-client-side-rendering'] !==
73
- 'undefined') {
74
- config_1.Config.setExperimentalClientSideRenderingEnabled(parsed_cli_1.parsedCli['enable-experimental-client-side-rendering']);
75
- }
76
28
  if (typeof parsed_cli_1.parsedCli['webpack-poll'] !== 'undefined') {
77
29
  config_1.Config.setWebpackPollingInMilliseconds(parsed_cli_1.parsedCli['webpack-poll']);
78
30
  }
@@ -23,9 +23,9 @@ exports.BooleanFlags = [
23
23
  'enable-lambda-insights',
24
24
  'yes',
25
25
  'y',
26
- 'disable-web-security',
26
+ client_1.BrowserSafeApis.options.disableWebSecurityOption.cliFlag,
27
27
  client_1.BrowserSafeApis.options.darkModeOption.cliFlag,
28
- 'ignore-certificate-errors',
28
+ client_1.BrowserSafeApis.options.ignoreCertificateErrorsOption.cliFlag,
29
29
  'disable-headless',
30
30
  'disable-keyboard-shortcuts',
31
31
  'default-only',
@@ -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, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }: {
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;
@@ -62,7 +62,7 @@ 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, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }) => {
66
66
  var _a;
67
67
  let bundlingProgress = null;
68
68
  let renderingProgress = null;
@@ -213,6 +213,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
213
213
  const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
214
214
  height,
215
215
  width,
216
+ fps,
217
+ durationInFrames,
216
218
  args: remainingArgs,
217
219
  compositionIdFromUi,
218
220
  browserExecutable,
@@ -427,6 +429,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
427
429
  ...config,
428
430
  width: width !== null && width !== void 0 ? width : config.width,
429
431
  height: height !== null && height !== void 0 ? height : config.height,
432
+ fps: fps !== null && fps !== void 0 ? fps : config.fps,
433
+ durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : config.durationInFrames,
430
434
  },
431
435
  crf: crf !== null && crf !== void 0 ? crf : null,
432
436
  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, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }: {
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";
@@ -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, askAIEnabled, experimentalClientSideRenderingEnabled, keyboardShortcutsEnabled, }) => {
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)();
@@ -131,6 +131,8 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
131
131
  const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
132
132
  height,
133
133
  width,
134
+ fps,
135
+ durationInFrames,
134
136
  args: remainingArgs,
135
137
  compositionIdFromUi,
136
138
  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, browserExecutableOption, } = 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;
@@ -36,6 +33,9 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
36
33
  entryPointReason: 'same as Studio',
37
34
  envVariables: job.envVariables,
38
35
  height: null,
36
+ width: null,
37
+ fps: null,
38
+ durationInFrames: null,
39
39
  fullEntryPoint,
40
40
  serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
41
41
  overwrite: true,
@@ -46,7 +46,6 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
46
46
  remainingArgs: [],
47
47
  scale: job.scale,
48
48
  stillFrame: job.frame,
49
- width: null,
50
49
  compositionIdFromUi: job.compositionId,
51
50
  imageFormatFromUi: job.imageFormat,
52
51
  logLevel: job.logLevel,
@@ -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, browserExecutableOption, } = 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,14 @@ 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 { ffmpegOverride } = (0, get_cli_options_1.getCliOptions)({
24
24
  isStill: true,
25
25
  logLevel,
26
26
  indent: true,
27
27
  });
28
+ const browserExecutable = browserExecutableOption.getValue({
29
+ commandLine: parsed_cli_1.parsedCli,
30
+ }).value;
28
31
  const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(entryPoint);
29
32
  await (0, render_1.renderVideoFlow)({
30
33
  remotionRoot,
@@ -34,6 +37,9 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
34
37
  entryPointReason: 'same as Studio',
35
38
  envVariables: job.envVariables,
36
39
  height: null,
40
+ width: null,
41
+ fps: null,
42
+ durationInFrames: null,
37
43
  fullEntryPoint,
38
44
  serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
39
45
  overwrite: true,
@@ -43,7 +49,6 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
43
49
  jpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : undefined,
44
50
  remainingArgs: [],
45
51
  scale: job.scale,
46
- width: null,
47
52
  compositionIdFromUi: job.compositionId,
48
53
  logLevel: job.logLevel,
49
54
  onProgress,
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, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = 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,30 @@ 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 { concurrency, frameRange, shouldOutputImageSequence, inputProps, envVariables, height, width, fps, durationInFrames, ffmpegOverride, } = (0, get_cli_options_1.getCliOptions)({
29
29
  isStill: false,
30
30
  logLevel,
31
31
  indent: false,
32
32
  });
33
+ const pixelFormat = pixelFormatOption.getValue({
34
+ commandLine: parsed_cli_1.parsedCli,
35
+ }).value;
36
+ const browserExecutable = browserExecutableOption.getValue({
37
+ commandLine: parsed_cli_1.parsedCli,
38
+ }).value;
39
+ const everyNthFrame = everyNthFrameOption.getValue({
40
+ commandLine: parsed_cli_1.parsedCli,
41
+ }).value;
42
+ const proResProfile = proResProfileOption.getValue({
43
+ commandLine: parsed_cli_1.parsedCli,
44
+ }).value;
45
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
46
+ const disableWebSecurity = disableWebSecurityOption.getValue({
47
+ commandLine: parsed_cli_1.parsedCli,
48
+ }).value;
49
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
50
+ commandLine: parsed_cli_1.parsedCli,
51
+ }).value;
33
52
  const x264Preset = x264Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
34
53
  const audioBitrate = audioBitrateOption.getValue({
35
54
  commandLine: parsed_cli_1.parsedCli,
@@ -144,6 +163,8 @@ const render = async (remotionRoot, args, logLevel) => {
144
163
  port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
145
164
  height,
146
165
  width,
166
+ fps,
167
+ durationInFrames,
147
168
  remainingArgs,
148
169
  compositionIdFromUi: null,
149
170
  entryPointReason,
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, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = 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,21 @@ 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, height, inputProps, stillFrame, width, fps, durationInFrames, } = (0, get_cli_options_1.getCliOptions)({
29
29
  isStill: true,
30
30
  logLevel,
31
31
  indent: false,
32
32
  });
33
+ const browserExecutable = browserExecutableOption.getValue({
34
+ commandLine: parsed_cli_1.parsedCli,
35
+ }).value;
36
+ const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
37
+ const disableWebSecurity = disableWebSecurityOption.getValue({
38
+ commandLine: parsed_cli_1.parsedCli,
39
+ }).value;
40
+ const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
41
+ commandLine: parsed_cli_1.parsedCli,
42
+ }).value;
33
43
  const jpegQuality = jpegQualityOption.getValue({
34
44
  commandLine: parsed_cli_1.parsedCli,
35
45
  }).value;
@@ -95,6 +105,9 @@ const still = async (remotionRoot, args, logLevel) => {
95
105
  chromiumOptions,
96
106
  envVariables,
97
107
  height,
108
+ width,
109
+ fps,
110
+ durationInFrames,
98
111
  serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
99
112
  data: inputProps,
100
113
  indent: undefined,
@@ -107,7 +120,6 @@ const still = async (remotionRoot, args, logLevel) => {
107
120
  jpegQuality,
108
121
  scale,
109
122
  stillFrame,
110
- width,
111
123
  compositionIdFromUi: null,
112
124
  imageFormatFromUi: null,
113
125
  logLevel,