@remotion/cli 4.0.115 → 4.0.117
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 +24 -17
- package/dist/bundle.js +11 -13
- package/dist/cleanup-before-quit.js +1 -1
- package/dist/cloudrun-command.js +5 -5
- package/dist/code-frame.d.ts +2 -2
- package/dist/code-frame.js +17 -17
- package/dist/composition-prompts.d.ts +2 -1
- package/dist/composition-prompts.js +4 -4
- package/dist/compositions.js +11 -11
- package/dist/config/chromium-flags.d.ts +0 -2
- package/dist/config/chromium-flags.js +1 -8
- package/dist/config/index.d.ts +0 -7
- package/dist/config/index.js +6 -39
- package/dist/config/override-webpack.d.ts +1 -1
- package/dist/ffmpeg.d.ts +2 -2
- package/dist/ffmpeg.js +2 -5
- package/dist/get-cli-options.d.ts +4 -10
- package/dist/get-cli-options.js +4 -18
- package/dist/get-composition-id.js +3 -3
- package/dist/get-config-file-name.js +1 -1
- package/dist/get-env.js +11 -11
- package/dist/get-input-props.js +5 -5
- package/dist/get-render-defaults.js +8 -4
- package/dist/gpu.d.ts +1 -1
- package/dist/gpu.js +11 -7
- package/dist/index.d.ts +6 -14
- package/dist/index.js +12 -13
- package/dist/initialize-cli.js +4 -2
- package/dist/lambda-command.js +5 -5
- package/dist/load-config.js +4 -4
- package/dist/log.d.ts +2 -4
- package/dist/parse-command-line.js +4 -21
- package/dist/print-compositions.d.ts +2 -1
- package/dist/print-compositions.js +6 -6
- package/dist/print-error.js +4 -4
- package/dist/print-help.d.ts +2 -1
- package/dist/print-help.js +43 -43
- package/dist/render-flows/render.js +4 -4
- package/dist/render-flows/still.js +3 -3
- package/dist/render-queue/process-still.js +3 -5
- package/dist/render-queue/process-video.js +2 -4
- package/dist/render-queue/queue.js +4 -5
- package/dist/render.js +19 -12
- package/dist/setup-cache.js +4 -4
- package/dist/show-compositions-picker.d.ts +3 -3
- package/dist/show-compositions-picker.js +4 -4
- package/dist/still.js +20 -12
- package/dist/studio.js +3 -3
- package/dist/upgrade.d.ts +2 -1
- package/dist/upgrade.js +6 -7
- package/dist/versions.js +17 -18
- package/package.json +10 -10
package/dist/benchmark.js
CHANGED
|
@@ -21,7 +21,7 @@ const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-
|
|
|
21
21
|
const show_compositions_picker_1 = require("./show-compositions-picker");
|
|
22
22
|
const truthy_1 = require("./truthy");
|
|
23
23
|
const DEFAULT_RUNS = 3;
|
|
24
|
-
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, } = client_1.BrowserSafeApis.options;
|
|
24
|
+
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, } = client_1.BrowserSafeApis.options;
|
|
25
25
|
const getValidConcurrency = (cliConcurrency) => {
|
|
26
26
|
const { concurrencies } = parse_command_line_1.parsedCli;
|
|
27
27
|
if (!concurrencies) {
|
|
@@ -90,17 +90,15 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
90
90
|
const runs = (_a = parse_command_line_1.parsedCli.runs) !== null && _a !== void 0 ? _a : DEFAULT_RUNS;
|
|
91
91
|
const { file, reason, remainingArgs } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
|
|
92
92
|
if (!file) {
|
|
93
|
-
log_1.Log.error('No entry file passed.');
|
|
94
|
-
log_1.Log.
|
|
95
|
-
log_1.Log.
|
|
96
|
-
log_1.Log.
|
|
93
|
+
log_1.Log.error({ indent: false, logLevel }, 'No entry file passed.');
|
|
94
|
+
log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying the entry file');
|
|
95
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
96
|
+
log_1.Log.info({ indent: false, logLevel }, `$ remotion benchmark <entry file>`);
|
|
97
97
|
process.exit(1);
|
|
98
98
|
}
|
|
99
99
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
100
|
-
const { inputProps, envVariables, browserExecutable,
|
|
101
|
-
|
|
102
|
-
type: 'series',
|
|
103
|
-
remotionRoot,
|
|
100
|
+
const { inputProps, envVariables, browserExecutable, publicDir, proResProfile, frameRange: defaultFrameRange, pixelFormat, everyNthFrame, ffmpegOverride, height, width, concurrency: unparsedConcurrency, disableWebSecurity, userAgent, ignoreCertificateErrors, } = (0, get_cli_options_1.getCliOptions)({
|
|
101
|
+
isStill: false,
|
|
104
102
|
logLevel,
|
|
105
103
|
});
|
|
106
104
|
log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', fullEntryPoint, 'reason:', reason);
|
|
@@ -109,6 +107,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
109
107
|
commandLine: parse_command_line_1.parsedCli,
|
|
110
108
|
}).value;
|
|
111
109
|
const gl = glOption.getValue({ commandLine: parse_command_line_1.parsedCli }).value;
|
|
110
|
+
const headless = headlessOption.getValue({ commandLine: parse_command_line_1.parsedCli }).value;
|
|
112
111
|
const chromiumOptions = {
|
|
113
112
|
disableWebSecurity,
|
|
114
113
|
enableMultiProcessOnLinux,
|
|
@@ -132,7 +131,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
132
131
|
remotionRoot,
|
|
133
132
|
onProgress: () => undefined,
|
|
134
133
|
indentOutput: false,
|
|
135
|
-
logLevel
|
|
134
|
+
logLevel,
|
|
136
135
|
bundlingStep: 0,
|
|
137
136
|
steps: 1,
|
|
138
137
|
onDirectoryCreated: (dir) => {
|
|
@@ -158,7 +157,9 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
158
157
|
serializedInputPropsWithCustomSchema,
|
|
159
158
|
envVariables,
|
|
160
159
|
chromiumOptions,
|
|
161
|
-
timeoutInMilliseconds:
|
|
160
|
+
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.getValue({
|
|
161
|
+
commandLine: parse_command_line_1.parsedCli,
|
|
162
|
+
}).value,
|
|
162
163
|
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
163
164
|
puppeteerInstance,
|
|
164
165
|
browserExecutable,
|
|
@@ -176,7 +177,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
176
177
|
.split(',')
|
|
177
178
|
.map((c) => c.trim())
|
|
178
179
|
.filter(truthy_1.truthy)
|
|
179
|
-
: await (0, show_compositions_picker_1.showMultiCompositionsPicker)(comps));
|
|
180
|
+
: await (0, show_compositions_picker_1.showMultiCompositionsPicker)(comps, logLevel));
|
|
180
181
|
const compositions = ids.map((compId) => {
|
|
181
182
|
const composition = comps.find((c) => c.id === compId);
|
|
182
183
|
if (!composition) {
|
|
@@ -185,7 +186,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
185
186
|
return composition;
|
|
186
187
|
});
|
|
187
188
|
if (compositions.length === 0) {
|
|
188
|
-
log_1.Log.error('No composition IDs passed. Add another argument to the command specifying at least 1 composition ID.');
|
|
189
|
+
log_1.Log.error({ indent: false, logLevel }, 'No composition IDs passed. Add another argument to the command specifying at least 1 composition ID.');
|
|
189
190
|
}
|
|
190
191
|
const benchmark = {};
|
|
191
192
|
let count = 1;
|
|
@@ -213,6 +214,12 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
213
214
|
const encodingBufferSize = encodingBufferSizeOption.getValue({
|
|
214
215
|
commandLine: parse_command_line_1.parsedCli,
|
|
215
216
|
}).value;
|
|
217
|
+
const delayRenderInMilliseconds = delayRenderTimeoutInMillisecondsOption.getValue({
|
|
218
|
+
commandLine: parse_command_line_1.parsedCli,
|
|
219
|
+
}).value;
|
|
220
|
+
const overwrite = overwriteOption.getValue({
|
|
221
|
+
commandLine: parse_command_line_1.parsedCli,
|
|
222
|
+
}, true).value;
|
|
216
223
|
for (const composition of compositions) {
|
|
217
224
|
const { value: videoCodec, source: codecReason } = videoCodecOption.getValue({
|
|
218
225
|
commandLine: parse_command_line_1.parsedCli,
|
|
@@ -232,8 +239,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
232
239
|
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
233
240
|
indent: false,
|
|
234
241
|
});
|
|
235
|
-
log_1.Log.
|
|
236
|
-
log_1.Log.
|
|
242
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
243
|
+
log_1.Log.info({ indent: false, logLevel }, `${chalk_1.chalk.bold(`Benchmark #${count++}:`)} ${chalk_1.chalk.gray(`composition=${composition.id} concurrency=${con} codec=${videoCodec} (${codecReason})`)}`);
|
|
237
244
|
const timeTaken = await runBenchmark(runs, {
|
|
238
245
|
outputLocation: null,
|
|
239
246
|
composition: {
|
|
@@ -255,7 +262,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
255
262
|
x264Preset,
|
|
256
263
|
jpegQuality,
|
|
257
264
|
chromiumOptions,
|
|
258
|
-
timeoutInMilliseconds:
|
|
265
|
+
timeoutInMilliseconds: delayRenderInMilliseconds,
|
|
259
266
|
scale,
|
|
260
267
|
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
261
268
|
numberOfGifLoops,
|
|
@@ -309,6 +316,6 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
309
316
|
benchmark[composition.id][`${con}`] = timeTaken;
|
|
310
317
|
}
|
|
311
318
|
}
|
|
312
|
-
log_1.Log.
|
|
319
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
313
320
|
};
|
|
314
321
|
exports.benchmarkCommand = benchmarkCommand;
|
package/dist/bundle.js
CHANGED
|
@@ -24,20 +24,18 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
24
24
|
reason !== 'argument passed' &&
|
|
25
25
|
reason !== 'argument passed - found in cwd' &&
|
|
26
26
|
reason !== 'argument passed - found in root') {
|
|
27
|
-
log_1.Log.error(`Entry point was specified as ${chalk_1.chalk.bold(explicitlyPassed)}, but it was not found.`);
|
|
27
|
+
log_1.Log.error({ indent: false, logLevel }, `Entry point was specified as ${chalk_1.chalk.bold(explicitlyPassed)}, but it was not found.`);
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
31
31
|
if (!file) {
|
|
32
|
-
log_1.Log.error('No entry point found.');
|
|
33
|
-
log_1.Log.error('Pass another argument to the command specifying the entry point.');
|
|
34
|
-
log_1.Log.error('See: https://www.remotion.dev/docs/terminology/entry-point');
|
|
32
|
+
log_1.Log.error({ indent: false, logLevel }, 'No entry point found.');
|
|
33
|
+
log_1.Log.error({ indent: false, logLevel }, 'Pass another argument to the command specifying the entry point.');
|
|
34
|
+
log_1.Log.error({ indent: false, logLevel }, 'See: https://www.remotion.dev/docs/terminology/entry-point');
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
const { publicDir } = (0, get_cli_options_1.getCliOptions)({
|
|
38
|
-
|
|
39
|
-
type: 'get-compositions',
|
|
40
|
-
remotionRoot,
|
|
38
|
+
isStill: false,
|
|
41
39
|
logLevel,
|
|
42
40
|
});
|
|
43
41
|
const outputPath = parse_command_line_1.parsedCli['out-dir']
|
|
@@ -49,9 +47,9 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
49
47
|
const existsIndexHtml = (0, fs_1.existsSync)(path_1.default.join(outputPath, 'index.html'));
|
|
50
48
|
const isEmpty = (0, fs_1.readdirSync)(outputPath).length === 0;
|
|
51
49
|
if (!existsIndexHtml && !isEmpty) {
|
|
52
|
-
log_1.Log.error(`The folder at ${outputPath} already exists, and needs to be deleted before a new bundle can be created.`);
|
|
53
|
-
log_1.Log.error('However, it does not look like the folder was created by `npx remotion bundle` (no index.html).');
|
|
54
|
-
log_1.Log.error('Aborting to prevent accidental data loss.');
|
|
50
|
+
log_1.Log.error({ indent: false, logLevel }, `The folder at ${outputPath} already exists, and needs to be deleted before a new bundle can be created.`);
|
|
51
|
+
log_1.Log.error({ indent: false, logLevel }, 'However, it does not look like the folder was created by `npx remotion bundle` (no index.html).');
|
|
52
|
+
log_1.Log.error({ indent: false, logLevel }, 'Aborting to prevent accidental data loss.');
|
|
55
53
|
process.exit(1);
|
|
56
54
|
}
|
|
57
55
|
(0, fs_1.rmSync)(outputPath, { recursive: true });
|
|
@@ -71,7 +69,7 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
71
69
|
// Handle floating point inaccuracies
|
|
72
70
|
if (bundling.progress < 0.99999) {
|
|
73
71
|
if (updatesDontOverwrite) {
|
|
74
|
-
log_1.Log.info(`Bundling ${Math.round(bundling.progress * 100)}%`);
|
|
72
|
+
log_1.Log.info({ indent: false, logLevel }, `Bundling ${Math.round(bundling.progress * 100)}%`);
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
if (copying.doneIn === null) {
|
|
@@ -86,7 +84,7 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
86
84
|
bufferStateDelayInMilliseconds: null,
|
|
87
85
|
maxTimlineTracks: null,
|
|
88
86
|
});
|
|
89
|
-
log_1.Log.
|
|
87
|
+
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`${existed ? '○' : '+'} ${output}`));
|
|
90
88
|
if (!gitignoreFolder) {
|
|
91
89
|
return;
|
|
92
90
|
}
|
|
@@ -112,6 +110,6 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
112
110
|
}
|
|
113
111
|
const newGitIgnoreContents = gitIgnoreContents + '\n' + relativePathToGitIgnore;
|
|
114
112
|
(0, fs_1.writeFileSync)(gitignorePath, newGitIgnoreContents);
|
|
115
|
-
log_1.Log.
|
|
113
|
+
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`Added to .gitignore!`));
|
|
116
114
|
};
|
|
117
115
|
exports.bundleCommand = bundleCommand;
|
|
@@ -18,7 +18,7 @@ const registerCleanupJob = (job) => {
|
|
|
18
18
|
exports.registerCleanupJob = registerCleanupJob;
|
|
19
19
|
const handleCtrlC = ({ indent, logLevel, }) => {
|
|
20
20
|
process.on('SIGINT', () => {
|
|
21
|
-
log_1.Log.
|
|
21
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
22
22
|
(0, exports.cleanupBeforeQuit)({ indent, logLevel });
|
|
23
23
|
process.exit(0);
|
|
24
24
|
});
|
package/dist/cloudrun-command.js
CHANGED
|
@@ -15,11 +15,11 @@ const cloudrunCommand = async (remotionRoot, args, logLevel) => {
|
|
|
15
15
|
catch (err) {
|
|
16
16
|
const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined);
|
|
17
17
|
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
18
|
-
log_1.Log.error(err);
|
|
19
|
-
log_1.Log.error('Remotion Cloud Run is not installed.');
|
|
20
|
-
log_1.Log.
|
|
21
|
-
log_1.Log.
|
|
22
|
-
log_1.Log.
|
|
18
|
+
log_1.Log.error({ indent: false, logLevel }, err);
|
|
19
|
+
log_1.Log.error({ indent: false, logLevel }, 'Remotion Cloud Run is not installed.');
|
|
20
|
+
log_1.Log.info({ indent: false, logLevel }, '');
|
|
21
|
+
log_1.Log.info({ indent: false, logLevel }, 'You can install it using:');
|
|
22
|
+
log_1.Log.info({ indent: false, logLevel }, `${installCommand} @remotion/cloudrun@${studio_server_1.StudioServerInternals.getRemotionVersion()}`);
|
|
23
23
|
process.exit(1);
|
|
24
24
|
}
|
|
25
25
|
};
|
package/dist/code-frame.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ErrorWithStackFrame } from '@remotion/renderer';
|
|
2
|
-
export declare const printCodeFrameAndStack: (err: ErrorWithStackFrame) => void;
|
|
1
|
+
import type { ErrorWithStackFrame, LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const printCodeFrameAndStack: (err: ErrorWithStackFrame, logLevel: LogLevel) => void;
|
package/dist/code-frame.js
CHANGED
|
@@ -15,15 +15,15 @@ const makeFileName = (firstFrame) => {
|
|
|
15
15
|
.filter(truthy_1.truthy)
|
|
16
16
|
.join(':');
|
|
17
17
|
};
|
|
18
|
-
const printCodeFrame = (frame) => {
|
|
18
|
+
const printCodeFrame = (frame, logLevel) => {
|
|
19
19
|
if (!frame.originalScriptCode) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
log_1.Log.info();
|
|
22
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
23
23
|
const longestLineNumber = Math.max(...frame.originalScriptCode.map((script) => script.lineNumber)).toString().length;
|
|
24
|
-
log_1.Log.info('at', chalk_1.chalk.underline(makeFileName(frame)));
|
|
24
|
+
log_1.Log.info({ indent: false, logLevel }, 'at', chalk_1.chalk.underline(makeFileName(frame)));
|
|
25
25
|
const alignLeftAmount = Math.min(...frame.originalScriptCode.map((c) => c.content.length - c.content.trimStart().length));
|
|
26
|
-
log_1.Log.info(`${frame.originalScriptCode
|
|
26
|
+
log_1.Log.info({ indent: false, logLevel }, `${frame.originalScriptCode
|
|
27
27
|
.map((c) => {
|
|
28
28
|
const left = String(c.lineNumber).padStart(longestLineNumber, ' ');
|
|
29
29
|
const right = c.content.substring(alignLeftAmount);
|
|
@@ -34,26 +34,26 @@ const printCodeFrame = (frame) => {
|
|
|
34
34
|
})
|
|
35
35
|
.join('\n')}`);
|
|
36
36
|
};
|
|
37
|
-
const logLine = (frame) => {
|
|
37
|
+
const logLine = (frame, logLevel) => {
|
|
38
38
|
const fileName = makeFileName(frame);
|
|
39
39
|
if (!fileName) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
log_1.Log.info(chalk_1.chalk.gray(['at', frame.originalFunctionName, `${chalk_1.chalk.blueBright(`(${fileName})`)}`]
|
|
42
|
+
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.gray(['at', frame.originalFunctionName, `${chalk_1.chalk.blueBright(`(${fileName})`)}`]
|
|
43
43
|
.filter(truthy_1.truthy)
|
|
44
44
|
.join(' ')));
|
|
45
45
|
};
|
|
46
|
-
const printCodeFrameAndStack = (err) => {
|
|
46
|
+
const printCodeFrameAndStack = (err, logLevel) => {
|
|
47
47
|
var _a, _b, _c, _d, _e;
|
|
48
48
|
if (!err.symbolicatedStackFrames ||
|
|
49
49
|
err.symbolicatedStackFrames.length === 0) {
|
|
50
|
-
log_1.Log.error(err.stack);
|
|
50
|
+
log_1.Log.error({ indent: false, logLevel }, err.stack);
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
const firstFrame = err.symbolicatedStackFrames[0];
|
|
54
|
-
log_1.Log.error(chalk_1.chalk.bgRed(chalk_1.chalk.white(` ${err.name} `)), err.message);
|
|
55
|
-
printCodeFrame(firstFrame);
|
|
56
|
-
log_1.Log.info();
|
|
54
|
+
log_1.Log.error({ indent: false, logLevel }, chalk_1.chalk.bgRed(chalk_1.chalk.white(` ${err.name} `)), err.message);
|
|
55
|
+
printCodeFrame(firstFrame, logLevel);
|
|
56
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
57
57
|
for (const frame of err.symbolicatedStackFrames) {
|
|
58
58
|
if (frame === firstFrame) {
|
|
59
59
|
continue;
|
|
@@ -61,25 +61,25 @@ const printCodeFrameAndStack = (err) => {
|
|
|
61
61
|
const isUserCode = !((_a = frame.originalFileName) === null || _a === void 0 ? void 0 : _a.includes('node_modules')) &&
|
|
62
62
|
!((_b = frame.originalFileName) === null || _b === void 0 ? void 0 : _b.startsWith('webpack/'));
|
|
63
63
|
if (isUserCode) {
|
|
64
|
-
printCodeFrame(frame);
|
|
64
|
+
printCodeFrame(frame, logLevel);
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
|
-
logLine(frame);
|
|
67
|
+
logLine(frame, logLevel);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
if (err.delayRenderCall) {
|
|
71
|
-
log_1.Log.error();
|
|
72
|
-
log_1.Log.error('🕧 The delayRender() call is located at:');
|
|
71
|
+
log_1.Log.error({ indent: false, logLevel });
|
|
72
|
+
log_1.Log.error({ indent: false, logLevel }, '🕧 The delayRender() call is located at:');
|
|
73
73
|
for (const frame of err.delayRenderCall) {
|
|
74
74
|
const showCodeFrame = (!((_c = frame.originalFileName) === null || _c === void 0 ? void 0 : _c.includes('node_modules')) &&
|
|
75
75
|
!((_d = frame.originalFileName) === null || _d === void 0 ? void 0 : _d.startsWith('webpack/'))) ||
|
|
76
76
|
frame === err.delayRenderCall[0] ||
|
|
77
77
|
((_e = frame.originalScriptCode) === null || _e === void 0 ? void 0 : _e.map((c) => c.content).join('').includes('delayRender'));
|
|
78
78
|
if (showCodeFrame) {
|
|
79
|
-
printCodeFrame(frame);
|
|
79
|
+
printCodeFrame(frame, logLevel);
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
|
-
logLine(frame);
|
|
82
|
+
logLine(frame, logLevel);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
import type { PromptObject } from 'prompts';
|
|
2
3
|
type Question<V extends string = string> = PromptObject<V> & {
|
|
3
4
|
optionsPerPage?: number;
|
|
4
5
|
};
|
|
5
6
|
type NamelessQuestion = Omit<Question<'value'>, 'name'>;
|
|
6
|
-
export declare function selectAsync(question: NamelessQuestion): Promise<string | string[]>;
|
|
7
|
+
export declare function selectAsync(question: NamelessQuestion, logLevel: LogLevel): Promise<string | string[]>;
|
|
7
8
|
export {};
|
|
@@ -6,20 +6,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.selectAsync = void 0;
|
|
7
7
|
const prompts_1 = __importDefault(require("prompts"));
|
|
8
8
|
const log_1 = require("./log");
|
|
9
|
-
function prompt(questions) {
|
|
9
|
+
function prompt(questions, logLevel) {
|
|
10
10
|
return (0, prompts_1.default)([questions], {
|
|
11
11
|
onCancel() {
|
|
12
|
-
log_1.Log.error('No composition selected.');
|
|
12
|
+
log_1.Log.error({ indent: false, logLevel }, 'No composition selected.');
|
|
13
13
|
process.exit(1);
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
async function selectAsync(question) {
|
|
17
|
+
async function selectAsync(question, logLevel) {
|
|
18
18
|
const { value } = await prompt({
|
|
19
19
|
...question,
|
|
20
20
|
name: 'value',
|
|
21
21
|
type: question.type,
|
|
22
|
-
});
|
|
22
|
+
}, logLevel);
|
|
23
23
|
return value !== null && value !== void 0 ? value : null;
|
|
24
24
|
}
|
|
25
25
|
exports.selectAsync = selectAsync;
|
package/dist/compositions.js
CHANGED
|
@@ -12,20 +12,18 @@ const log_1 = require("./log");
|
|
|
12
12
|
const parse_command_line_1 = require("./parse-command-line");
|
|
13
13
|
const print_compositions_1 = require("./print-compositions");
|
|
14
14
|
const setup_cache_1 = require("./setup-cache");
|
|
15
|
-
const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, glOption, } = client_1.BrowserSafeApis.options;
|
|
15
|
+
const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, } = client_1.BrowserSafeApis.options;
|
|
16
16
|
const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
17
17
|
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
|
|
18
18
|
if (!file) {
|
|
19
|
-
log_1.Log.error('The `compositions` command requires you to specify a entry point. For example');
|
|
20
|
-
log_1.Log.error(' npx remotion compositions src/index.ts');
|
|
21
|
-
log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
|
|
19
|
+
log_1.Log.error({ indent: false, logLevel }, 'The `compositions` command requires you to specify a entry point. For example');
|
|
20
|
+
log_1.Log.error({ indent: false, logLevel }, ' npx remotion compositions src/index.ts');
|
|
21
|
+
log_1.Log.error({ indent: false, logLevel }, 'See https://www.remotion.dev/docs/register-root for more information.');
|
|
22
22
|
process.exit(1);
|
|
23
23
|
}
|
|
24
24
|
log_1.Log.verbose({ indent: false, logLevel }, 'Entry point:', file, 'reason:', reason);
|
|
25
|
-
const { browserExecutable, envVariables, inputProps,
|
|
26
|
-
|
|
27
|
-
type: 'get-compositions',
|
|
28
|
-
remotionRoot,
|
|
25
|
+
const { browserExecutable, envVariables, inputProps, publicDir, ignoreCertificateErrors, userAgent, disableWebSecurity, } = (0, get_cli_options_1.getCliOptions)({
|
|
26
|
+
isStill: false,
|
|
29
27
|
logLevel,
|
|
30
28
|
});
|
|
31
29
|
const chromiumOptions = {
|
|
@@ -34,7 +32,7 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
34
32
|
commandLine: parse_command_line_1.parsedCli,
|
|
35
33
|
}).value,
|
|
36
34
|
gl: glOption.getValue({ commandLine: parse_command_line_1.parsedCli }).value,
|
|
37
|
-
headless,
|
|
35
|
+
headless: headlessOption.getValue({ commandLine: parse_command_line_1.parsedCli }).value,
|
|
38
36
|
ignoreCertificateErrors,
|
|
39
37
|
userAgent,
|
|
40
38
|
};
|
|
@@ -69,7 +67,9 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
69
67
|
staticBase: null,
|
|
70
68
|
indent: undefined,
|
|
71
69
|
}).serializedString,
|
|
72
|
-
timeoutInMilliseconds:
|
|
70
|
+
timeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.getValue({
|
|
71
|
+
commandLine: parse_command_line_1.parsedCli,
|
|
72
|
+
}).value,
|
|
73
73
|
port: (0, preview_server_1.getRendererPortFromConfigFileAndCliFlag)(),
|
|
74
74
|
indent: false,
|
|
75
75
|
onBrowserLog: null,
|
|
@@ -80,6 +80,6 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
80
80
|
commandLine: parse_command_line_1.parsedCli,
|
|
81
81
|
}).value,
|
|
82
82
|
});
|
|
83
|
-
(0, print_compositions_1.printCompositions)(compositions);
|
|
83
|
+
(0, print_compositions_1.printCompositions)(compositions, logLevel);
|
|
84
84
|
};
|
|
85
85
|
exports.listCompositionsCommand = listCompositionsCommand;
|
|
@@ -2,5 +2,3 @@ export declare const getChromiumDisableWebSecurity: () => boolean;
|
|
|
2
2
|
export declare const setChromiumDisableWebSecurity: (should: boolean) => void;
|
|
3
3
|
export declare const getIgnoreCertificateErrors: () => boolean;
|
|
4
4
|
export declare const setChromiumIgnoreCertificateErrors: (should: boolean) => void;
|
|
5
|
-
export declare const getChromiumHeadlessMode: () => boolean;
|
|
6
|
-
export declare const setChromiumHeadlessMode: (should: boolean) => void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.setChromiumIgnoreCertificateErrors = exports.getIgnoreCertificateErrors = exports.setChromiumDisableWebSecurity = exports.getChromiumDisableWebSecurity = void 0;
|
|
4
4
|
let chromiumDisableWebSecurity = false;
|
|
5
5
|
let ignoreCertificateErrors = false;
|
|
6
|
-
let headlessMode = true;
|
|
7
6
|
const getChromiumDisableWebSecurity = () => chromiumDisableWebSecurity;
|
|
8
7
|
exports.getChromiumDisableWebSecurity = getChromiumDisableWebSecurity;
|
|
9
8
|
const setChromiumDisableWebSecurity = (should) => {
|
|
@@ -16,9 +15,3 @@ const setChromiumIgnoreCertificateErrors = (should) => {
|
|
|
16
15
|
ignoreCertificateErrors = should;
|
|
17
16
|
};
|
|
18
17
|
exports.setChromiumIgnoreCertificateErrors = setChromiumIgnoreCertificateErrors;
|
|
19
|
-
const getChromiumHeadlessMode = () => headlessMode;
|
|
20
|
-
exports.getChromiumHeadlessMode = getChromiumHeadlessMode;
|
|
21
|
-
const setChromiumHeadlessMode = (should) => {
|
|
22
|
-
headlessMode = should;
|
|
23
|
-
};
|
|
24
|
-
exports.setChromiumHeadlessMode = setChromiumHeadlessMode;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as Logging from './log';
|
|
2
1
|
import type { WebpackConfiguration } from '@remotion/bundler';
|
|
3
2
|
import type { BrowserExecutable, CodecOrUndefined, ColorSpace, Crf, DeleteAfter, FrameRange, NumberOfGifLoops, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
4
3
|
import type { Concurrency } from './concurrency';
|
|
@@ -329,19 +328,14 @@ export declare const ConfigInternals: {
|
|
|
329
328
|
getBrowser: () => null;
|
|
330
329
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
331
330
|
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
332
|
-
getShouldOverwrite: ({ defaultValue, }: {
|
|
333
|
-
defaultValue: boolean;
|
|
334
|
-
}) => boolean;
|
|
335
331
|
getBrowserExecutable: () => BrowserExecutable;
|
|
336
332
|
getStudioPort: () => number | undefined;
|
|
337
333
|
getRendererPortFromConfigFile: () => number | null;
|
|
338
334
|
getRendererPortFromConfigFileAndCliFlag: () => number | null;
|
|
339
335
|
getChromiumDisableWebSecurity: () => boolean;
|
|
340
336
|
getIgnoreCertificateErrors: () => boolean;
|
|
341
|
-
getChromiumHeadlessMode: () => boolean;
|
|
342
337
|
getEveryNthFrame: () => number;
|
|
343
338
|
getConcurrency: () => string | number | null;
|
|
344
|
-
getCurrentPuppeteerTimeout: () => number;
|
|
345
339
|
getAudioCodec: () => "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
346
340
|
getStillFrame: () => number;
|
|
347
341
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
@@ -351,7 +345,6 @@ export declare const ConfigInternals: {
|
|
|
351
345
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
352
346
|
getWebpackCaching: () => boolean;
|
|
353
347
|
getOutputLocation: () => string | null;
|
|
354
|
-
Logging: typeof Logging;
|
|
355
348
|
setFrameRangeFromCli: (newFrameRange: string | number) => void;
|
|
356
349
|
setStillFrame: (frame: number) => void;
|
|
357
350
|
getMaxTimelineTracks: () => number;
|
package/dist/config/index.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.ConfigInternals = exports.Config = void 0;
|
|
27
4
|
const browser_1 = require("./browser");
|
|
@@ -32,15 +9,12 @@ const env_file_1 = require("./env-file");
|
|
|
32
9
|
const frame_range_1 = require("./frame-range");
|
|
33
10
|
const image_format_1 = require("./image-format");
|
|
34
11
|
const image_sequence_1 = require("./image-sequence");
|
|
35
|
-
const Logging = __importStar(require("./log"));
|
|
36
12
|
const output_location_1 = require("./output-location");
|
|
37
13
|
const override_webpack_1 = require("./override-webpack");
|
|
38
|
-
const overwrite_1 = require("./overwrite");
|
|
39
14
|
const pixel_format_1 = require("./pixel-format");
|
|
40
15
|
const preview_server_1 = require("./preview-server");
|
|
41
16
|
const prores_profile_1 = require("./prores-profile");
|
|
42
17
|
const still_frame_1 = require("./still-frame");
|
|
43
|
-
const timeout_1 = require("./timeout");
|
|
44
18
|
const webpack_caching_1 = require("./webpack-caching");
|
|
45
19
|
const client_1 = require("@remotion/renderer/client");
|
|
46
20
|
const studio_server_1 = require("@remotion/studio-server");
|
|
@@ -57,22 +31,19 @@ const frame_range_2 = require("./frame-range");
|
|
|
57
31
|
const height_1 = require("./height");
|
|
58
32
|
const image_sequence_2 = require("./image-sequence");
|
|
59
33
|
const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
|
|
60
|
-
const log_1 = require("./log");
|
|
61
34
|
const number_of_shared_audio_tags_1 = require("./number-of-shared-audio-tags");
|
|
62
35
|
const open_browser_1 = require("./open-browser");
|
|
63
36
|
const output_location_2 = require("./output-location");
|
|
64
37
|
const override_webpack_2 = require("./override-webpack");
|
|
65
|
-
const overwrite_2 = require("./overwrite");
|
|
66
38
|
const pixel_format_2 = require("./pixel-format");
|
|
67
39
|
const preview_server_2 = require("./preview-server");
|
|
68
40
|
const prores_profile_2 = require("./prores-profile");
|
|
69
41
|
const public_dir_1 = require("./public-dir");
|
|
70
|
-
const timeout_2 = require("./timeout");
|
|
71
42
|
const user_agent_1 = require("./user-agent");
|
|
72
43
|
const webpack_caching_2 = require("./webpack-caching");
|
|
73
44
|
const webpack_poll_1 = require("./webpack-poll");
|
|
74
45
|
const width_1 = require("./width");
|
|
75
|
-
const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, } = client_1.BrowserSafeApis.options;
|
|
46
|
+
const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, } = client_1.BrowserSafeApis.options;
|
|
76
47
|
exports.Config = {
|
|
77
48
|
get Bundling() {
|
|
78
49
|
throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
|
|
@@ -105,13 +76,13 @@ exports.Config = {
|
|
|
105
76
|
setRendererPort: preview_server_2.setRendererPort,
|
|
106
77
|
setPublicDir: public_dir_1.setPublicDir,
|
|
107
78
|
setEntryPoint: entry_point_1.setEntryPoint,
|
|
108
|
-
setLevel:
|
|
79
|
+
setLevel: logLevelOption.setConfig,
|
|
109
80
|
setBrowserExecutable: browser_executable_2.setBrowserExecutable,
|
|
110
|
-
setTimeoutInMilliseconds:
|
|
111
|
-
setDelayRenderTimeoutInMilliseconds:
|
|
81
|
+
setTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.setConfig,
|
|
82
|
+
setDelayRenderTimeoutInMilliseconds: delayRenderTimeoutInMillisecondsOption.setConfig,
|
|
112
83
|
setChromiumDisableWebSecurity: chromium_flags_2.setChromiumDisableWebSecurity,
|
|
113
84
|
setChromiumIgnoreCertificateErrors: chromium_flags_2.setChromiumIgnoreCertificateErrors,
|
|
114
|
-
setChromiumHeadlessMode:
|
|
85
|
+
setChromiumHeadlessMode: headlessOption.setConfig,
|
|
115
86
|
setChromiumOpenGlRenderer: glOption.setConfig,
|
|
116
87
|
setChromiumUserAgent: user_agent_1.setChromiumUserAgent,
|
|
117
88
|
setDotEnvLocation: env_file_2.setDotEnvLocation,
|
|
@@ -135,7 +106,7 @@ exports.Config = {
|
|
|
135
106
|
setMuted: mutedOption.setConfig,
|
|
136
107
|
setEnforceAudioTrack: enforceAudioOption.setConfig,
|
|
137
108
|
setOutputLocation: output_location_2.setOutputLocation,
|
|
138
|
-
setOverwriteOutput:
|
|
109
|
+
setOverwriteOutput: overwriteOption.setConfig,
|
|
139
110
|
setPixelFormat: pixel_format_2.setPixelFormat,
|
|
140
111
|
setCodec: videoCodecOption.setConfig,
|
|
141
112
|
setCrf: crfOption.setConfig,
|
|
@@ -163,17 +134,14 @@ exports.ConfigInternals = {
|
|
|
163
134
|
getBrowser: browser_1.getBrowser,
|
|
164
135
|
getPixelFormat: pixel_format_1.getPixelFormat,
|
|
165
136
|
getProResProfile: prores_profile_1.getProResProfile,
|
|
166
|
-
getShouldOverwrite: overwrite_1.getShouldOverwrite,
|
|
167
137
|
getBrowserExecutable: browser_executable_1.getBrowserExecutable,
|
|
168
138
|
getStudioPort: preview_server_1.getStudioPort,
|
|
169
139
|
getRendererPortFromConfigFile: preview_server_1.getRendererPortFromConfigFile,
|
|
170
140
|
getRendererPortFromConfigFileAndCliFlag: preview_server_1.getRendererPortFromConfigFileAndCliFlag,
|
|
171
141
|
getChromiumDisableWebSecurity: chromium_flags_1.getChromiumDisableWebSecurity,
|
|
172
142
|
getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
|
|
173
|
-
getChromiumHeadlessMode: chromium_flags_1.getChromiumHeadlessMode,
|
|
174
143
|
getEveryNthFrame: every_nth_frame_1.getEveryNthFrame,
|
|
175
144
|
getConcurrency: concurrency_1.getConcurrency,
|
|
176
|
-
getCurrentPuppeteerTimeout: timeout_1.getCurrentPuppeteerTimeout,
|
|
177
145
|
getAudioCodec: audio_codec_1.getAudioCodec,
|
|
178
146
|
getStillFrame: still_frame_1.getStillFrame,
|
|
179
147
|
getShouldOutputImageSequence: image_sequence_1.getShouldOutputImageSequence,
|
|
@@ -183,7 +151,6 @@ exports.ConfigInternals = {
|
|
|
183
151
|
getWebpackOverrideFn: override_webpack_1.getWebpackOverrideFn,
|
|
184
152
|
getWebpackCaching: webpack_caching_1.getWebpackCaching,
|
|
185
153
|
getOutputLocation: output_location_1.getOutputLocation,
|
|
186
|
-
Logging,
|
|
187
154
|
setFrameRangeFromCli: frame_range_1.setFrameRangeFromCli,
|
|
188
155
|
setStillFrame: still_frame_1.setStillFrame,
|
|
189
156
|
getMaxTimelineTracks: studio_server_1.StudioServerInternals.getMaxTimelineTracks,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WebpackConfiguration } from '@remotion/bundler';
|
|
2
|
-
export type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration
|
|
2
|
+
export type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration | Promise<WebpackConfiguration>;
|
|
3
3
|
export declare const defaultOverrideFunction: WebpackOverrideFn;
|
|
4
4
|
export declare const getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
5
5
|
export declare const overrideWebpackConfig: (fn: WebpackOverrideFn) => void;
|
package/dist/ffmpeg.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export declare const dynamicLibEnv: (indent: boolean, logLevel: LogLevel) => {
|
|
|
9
9
|
LD_LIBRARY_PATH: string;
|
|
10
10
|
RUST_BACKTRACE: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const ffmpegCommand: (_root: string, args: string[]) => never;
|
|
13
|
-
export declare const ffprobeCommand: (_root: string, args: string[]) => never;
|
|
12
|
+
export declare const ffmpegCommand: (_root: string, args: string[], logLevel: LogLevel) => never;
|
|
13
|
+
export declare const ffprobeCommand: (_root: string, args: string[], logLevel: LogLevel) => never;
|
package/dist/ffmpeg.js
CHANGED
|
@@ -8,7 +8,6 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
8
8
|
const node_child_process_1 = require("node:child_process");
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
-
const config_1 = require("./config");
|
|
12
11
|
const dynamicLibEnv = (indent, logLevel) => {
|
|
13
12
|
const lib = node_path_1.default.dirname(renderer_1.RenderInternals.getExecutablePath('compositor', indent, logLevel));
|
|
14
13
|
return {
|
|
@@ -27,8 +26,7 @@ const dynamicLibEnv = (indent, logLevel) => {
|
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
exports.dynamicLibEnv = dynamicLibEnv;
|
|
30
|
-
const ffmpegCommand = (_root, args) => {
|
|
31
|
-
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
29
|
+
const ffmpegCommand = (_root, args, logLevel) => {
|
|
32
30
|
const binary = renderer_1.RenderInternals.getExecutablePath('ffmpeg', false, logLevel);
|
|
33
31
|
if (!process.env.READ_ONLY_FS) {
|
|
34
32
|
(0, node_fs_1.chmodSync)(binary, 0o755);
|
|
@@ -40,8 +38,7 @@ const ffmpegCommand = (_root, args) => {
|
|
|
40
38
|
process.exit(done.status);
|
|
41
39
|
};
|
|
42
40
|
exports.ffmpegCommand = ffmpegCommand;
|
|
43
|
-
const ffprobeCommand = (_root, args) => {
|
|
44
|
-
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
41
|
+
const ffprobeCommand = (_root, args, logLevel) => {
|
|
45
42
|
const binary = renderer_1.RenderInternals.getExecutablePath('ffprobe', false, logLevel);
|
|
46
43
|
if (!process.env.READ_ONLY_FS) {
|
|
47
44
|
(0, node_fs_1.chmodSync)(binary, 0o755);
|