@remotion/cli 4.0.60 → 4.0.61
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 +4 -3
- package/dist/compositions.js +3 -2
- package/dist/config/index.d.ts +16 -3
- package/dist/config/index.js +5 -1
- package/dist/config/preview-server.d.ts +11 -1
- package/dist/config/preview-server.js +36 -7
- package/dist/event-source.js +7 -0
- package/dist/get-cli-options.d.ts +0 -1
- package/dist/get-cli-options.js +1 -3
- package/dist/get-env.d.ts +1 -1
- package/dist/get-env.js +27 -4
- package/dist/index.d.ts +0 -1
- package/dist/parse-command-line.js +1 -3
- package/dist/preview-server/render-queue/process-still.js +3 -2
- package/dist/preview-server/render-queue/process-video.js +3 -2
- package/dist/render.js +3 -2
- package/dist/still.js +3 -2
- package/dist/studio.js +2 -2
- package/package.json +8 -8
- package/dist/config/presets-profile.d.ts +0 -3
- package/dist/config/presets-profile.js +0 -12
- package/dist/editor/components/DownloadButton.d.ts +0 -0
- package/dist/editor/components/DownloadButton.js +0 -1
- package/dist/handle-common-errors.d.ts +0 -2
- package/dist/handle-common-errors.js +0 -60
package/dist/benchmark.js
CHANGED
|
@@ -6,6 +6,7 @@ const remotion_1 = require("remotion");
|
|
|
6
6
|
const chalk_1 = require("./chalk");
|
|
7
7
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
8
8
|
const config_1 = require("./config");
|
|
9
|
+
const preview_server_1 = require("./config/preview-server");
|
|
9
10
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
10
11
|
const entry_point_1 = require("./entry-point");
|
|
11
12
|
const get_cli_options_1 = require("./get-cli-options");
|
|
@@ -95,7 +96,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
95
96
|
process.exit(1);
|
|
96
97
|
}
|
|
97
98
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
98
|
-
const { inputProps, envVariables, browserExecutable, chromiumOptions,
|
|
99
|
+
const { inputProps, envVariables, browserExecutable, chromiumOptions, puppeteerTimeout, browser, scale, publicDir, proResProfile, x264Preset, frameRange: defaultFrameRange, overwrite, jpegQuality, crf: configFileCrf, pixelFormat, scale: configFileScale, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, concurrency: unparsedConcurrency, offthreadVideoCacheSizeInBytes, colorSpace, } = await (0, get_cli_options_1.getCliOptions)({
|
|
99
100
|
isLambda: false,
|
|
100
101
|
type: 'series',
|
|
101
102
|
remotionRoot,
|
|
@@ -138,7 +139,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
138
139
|
envVariables,
|
|
139
140
|
chromiumOptions,
|
|
140
141
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
141
|
-
port,
|
|
142
|
+
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
142
143
|
puppeteerInstance,
|
|
143
144
|
browserExecutable,
|
|
144
145
|
indent: false,
|
|
@@ -209,7 +210,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
209
210
|
chromiumOptions,
|
|
210
211
|
timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
211
212
|
scale: configFileScale,
|
|
212
|
-
port,
|
|
213
|
+
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
213
214
|
numberOfGifLoops,
|
|
214
215
|
everyNthFrame,
|
|
215
216
|
logLevel,
|
package/dist/compositions.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.listCompositionsCommand = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
7
|
+
const preview_server_1 = require("./config/preview-server");
|
|
7
8
|
const entry_point_1 = require("./entry-point");
|
|
8
9
|
const get_cli_options_1 = require("./get-cli-options");
|
|
9
10
|
const log_1 = require("./log");
|
|
@@ -18,7 +19,7 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
18
19
|
process.exit(1);
|
|
19
20
|
}
|
|
20
21
|
log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', file, 'reason:', reason);
|
|
21
|
-
const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout,
|
|
22
|
+
const { browserExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, publicDir, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
|
|
22
23
|
isLambda: false,
|
|
23
24
|
type: 'get-compositions',
|
|
24
25
|
remotionRoot,
|
|
@@ -50,7 +51,7 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
50
51
|
indent: undefined,
|
|
51
52
|
}).serializedString,
|
|
52
53
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
53
|
-
port,
|
|
54
|
+
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
54
55
|
indent: false,
|
|
55
56
|
onBrowserLog: null,
|
|
56
57
|
puppeteerInstance: undefined,
|
package/dist/config/index.d.ts
CHANGED
|
@@ -18,11 +18,22 @@ declare global {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly setCachingEnabled: (flag: boolean) => void;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* @deprecated
|
|
22
|
+
* Use `setStudioPort()` and `setRendererPort()` instead.
|
|
23
|
+
*/
|
|
24
|
+
readonly setPort: (port: number | undefined) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Set the HTTP port used by the Studio.
|
|
22
27
|
* By default, Remotion will try to find a free port.
|
|
23
28
|
* If you specify a port, but it's not available, Remotion will throw an error.
|
|
24
29
|
*/
|
|
25
|
-
readonly
|
|
30
|
+
readonly setStudioPort: (port: number | undefined) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Set the HTTP port used to host the Webpack bundle.
|
|
33
|
+
* By default, Remotion will try to find a free port.
|
|
34
|
+
* If you specify a port, but it's not available, Remotion will throw an error.
|
|
35
|
+
*/
|
|
36
|
+
readonly setRendererPort: (port: number | undefined) => void;
|
|
26
37
|
/**
|
|
27
38
|
* Define the location of the public/ directory.
|
|
28
39
|
* By default it is a folder named "public" inside the current working directory.
|
|
@@ -302,7 +313,9 @@ export declare const ConfigInternals: {
|
|
|
302
313
|
}) => boolean;
|
|
303
314
|
getBrowserExecutable: () => BrowserExecutable;
|
|
304
315
|
getScale: () => number;
|
|
305
|
-
|
|
316
|
+
getStudioPort: () => number | undefined;
|
|
317
|
+
getRendererPortFromConfigFile: () => number | null;
|
|
318
|
+
getRendererPortFromConfigFileAndCliFlag: () => number | null;
|
|
306
319
|
getChromiumDisableWebSecurity: () => boolean;
|
|
307
320
|
getIgnoreCertificateErrors: () => boolean;
|
|
308
321
|
getChromiumHeadlessMode: () => boolean;
|
package/dist/config/index.js
CHANGED
|
@@ -115,6 +115,8 @@ exports.Config = {
|
|
|
115
115
|
overrideWebpackConfig: override_webpack_2.overrideWebpackConfig,
|
|
116
116
|
setCachingEnabled: webpack_caching_2.setWebpackCaching,
|
|
117
117
|
setPort: preview_server_2.setPort,
|
|
118
|
+
setStudioPort: preview_server_2.setStudioPort,
|
|
119
|
+
setRendererPort: preview_server_2.setRendererPort,
|
|
118
120
|
setPublicDir: public_dir_1.setPublicDir,
|
|
119
121
|
setEntryPoint: entry_point_1.setEntryPoint,
|
|
120
122
|
setLevel: log_1.setLogLevel,
|
|
@@ -173,7 +175,9 @@ exports.ConfigInternals = {
|
|
|
173
175
|
getShouldOverwrite: overwrite_1.getShouldOverwrite,
|
|
174
176
|
getBrowserExecutable: browser_executable_1.getBrowserExecutable,
|
|
175
177
|
getScale: scale_1.getScale,
|
|
176
|
-
|
|
178
|
+
getStudioPort: preview_server_1.getStudioPort,
|
|
179
|
+
getRendererPortFromConfigFile: preview_server_1.getRendererPortFromConfigFile,
|
|
180
|
+
getRendererPortFromConfigFileAndCliFlag: preview_server_1.getRendererPortFromConfigFileAndCliFlag,
|
|
177
181
|
getChromiumDisableWebSecurity: chromium_flags_1.getChromiumDisableWebSecurity,
|
|
178
182
|
getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
|
|
179
183
|
getChromiumHeadlessMode: chromium_flags_1.getChromiumHeadlessMode,
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param port
|
|
4
|
+
* @deprecated Use the `setStudioPort` and `setRendererPort` functions instead
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
1
7
|
export declare const setPort: (port: number | undefined) => void;
|
|
2
|
-
export declare const
|
|
8
|
+
export declare const setStudioPort: (port: number | undefined) => void;
|
|
9
|
+
export declare const setRendererPort: (port: number | undefined) => void;
|
|
10
|
+
export declare const getStudioPort: () => number | undefined;
|
|
11
|
+
export declare const getRendererPortFromConfigFile: () => number | null;
|
|
12
|
+
export declare const getRendererPortFromConfigFileAndCliFlag: () => number | null;
|
|
@@ -1,20 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
exports.getRendererPortFromConfigFileAndCliFlag = exports.getRendererPortFromConfigFile = exports.getStudioPort = exports.setRendererPort = exports.setStudioPort = exports.setPort = void 0;
|
|
4
|
+
const parse_command_line_1 = require("../parse-command-line");
|
|
5
|
+
let studioPort;
|
|
6
|
+
let rendererPort;
|
|
7
|
+
const validatePort = (port) => {
|
|
6
8
|
if (!['number', 'undefined'].includes(typeof port)) {
|
|
7
9
|
throw new Error(`Studio server port should be a number. Got ${typeof port} (${JSON.stringify(port)})`);
|
|
8
10
|
}
|
|
9
11
|
if (port === undefined) {
|
|
10
|
-
serverPort = undefined;
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
13
14
|
if (port < 1 || port > 65535) {
|
|
14
15
|
throw new Error(`Studio server port should be a number between 1 and 65535. Got ${port}`);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param port
|
|
21
|
+
* @deprecated Use the `setStudioPort` and `setRendererPort` functions instead
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
const setPort = (port) => {
|
|
25
|
+
(0, exports.setStudioPort)(port);
|
|
26
|
+
(0, exports.setRendererPort)(port);
|
|
17
27
|
};
|
|
18
28
|
exports.setPort = setPort;
|
|
19
|
-
const
|
|
20
|
-
|
|
29
|
+
const setStudioPort = (port) => {
|
|
30
|
+
validatePort(port);
|
|
31
|
+
studioPort = port;
|
|
32
|
+
};
|
|
33
|
+
exports.setStudioPort = setStudioPort;
|
|
34
|
+
const setRendererPort = (port) => {
|
|
35
|
+
validatePort(port);
|
|
36
|
+
rendererPort = port;
|
|
37
|
+
};
|
|
38
|
+
exports.setRendererPort = setRendererPort;
|
|
39
|
+
const getStudioPort = () => studioPort;
|
|
40
|
+
exports.getStudioPort = getStudioPort;
|
|
41
|
+
const getRendererPortFromConfigFile = () => {
|
|
42
|
+
return rendererPort !== null && rendererPort !== void 0 ? rendererPort : null;
|
|
43
|
+
};
|
|
44
|
+
exports.getRendererPortFromConfigFile = getRendererPortFromConfigFile;
|
|
45
|
+
const getRendererPortFromConfigFileAndCliFlag = () => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
return (_b = (_a = parse_command_line_1.parsedCli.port) !== null && _a !== void 0 ? _a : rendererPort) !== null && _b !== void 0 ? _b : null;
|
|
48
|
+
};
|
|
49
|
+
exports.getRendererPortFromConfigFileAndCliFlag = getRendererPortFromConfigFileAndCliFlag;
|
package/dist/event-source.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.openEventSource = exports.subscribeToEvent = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
4
5
|
const NotificationCenter_1 = require("./editor/components/Notifications/NotificationCenter");
|
|
5
6
|
const context_1 = require("./editor/components/RenderQueue/context");
|
|
6
7
|
const client_id_1 = require("./editor/helpers/client-id");
|
|
@@ -35,6 +36,12 @@ const openEventSource = () => {
|
|
|
35
36
|
(0, NotificationCenter_1.sendErrorNotification)(`Rendering "${newEvent.compositionId}" failed`);
|
|
36
37
|
}
|
|
37
38
|
if (newEvent.type === 'new-public-folder') {
|
|
39
|
+
const payload = {
|
|
40
|
+
files: newEvent.files,
|
|
41
|
+
};
|
|
42
|
+
window.dispatchEvent(new CustomEvent(remotion_1.Internals.WATCH_REMOTION_STATIC_FILES, {
|
|
43
|
+
detail: payload,
|
|
44
|
+
}));
|
|
38
45
|
window.remotion_staticFiles = newEvent.files;
|
|
39
46
|
window.remotion_publicFolderExists = newEvent.folderExists;
|
|
40
47
|
}
|
package/dist/get-cli-options.js
CHANGED
|
@@ -82,7 +82,6 @@ const getCliOptions = async (options) => {
|
|
|
82
82
|
const x264Preset = getx264Preset();
|
|
83
83
|
const browserExecutable = config_1.ConfigInternals.getBrowserExecutable();
|
|
84
84
|
const scale = config_1.ConfigInternals.getScale();
|
|
85
|
-
const port = config_1.ConfigInternals.getServerPort();
|
|
86
85
|
const chromiumOptions = {
|
|
87
86
|
disableWebSecurity: config_1.ConfigInternals.getChromiumDisableWebSecurity(),
|
|
88
87
|
ignoreCertificateErrors: config_1.ConfigInternals.getIgnoreCertificateErrors(),
|
|
@@ -107,7 +106,7 @@ const getCliOptions = async (options) => {
|
|
|
107
106
|
frameRange,
|
|
108
107
|
shouldOutputImageSequence,
|
|
109
108
|
inputProps: (0, get_input_props_1.getInputProps)(null, options.logLevel),
|
|
110
|
-
envVariables:
|
|
109
|
+
envVariables: (0, get_env_1.getEnvironmentVariables)(null, options.logLevel),
|
|
111
110
|
jpegQuality: config_1.ConfigInternals.getJpegQuality(),
|
|
112
111
|
browser: await getAndValidateBrowser({
|
|
113
112
|
browserExecutable,
|
|
@@ -126,7 +125,6 @@ const getCliOptions = async (options) => {
|
|
|
126
125
|
scale,
|
|
127
126
|
chromiumOptions,
|
|
128
127
|
overwrite,
|
|
129
|
-
port: port !== null && port !== void 0 ? port : null,
|
|
130
128
|
muted: config_1.ConfigInternals.getMuted(),
|
|
131
129
|
enforceAudioTrack: config_1.ConfigInternals.getEnforceAudioTrack(),
|
|
132
130
|
publicDir: config_1.ConfigInternals.getPublicDir(),
|
package/dist/get-env.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
export declare const getEnvironmentVariables: (onUpdate: ((newProps: Record<string, string>) => void) | null, logLevel: LogLevel) =>
|
|
2
|
+
export declare const getEnvironmentVariables: (onUpdate: ((newProps: Record<string, string>) => void) | null, logLevel: LogLevel) => Record<string, string>;
|
package/dist/get-env.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
@@ -6,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
29
|
exports.getEnvironmentVariables = void 0;
|
|
7
30
|
const renderer_1 = require("@remotion/renderer");
|
|
8
31
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
|
-
const node_fs_1 =
|
|
32
|
+
const node_fs_1 = __importStar(require("node:fs"));
|
|
10
33
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
34
|
const chalk_1 = require("./chalk");
|
|
12
35
|
const config_1 = require("./config");
|
|
@@ -52,9 +75,9 @@ const watchEnvFile = ({ processEnv, envFile, onUpdate, logLevel, }) => {
|
|
|
52
75
|
});
|
|
53
76
|
return unwatch;
|
|
54
77
|
};
|
|
55
|
-
const getEnvForEnvFile =
|
|
78
|
+
const getEnvForEnvFile = (processEnv, envFile, onUpdate, logLevel) => {
|
|
56
79
|
try {
|
|
57
|
-
const envFileData =
|
|
80
|
+
const envFileData = (0, node_fs_1.readFileSync)(envFile);
|
|
58
81
|
if (onUpdate) {
|
|
59
82
|
if (typeof node_fs_1.default.watchFile === 'undefined') {
|
|
60
83
|
log_1.Log.warn({ indent: false, logLevel }, 'Unsupported feature (fs.watchFile): .env file will not hot reload.');
|
|
@@ -113,7 +136,7 @@ const getEnvironmentVariables = (onUpdate, logLevel) => {
|
|
|
113
136
|
});
|
|
114
137
|
}
|
|
115
138
|
}
|
|
116
|
-
return
|
|
139
|
+
return processEnv;
|
|
117
140
|
}
|
|
118
141
|
return getEnvForEnvFile(processEnv, defaultEnvFile, onUpdate, logLevel);
|
|
119
142
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ exports.BooleanFlags = [
|
|
|
23
23
|
'disable-chunk-optimization',
|
|
24
24
|
'save-browser-logs',
|
|
25
25
|
'disable-cloudwatch',
|
|
26
|
+
'enable-lambda-insights',
|
|
26
27
|
'yes',
|
|
27
28
|
'y',
|
|
28
29
|
'disable-web-security',
|
|
@@ -122,9 +123,6 @@ const parseCommandLine = () => {
|
|
|
122
123
|
if (typeof exports.parsedCli.scale !== 'undefined') {
|
|
123
124
|
config_1.Config.setScale(exports.parsedCli.scale);
|
|
124
125
|
}
|
|
125
|
-
if (typeof exports.parsedCli.port !== 'undefined') {
|
|
126
|
-
config_1.Config.setPort(exports.parsedCli.port);
|
|
127
|
-
}
|
|
128
126
|
if (typeof exports.parsedCli.muted !== 'undefined') {
|
|
129
127
|
config_1.Config.setMuted(exports.parsedCli.muted);
|
|
130
128
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processStill = void 0;
|
|
4
|
+
const preview_server_1 = require("../../config/preview-server");
|
|
4
5
|
const convert_entry_point_to_serve_url_1 = require("../../convert-entry-point-to-serve-url");
|
|
5
6
|
const get_cli_options_1 = require("../../get-cli-options");
|
|
6
7
|
const still_1 = require("../../render-flows/still");
|
|
@@ -8,7 +9,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
8
9
|
if (job.type !== 'still') {
|
|
9
10
|
throw new Error('Expected still job');
|
|
10
11
|
}
|
|
11
|
-
const { publicDir, browserExecutable,
|
|
12
|
+
const { publicDir, browserExecutable, browser, puppeteerTimeout } = await (0, get_cli_options_1.getCliOptions)({
|
|
12
13
|
isLambda: false,
|
|
13
14
|
type: 'still',
|
|
14
15
|
remotionRoot,
|
|
@@ -26,7 +27,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
26
27
|
fullEntryPoint,
|
|
27
28
|
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
28
29
|
overwrite: true,
|
|
29
|
-
port,
|
|
30
|
+
port: (0, preview_server_1.getRendererPortFromConfigFile)(),
|
|
30
31
|
publicDir,
|
|
31
32
|
puppeteerTimeout,
|
|
32
33
|
jpegQuality: job.jpegQuality,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processVideoJob = void 0;
|
|
4
|
+
const preview_server_1 = require("../../config/preview-server");
|
|
4
5
|
const convert_entry_point_to_serve_url_1 = require("../../convert-entry-point-to-serve-url");
|
|
5
6
|
const get_cli_options_1 = require("../../get-cli-options");
|
|
6
7
|
const render_1 = require("../../render-flows/render");
|
|
@@ -9,7 +10,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
9
10
|
if (job.type !== 'video' && job.type !== 'sequence') {
|
|
10
11
|
throw new Error('Expected video job');
|
|
11
12
|
}
|
|
12
|
-
const { publicDir, browserExecutable,
|
|
13
|
+
const { publicDir, browserExecutable, browser, ffmpegOverride } = await (0, get_cli_options_1.getCliOptions)({
|
|
13
14
|
isLambda: false,
|
|
14
15
|
type: 'still',
|
|
15
16
|
remotionRoot,
|
|
@@ -27,7 +28,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
27
28
|
fullEntryPoint,
|
|
28
29
|
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
29
30
|
overwrite: true,
|
|
30
|
-
port,
|
|
31
|
+
port: (0, preview_server_1.getRendererPortFromConfigFile)(),
|
|
31
32
|
publicDir,
|
|
32
33
|
puppeteerTimeout: job.delayRenderTimeout,
|
|
33
34
|
jpegQuality: (_a = job.jpegQuality) !== null && _a !== void 0 ? _a : undefined,
|
package/dist/render.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.render = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
6
6
|
const config_1 = require("./config");
|
|
7
|
+
const preview_server_1 = require("./config/preview-server");
|
|
7
8
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
8
9
|
const entry_point_1 = require("./entry-point");
|
|
9
10
|
const get_audio_codec_1 = require("./get-audio-codec");
|
|
@@ -24,7 +25,7 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
24
25
|
log_1.Log.error('--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/');
|
|
25
26
|
process.exit(1);
|
|
26
27
|
}
|
|
27
|
-
const { concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, jpegQuality, browser, browserExecutable, scale, chromiumOptions,
|
|
28
|
+
const { concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, jpegQuality, browser, browserExecutable, scale, chromiumOptions, everyNthFrame, puppeteerTimeout, publicDir, height, width, crf, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, numberOfGifLoops, offthreadVideoCacheSizeInBytes, colorSpace, } = await (0, get_cli_options_1.getCliOptions)({
|
|
28
29
|
isLambda: false,
|
|
29
30
|
type: 'series',
|
|
30
31
|
remotionRoot,
|
|
@@ -49,7 +50,7 @@ const render = async (remotionRoot, args, logLevel) => {
|
|
|
49
50
|
data: inputProps,
|
|
50
51
|
}).serializedString,
|
|
51
52
|
puppeteerTimeout,
|
|
52
|
-
port,
|
|
53
|
+
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
53
54
|
height,
|
|
54
55
|
width,
|
|
55
56
|
remainingArgs,
|
package/dist/still.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.still = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
6
|
+
const preview_server_1 = require("./config/preview-server");
|
|
6
7
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
7
8
|
const entry_point_1 = require("./entry-point");
|
|
8
9
|
const get_cli_options_1 = require("./get-cli-options");
|
|
@@ -22,7 +23,7 @@ const still = async (remotionRoot, args, logLevel) => {
|
|
|
22
23
|
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/');
|
|
23
24
|
process.exit(1);
|
|
24
25
|
}
|
|
25
|
-
const { browser, browserExecutable, chromiumOptions, envVariables, height, inputProps, overwrite,
|
|
26
|
+
const { browser, browserExecutable, chromiumOptions, envVariables, height, inputProps, overwrite, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, offthreadVideoCacheSizeInBytes, } = await (0, get_cli_options_1.getCliOptions)({
|
|
26
27
|
isLambda: false,
|
|
27
28
|
type: 'still',
|
|
28
29
|
remotionRoot,
|
|
@@ -44,7 +45,7 @@ const still = async (remotionRoot, args, logLevel) => {
|
|
|
44
45
|
staticBase: null,
|
|
45
46
|
}).serializedString,
|
|
46
47
|
overwrite,
|
|
47
|
-
port,
|
|
48
|
+
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
48
49
|
publicDir,
|
|
49
50
|
puppeteerTimeout,
|
|
50
51
|
jpegQuality,
|
package/dist/studio.js
CHANGED
|
@@ -49,7 +49,7 @@ const getPort = () => {
|
|
|
49
49
|
if (parse_command_line_1.parsedCli.port) {
|
|
50
50
|
return parse_command_line_1.parsedCli.port;
|
|
51
51
|
}
|
|
52
|
-
const serverPort = config_1.ConfigInternals.
|
|
52
|
+
const serverPort = config_1.ConfigInternals.getStudioPort();
|
|
53
53
|
if (serverPort) {
|
|
54
54
|
return serverPort;
|
|
55
55
|
}
|
|
@@ -75,7 +75,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}, logLevel);
|
|
78
|
-
let envVariables =
|
|
78
|
+
let envVariables = (0, get_env_1.getEnvironmentVariables)((newEnvVariables) => {
|
|
79
79
|
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
80
80
|
envVariables = newEnvVariables;
|
|
81
81
|
listener.sendEventToClient({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.61",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prompts": "2.4.1",
|
|
36
36
|
"semver": "7.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/bundler": "4.0.
|
|
39
|
-
"@remotion/
|
|
40
|
-
"remotion": "4.0.
|
|
41
|
-
"@remotion/
|
|
42
|
-
"
|
|
38
|
+
"@remotion/bundler": "4.0.61",
|
|
39
|
+
"@remotion/media-utils": "4.0.61",
|
|
40
|
+
"@remotion/player": "4.0.61",
|
|
41
|
+
"@remotion/renderer": "4.0.61",
|
|
42
|
+
"remotion": "4.0.61"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": "18.2.0",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.22.3",
|
|
68
|
-
"@remotion/zod-types": "4.0.
|
|
69
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.61",
|
|
69
|
+
"@remotion/tailwind": "4.0.61"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPresetProfile = exports.getPresetProfile = void 0;
|
|
4
|
-
let preset;
|
|
5
|
-
const getPresetProfile = () => {
|
|
6
|
-
return preset;
|
|
7
|
-
};
|
|
8
|
-
exports.getPresetProfile = getPresetProfile;
|
|
9
|
-
const setPresetProfile = (profile) => {
|
|
10
|
-
preset = profile;
|
|
11
|
-
};
|
|
12
|
-
exports.setPresetProfile = setPresetProfile;
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleCommonError = void 0;
|
|
4
|
-
const chalk_1 = require("./chalk");
|
|
5
|
-
const log_1 = require("./log");
|
|
6
|
-
const print_error_1 = require("./print-error");
|
|
7
|
-
const truthy_1 = require("./truthy");
|
|
8
|
-
const handleCommonError = async (err, logLevel) => {
|
|
9
|
-
var _a;
|
|
10
|
-
await (0, print_error_1.printError)(err, logLevel);
|
|
11
|
-
if (err.message.includes('Could not play video with')) {
|
|
12
|
-
log_1.Log.info();
|
|
13
|
-
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
|
|
14
|
-
}
|
|
15
|
-
if (err.message.includes('A delayRender()') &&
|
|
16
|
-
err.message.includes('was called but not cleared after')) {
|
|
17
|
-
log_1.Log.info();
|
|
18
|
-
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
|
|
19
|
-
}
|
|
20
|
-
if (err.message.includes('Target closed')) {
|
|
21
|
-
log_1.Log.info();
|
|
22
|
-
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
|
|
23
|
-
}
|
|
24
|
-
if (err.message.includes('ENAMETOOLONG')) {
|
|
25
|
-
log_1.Log.info();
|
|
26
|
-
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
|
|
27
|
-
}
|
|
28
|
-
if (err.message.includes('Error creating WebGL context')) {
|
|
29
|
-
log_1.Log.info();
|
|
30
|
-
log_1.Log.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
31
|
-
log_1.Log.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
32
|
-
}
|
|
33
|
-
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
34
|
-
log_1.Log.info();
|
|
35
|
-
log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
|
|
36
|
-
}
|
|
37
|
-
if (err.message.includes('Minified React error #306')) {
|
|
38
|
-
const componentName = (_a = err.message.match(/<\w+>/)) === null || _a === void 0 ? void 0 : _a[0];
|
|
39
|
-
log_1.Log.info([
|
|
40
|
-
'💡 This error indicates that the component',
|
|
41
|
-
componentName ? `(${componentName})` : null,
|
|
42
|
-
'you are trying to render is not imported correctly.',
|
|
43
|
-
]
|
|
44
|
-
.filter(truthy_1.truthy)
|
|
45
|
-
.join(' '));
|
|
46
|
-
log_1.Log.info();
|
|
47
|
-
log_1.Log.info(' Check the root file and ensure that the component is not undefined.');
|
|
48
|
-
log_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
|
|
49
|
-
log_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
|
|
50
|
-
}
|
|
51
|
-
if (err.message.includes('GLIBC_')) {
|
|
52
|
-
log_1.Log.info('💡 Remotion requires at least Libc 2.35.');
|
|
53
|
-
log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
|
|
54
|
-
}
|
|
55
|
-
if (err.message.includes('EBADF')) {
|
|
56
|
-
log_1.Log.info('💡 This error might be fixed by changing your Node version:');
|
|
57
|
-
log_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
exports.handleCommonError = handleCommonError;
|