@remotion/cli 4.0.136 → 4.0.137
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 +17 -1
- package/dist/browser/ensure.d.ts +3 -0
- package/dist/browser/ensure.js +40 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.js +23 -0
- package/dist/browser-download-bar.d.ts +6 -0
- package/dist/browser-download-bar.js +67 -0
- package/dist/compositions.js +6 -0
- package/dist/get-composition-id.d.ts +3 -2
- package/dist/get-composition-id.js +3 -1
- package/dist/get-composition-with-dimension-override.d.ts +3 -2
- package/dist/get-composition-with-dimension-override.js +2 -1
- package/dist/gpu.js +6 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/render-flows/render.js +16 -0
- package/dist/render-flows/still.js +15 -0
- package/package.json +10 -10
package/dist/benchmark.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.benchmarkCommand = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
|
+
const browser_download_bar_1 = require("./browser-download-bar");
|
|
7
8
|
const chalk_1 = require("./chalk");
|
|
8
9
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
9
10
|
const config_1 = require("./config");
|
|
@@ -123,14 +124,27 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
123
124
|
ignoreCertificateErrors,
|
|
124
125
|
userAgent,
|
|
125
126
|
};
|
|
127
|
+
const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
128
|
+
indent: false,
|
|
129
|
+
logLevel,
|
|
130
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
131
|
+
});
|
|
132
|
+
const indent = false;
|
|
133
|
+
await renderer_1.RenderInternals.internalEnsureBrowser({
|
|
134
|
+
browserExecutable,
|
|
135
|
+
indent,
|
|
136
|
+
logLevel,
|
|
137
|
+
onBrowserDownload,
|
|
138
|
+
});
|
|
126
139
|
const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
|
|
127
140
|
browser: 'chrome',
|
|
128
141
|
browserExecutable,
|
|
129
142
|
chromiumOptions,
|
|
130
143
|
forceDeviceScaleFactor: scale,
|
|
131
|
-
indent
|
|
144
|
+
indent,
|
|
132
145
|
viewport: null,
|
|
133
146
|
logLevel,
|
|
147
|
+
onBrowserDownload,
|
|
134
148
|
});
|
|
135
149
|
const { urlOrBundle: bundleLocation, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
136
150
|
fullPath: fullEntryPoint,
|
|
@@ -182,6 +196,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
182
196
|
binariesDirectory: binariesDirectoryOption.getValue({
|
|
183
197
|
commandLine: parse_command_line_1.parsedCli,
|
|
184
198
|
}).value,
|
|
199
|
+
onBrowserDownload,
|
|
185
200
|
});
|
|
186
201
|
const ids = (remainingArgs[0]
|
|
187
202
|
? remainingArgs[0]
|
|
@@ -322,6 +337,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
322
337
|
commandLine: parse_command_line_1.parsedCli,
|
|
323
338
|
}).value,
|
|
324
339
|
compositionStart: 0,
|
|
340
|
+
onBrowserDownload,
|
|
325
341
|
}, (run, progress) => {
|
|
326
342
|
benchmarkProgress.update(makeBenchmarkProgressBar({
|
|
327
343
|
totalRuns: runs,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureCommand = exports.ENSURE_COMMAND = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const browser_download_bar_1 = require("../browser-download-bar");
|
|
6
|
+
const get_cli_options_1 = require("../get-cli-options");
|
|
7
|
+
const log_1 = require("../log");
|
|
8
|
+
const parse_command_line_1 = require("../parse-command-line");
|
|
9
|
+
exports.ENSURE_COMMAND = 'ensure';
|
|
10
|
+
const ensureCommand = async (logLevel) => {
|
|
11
|
+
const { browserExecutable } = (0, get_cli_options_1.getCliOptions)({
|
|
12
|
+
isStill: false,
|
|
13
|
+
logLevel,
|
|
14
|
+
});
|
|
15
|
+
const indent = false;
|
|
16
|
+
const status = await (0, renderer_1.ensureBrowser)({
|
|
17
|
+
browserExecutable,
|
|
18
|
+
logLevel,
|
|
19
|
+
onBrowserDownload: (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
20
|
+
indent,
|
|
21
|
+
logLevel,
|
|
22
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
if (status.type === 'no-browser') {
|
|
26
|
+
throw new Error('should have downloaded browser');
|
|
27
|
+
}
|
|
28
|
+
if (status.type === 'user-defined-path') {
|
|
29
|
+
log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (status.type === 'local-browser') {
|
|
33
|
+
log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (status.type === 'local-puppeteer-browser') {
|
|
37
|
+
log_1.Log.info({ indent, logLevel }, `Has browser at ${status.path}`);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.ensureCommand = ensureCommand;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browserCommand = exports.BROWSER_COMMAND = void 0;
|
|
4
|
+
const chalk_1 = require("../chalk");
|
|
5
|
+
const log_1 = require("../log");
|
|
6
|
+
const ensure_1 = require("./ensure");
|
|
7
|
+
exports.BROWSER_COMMAND = 'browser';
|
|
8
|
+
const printHelp = (logLevel) => {
|
|
9
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
10
|
+
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`remotion ${exports.BROWSER_COMMAND}`));
|
|
11
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
12
|
+
log_1.Log.info({ indent: false, logLevel }, 'Available commands:');
|
|
13
|
+
log_1.Log.info({ indent: false, logLevel }, '');
|
|
14
|
+
log_1.Log.info({ indent: false, logLevel }, `remotion ${exports.BROWSER_COMMAND} ${ensure_1.ENSURE_COMMAND}`);
|
|
15
|
+
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray('Ensure Remotion has a browser to render.'));
|
|
16
|
+
};
|
|
17
|
+
const browserCommand = (args, logLevel) => {
|
|
18
|
+
if (args[0] === ensure_1.ENSURE_COMMAND) {
|
|
19
|
+
return (0, ensure_1.ensureCommand)(logLevel);
|
|
20
|
+
}
|
|
21
|
+
printHelp(logLevel);
|
|
22
|
+
};
|
|
23
|
+
exports.browserCommand = browserCommand;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultBrowserDownloadProgress = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const chalk_1 = require("./chalk");
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
const make_progress_bar_1 = require("./make-progress-bar");
|
|
8
|
+
const progress_bar_1 = require("./progress-bar");
|
|
9
|
+
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
10
|
+
const truthy_1 = require("./truthy");
|
|
11
|
+
const makeDownloadProgress = ({ bytesDownloaded, totalBytes, doneIn, }) => {
|
|
12
|
+
const progress = bytesDownloaded / totalBytes;
|
|
13
|
+
return [
|
|
14
|
+
` +`,
|
|
15
|
+
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
16
|
+
`${doneIn ? 'Got' : 'Getting'} Headless Shell`,
|
|
17
|
+
doneIn === null
|
|
18
|
+
? (progress * 100).toFixed(0) + '%'
|
|
19
|
+
: chalk_1.chalk.gray(`${doneIn}ms`),
|
|
20
|
+
]
|
|
21
|
+
.filter(truthy_1.truthy)
|
|
22
|
+
.join(' ');
|
|
23
|
+
};
|
|
24
|
+
const defaultBrowserDownloadProgress = ({ indent, logLevel, quiet, }) => {
|
|
25
|
+
return () => {
|
|
26
|
+
log_1.Log.info({ indent, logLevel }, 'No local browser could be found.');
|
|
27
|
+
log_1.Log.info({ indent, logLevel }, 'Downloading Chrome Headless Shell https://www.remotion.dev/chrome-headless-shell');
|
|
28
|
+
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
29
|
+
if (updatesDontOverwrite) {
|
|
30
|
+
let lastProgress = 0;
|
|
31
|
+
return {
|
|
32
|
+
version: null,
|
|
33
|
+
onProgress: (progress) => {
|
|
34
|
+
if (progress.downloadedBytes > lastProgress + 10000000) {
|
|
35
|
+
lastProgress = progress.downloadedBytes;
|
|
36
|
+
log_1.Log.info({ indent, logLevel }, `Getting Headless Shell - ${renderer_1.RenderInternals.toMegabytes(progress.downloadedBytes)}/${renderer_1.RenderInternals.toMegabytes(progress.totalSizeInBytes)}`);
|
|
37
|
+
}
|
|
38
|
+
if (progress.percent === 1) {
|
|
39
|
+
log_1.Log.info({ indent, logLevel }, `Got Headless Shell`);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const cliOutput = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
45
|
+
quiet,
|
|
46
|
+
indent,
|
|
47
|
+
cancelSignal: null,
|
|
48
|
+
updatesDontOverwrite,
|
|
49
|
+
});
|
|
50
|
+
const startedAt = Date.now();
|
|
51
|
+
let doneIn = null;
|
|
52
|
+
return {
|
|
53
|
+
version: null,
|
|
54
|
+
onProgress: (progress) => {
|
|
55
|
+
if (progress.percent === 1) {
|
|
56
|
+
doneIn = Date.now() - startedAt;
|
|
57
|
+
}
|
|
58
|
+
cliOutput.update(makeDownloadProgress({
|
|
59
|
+
doneIn,
|
|
60
|
+
bytesDownloaded: progress.downloadedBytes,
|
|
61
|
+
totalBytes: progress.totalSizeInBytes,
|
|
62
|
+
}), false);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
exports.defaultBrowserDownloadProgress = defaultBrowserDownloadProgress;
|
package/dist/compositions.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.listCompositionsCommand = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
|
+
const browser_download_bar_1 = require("./browser-download-bar");
|
|
7
8
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
8
9
|
const preview_server_1 = require("./config/preview-server");
|
|
9
10
|
const entry_point_1 = require("./entry-point");
|
|
@@ -93,6 +94,11 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
93
94
|
server: undefined,
|
|
94
95
|
offthreadVideoCacheSizeInBytes,
|
|
95
96
|
binariesDirectory,
|
|
97
|
+
onBrowserDownload: (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
98
|
+
indent: false,
|
|
99
|
+
logLevel,
|
|
100
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
101
|
+
}),
|
|
96
102
|
});
|
|
97
103
|
(0, print_compositions_1.printCompositions)(compositions, logLevel);
|
|
98
104
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
1
|
+
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, OnBrowserDownload, RemotionServer } from '@remotion/renderer';
|
|
2
2
|
import type { VideoConfig } from 'remotion';
|
|
3
|
-
export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, }: {
|
|
3
|
+
export declare const getCompositionId: ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
|
|
4
4
|
args: string[];
|
|
5
5
|
compositionIdFromUi: string | null;
|
|
6
6
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -16,6 +16,7 @@ export declare const getCompositionId: ({ args, compositionIdFromUi, serializedI
|
|
|
16
16
|
server: RemotionServer;
|
|
17
17
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
18
18
|
binariesDirectory: string | null;
|
|
19
|
+
onBrowserDownload: OnBrowserDownload;
|
|
19
20
|
}) => Promise<{
|
|
20
21
|
compositionId: string;
|
|
21
22
|
reason: string;
|
|
@@ -16,7 +16,7 @@ const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
|
|
|
16
16
|
const [compName, ...remainingArgs] = cliArgs;
|
|
17
17
|
return { compName, remainingArgs, reason: 'Passed as argument' };
|
|
18
18
|
};
|
|
19
|
-
const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, }) => {
|
|
19
|
+
const getCompositionId = async ({ args, compositionIdFromUi, serializedInputPropsWithCustomSchema, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }) => {
|
|
20
20
|
const { compName, remainingArgs, reason: compReason, } = getCompName({
|
|
21
21
|
cliArgs: args,
|
|
22
22
|
compositionIdFromUi,
|
|
@@ -38,6 +38,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
38
38
|
onBrowserLog: null,
|
|
39
39
|
offthreadVideoCacheSizeInBytes,
|
|
40
40
|
binariesDirectory,
|
|
41
|
+
onBrowserDownload,
|
|
41
42
|
});
|
|
42
43
|
if (propsSize > 10000000) {
|
|
43
44
|
log_1.Log.warn({
|
|
@@ -71,6 +72,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
71
72
|
serializedInputPropsWithCustomSchema,
|
|
72
73
|
offthreadVideoCacheSizeInBytes,
|
|
73
74
|
binariesDirectory,
|
|
75
|
+
onBrowserDownload,
|
|
74
76
|
});
|
|
75
77
|
const { compositionId, reason } = await (0, show_compositions_picker_1.showSingleCompositionsPicker)(comps, logLevel);
|
|
76
78
|
if (compositionId && typeof compositionId === 'string') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
1
|
+
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, 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, binariesDirectory, }: {
|
|
3
|
+
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
|
|
4
4
|
height: number | null;
|
|
5
5
|
width: number | null;
|
|
6
6
|
args: string[];
|
|
@@ -18,6 +18,7 @@ export declare const getCompositionWithDimensionOverride: ({ height, width, args
|
|
|
18
18
|
server: RemotionServer;
|
|
19
19
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
20
20
|
binariesDirectory: string | null;
|
|
21
|
+
onBrowserDownload: OnBrowserDownload;
|
|
21
22
|
}) => Promise<{
|
|
22
23
|
compositionId: string;
|
|
23
24
|
reason: string;
|
|
@@ -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, binariesDirectory, }) => {
|
|
5
|
+
const getCompositionWithDimensionOverride = async ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }) => {
|
|
6
6
|
const returnValue = await (0, get_composition_id_1.getCompositionId)({
|
|
7
7
|
args,
|
|
8
8
|
compositionIdFromUi,
|
|
@@ -19,6 +19,7 @@ const getCompositionWithDimensionOverride = async ({ height, width, args, compos
|
|
|
19
19
|
server,
|
|
20
20
|
offthreadVideoCacheSizeInBytes,
|
|
21
21
|
binariesDirectory,
|
|
22
|
+
onBrowserDownload,
|
|
22
23
|
});
|
|
23
24
|
return {
|
|
24
25
|
...returnValue,
|
package/dist/gpu.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.gpuCommand = exports.GPU_COMMAND = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
|
+
const browser_download_bar_1 = require("./browser-download-bar");
|
|
6
7
|
const chalk_1 = require("./chalk");
|
|
7
8
|
const get_cli_options_1 = require("./get-cli-options");
|
|
8
9
|
const log_1 = require("./log");
|
|
@@ -38,6 +39,11 @@ const gpuCommand = async (logLevel) => {
|
|
|
38
39
|
logLevel,
|
|
39
40
|
chromiumOptions,
|
|
40
41
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
42
|
+
onBrowserDownload: (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
43
|
+
indent: false,
|
|
44
|
+
logLevel,
|
|
45
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
46
|
+
}),
|
|
41
47
|
});
|
|
42
48
|
for (const { feature, status } of statuses) {
|
|
43
49
|
log_1.Log.info({ indent: false, logLevel }, `${feature}: ${colorStatus(status)}`);
|
package/dist/index.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export declare const CliInternals: {
|
|
|
202
202
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
203
203
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
204
204
|
}) => boolean;
|
|
205
|
-
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, }: {
|
|
205
|
+
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, binariesDirectory, onBrowserDownload, }: {
|
|
206
206
|
height: number | null;
|
|
207
207
|
width: number | null;
|
|
208
208
|
args: string[];
|
|
@@ -220,10 +220,16 @@ export declare const CliInternals: {
|
|
|
220
220
|
server: import("@remotion/renderer").RemotionServer;
|
|
221
221
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
222
222
|
binariesDirectory: string | null;
|
|
223
|
+
onBrowserDownload: import("@remotion/renderer").OnBrowserDownload;
|
|
223
224
|
}) => Promise<{
|
|
224
225
|
compositionId: string;
|
|
225
226
|
reason: string;
|
|
226
227
|
config: import("remotion").VideoConfig;
|
|
227
228
|
argsAfterComposition: string[];
|
|
228
229
|
}>;
|
|
230
|
+
defaultBrowserDownloadProgress: ({ indent, logLevel, quiet, }: {
|
|
231
|
+
indent: boolean;
|
|
232
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
233
|
+
quiet: boolean;
|
|
234
|
+
}) => import("@remotion/renderer").OnBrowserDownload;
|
|
229
235
|
};
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,11 @@ 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 studio_server_1 = require("@remotion/studio-server");
|
|
8
9
|
const minimist_1 = __importDefault(require("minimist"));
|
|
9
10
|
const benchmark_1 = require("./benchmark");
|
|
11
|
+
const browser_1 = require("./browser");
|
|
12
|
+
const browser_download_bar_1 = require("./browser-download-bar");
|
|
10
13
|
const bundle_1 = require("./bundle");
|
|
11
14
|
const chalk_1 = require("./chalk");
|
|
12
15
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
@@ -103,6 +106,9 @@ const cli = async () => {
|
|
|
103
106
|
else if (command === versions_1.VERSIONS_COMMAND) {
|
|
104
107
|
await (0, versions_1.versionsCommand)(remotionRoot, logLevel);
|
|
105
108
|
}
|
|
109
|
+
else if (command === browser_1.BROWSER_COMMAND) {
|
|
110
|
+
await (0, browser_1.browserCommand)(args, logLevel);
|
|
111
|
+
}
|
|
106
112
|
else if (command === 'benchmark') {
|
|
107
113
|
await (0, benchmark_1.benchmarkCommand)(remotionRoot, args, logLevel);
|
|
108
114
|
}
|
|
@@ -130,7 +136,6 @@ const cli = async () => {
|
|
|
130
136
|
}
|
|
131
137
|
};
|
|
132
138
|
exports.cli = cli;
|
|
133
|
-
const studio_server_1 = require("@remotion/studio-server");
|
|
134
139
|
exports.CliInternals = {
|
|
135
140
|
createOverwriteableCliOutput: progress_bar_1.createOverwriteableCliOutput,
|
|
136
141
|
chalk: chalk_1.chalk,
|
|
@@ -153,4 +158,5 @@ exports.CliInternals = {
|
|
|
153
158
|
listOfRemotionPackages: list_of_remotion_packages_1.listOfRemotionPackages,
|
|
154
159
|
shouldUseNonOverlayingLogger: should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger,
|
|
155
160
|
getCompositionWithDimensionOverride: get_composition_with_dimension_override_1.getCompositionWithDimensionOverride,
|
|
161
|
+
defaultBrowserDownloadProgress: browser_download_bar_1.defaultBrowserDownloadProgress,
|
|
156
162
|
};
|
|
@@ -33,6 +33,7 @@ const node_fs_1 = __importStar(require("node:fs"));
|
|
|
33
33
|
const node_os_1 = __importDefault(require("node:os"));
|
|
34
34
|
const node_path_1 = __importDefault(require("node:path"));
|
|
35
35
|
const no_react_1 = require("remotion/no-react");
|
|
36
|
+
const browser_download_bar_1 = require("../browser-download-bar");
|
|
36
37
|
const chalk_1 = require("../chalk");
|
|
37
38
|
const config_1 = require("../config");
|
|
38
39
|
const get_cli_options_1 = require("../get-cli-options");
|
|
@@ -50,6 +51,17 @@ const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
|
50
51
|
const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, }) => {
|
|
51
52
|
var _a;
|
|
52
53
|
const downloads = [];
|
|
54
|
+
const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
55
|
+
indent,
|
|
56
|
+
logLevel,
|
|
57
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
58
|
+
});
|
|
59
|
+
await renderer_1.RenderInternals.internalEnsureBrowser({
|
|
60
|
+
browserExecutable,
|
|
61
|
+
indent,
|
|
62
|
+
logLevel,
|
|
63
|
+
onBrowserDownload,
|
|
64
|
+
});
|
|
53
65
|
const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
|
|
54
66
|
browser,
|
|
55
67
|
browserExecutable,
|
|
@@ -58,6 +70,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
58
70
|
indent,
|
|
59
71
|
viewport: null,
|
|
60
72
|
logLevel,
|
|
73
|
+
onBrowserDownload,
|
|
61
74
|
});
|
|
62
75
|
let isUsingParallelEncoding = false;
|
|
63
76
|
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
@@ -168,6 +181,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
168
181
|
server,
|
|
169
182
|
offthreadVideoCacheSizeInBytes,
|
|
170
183
|
binariesDirectory,
|
|
184
|
+
onBrowserDownload,
|
|
171
185
|
});
|
|
172
186
|
const { value: codec, source: codecReason } = client_1.BrowserSafeApis.options.videoCodecOption.getValue({
|
|
173
187
|
commandLine: parse_command_line_1.parsedCli,
|
|
@@ -268,6 +282,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
268
282
|
binariesDirectory,
|
|
269
283
|
compositionStart: 0,
|
|
270
284
|
forSeamlessAacConcatenation,
|
|
285
|
+
onBrowserDownload,
|
|
271
286
|
});
|
|
272
287
|
updateRenderProgress({ newline: true, printToConsole: true });
|
|
273
288
|
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
@@ -353,6 +368,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
353
368
|
separateAudioTo: absoluteSeparateAudioTo,
|
|
354
369
|
forSeamlessAacConcatenation,
|
|
355
370
|
compositionStart: 0,
|
|
371
|
+
onBrowserDownload,
|
|
356
372
|
});
|
|
357
373
|
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
|
|
358
374
|
if (absoluteSeparateAudioTo) {
|
|
@@ -9,6 +9,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const no_react_1 = require("remotion/no-react");
|
|
12
|
+
const browser_download_bar_1 = require("../browser-download-bar");
|
|
12
13
|
const chalk_1 = require("../chalk");
|
|
13
14
|
const cleanup_before_quit_1 = require("../cleanup-before-quit");
|
|
14
15
|
const config_1 = require("../config");
|
|
@@ -50,6 +51,17 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
50
51
|
}
|
|
51
52
|
onProgress({ message, value: progress, ...aggregate });
|
|
52
53
|
};
|
|
54
|
+
const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
55
|
+
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
56
|
+
indent,
|
|
57
|
+
logLevel,
|
|
58
|
+
});
|
|
59
|
+
await renderer_1.RenderInternals.internalEnsureBrowser({
|
|
60
|
+
browserExecutable,
|
|
61
|
+
indent,
|
|
62
|
+
logLevel,
|
|
63
|
+
onBrowserDownload,
|
|
64
|
+
});
|
|
53
65
|
const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
|
|
54
66
|
browser,
|
|
55
67
|
browserExecutable,
|
|
@@ -58,6 +70,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
58
70
|
indent,
|
|
59
71
|
viewport: null,
|
|
60
72
|
logLevel,
|
|
73
|
+
onBrowserDownload,
|
|
61
74
|
});
|
|
62
75
|
const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
63
76
|
fullPath: fullEntryPoint,
|
|
@@ -123,6 +136,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
123
136
|
server,
|
|
124
137
|
offthreadVideoCacheSizeInBytes,
|
|
125
138
|
binariesDirectory,
|
|
139
|
+
onBrowserDownload,
|
|
126
140
|
});
|
|
127
141
|
const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalStillImageFormat)({
|
|
128
142
|
cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
|
|
@@ -196,6 +210,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
196
210
|
}).serializedString,
|
|
197
211
|
offthreadVideoCacheSizeInBytes,
|
|
198
212
|
binariesDirectory,
|
|
213
|
+
onBrowserDownload,
|
|
199
214
|
});
|
|
200
215
|
aggregate.rendering = {
|
|
201
216
|
frames: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.137",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"dotenv": "9.0.2",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
34
|
"prompts": "2.4.2",
|
|
35
|
-
"@remotion/bundler": "4.0.
|
|
36
|
-
"@remotion/media-utils": "4.0.
|
|
37
|
-
"
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/studio-server": "4.0.
|
|
40
|
-
"@remotion/
|
|
41
|
-
"remotion": "4.0.
|
|
35
|
+
"@remotion/bundler": "4.0.137",
|
|
36
|
+
"@remotion/media-utils": "4.0.137",
|
|
37
|
+
"remotion": "4.0.137",
|
|
38
|
+
"@remotion/player": "4.0.137",
|
|
39
|
+
"@remotion/studio-server": "4.0.137",
|
|
40
|
+
"@remotion/renderer": "4.0.137",
|
|
41
|
+
"@remotion/studio": "4.0.137"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"react-dom": "18.2.0",
|
|
64
64
|
"vitest": "0.31.1",
|
|
65
65
|
"zod": "^3.22.3",
|
|
66
|
-
"@remotion/
|
|
67
|
-
"@remotion/
|
|
66
|
+
"@remotion/zod-types": "4.0.137",
|
|
67
|
+
"@remotion/tailwind": "4.0.137"
|
|
68
68
|
},
|
|
69
69
|
"keywords": [
|
|
70
70
|
"remotion",
|