@remotion/cli 4.0.59 → 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/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +17 -4
- 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/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/event-source.js +7 -0
- package/dist/get-cli-options.d.ts +1 -2
- 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 +5 -6
- package/dist/parse-command-line.js +1 -3
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- 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/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,
|
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | 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;
|
|
@@ -316,7 +329,7 @@ export declare const ConfigInternals: {
|
|
|
316
329
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
317
330
|
getDotEnvLocation: () => string | null;
|
|
318
331
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
319
|
-
getUserPreferredVideoImageFormat: () => "
|
|
332
|
+
getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
|
|
320
333
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
321
334
|
getWebpackCaching: () => boolean;
|
|
322
335
|
getOutputLocation: () => string | null;
|
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;
|
|
@@ -13,5 +13,5 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
15
|
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
|
|
|
3
3
|
status: 'error' | 'warning' | 'ok';
|
|
4
4
|
};
|
|
5
5
|
export declare const inputBaseStyle: React.CSSProperties;
|
|
6
|
-
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "GIF" | "AAC" | "MP3" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
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
|
}
|
|
@@ -26,7 +26,6 @@ export declare const getCliOptions: (options: {
|
|
|
26
26
|
scale: number;
|
|
27
27
|
chromiumOptions: ChromiumOptions;
|
|
28
28
|
overwrite: boolean;
|
|
29
|
-
port: number | null;
|
|
30
29
|
muted: boolean;
|
|
31
30
|
enforceAudioTrack: boolean;
|
|
32
31
|
publicDir: string | null;
|
|
@@ -35,7 +34,7 @@ export declare const getCliOptions: (options: {
|
|
|
35
34
|
videoBitrate: string | null;
|
|
36
35
|
height: number | null;
|
|
37
36
|
width: number | null;
|
|
38
|
-
configFileImageFormat: "
|
|
37
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
39
38
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
40
39
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
41
40
|
colorSpace: "default" | "bt709";
|
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
|
@@ -96,7 +96,6 @@ export declare const CliInternals: {
|
|
|
96
96
|
scale: number;
|
|
97
97
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
98
98
|
overwrite: boolean;
|
|
99
|
-
port: number | null;
|
|
100
99
|
muted: boolean;
|
|
101
100
|
enforceAudioTrack: boolean;
|
|
102
101
|
publicDir: string | null;
|
|
@@ -105,7 +104,7 @@ export declare const CliInternals: {
|
|
|
105
104
|
videoBitrate: string | null;
|
|
106
105
|
height: number | null;
|
|
107
106
|
width: number | null;
|
|
108
|
-
configFileImageFormat: "
|
|
107
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
109
108
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
110
109
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
111
110
|
colorSpace: "default" | "bt709";
|
|
@@ -117,7 +116,7 @@ export declare const CliInternals: {
|
|
|
117
116
|
parsedCli: {
|
|
118
117
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
119
118
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
120
|
-
"image-format": "
|
|
119
|
+
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
121
120
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
122
121
|
"x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
123
122
|
"bundle-cache": string;
|
|
@@ -188,7 +187,7 @@ export declare const CliInternals: {
|
|
|
188
187
|
downloadName: string | null;
|
|
189
188
|
outName: string | null;
|
|
190
189
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
191
|
-
cliFlag: "
|
|
190
|
+
cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
|
|
192
191
|
isLambda: boolean;
|
|
193
192
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
194
193
|
}) => {
|
|
@@ -203,8 +202,8 @@ export declare const CliInternals: {
|
|
|
203
202
|
};
|
|
204
203
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
205
204
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
206
|
-
uiImageFormat: "
|
|
207
|
-
}) => "
|
|
205
|
+
uiImageFormat: "png" | "jpeg" | "none" | null;
|
|
206
|
+
}) => "png" | "jpeg" | "none";
|
|
208
207
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
209
208
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }: {
|
|
210
209
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
@@ -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
|
}
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | Ranges | -2;
|
|
15
15
|
export {};
|
|
@@ -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/
|
|
41
|
-
"remotion": "4.0.
|
|
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",
|