@remotion/cli 4.0.141 → 4.0.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark.js +32 -32
- package/dist/browser/ensure.js +2 -2
- package/dist/bundle.js +6 -6
- package/dist/compositions.js +11 -11
- package/dist/config/preview-server.js +2 -2
- package/dist/ffmpeg.js +3 -3
- package/dist/get-config-file-name.js +5 -5
- package/dist/get-env.js +3 -3
- package/dist/get-input-props.js +6 -6
- package/dist/get-render-defaults.js +22 -22
- package/dist/gpu.js +6 -6
- package/dist/image-formats.js +5 -5
- package/dist/index.d.ts +5 -71
- package/dist/index.js +7 -7
- package/dist/initialize-cli.js +2 -1
- package/dist/log.d.ts +4 -4
- package/dist/parse-command-line.d.ts +1 -6
- package/dist/parse-command-line.js +36 -74
- package/dist/parsed-cli.d.ts +6 -0
- package/dist/parsed-cli.js +43 -0
- package/dist/print-compositions.js +3 -3
- package/dist/render-flows/render.js +4 -4
- package/dist/render-flows/still.js +5 -5
- package/dist/render-queue/process-still.js +2 -2
- package/dist/render-queue/process-video.js +2 -2
- package/dist/render.js +28 -28
- package/dist/still.js +13 -13
- package/dist/studio.js +10 -10
- package/dist/user-passed-output-location.js +3 -3
- package/package.json +10 -10
package/dist/render.js
CHANGED
|
@@ -9,7 +9,7 @@ const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-ser
|
|
|
9
9
|
const entry_point_1 = require("./entry-point");
|
|
10
10
|
const get_cli_options_1 = require("./get-cli-options");
|
|
11
11
|
const log_1 = require("./log");
|
|
12
|
-
const
|
|
12
|
+
const parsed_cli_1 = require("./parsed-cli");
|
|
13
13
|
const render_1 = require("./render-flows/render");
|
|
14
14
|
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, publicPathOption, publicDirOption, } = client_1.BrowserSafeApis.options;
|
|
15
15
|
const render = async (remotionRoot, args, logLevel) => {
|
|
@@ -21,7 +21,7 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
24
|
-
if (
|
|
24
|
+
if (parsed_cli_1.parsedCli.frame) {
|
|
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
|
}
|
|
@@ -29,63 +29,63 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
29
29
|
isStill: false,
|
|
30
30
|
logLevel,
|
|
31
31
|
});
|
|
32
|
-
const x264Preset = x264Option.getValue({ commandLine:
|
|
32
|
+
const x264Preset = x264Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
33
33
|
const audioBitrate = audioBitrateOption.getValue({
|
|
34
|
-
commandLine:
|
|
34
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
35
35
|
}).value;
|
|
36
36
|
const offthreadVideoCacheSizeInBytes = offthreadVideoCacheSizeInBytesOption.getValue({
|
|
37
|
-
commandLine:
|
|
37
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
38
38
|
}).value;
|
|
39
|
-
const scale = scaleOption.getValue({ commandLine:
|
|
39
|
+
const scale = scaleOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
40
40
|
const jpegQuality = jpegQualityOption.getValue({
|
|
41
|
-
commandLine:
|
|
41
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
42
42
|
}).value;
|
|
43
43
|
const videoBitrate = videoBitrateOption.getValue({
|
|
44
|
-
commandLine:
|
|
44
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
45
45
|
}).value;
|
|
46
46
|
const enforceAudioTrack = enforceAudioOption.getValue({
|
|
47
|
-
commandLine:
|
|
47
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
48
48
|
}).value;
|
|
49
|
-
const muted = mutedOption.getValue({ commandLine:
|
|
49
|
+
const muted = mutedOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
50
50
|
const colorSpace = colorSpaceOption.getValue({
|
|
51
|
-
commandLine:
|
|
51
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
52
52
|
}).value;
|
|
53
53
|
const crf = shouldOutputImageSequence
|
|
54
54
|
? null
|
|
55
|
-
: crfOption.getValue({ commandLine:
|
|
55
|
+
: crfOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
56
56
|
const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
|
|
57
|
-
commandLine:
|
|
57
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
58
58
|
}).value;
|
|
59
|
-
const gl = glOption.getValue({ commandLine:
|
|
59
|
+
const gl = glOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
60
60
|
const numberOfGifLoops = numberOfGifLoopsOption.getValue({
|
|
61
|
-
commandLine:
|
|
61
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
62
62
|
}).value;
|
|
63
63
|
const encodingMaxRate = encodingMaxRateOption.getValue({
|
|
64
|
-
commandLine:
|
|
64
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
65
65
|
}).value;
|
|
66
66
|
const encodingBufferSize = encodingBufferSizeOption.getValue({
|
|
67
|
-
commandLine:
|
|
67
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
68
68
|
}).value;
|
|
69
|
-
const repro = reproOption.getValue({ commandLine:
|
|
69
|
+
const repro = reproOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
70
70
|
const puppeteerTimeout = delayRenderTimeoutInMillisecondsOption.getValue({
|
|
71
|
-
commandLine:
|
|
71
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
72
72
|
}).value;
|
|
73
73
|
const headless = headlessOption.getValue({
|
|
74
|
-
commandLine:
|
|
74
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
75
75
|
}).value;
|
|
76
76
|
const overwrite = overwriteOption.getValue({
|
|
77
|
-
commandLine:
|
|
77
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
78
78
|
}, true).value;
|
|
79
79
|
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
80
|
-
commandLine:
|
|
80
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
81
81
|
}).value;
|
|
82
82
|
const forSeamlessAacConcatenation = forSeamlessAacConcatenationOption.getValue({
|
|
83
|
-
commandLine:
|
|
83
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
84
84
|
}).value;
|
|
85
85
|
const separateAudioTo = separateAudioOption.getValue({
|
|
86
|
-
commandLine:
|
|
86
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
87
87
|
}).value;
|
|
88
|
-
const publicPath = publicPathOption.getValue({ commandLine:
|
|
88
|
+
const publicPath = publicPathOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
89
89
|
const chromiumOptions = {
|
|
90
90
|
disableWebSecurity,
|
|
91
91
|
enableMultiProcessOnLinux,
|
|
@@ -94,8 +94,8 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
94
94
|
ignoreCertificateErrors,
|
|
95
95
|
userAgent,
|
|
96
96
|
};
|
|
97
|
-
const audioCodec = audioCodecOption.getValue({ commandLine:
|
|
98
|
-
const publicDir = publicDirOption.getValue({ commandLine:
|
|
97
|
+
const audioCodec = audioCodecOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
98
|
+
const publicDir = publicDirOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
99
99
|
await (0, render_1.renderVideoFlow)({
|
|
100
100
|
fullEntryPoint,
|
|
101
101
|
remotionRoot,
|
|
@@ -121,7 +121,7 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
121
121
|
compositionIdFromUi: null,
|
|
122
122
|
entryPointReason,
|
|
123
123
|
overwrite,
|
|
124
|
-
quiet: (0,
|
|
124
|
+
quiet: (0, parsed_cli_1.quietFlagProvided)(),
|
|
125
125
|
concurrency,
|
|
126
126
|
everyNthFrame,
|
|
127
127
|
frameRange,
|
package/dist/still.js
CHANGED
|
@@ -9,7 +9,7 @@ const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-ser
|
|
|
9
9
|
const entry_point_1 = require("./entry-point");
|
|
10
10
|
const get_cli_options_1 = require("./get-cli-options");
|
|
11
11
|
const log_1 = require("./log");
|
|
12
|
-
const
|
|
12
|
+
const parsed_cli_1 = require("./parsed-cli");
|
|
13
13
|
const still_1 = require("./render-flows/still");
|
|
14
14
|
const { offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, publicPathOption, publicDirOption, } = client_1.BrowserSafeApis.options;
|
|
15
15
|
const still = async (remotionRoot, args, logLevel) => {
|
|
@@ -21,7 +21,7 @@ const still = async (remotionRoot, args, logLevel) => {
|
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
24
|
-
if (
|
|
24
|
+
if (parsed_cli_1.parsedCli.frames) {
|
|
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
|
}
|
|
@@ -30,33 +30,33 @@ const still = async (remotionRoot, args, logLevel) => {
|
|
|
30
30
|
logLevel,
|
|
31
31
|
});
|
|
32
32
|
const jpegQuality = jpegQualityOption.getValue({
|
|
33
|
-
commandLine:
|
|
33
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
34
34
|
}).value;
|
|
35
|
-
const scale = scaleOption.getValue({ commandLine:
|
|
35
|
+
const scale = scaleOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
36
36
|
const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
|
|
37
|
-
commandLine:
|
|
37
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
38
38
|
}).value;
|
|
39
|
-
const gl = glOption.getValue({ commandLine:
|
|
39
|
+
const gl = glOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
40
40
|
const offthreadVideoCacheSizeInBytes = offthreadVideoCacheSizeInBytesOption.getValue({
|
|
41
|
-
commandLine:
|
|
41
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
42
42
|
}).value;
|
|
43
43
|
const puppeteerTimeout = delayRenderTimeoutInMillisecondsOption.getValue({
|
|
44
|
-
commandLine:
|
|
44
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
45
45
|
}).value;
|
|
46
46
|
const headless = headlessOption.getValue({
|
|
47
|
-
commandLine:
|
|
47
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
48
48
|
}).value;
|
|
49
49
|
const overwrite = overwriteOption.getValue({
|
|
50
|
-
commandLine:
|
|
50
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
51
51
|
}, true).value;
|
|
52
52
|
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
53
|
-
commandLine:
|
|
53
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
54
54
|
}).value;
|
|
55
55
|
const publicPath = publicPathOption.getValue({
|
|
56
|
-
commandLine:
|
|
56
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
57
57
|
}).value;
|
|
58
58
|
const publicDir = publicDirOption.getValue({
|
|
59
|
-
commandLine:
|
|
59
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
60
60
|
}).value;
|
|
61
61
|
const chromiumOptions = {
|
|
62
62
|
disableWebSecurity,
|
package/dist/studio.js
CHANGED
|
@@ -12,11 +12,11 @@ const get_github_repository_1 = require("./get-github-repository");
|
|
|
12
12
|
const get_input_props_1 = require("./get-input-props");
|
|
13
13
|
const get_render_defaults_1 = require("./get-render-defaults");
|
|
14
14
|
const log_1 = require("./log");
|
|
15
|
-
const
|
|
15
|
+
const parsed_cli_1 = require("./parsed-cli");
|
|
16
16
|
const queue_1 = require("./render-queue/queue");
|
|
17
17
|
const getPort = () => {
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
18
|
+
if (parsed_cli_1.parsedCli.port) {
|
|
19
|
+
return parsed_cli_1.parsedCli.port;
|
|
20
20
|
}
|
|
21
21
|
const serverPort = config_1.ConfigInternals.getStudioPort();
|
|
22
22
|
if (serverPort) {
|
|
@@ -63,15 +63,15 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
63
63
|
const keyboardShortcutsEnabled = config_1.ConfigInternals.getKeyboardShortcutsEnabled();
|
|
64
64
|
const gitSource = (0, get_github_repository_1.getGitSource)(remotionRoot);
|
|
65
65
|
const binariesDirectory = binariesDirectoryOption.getValue({
|
|
66
|
-
commandLine:
|
|
66
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
67
67
|
}).value;
|
|
68
68
|
const relativePublicDir = publicDirOption.getValue({
|
|
69
|
-
commandLine:
|
|
69
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
70
70
|
}).value;
|
|
71
71
|
await studio_server_1.StudioServerInternals.startStudio({
|
|
72
72
|
previewEntry: require.resolve('@remotion/studio/entry'),
|
|
73
|
-
browserArgs:
|
|
74
|
-
browserFlag:
|
|
73
|
+
browserArgs: parsed_cli_1.parsedCli['browser-args'],
|
|
74
|
+
browserFlag: parsed_cli_1.parsedCli.browser,
|
|
75
75
|
logLevel,
|
|
76
76
|
configValueShouldOpenBrowser: config_1.ConfigInternals.getShouldOpenBrowser(),
|
|
77
77
|
fullEntryPath,
|
|
@@ -86,7 +86,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
86
86
|
poll: config_1.ConfigInternals.getWebpackPolling(),
|
|
87
87
|
getRenderDefaults: get_render_defaults_1.getRenderDefaults,
|
|
88
88
|
getRenderQueue: queue_1.getRenderQueue,
|
|
89
|
-
numberOfAudioTags: (_a =
|
|
89
|
+
numberOfAudioTags: (_a = parsed_cli_1.parsedCli['number-of-shared-audio-tags']) !== null && _a !== void 0 ? _a : (0, number_of_shared_audio_tags_1.getNumberOfSharedAudioTags)(),
|
|
90
90
|
queueMethods: {
|
|
91
91
|
addJob: queue_1.addJob,
|
|
92
92
|
cancelJob: queue_1.cancelJob,
|
|
@@ -94,11 +94,11 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
94
94
|
},
|
|
95
95
|
// Minimist quirk: Adding `--no-open` flag will result in {['no-open']: false, open: true}
|
|
96
96
|
// @ts-expect-error
|
|
97
|
-
parsedCliOpen:
|
|
97
|
+
parsedCliOpen: parsed_cli_1.parsedCli.open,
|
|
98
98
|
gitSource,
|
|
99
99
|
bufferStateDelayInMilliseconds: config_1.ConfigInternals.getBufferStateDelayInMilliseconds(),
|
|
100
100
|
binariesDirectory,
|
|
101
|
-
forceIPv4:
|
|
101
|
+
forceIPv4: parsed_cli_1.parsedCli.ipv4,
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
104
|
exports.studioCommand = studioCommand;
|
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
|
|
4
4
|
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
|
-
const
|
|
6
|
+
const parsed_cli_1 = require("./parsed-cli");
|
|
7
7
|
const getUserPassedOutputLocation = (args, uiPassedOutName) => {
|
|
8
8
|
var _a, _b;
|
|
9
|
-
const filename = (_b = (_a = uiPassedOutName !== null && uiPassedOutName !== void 0 ? uiPassedOutName : args[0]) !== null && _a !== void 0 ? _a :
|
|
9
|
+
const filename = (_b = (_a = uiPassedOutName !== null && uiPassedOutName !== void 0 ? uiPassedOutName : args[0]) !== null && _a !== void 0 ? _a : parsed_cli_1.parsedCli.output) !== null && _b !== void 0 ? _b : config_1.ConfigInternals.getOutputLocation();
|
|
10
10
|
return filename;
|
|
11
11
|
};
|
|
12
12
|
exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
|
|
13
13
|
const getOutputLocation = ({ compositionId, defaultExtension, args, type, outputLocationFromUi, }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
if (typeof args[0] !== 'undefined' &&
|
|
16
|
-
typeof
|
|
16
|
+
typeof parsed_cli_1.parsedCli.output !== 'undefined') {
|
|
17
17
|
throw new Error('Both an output flag (--output) and an output location as a positional argument were passed. Please choose only one of the ways.');
|
|
18
18
|
}
|
|
19
19
|
return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a : (0, studio_server_1.getDefaultOutLocation)({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.143",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"dotenv": "9.0.2",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
34
|
"prompts": "2.4.2",
|
|
35
|
-
"@remotion/bundler": "4.0.
|
|
36
|
-
"@remotion/media-utils": "4.0.
|
|
37
|
-
"@remotion/
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"remotion": "4.0.
|
|
41
|
-
"
|
|
35
|
+
"@remotion/bundler": "4.0.143",
|
|
36
|
+
"@remotion/media-utils": "4.0.143",
|
|
37
|
+
"@remotion/player": "4.0.143",
|
|
38
|
+
"@remotion/renderer": "4.0.143",
|
|
39
|
+
"@remotion/studio": "4.0.143",
|
|
40
|
+
"@remotion/studio-server": "4.0.143",
|
|
41
|
+
"remotion": "4.0.143"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"react-dom": "18.2.0",
|
|
64
64
|
"vitest": "0.31.1",
|
|
65
65
|
"zod": "^3.22.3",
|
|
66
|
-
"@remotion/zod-types": "4.0.
|
|
67
|
-
"@remotion/tailwind": "4.0.
|
|
66
|
+
"@remotion/zod-types": "4.0.143",
|
|
67
|
+
"@remotion/tailwind": "4.0.143"
|
|
68
68
|
},
|
|
69
69
|
"keywords": [
|
|
70
70
|
"remotion",
|