@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.
- package/dist/benchmark.js +46 -7
- package/dist/browser/ensure.js +5 -6
- package/dist/bundle.js +10 -3
- package/dist/compositions.js +18 -2
- package/dist/config/index.d.ts +24 -12
- package/dist/config/index.js +23 -51
- package/dist/config/number-of-shared-audio-tags.d.ts +2 -0
- package/dist/config/number-of-shared-audio-tags.js +12 -0
- package/dist/config/preview-server.js +3 -1
- package/dist/detect-remotion-server.d.ts +9 -0
- package/dist/detect-remotion-server.js +45 -0
- package/dist/extra-packages.js +2 -2
- package/dist/get-cli-options.d.ts +0 -10
- package/dist/get-cli-options.js +13 -33
- package/dist/get-composition-with-dimension-override.d.ts +3 -1
- package/dist/get-composition-with-dimension-override.js +3 -1
- package/dist/get-config-file-name.js +7 -4
- package/dist/get-env.js +11 -15
- package/dist/get-input-props.js +8 -5
- package/dist/get-render-defaults.js +16 -8
- package/dist/gpu.js +11 -7
- package/dist/index.d.ts +4 -12
- package/dist/index.js +9 -3
- package/dist/is-port-open.d.ts +1 -0
- package/dist/is-port-open.js +24 -0
- package/dist/list-of-remotion-packages.js +2 -0
- package/dist/parse-command-line.d.ts +0 -458
- package/dist/parse-command-line.js +0 -65
- package/dist/parsed-cli.d.ts +1104 -1
- package/dist/parsed-cli.js +24 -33
- package/dist/render-flows/render.d.ts +5 -1
- package/dist/render-flows/render.js +12 -1
- package/dist/render-flows/still.d.ts +5 -1
- package/dist/render-flows/still.js +5 -1
- package/dist/render-queue/process-still.js +13 -8
- package/dist/render-queue/process-video.js +14 -3
- package/dist/render.js +46 -4
- package/dist/setup-cache.d.ts +6 -2
- package/dist/setup-cache.js +5 -3
- package/dist/still.js +31 -3
- package/dist/studio.js +11 -18
- package/package.json +16 -16
package/dist/get-cli-options.js
CHANGED
|
@@ -4,15 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getCliOptions = exports.getAndValidateAbsoluteOutputFile = void 0;
|
|
7
|
-
const
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
8
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const config_1 = require("./config");
|
|
11
11
|
const get_env_1 = require("./get-env");
|
|
12
12
|
const get_input_props_1 = require("./get-input-props");
|
|
13
13
|
const log_1 = require("./log");
|
|
14
|
+
const parsed_cli_1 = require("./parsed-cli");
|
|
14
15
|
const getAndValidateFrameRange = (logLevel, indent) => {
|
|
15
|
-
const frameRange =
|
|
16
|
+
const frameRange = client_1.BrowserSafeApis.options.framesOption.getValue({
|
|
17
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
18
|
+
}).value;
|
|
16
19
|
if (typeof frameRange === 'number') {
|
|
17
20
|
log_1.Log.warn({ logLevel, indent }, 'Selected a single frame. Assuming you want to output an image.');
|
|
18
21
|
log_1.Log.warn({ logLevel, indent }, `If you want to render a video, pass a range: '--frames=${frameRange}-${frameRange}'.`);
|
|
@@ -29,47 +32,24 @@ const getAndValidateAbsoluteOutputFile = (relativeOutputLocation, overwrite, log
|
|
|
29
32
|
return absoluteOutputFile;
|
|
30
33
|
};
|
|
31
34
|
exports.getAndValidateAbsoluteOutputFile = getAndValidateAbsoluteOutputFile;
|
|
32
|
-
const getProResProfile = () => {
|
|
33
|
-
const proResProfile = config_1.ConfigInternals.getProResProfile();
|
|
34
|
-
return proResProfile;
|
|
35
|
-
};
|
|
36
35
|
const getCliOptions = (options) => {
|
|
36
|
+
var _a;
|
|
37
37
|
const frameRange = getAndValidateFrameRange(options.logLevel, false);
|
|
38
|
+
const imageSequence = client_1.BrowserSafeApis.options.imageSequenceOption.getValue({
|
|
39
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
40
|
+
}).value;
|
|
38
41
|
const shouldOutputImageSequence = options.isStill
|
|
39
42
|
? true
|
|
40
|
-
:
|
|
41
|
-
const pixelFormat = config_1.ConfigInternals.getPixelFormat();
|
|
42
|
-
const proResProfile = getProResProfile();
|
|
43
|
-
const browserExecutable = config_1.ConfigInternals.getBrowserExecutable();
|
|
44
|
-
const disableWebSecurity = config_1.ConfigInternals.getChromiumDisableWebSecurity();
|
|
45
|
-
const ignoreCertificateErrors = config_1.ConfigInternals.getIgnoreCertificateErrors();
|
|
46
|
-
const userAgent = config_1.ConfigInternals.getChromiumUserAgent();
|
|
47
|
-
const everyNthFrame = config_1.ConfigInternals.getEveryNthFrame();
|
|
48
|
-
const concurrency = config_1.ConfigInternals.getConcurrency();
|
|
49
|
-
const height = config_1.ConfigInternals.getHeight();
|
|
50
|
-
const width = config_1.ConfigInternals.getWidth();
|
|
51
|
-
renderer_1.RenderInternals.validateConcurrency({
|
|
52
|
-
value: concurrency,
|
|
53
|
-
setting: 'concurrency',
|
|
54
|
-
checkIfValidForCurrentMachine: false,
|
|
55
|
-
});
|
|
43
|
+
: imageSequence || typeof frameRange === 'number';
|
|
56
44
|
return {
|
|
57
|
-
concurrency,
|
|
58
45
|
frameRange,
|
|
59
46
|
shouldOutputImageSequence,
|
|
60
47
|
inputProps: (0, get_input_props_1.getInputProps)(null, options.logLevel),
|
|
61
48
|
envVariables: (0, get_env_1.getEnvironmentVariables)(null, options.logLevel, options.indent),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
stillFrame: config_1.ConfigInternals.getStillFrame(),
|
|
66
|
-
browserExecutable,
|
|
67
|
-
userAgent,
|
|
68
|
-
disableWebSecurity,
|
|
69
|
-
ignoreCertificateErrors,
|
|
49
|
+
stillFrame: (_a = client_1.BrowserSafeApis.options.stillFrameOption.getValue({
|
|
50
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
51
|
+
}).value) !== null && _a !== void 0 ? _a : 0,
|
|
70
52
|
ffmpegOverride: config_1.ConfigInternals.getFfmpegOverrideFunction(),
|
|
71
|
-
height,
|
|
72
|
-
width,
|
|
73
53
|
};
|
|
74
54
|
};
|
|
75
55
|
exports.getCliOptions = getCliOptions;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }: {
|
|
3
|
+
export declare const getCompositionWithDimensionOverride: ({ height, width, fps, durationInFrames, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }: {
|
|
4
4
|
height: number | null;
|
|
5
5
|
width: number | null;
|
|
6
|
+
fps: number | null;
|
|
7
|
+
durationInFrames: number | null;
|
|
6
8
|
args: (string | number)[];
|
|
7
9
|
compositionIdFromUi: string | null;
|
|
8
10
|
timeoutInMilliseconds: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionWithDimensionOverride = void 0;
|
|
4
4
|
const get_composition_id_1 = require("./get-composition-id");
|
|
5
|
-
const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }) => {
|
|
5
|
+
const getCompositionWithDimensionOverride = async ({ height, width, fps, durationInFrames, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }) => {
|
|
6
6
|
const returnValue = await (0, get_composition_id_1.getCompositionId)({
|
|
7
7
|
args,
|
|
8
8
|
compositionIdFromUi,
|
|
@@ -30,6 +30,8 @@ const getCompositionWithDimensionOverride = async ({ height, width, args, compos
|
|
|
30
30
|
...returnValue.config,
|
|
31
31
|
height: height !== null && height !== void 0 ? height : returnValue.config.height,
|
|
32
32
|
width: width !== null && width !== void 0 ? width : returnValue.config.width,
|
|
33
|
+
fps: fps !== null && fps !== void 0 ? fps : returnValue.config.fps,
|
|
34
|
+
durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : returnValue.config.durationInFrames,
|
|
33
35
|
},
|
|
34
36
|
};
|
|
35
37
|
};
|
|
@@ -4,21 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadConfig = void 0;
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const node_fs_1 = require("node:fs");
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const load_config_1 = require("./load-config");
|
|
10
11
|
const log_1 = require("./log");
|
|
11
12
|
const parsed_cli_1 = require("./parsed-cli");
|
|
13
|
+
const { configOption } = client_1.BrowserSafeApis.options;
|
|
12
14
|
const defaultConfigFileJavascript = 'remotion.config.js';
|
|
13
15
|
const defaultConfigFileTypescript = 'remotion.config.ts';
|
|
14
16
|
const loadConfig = (remotionRoot) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const configFile = configOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
18
|
+
if (configFile) {
|
|
19
|
+
const fullPath = node_path_1.default.resolve(process.cwd(), configFile);
|
|
17
20
|
if (!(0, node_fs_1.existsSync)(fullPath)) {
|
|
18
|
-
log_1.Log.error({ indent: false, logLevel: 'error' }, `You specified a config file location of "${
|
|
21
|
+
log_1.Log.error({ indent: false, logLevel: 'error' }, `You specified a config file location of "${configFile}" but no file under ${fullPath} was found.`);
|
|
19
22
|
process.exit(1);
|
|
20
23
|
}
|
|
21
|
-
return (0, load_config_1.loadConfigFile)(remotionRoot,
|
|
24
|
+
return (0, load_config_1.loadConfigFile)(remotionRoot, configFile, fullPath.endsWith('.js'));
|
|
22
25
|
}
|
|
23
26
|
if (remotionRoot === null) {
|
|
24
27
|
return Promise.resolve(null);
|
package/dist/get-env.js
CHANGED
|
@@ -38,15 +38,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getEnvironmentVariables = void 0;
|
|
40
40
|
const renderer_1 = require("@remotion/renderer");
|
|
41
|
+
const client_1 = require("@remotion/renderer/client");
|
|
41
42
|
const studio_server_1 = require("@remotion/studio-server");
|
|
42
43
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
43
44
|
const node_fs_1 = __importStar(require("node:fs"));
|
|
44
45
|
const node_path_1 = __importDefault(require("node:path"));
|
|
45
46
|
const chalk_1 = require("./chalk");
|
|
46
|
-
const config_1 = require("./config");
|
|
47
47
|
const make_link_1 = require("./hyperlinks/make-link");
|
|
48
48
|
const log_1 = require("./log");
|
|
49
49
|
const parsed_cli_1 = require("./parsed-cli");
|
|
50
|
+
const { envFileOption } = client_1.BrowserSafeApis.options;
|
|
50
51
|
function getProcessEnv() {
|
|
51
52
|
const env = {};
|
|
52
53
|
const validKeys = Object.keys(process.env).filter((key) => key.startsWith('REMOTION_'));
|
|
@@ -122,22 +123,17 @@ const findDotEnvFile = (remotionRoot) => {
|
|
|
122
123
|
};
|
|
123
124
|
const getEnvironmentVariables = (onUpdate, logLevel, indent) => {
|
|
124
125
|
const processEnv = getProcessEnv();
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
log_1.Log.error({ indent: false, logLevel }, 'You passed a --env-file but it could not be found.');
|
|
129
|
-
log_1.Log.error({ indent: false, logLevel }, 'We looked for the file at:', envFile);
|
|
130
|
-
log_1.Log.error({ indent: false, logLevel }, 'Check that your path is correct and try again.');
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
return getEnvForEnvFile({ processEnv, envFile, onUpdate, logLevel, indent });
|
|
134
|
-
}
|
|
126
|
+
const { value: envFileValue, source: envFileSource } = envFileOption.getValue({
|
|
127
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
128
|
+
});
|
|
135
129
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const envFile = node_path_1.default.resolve(
|
|
130
|
+
if (envFileValue && envFileSource !== 'default') {
|
|
131
|
+
const baseDir = envFileSource === 'cli' ? process.cwd() : remotionRoot;
|
|
132
|
+
const envFile = node_path_1.default.resolve(baseDir, envFileValue);
|
|
139
133
|
if (!node_fs_1.default.existsSync(envFile)) {
|
|
140
|
-
log_1.Log.error({ indent: false, logLevel },
|
|
134
|
+
log_1.Log.error({ indent: false, logLevel }, envFileSource === 'cli'
|
|
135
|
+
? 'You passed a --env-file but it could not be found.'
|
|
136
|
+
: 'You specified a custom .env file using `Config.setDotEnvLocation()` in the config file but it could not be found');
|
|
141
137
|
log_1.Log.error({ indent: false, logLevel }, 'We looked for the file at:', envFile);
|
|
142
138
|
log_1.Log.error({ indent: false, logLevel }, 'Check that your path is correct and try again.');
|
|
143
139
|
process.exit(1);
|
package/dist/get-input-props.js
CHANGED
|
@@ -4,16 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getInputProps = void 0;
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
9
|
const node_os_1 = __importDefault(require("node:os"));
|
|
9
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
11
|
const log_1 = require("./log");
|
|
11
12
|
const parsed_cli_1 = require("./parsed-cli");
|
|
13
|
+
const { propsOption } = client_1.BrowserSafeApis.options;
|
|
12
14
|
const getInputProps = (onUpdate, logLevel) => {
|
|
13
|
-
|
|
15
|
+
const props = propsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
16
|
+
if (!props) {
|
|
14
17
|
return {};
|
|
15
18
|
}
|
|
16
|
-
const jsonFile = node_path_1.default.resolve(process.cwd(),
|
|
19
|
+
const jsonFile = node_path_1.default.resolve(process.cwd(), props);
|
|
17
20
|
try {
|
|
18
21
|
if (node_fs_1.default.existsSync(jsonFile)) {
|
|
19
22
|
const rawJsonData = node_fs_1.default.readFileSync(jsonFile, 'utf-8');
|
|
@@ -30,12 +33,12 @@ const getInputProps = (onUpdate, logLevel) => {
|
|
|
30
33
|
}
|
|
31
34
|
return JSON.parse(rawJsonData);
|
|
32
35
|
}
|
|
33
|
-
return JSON.parse(
|
|
36
|
+
return JSON.parse(props);
|
|
34
37
|
}
|
|
35
38
|
catch (_a) {
|
|
36
39
|
log_1.Log.error({ indent: false, logLevel }, 'You passed --props but it was neither valid JSON nor a file path to a valid JSON file. Provided value: ' +
|
|
37
|
-
|
|
38
|
-
log_1.Log.info({ indent: false, logLevel }, 'Got the following value:',
|
|
40
|
+
props);
|
|
41
|
+
log_1.Log.info({ indent: false, logLevel }, 'Got the following value:', props);
|
|
39
42
|
log_1.Log.error({ indent: false, logLevel }, 'Check that your input is parseable using `JSON.parse` and try again.');
|
|
40
43
|
if (node_os_1.default.platform() === 'win32') {
|
|
41
44
|
const logOptions = {
|
|
@@ -5,7 +5,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const config_1 = require("./config");
|
|
7
7
|
const parsed_cli_1 = require("./parsed-cli");
|
|
8
|
-
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, chromeModeOption, mediaCacheSizeInBytesOption, darkModeOption, publicLicenseKeyOption, stillImageFormatOption, videoImageFormatOption, } = client_1.BrowserSafeApis.options;
|
|
8
|
+
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, concurrencyOption, offthreadVideoThreadsOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, hardwareAccelerationOption, chromeModeOption, mediaCacheSizeInBytesOption, darkModeOption, pixelFormatOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, publicLicenseKeyOption, stillImageFormatOption, videoImageFormatOption, } = client_1.BrowserSafeApis.options;
|
|
9
9
|
const getRenderDefaults = () => {
|
|
10
10
|
var _a;
|
|
11
11
|
const defaultJpegQuality = jpegQualityOption.getValue({
|
|
@@ -13,9 +13,11 @@ const getRenderDefaults = () => {
|
|
|
13
13
|
}).value;
|
|
14
14
|
const logLevel = logLevelOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
15
15
|
const defaultCodec = config_1.ConfigInternals.getOutputCodecOrUndefined();
|
|
16
|
-
const concurrency = renderer_1.RenderInternals.resolveConcurrency(
|
|
17
|
-
const pixelFormat =
|
|
18
|
-
|
|
16
|
+
const concurrency = renderer_1.RenderInternals.resolveConcurrency(concurrencyOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value);
|
|
17
|
+
const pixelFormat = pixelFormatOption.getValue({
|
|
18
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
19
|
+
}).value;
|
|
20
|
+
const proResProfile = (_a = proResProfileOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _a !== void 0 ? _a : null;
|
|
19
21
|
const x264Preset = x264Option.getValue({
|
|
20
22
|
commandLine: parsed_cli_1.parsedCli,
|
|
21
23
|
}).value;
|
|
@@ -88,19 +90,25 @@ const getRenderDefaults = () => {
|
|
|
88
90
|
const publicLicenseKey = publicLicenseKeyOption.getValue({
|
|
89
91
|
commandLine: parsed_cli_1.parsedCli,
|
|
90
92
|
}).value;
|
|
91
|
-
const everyNthFrame =
|
|
93
|
+
const everyNthFrame = everyNthFrameOption.getValue({
|
|
94
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
95
|
+
}).value;
|
|
92
96
|
const stillImageFormat = stillImageFormatOption.getValue({
|
|
93
97
|
commandLine: parsed_cli_1.parsedCli,
|
|
94
98
|
}).value;
|
|
95
99
|
const videoImageFormat = videoImageFormatOption.getValue({
|
|
96
100
|
commandLine: parsed_cli_1.parsedCli,
|
|
97
101
|
}).value;
|
|
98
|
-
const disableWebSecurity =
|
|
99
|
-
|
|
102
|
+
const disableWebSecurity = disableWebSecurityOption.getValue({
|
|
103
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
104
|
+
}).value;
|
|
105
|
+
const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
|
|
106
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
107
|
+
}).value;
|
|
100
108
|
const darkMode = darkModeOption.getValue({
|
|
101
109
|
commandLine: parsed_cli_1.parsedCli,
|
|
102
110
|
}).value;
|
|
103
|
-
const userAgent =
|
|
111
|
+
const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
104
112
|
const metadata = config_1.ConfigInternals.getMetadata();
|
|
105
113
|
const outputLocation = config_1.ConfigInternals.getOutputLocation();
|
|
106
114
|
const maxConcurrency = renderer_1.RenderInternals.getMaxConcurrency();
|
package/dist/gpu.js
CHANGED
|
@@ -5,17 +5,21 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const browser_download_bar_1 = require("./browser-download-bar");
|
|
7
7
|
const chalk_1 = require("./chalk");
|
|
8
|
-
const get_cli_options_1 = require("./get-cli-options");
|
|
9
8
|
const log_1 = require("./log");
|
|
10
9
|
const parsed_cli_1 = require("./parsed-cli");
|
|
11
10
|
exports.GPU_COMMAND = 'gpu';
|
|
12
|
-
const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, chromeModeOption, darkModeOption, } = client_1.BrowserSafeApis.options;
|
|
11
|
+
const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, chromeModeOption, darkModeOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options;
|
|
13
12
|
const gpuCommand = async (logLevel) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const browserExecutable = browserExecutableOption.getValue({
|
|
14
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
15
|
+
}).value;
|
|
16
|
+
const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
17
|
+
const disableWebSecurity = disableWebSecurityOption.getValue({
|
|
18
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
19
|
+
}).value;
|
|
20
|
+
const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
|
|
21
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
22
|
+
}).value;
|
|
19
23
|
const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
|
|
20
24
|
commandLine: parsed_cli_1.parsedCli,
|
|
21
25
|
}).value;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,22 +80,12 @@ export declare const CliInternals: {
|
|
|
80
80
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
81
81
|
indent: boolean;
|
|
82
82
|
}) => {
|
|
83
|
-
concurrency: string | number | null;
|
|
84
83
|
frameRange: import("@remotion/renderer").FrameRange | null;
|
|
85
84
|
shouldOutputImageSequence: boolean;
|
|
86
85
|
inputProps: Record<string, unknown>;
|
|
87
86
|
envVariables: Record<string, string>;
|
|
88
|
-
pixelFormat: "yuv420p" | "yuv420p10le" | "yuv422p" | "yuv422p10le" | "yuv444p" | "yuv444p10le" | "yuva420p" | "yuva444p10le";
|
|
89
|
-
proResProfile: "4444" | "4444-xq" | "hq" | "light" | "proxy" | "standard" | undefined;
|
|
90
|
-
everyNthFrame: number;
|
|
91
87
|
stillFrame: number;
|
|
92
|
-
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
93
|
-
userAgent: string | null;
|
|
94
|
-
disableWebSecurity: boolean;
|
|
95
|
-
ignoreCertificateErrors: boolean;
|
|
96
88
|
ffmpegOverride: import("@remotion/renderer").FfmpegOverrideFn;
|
|
97
|
-
height: number | null;
|
|
98
|
-
width: number | null;
|
|
99
89
|
};
|
|
100
90
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
101
91
|
formatBytes: (number: number, options?: (Intl.NumberFormatOptions & {
|
|
@@ -107,7 +97,7 @@ export declare const CliInternals: {
|
|
|
107
97
|
initializeCli: (remotionRoot: string) => Promise<"error" | "info" | "trace" | "verbose" | "warn">;
|
|
108
98
|
BooleanFlags: string[];
|
|
109
99
|
quietFlagProvided: () => boolean;
|
|
110
|
-
parsedCli: import("./
|
|
100
|
+
parsedCli: import("./parsed-cli").CommandLineOptions & {
|
|
111
101
|
_: string[];
|
|
112
102
|
};
|
|
113
103
|
printError: (err: Error, logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
|
|
@@ -142,9 +132,11 @@ export declare const CliInternals: {
|
|
|
142
132
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
143
133
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
144
134
|
}) => boolean;
|
|
145
|
-
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }: {
|
|
135
|
+
getCompositionWithDimensionOverride: ({ height, width, fps, durationInFrames, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, binariesDirectory, onBrowserDownload, chromeMode, mediaCacheSizeInBytes, }: {
|
|
146
136
|
height: number | null;
|
|
147
137
|
width: number | null;
|
|
138
|
+
fps: number | null;
|
|
139
|
+
durationInFrames: number | null;
|
|
148
140
|
args: (string | number)[];
|
|
149
141
|
compositionIdFromUi: string | null;
|
|
150
142
|
timeoutInMilliseconds: number;
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CliInternals = exports.cli = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const client_1 = require("@remotion/renderer/client");
|
|
8
9
|
const studio_server_1 = require("@remotion/studio-server");
|
|
9
10
|
const minimist_1 = __importDefault(require("minimist"));
|
|
10
11
|
const add_1 = require("./add");
|
|
@@ -46,8 +47,13 @@ const still_1 = require("./still");
|
|
|
46
47
|
const studio_1 = require("./studio");
|
|
47
48
|
const upgrade_1 = require("./upgrade");
|
|
48
49
|
const versions_1 = require("./versions");
|
|
50
|
+
const { packageManagerOption, versionFlagOption } = client_1.BrowserSafeApis.options;
|
|
49
51
|
const cli = async () => {
|
|
52
|
+
var _a;
|
|
50
53
|
const [command, ...args] = parsed_cli_1.parsedCli._;
|
|
54
|
+
const packageManager = packageManagerOption.getValue({
|
|
55
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
56
|
+
}).value;
|
|
51
57
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
52
58
|
if (command !== versions_1.VERSIONS_COMMAND && !parsed_cli_1.parsedCli.help) {
|
|
53
59
|
await (0, versions_1.validateVersionsBeforeCommand)(remotionRoot, 'info');
|
|
@@ -106,8 +112,8 @@ const cli = async () => {
|
|
|
106
112
|
else if (command === 'upgrade') {
|
|
107
113
|
await (0, upgrade_1.upgradeCommand)({
|
|
108
114
|
remotionRoot,
|
|
109
|
-
packageManager:
|
|
110
|
-
version: parsed_cli_1.parsedCli.
|
|
115
|
+
packageManager: packageManager !== null && packageManager !== void 0 ? packageManager : undefined,
|
|
116
|
+
version: (_a = versionFlagOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _a !== void 0 ? _a : undefined,
|
|
111
117
|
logLevel,
|
|
112
118
|
args,
|
|
113
119
|
});
|
|
@@ -122,7 +128,7 @@ const cli = async () => {
|
|
|
122
128
|
const additionalArgs = flagIndex === -1 ? [] : args.slice(flagIndex);
|
|
123
129
|
await (0, add_1.addCommand)({
|
|
124
130
|
remotionRoot,
|
|
125
|
-
packageManager:
|
|
131
|
+
packageManager: packageManager !== null && packageManager !== void 0 ? packageManager : undefined,
|
|
126
132
|
packageNames,
|
|
127
133
|
logLevel,
|
|
128
134
|
args: additionalArgs,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isPortOpen: (port: number) => Promise<boolean>;
|
|
@@ -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;
|
|
@@ -75,6 +75,7 @@ exports.listOfRemotionPackages = [
|
|
|
75
75
|
'@remotion/transitions',
|
|
76
76
|
'@remotion/media-parser',
|
|
77
77
|
'@remotion/zod-types',
|
|
78
|
+
'@remotion/zod-types-v3',
|
|
78
79
|
'@remotion/webcodecs',
|
|
79
80
|
'@remotion/convert',
|
|
80
81
|
'@remotion/captions',
|
|
@@ -86,4 +87,5 @@ exports.listOfRemotionPackages = [
|
|
|
86
87
|
'@remotion/web-renderer',
|
|
87
88
|
'@remotion/design',
|
|
88
89
|
'@remotion/light-leaks',
|
|
90
|
+
'@remotion/vercel',
|
|
89
91
|
];
|