@remotion/cli 3.2.25 → 3.2.28

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/still.js CHANGED
@@ -9,9 +9,9 @@ const fs_1 = require("fs");
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const chalk_1 = require("./chalk");
11
11
  const config_1 = require("./config");
12
+ const determine_image_format_1 = require("./determine-image-format");
12
13
  const get_cli_options_1 = require("./get-cli-options");
13
14
  const get_composition_id_1 = require("./get-composition-id");
14
- const initialize_render_cli_1 = require("./initialize-render-cli");
15
15
  const log_1 = require("./log");
16
16
  const parse_command_line_1 = require("./parse-command-line");
17
17
  const progress_bar_1 = require("./progress-bar");
@@ -19,46 +19,36 @@ const setup_cache_1 = require("./setup-cache");
19
19
  const truthy_1 = require("./truthy");
20
20
  const user_passed_output_location_1 = require("./user-passed-output-location");
21
21
  const still = async (remotionRoot) => {
22
+ var _a, _b;
22
23
  const startTime = Date.now();
23
24
  const file = parse_command_line_1.parsedCli._[1];
24
25
  const fullPath = renderer_1.RenderInternals.isServeUrl(file)
25
26
  ? file
26
27
  : path_1.default.join(process.cwd(), file);
27
- await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'still');
28
- const userPassedOutput = (0, user_passed_output_location_1.getUserPassedOutputLocation)();
29
- if ((userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpeg')) ||
30
- (userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpg'))) {
31
- log_1.Log.verbose('Output file has a JPEG extension, setting the image format to JPEG.');
32
- config_1.Config.Rendering.setImageFormat('jpeg');
33
- }
34
- if (userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.png')) {
35
- log_1.Log.verbose('Output file has a PNG extension, setting the image format to PNG.');
36
- config_1.Config.Rendering.setImageFormat('png');
28
+ if (parse_command_line_1.parsedCli.frames) {
29
+ log_1.Log.error('--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/');
30
+ process.exit(1);
37
31
  }
38
- const { inputProps, envVariables, quality, browser, imageFormat, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
32
+ const { inputProps, envVariables, quality, browser, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
39
33
  isLambda: false,
40
34
  type: 'still',
35
+ codec: 'h264',
41
36
  });
42
37
  log_1.Log.verbose('Browser executable: ', browserExecutable);
43
38
  const compositionId = (0, get_composition_id_1.getCompositionId)();
39
+ const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalImageFormat)({
40
+ cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
41
+ configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredImageFormat()) !== null && _b !== void 0 ? _b : null,
42
+ downloadName: null,
43
+ outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(),
44
+ isLambda: false,
45
+ });
44
46
  const relativeOutputLocation = (0, user_passed_output_location_1.getOutputLocation)({
45
47
  compositionId,
46
48
  defaultExtension: imageFormat,
47
49
  });
48
50
  const absoluteOutputLocation = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
49
- log_1.Log.info(chalk_1.chalk.gray(`Output = ${relativeOutputLocation}, Format = ${imageFormat}, Composition = ${compositionId}`));
50
- if (imageFormat === 'none') {
51
- log_1.Log.error('No image format was selected - this is probably an error in Remotion - please post your command on Github Issues for help.');
52
- process.exit(1);
53
- }
54
- if (imageFormat === 'png' && !absoluteOutputLocation.endsWith('.png')) {
55
- log_1.Log.warn(`Rendering a PNG, expected a .png extension but got ${absoluteOutputLocation}`);
56
- }
57
- if (imageFormat === 'jpeg' &&
58
- !absoluteOutputLocation.endsWith('.jpg') &&
59
- !absoluteOutputLocation.endsWith('.jpeg')) {
60
- log_1.Log.warn(`Rendering a JPEG, expected a .jpg or .jpeg extension but got ${absoluteOutputLocation}`);
61
- }
51
+ log_1.Log.info(chalk_1.chalk.gray(`Output = ${relativeOutputLocation}, Format = ${imageFormat} (${source}), Composition = ${compositionId}`));
62
52
  const browserInstance = (0, renderer_1.openBrowser)(browser, {
63
53
  browserExecutable,
64
54
  chromiumOptions,
@@ -0,0 +1,2 @@
1
+ import type { ImageFormat } from '@remotion/renderer';
2
+ export declare const validateImageFormat: (imageFormat: ImageFormat, outName: string | null) => void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateImageFormat = void 0;
4
+ const log_1 = require("./log");
5
+ const validateImageFormat = (imageFormat, outName) => {
6
+ if (imageFormat === 'png' && !(outName === null || outName === void 0 ? void 0 : outName.endsWith('.png'))) {
7
+ log_1.Log.warn(`Rendering a PNG, expected a .png extension but got ${outName}`);
8
+ }
9
+ if (imageFormat === 'jpeg' &&
10
+ !(outName === null || outName === void 0 ? void 0 : outName.endsWith('.jpg')) &&
11
+ !(outName === null || outName === void 0 ? void 0 : outName.endsWith('.jpeg'))) {
12
+ log_1.Log.warn(`Rendering a JPEG, expected a .jpg or .jpeg extension but got ${outName}`);
13
+ }
14
+ };
15
+ exports.validateImageFormat = validateImageFormat;
package/dist/versions.js CHANGED
@@ -68,7 +68,7 @@ const validateVersionsBeforeCommand = async (remotionRoot) => {
68
68
  };
69
69
  exports.validateVersionsBeforeCommand = validateVersionsBeforeCommand;
70
70
  const versionsCommand = async (remotionRoot) => {
71
- (0, parse_command_line_1.parseCommandLine)('versions');
71
+ (0, parse_command_line_1.parseCommandLine)();
72
72
  const versions = await getAllVersions(remotionRoot);
73
73
  const grouped = groupBy(versions);
74
74
  const installedVersions = Object.keys(grouped);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.2.25",
3
+ "version": "3.2.28",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,15 +23,15 @@
23
23
  "author": "Jonny Burger <jonny@remotion.dev>",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
25
25
  "dependencies": {
26
- "@remotion/bundler": "3.2.25",
27
- "@remotion/media-utils": "3.2.25",
28
- "@remotion/player": "3.2.25",
29
- "@remotion/renderer": "3.2.25",
26
+ "@remotion/bundler": "3.2.28",
27
+ "@remotion/media-utils": "3.2.28",
28
+ "@remotion/player": "3.2.28",
29
+ "@remotion/renderer": "3.2.28",
30
30
  "better-opn": "2.1.1",
31
31
  "dotenv": "9.0.2",
32
32
  "memfs": "3.4.3",
33
33
  "minimist": "1.2.6",
34
- "remotion": "3.2.25",
34
+ "remotion": "3.2.28",
35
35
  "semver": "7.3.5",
36
36
  "source-map": "0.6.1"
37
37
  },
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "8e51d998e16f062336d65469cbfc9266068b7701"
74
+ "gitHead": "49bb70afa503bfb0c89ee51d8bf3386ad1b91ac4"
75
75
  }