@remotion/cli 3.0.0-alpha.192 → 3.0.0-compression.1
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/editor/components/CurrentComposition.js +1 -1
- package/dist/editor/components/CurrentComposition.js.map +1 -1
- package/dist/editor/components/Preview.d.ts.map +1 -1
- package/dist/editor/components/Preview.js +2 -2
- package/dist/editor/components/Preview.js.map +1 -1
- package/dist/editor/components/Thumbnail.js +2 -2
- package/dist/editor/components/Thumbnail.js.map +1 -1
- package/dist/get-cli-options.d.ts +2 -7
- package/dist/get-cli-options.d.ts.map +1 -1
- package/dist/get-cli-options.js +21 -41
- package/dist/get-cli-options.js.map +1 -1
- package/dist/get-config-file-name.d.ts +1 -1
- package/dist/get-config-file-name.d.ts.map +1 -1
- package/dist/get-config-file-name.js +1 -1
- package/dist/get-config-file-name.js.map +1 -1
- package/dist/index.d.ts +0 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -28
- package/dist/index.js.map +1 -1
- package/dist/initialize-render-cli.d.ts +1 -1
- package/dist/initialize-render-cli.d.ts.map +1 -1
- package/dist/initialize-render-cli.js +2 -2
- package/dist/initialize-render-cli.js.map +1 -1
- package/dist/load-config.d.ts +1 -1
- package/dist/load-config.d.ts.map +1 -1
- package/dist/load-config.js +18 -28
- package/dist/load-config.js.map +1 -1
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +4 -4
- package/dist/log.js.map +1 -1
- package/dist/parse-command-line.d.ts +1 -4
- package/dist/parse-command-line.d.ts.map +1 -1
- package/dist/parse-command-line.js +2 -20
- package/dist/parse-command-line.js.map +1 -1
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +9 -3
- package/dist/preview.js.map +1 -1
- package/dist/progress-bar.d.ts +6 -26
- package/dist/progress-bar.d.ts.map +1 -1
- package/dist/progress-bar.js +13 -33
- package/dist/progress-bar.js.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +154 -139
- package/dist/render.js.map +1 -1
- package/dist/setup-cache.d.ts +1 -2
- package/dist/setup-cache.d.ts.map +1 -1
- package/dist/setup-cache.js +2 -6
- package/dist/setup-cache.js.map +1 -1
- package/dist/still.d.ts.map +1 -1
- package/dist/still.js +32 -41
- package/dist/still.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +1 -1
- package/dist/upgrade.js.map +1 -1
- package/package.json +7 -8
- package/remotion-cli.js +0 -3
|
@@ -8,7 +8,6 @@ export declare type CommandLineOptions = {
|
|
|
8
8
|
['prores-profile']: ProResProfile;
|
|
9
9
|
['bundle-cache']: string;
|
|
10
10
|
['env-file']: string;
|
|
11
|
-
['frames-per-lambda']: number;
|
|
12
11
|
codec: Codec;
|
|
13
12
|
concurrency: number;
|
|
14
13
|
config: string;
|
|
@@ -24,9 +23,7 @@ export declare type CommandLineOptions = {
|
|
|
24
23
|
help: boolean;
|
|
25
24
|
port: number;
|
|
26
25
|
frame: string | number;
|
|
27
|
-
siteName: string;
|
|
28
26
|
};
|
|
29
|
-
export declare const BooleanFlags: string[];
|
|
30
27
|
export declare const parsedCli: CommandLineOptions & minimist.ParsedArgs;
|
|
31
|
-
export declare const parseCommandLine: (type: 'still' | 'sequence'
|
|
28
|
+
export declare const parseCommandLine: (type: 'still' | 'sequence') => void;
|
|
32
29
|
//# sourceMappingURL=parse-command-line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-command-line.d.ts","sourceRoot":"","sources":["../src/parse-command-line.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EACN,iBAAiB,EACjB,KAAK,EAEL,gBAAgB,EAChB,WAAW,EAGX,WAAW,EACX,aAAa,EACb,MAAM,UAAU,CAAC;AAGlB,oBAAY,kBAAkB,GAAG;IAChC,CAAC,oBAAoB,CAAC,EAAE,iBAAiB,CAAC;IAC1C,CAAC,mBAAmB,CAAC,EAAE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AAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,SAAS,0CAEpB,CAAC;AAEH,eAAO,MAAM,gBAAgB,SAAU,OAAO,GAAG,UAAU,SAgG1D,CAAC"}
|
|
@@ -3,28 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.parseCommandLine = exports.parsedCli =
|
|
6
|
+
exports.parseCommandLine = exports.parsedCli = void 0;
|
|
7
7
|
const minimist_1 = __importDefault(require("minimist"));
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const remotion_1 = require("remotion");
|
|
10
10
|
const log_1 = require("./log");
|
|
11
|
-
exports.BooleanFlags = [
|
|
12
|
-
'force',
|
|
13
|
-
'overwrite',
|
|
14
|
-
'sequence',
|
|
15
|
-
'help',
|
|
16
|
-
// Lambda flags
|
|
17
|
-
'q',
|
|
18
|
-
'quiet',
|
|
19
|
-
'force',
|
|
20
|
-
'disable-chunk-optimization',
|
|
21
|
-
'save-browser-logs',
|
|
22
|
-
'disable-cloudwatch',
|
|
23
|
-
'yes',
|
|
24
|
-
'y',
|
|
25
|
-
];
|
|
26
11
|
exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
|
|
27
|
-
boolean:
|
|
12
|
+
boolean: ['force', 'overwrite', 'sequence', 'help'],
|
|
28
13
|
});
|
|
29
14
|
const parseCommandLine = (type) => {
|
|
30
15
|
if (exports.parsedCli['pixel-format']) {
|
|
@@ -69,9 +54,6 @@ const parseCommandLine = (type) => {
|
|
|
69
54
|
}
|
|
70
55
|
remotion_1.Internals.setStillFrame(Number(exports.parsedCli.frame));
|
|
71
56
|
}
|
|
72
|
-
if (exports.parsedCli['frames-per-lambda']) {
|
|
73
|
-
remotion_1.Internals.setFramesPerLambda(exports.parsedCli['frames-per-lambda']);
|
|
74
|
-
}
|
|
75
57
|
if (exports.parsedCli.png) {
|
|
76
58
|
log_1.Log.warn('The --png flag has been deprecrated. Use --sequence --image-format=png from now on.');
|
|
77
59
|
remotion_1.Config.Output.setImageSequence(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-command-line.js","sourceRoot":"","sources":["../src/parse-command-line.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,+BAA6B;AAC7B,uCAUkB;AAClB,+BAA0B;
|
|
1
|
+
{"version":3,"file":"parse-command-line.js","sourceRoot":"","sources":["../src/parse-command-line.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,+BAA6B;AAC7B,uCAUkB;AAClB,+BAA0B;AA2Bb,QAAA,SAAS,GAAG,IAAA,kBAAQ,EAAqB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC5E,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC;CACnD,CAAC,CAAC;AAEI,MAAM,gBAAgB,GAAG,CAAC,IAA0B,EAAE,EAAE;IAC9D,IAAI,iBAAS,CAAC,cAAc,CAAC,EAAE;QAC9B,iBAAM,CAAC,MAAM,CAAC,cAAc,CAAC,iBAAS,CAAC,cAAc,CAAC,CAAC,CAAC;KACxD;IAED,IAAI,iBAAS,CAAC,cAAc,CAAC,EAAE;QAC9B,iBAAM,CAAC,SAAS,CAAC,cAAc,CAAC,iBAAS,CAAC,cAAc,CAAC,CAAC,CAAC;KAC3D;IAED,IAAI,iBAAS,CAAC,oBAAoB,CAAC,EAAE;QACpC,iBAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,iBAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC;KACvE;IAED,IAAI,iBAAS,CAAC,mBAAmB,CAAC,EAAE;QACnC,iBAAM,CAAC,SAAS,CAAC,mBAAmB,CACnC,IAAA,cAAO,EAAC,iBAAS,CA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view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,qBA2B1B,CAAC"}
|
package/dist/preview.js
CHANGED
|
@@ -10,23 +10,29 @@ const bundler_1 = require("@remotion/bundler");
|
|
|
10
10
|
const better_opn_1 = __importDefault(require("better-opn"));
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const remotion_1 = require("remotion");
|
|
13
|
+
const get_config_file_name_1 = require("./get-config-file-name");
|
|
13
14
|
const get_env_1 = require("./get-env");
|
|
14
15
|
const get_input_props_1 = require("./get-input-props");
|
|
15
|
-
const
|
|
16
|
+
const log_1 = require("./log");
|
|
16
17
|
const parse_command_line_1 = require("./parse-command-line");
|
|
17
18
|
const noop = () => undefined;
|
|
18
19
|
const previewCommand = async () => {
|
|
19
20
|
const file = parse_command_line_1.parsedCli._[1];
|
|
20
21
|
const { port: desiredPort } = parse_command_line_1.parsedCli;
|
|
21
22
|
const fullPath = path_1.default.join(process.cwd(), file);
|
|
22
|
-
|
|
23
|
+
const appliedName = (0, get_config_file_name_1.loadConfig)();
|
|
24
|
+
if (appliedName) {
|
|
25
|
+
log_1.Log.verbose(`Applied configuration from ${appliedName}.`);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
log_1.Log.verbose('No config file loaded.');
|
|
29
|
+
}
|
|
23
30
|
const inputProps = (0, get_input_props_1.getInputProps)();
|
|
24
31
|
const envVariables = await (0, get_env_1.getEnvironmentVariables)();
|
|
25
32
|
const port = await bundler_1.BundlerInternals.startServer(path_1.default.resolve(__dirname, 'previewEntry.js'), fullPath, {
|
|
26
33
|
inputProps,
|
|
27
34
|
envVariables,
|
|
28
35
|
port: desiredPort,
|
|
29
|
-
publicPath: '',
|
|
30
36
|
maxTimelineTracks: remotion_1.Internals.getMaxTimelineTracks(),
|
|
31
37
|
});
|
|
32
38
|
(0, better_opn_1.default)(`http://localhost:${port}`);
|
package/dist/preview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":";;;;;;AAAA,qEAAqE;AACrE,aAAa;AACb,+CAAmD;AACnD,4DAAmC;AACnC,gDAAwB;AACxB,uCAAmC;AACnC,uCAAkD;AAClD,uDAAgD;AAChD
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":";;;;;;AAAA,qEAAqE;AACrE,aAAa;AACb,+CAAmD;AACnD,4DAAmC;AACnC,gDAAwB;AACxB,uCAAmC;AACnC,iEAAkD;AAClD,uCAAkD;AAClD,uDAAgD;AAChD,+BAA0B;AAC1B,6DAA+C;AAE/C,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAEtB,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IACxC,MAAM,IAAI,GAAG,8BAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAC,IAAI,EAAE,WAAW,EAAC,GAAG,8BAAS,CAAC;IACtC,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IAEhD,MAAM,WAAW,GAAG,IAAA,iCAAU,GAAE,CAAC;IACjC,IAAI,WAAW,EAAE;QAChB,SAAG,CAAC,OAAO,CAAC,8BAA8B,WAAW,GAAG,CAAC,CAAC;KAC1D;SAAM;QACN,SAAG,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;KACtC;IAED,MAAM,UAAU,GAAG,IAAA,+BAAa,GAAE,CAAC;IACnC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAuB,GAAE,CAAC;IAErD,MAAM,IAAI,GAAG,MAAM,0BAAgB,CAAC,WAAW,CAC9C,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,EAC1C,QAAQ,EACR;QACC,UAAU;QACV,YAAY;QACZ,IAAI,EAAE,WAAW;QACjB,iBAAiB,EAAE,oBAAS,CAAC,oBAAoB,EAAE;KACnD,CACD,CAAC;IACF,IAAA,oBAAS,EAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACtC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC,CAAC;AA3BW,QAAA,cAAc,kBA2BzB"}
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -1,43 +1,23 @@
|
|
|
1
|
-
import { StitchingState } from '@remotion/renderer';
|
|
2
|
-
import { RenderStep } from './step';
|
|
3
1
|
export declare const createProgressBar: () => {
|
|
4
2
|
update: (str: string) => boolean;
|
|
5
3
|
};
|
|
6
|
-
export declare const createOverwriteableCliOutput: () => {
|
|
7
|
-
update: (up: string) => boolean;
|
|
8
|
-
};
|
|
9
4
|
export declare const makeProgressBar: (percentage: number) => string;
|
|
10
5
|
export declare const makeBundlingProgress: ({ progress, steps, doneIn, }: {
|
|
11
6
|
progress: number;
|
|
12
|
-
steps:
|
|
7
|
+
steps: number;
|
|
13
8
|
doneIn: number | null;
|
|
14
9
|
}) => string;
|
|
15
|
-
declare
|
|
10
|
+
export declare const makeRenderingProgress: ({ frames, totalFrames, steps, concurrency, doneIn, }: {
|
|
16
11
|
frames: number;
|
|
17
12
|
totalFrames: number;
|
|
18
|
-
steps:
|
|
13
|
+
steps: number;
|
|
19
14
|
concurrency: number;
|
|
20
15
|
doneIn: number | null;
|
|
21
|
-
};
|
|
22
|
-
export declare const
|
|
23
|
-
declare type StitchingProgressInput = {
|
|
16
|
+
}) => string;
|
|
17
|
+
export declare const makeStitchingProgress: ({ frames, totalFrames, steps, doneIn, }: {
|
|
24
18
|
frames: number;
|
|
25
19
|
totalFrames: number;
|
|
26
|
-
steps:
|
|
20
|
+
steps: number;
|
|
27
21
|
doneIn: number | null;
|
|
28
|
-
stage: StitchingState;
|
|
29
|
-
};
|
|
30
|
-
export declare const makeDownloadProgress: (progress: DownloadProgress) => string;
|
|
31
|
-
export declare const makeStitchingProgress: ({ frames, totalFrames, steps, doneIn, stage, }: StitchingProgressInput) => string;
|
|
32
|
-
export declare type DownloadProgress = {
|
|
33
|
-
name: string;
|
|
34
|
-
id: number;
|
|
35
|
-
progress: number;
|
|
36
|
-
};
|
|
37
|
-
export declare const makeRenderingAndStitchingProgress: ({ rendering, stitching, downloads, }: {
|
|
38
|
-
rendering: RenderingProgressInput;
|
|
39
|
-
stitching: StitchingProgressInput | null;
|
|
40
|
-
downloads: DownloadProgress[];
|
|
41
22
|
}) => string;
|
|
42
|
-
export {};
|
|
43
23
|
//# sourceMappingURL=progress-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;kBACf,MAAM,KAAK,OAAO;CAWhC,CAAC;AAEF,eAAO,MAAM,eAAe,eAAgB,MAAM,WAIjD,CAAC;AAEF,eAAO,MAAM,oBAAoB;cAKtB,MAAM;WACT,MAAM;YACL,MAAM,GAAG,IAAI;YAUV,CAAC;AAEb,eAAO,MAAM,qBAAqB;YAOzB,MAAM;iBACD,MAAM;WACZ,MAAM;iBACA,MAAM;YACX,MAAM,GAAG,IAAI;YAUrB,CAAC;AAEF,eAAO,MAAM,qBAAqB;YAMzB,MAAM;iBACD,MAAM;WACZ,MAAM;YACL,MAAM,GAAG,IAAI;YAUrB,CAAC"}
|
package/dist/progress-bar.js
CHANGED
|
@@ -3,25 +3,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.makeStitchingProgress = exports.makeRenderingProgress = exports.makeBundlingProgress = exports.makeProgressBar = exports.createProgressBar = void 0;
|
|
7
7
|
// @ts-expect-error
|
|
8
8
|
const ansi_diff_1 = __importDefault(require("ansi-diff"));
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const remotion_1 = require("remotion");
|
|
11
11
|
const createProgressBar = () => {
|
|
12
|
-
if (!remotion_1.Internals.Logging.isEqualOrBelowLogLevel(
|
|
12
|
+
if (!remotion_1.Internals.Logging.isEqualOrBelowLogLevel('info')) {
|
|
13
13
|
return { update: () => false };
|
|
14
14
|
}
|
|
15
|
-
return (0, exports.createOverwriteableCliOutput)();
|
|
16
|
-
};
|
|
17
|
-
exports.createProgressBar = createProgressBar;
|
|
18
|
-
const createOverwriteableCliOutput = () => {
|
|
19
15
|
const diff = (0, ansi_diff_1.default)();
|
|
16
|
+
process.stdout.write('');
|
|
20
17
|
return {
|
|
21
18
|
update: (up) => process.stdout.write(diff.update(up)),
|
|
22
19
|
};
|
|
23
20
|
};
|
|
24
|
-
exports.
|
|
21
|
+
exports.createProgressBar = createProgressBar;
|
|
25
22
|
const makeProgressBar = (percentage) => {
|
|
26
23
|
const totalBars = 20;
|
|
27
24
|
const barsToShow = Math.floor(percentage * totalBars);
|
|
@@ -29,7 +26,8 @@ const makeProgressBar = (percentage) => {
|
|
|
29
26
|
};
|
|
30
27
|
exports.makeProgressBar = makeProgressBar;
|
|
31
28
|
const makeBundlingProgress = ({ progress, steps, doneIn, }) => [
|
|
32
|
-
|
|
29
|
+
'📦',
|
|
30
|
+
`(1/${steps})`,
|
|
33
31
|
(0, exports.makeProgressBar)(progress),
|
|
34
32
|
`${doneIn ? 'Bundled' : 'Bundling'} code`,
|
|
35
33
|
doneIn === null
|
|
@@ -40,41 +38,23 @@ exports.makeBundlingProgress = makeBundlingProgress;
|
|
|
40
38
|
const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn, }) => {
|
|
41
39
|
const progress = frames / totalFrames;
|
|
42
40
|
return [
|
|
43
|
-
|
|
41
|
+
'🖼 ',
|
|
42
|
+
`(2/${steps})`,
|
|
44
43
|
(0, exports.makeProgressBar)(progress),
|
|
45
|
-
|
|
46
|
-
.filter(remotion_1.Internals.truthy)
|
|
47
|
-
.join(' '),
|
|
44
|
+
`${doneIn ? 'Rendered' : 'Rendering'} frames (${concurrency}x)`,
|
|
48
45
|
doneIn === null ? `${frames}/${totalFrames}` : chalk_1.default.gray(`${doneIn}ms`),
|
|
49
46
|
].join(' ');
|
|
50
47
|
};
|
|
51
48
|
exports.makeRenderingProgress = makeRenderingProgress;
|
|
52
|
-
const
|
|
53
|
-
return [
|
|
54
|
-
`(-/-)`,
|
|
55
|
-
(0, exports.makeProgressBar)(progress.progress),
|
|
56
|
-
`Downloading ${progress.name}`,
|
|
57
|
-
].join(' ');
|
|
58
|
-
};
|
|
59
|
-
exports.makeDownloadProgress = makeDownloadProgress;
|
|
60
|
-
const makeStitchingProgress = ({ frames, totalFrames, steps, doneIn, stage, }) => {
|
|
49
|
+
const makeStitchingProgress = ({ frames, totalFrames, steps, doneIn, }) => {
|
|
61
50
|
const progress = frames / totalFrames;
|
|
62
51
|
return [
|
|
63
|
-
|
|
52
|
+
'🎞 ',
|
|
53
|
+
`(3/${steps})`,
|
|
64
54
|
(0, exports.makeProgressBar)(progress),
|
|
65
|
-
|
|
66
|
-
? `${doneIn ? 'Muxed' : 'Muxing'} audio`
|
|
67
|
-
: `${doneIn ? 'Encoded' : 'Encoding'} video`,
|
|
55
|
+
`${doneIn ? 'Encoded' : 'Encoding'} video`,
|
|
68
56
|
doneIn === null ? `${frames}/${totalFrames}` : chalk_1.default.gray(`${doneIn}ms`),
|
|
69
57
|
].join(' ');
|
|
70
58
|
};
|
|
71
59
|
exports.makeStitchingProgress = makeStitchingProgress;
|
|
72
|
-
const makeRenderingAndStitchingProgress = ({ rendering, stitching, downloads, }) => {
|
|
73
|
-
return [
|
|
74
|
-
(0, exports.makeRenderingProgress)(rendering),
|
|
75
|
-
...downloads.map((d) => (0, exports.makeDownloadProgress)(d)),
|
|
76
|
-
stitching === null ? null : (0, exports.makeStitchingProgress)(stitching),
|
|
77
|
-
].join('\n');
|
|
78
|
-
};
|
|
79
|
-
exports.makeRenderingAndStitchingProgress = makeRenderingAndStitchingProgress;
|
|
80
60
|
//# sourceMappingURL=progress-bar.js.map
|
package/dist/progress-bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../src/progress-bar.ts"],"names":[],"mappings":";;;;;;AAAA,mBAAmB;AACnB,0DAAiC;AACjC,kDAA0B;AAC1B,uCAAmC;AAE5B,MAAM,iBAAiB,GAAG,GAE/B,EAAE;IACH,IAAI,CAAC,oBAAS,CAAC,OAAO,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE;QACtD,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAC,CAAC;KAC7B;IAED,MAAM,IAAI,GAAG,IAAA,mBAAQ,GAAE,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,OAAO;QACN,MAAM,EAAE,CAAC,EAAU,EAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;KACtE,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE;IACrD,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACtD,OAAO,IAAI,GAAG,CAAC,MAAM,CAA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GAMN,EAAE,EAAE;IACJ,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO;QACN,KAAK;QACL,MAAM,KAAK,GAAG;QACd,IAAA,uBAAe,EAAC,QAAQ,CAAC;QACzB,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,QAAQ;QAC1C,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC;KACxE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC,CAAC;AAnBW,QAAA,qBAAqB,yBAmBhC"}
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,MAAM,qBA2OlB,CAAC"}
|
package/dist/render.js
CHANGED
|
@@ -10,45 +10,53 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
10
10
|
const os_1 = __importDefault(require("os"));
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const remotion_1 = require("remotion");
|
|
13
|
+
const delete_directory_1 = require("./delete-directory");
|
|
13
14
|
const get_cli_options_1 = require("./get-cli-options");
|
|
14
15
|
const get_composition_id_1 = require("./get-composition-id");
|
|
16
|
+
const handle_common_errors_1 = require("./handle-common-errors");
|
|
15
17
|
const initialize_render_cli_1 = require("./initialize-render-cli");
|
|
16
18
|
const log_1 = require("./log");
|
|
17
19
|
const parse_command_line_1 = require("./parse-command-line");
|
|
18
20
|
const progress_bar_1 = require("./progress-bar");
|
|
19
21
|
const setup_cache_1 = require("./setup-cache");
|
|
20
22
|
const validate_ffmpeg_version_1 = require("./validate-ffmpeg-version");
|
|
23
|
+
const onError = async (info) => {
|
|
24
|
+
log_1.Log.error();
|
|
25
|
+
if (info.frame === null) {
|
|
26
|
+
log_1.Log.error('The following error occured when trying to initialize the video rendering:');
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
log_1.Log.error(`The following error occurred when trying to render frame ${info.frame}:`);
|
|
30
|
+
}
|
|
31
|
+
(0, handle_common_errors_1.handleCommonError)(info.error);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
};
|
|
21
34
|
const render = async () => {
|
|
35
|
+
var _a, _b;
|
|
22
36
|
const startTime = Date.now();
|
|
23
37
|
const file = parse_command_line_1.parsedCli._[1];
|
|
24
|
-
const fullPath =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
await (0, initialize_render_cli_1.initializeRenderCli)('sequence');
|
|
28
|
-
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, absoluteOutputFile, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, } = await (0, get_cli_options_1.getCliOptions)({ isLambda: false, type: 'series' });
|
|
29
|
-
if (!absoluteOutputFile) {
|
|
30
|
-
throw new Error('assertion error - expected absoluteOutputFile to not be null');
|
|
31
|
-
}
|
|
38
|
+
const fullPath = path_1.default.join(process.cwd(), file);
|
|
39
|
+
(0, initialize_render_cli_1.initializeRenderCli)('sequence');
|
|
40
|
+
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, absoluteOutputFile, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, } = await (0, get_cli_options_1.getCliOptions)('series');
|
|
32
41
|
await (0, validate_ffmpeg_version_1.checkAndValidateFfmpegVersion)({
|
|
33
42
|
ffmpegExecutable: remotion_1.Internals.getCustomFfmpegExecutable(),
|
|
34
43
|
});
|
|
35
|
-
const browserInstance =
|
|
44
|
+
const browserInstance = renderer_1.RenderInternals.openBrowser(browser, {
|
|
36
45
|
browserExecutable,
|
|
37
|
-
shouldDumpIo: remotion_1.Internals.Logging.isEqualOrBelowLogLevel(
|
|
46
|
+
shouldDumpIo: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
38
47
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const comps = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
48
|
+
if (shouldOutputImageSequence) {
|
|
49
|
+
fs_1.default.mkdirSync(absoluteOutputFile, {
|
|
50
|
+
recursive: true,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const steps = shouldOutputImageSequence ? 2 : 3;
|
|
54
|
+
const bundled = await (0, setup_cache_1.bundleOnCli)(fullPath, steps);
|
|
55
|
+
const openedBrowser = await browserInstance;
|
|
56
|
+
const comps = await (0, renderer_1.getCompositions)(bundled, {
|
|
57
|
+
browser,
|
|
50
58
|
inputProps,
|
|
51
|
-
|
|
59
|
+
browserInstance: openedBrowser,
|
|
52
60
|
envVariables,
|
|
53
61
|
});
|
|
54
62
|
const compositionId = (0, get_composition_id_1.getCompositionId)(comps);
|
|
@@ -65,121 +73,140 @@ const render = async () => {
|
|
|
65
73
|
? absoluteOutputFile
|
|
66
74
|
: await fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'react-motion-render'));
|
|
67
75
|
log_1.Log.verbose('Output dir', outputDir);
|
|
68
|
-
const renderProgress = (0, progress_bar_1.
|
|
76
|
+
const renderProgress = (0, progress_bar_1.createProgressBar)();
|
|
69
77
|
let totalFrames = 0;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const updateRenderProgress = () => {
|
|
77
|
-
if (totalFrames === null) {
|
|
78
|
-
throw new Error('totalFrames should not be 0');
|
|
79
|
-
}
|
|
80
|
-
return renderProgress.update((0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
81
|
-
rendering: {
|
|
82
|
-
frames: renderedFrames,
|
|
78
|
+
const renderStart = Date.now();
|
|
79
|
+
const { assetsInfo } = await (0, renderer_1.renderFrames)({
|
|
80
|
+
config,
|
|
81
|
+
onFrameUpdate: (frame) => {
|
|
82
|
+
renderProgress.update((0, progress_bar_1.makeRenderingProgress)({
|
|
83
|
+
frames: frame,
|
|
83
84
|
totalFrames,
|
|
84
85
|
concurrency: renderer_1.RenderInternals.getActualConcurrency(parallelism),
|
|
85
|
-
doneIn:
|
|
86
|
+
doneIn: null,
|
|
86
87
|
steps,
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
}));
|
|
89
|
+
},
|
|
90
|
+
parallelism,
|
|
91
|
+
compositionId,
|
|
92
|
+
outputDir,
|
|
93
|
+
onError,
|
|
94
|
+
onStart: ({ frameCount: fc }) => {
|
|
95
|
+
renderProgress.update((0, progress_bar_1.makeRenderingProgress)({
|
|
96
|
+
frames: 0,
|
|
97
|
+
totalFrames: fc,
|
|
98
|
+
concurrency: renderer_1.RenderInternals.getActualConcurrency(parallelism),
|
|
99
|
+
doneIn: null,
|
|
100
|
+
steps,
|
|
101
|
+
}));
|
|
102
|
+
totalFrames = fc;
|
|
103
|
+
},
|
|
104
|
+
inputProps,
|
|
105
|
+
envVariables,
|
|
106
|
+
webpackBundle: bundled,
|
|
107
|
+
imageFormat,
|
|
108
|
+
quality,
|
|
109
|
+
browser,
|
|
110
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
111
|
+
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
112
|
+
puppeteerInstance: openedBrowser,
|
|
113
|
+
});
|
|
114
|
+
const closeBrowserPromise = openedBrowser.close();
|
|
115
|
+
renderProgress.update((0, progress_bar_1.makeRenderingProgress)({
|
|
116
|
+
frames: totalFrames,
|
|
117
|
+
totalFrames,
|
|
118
|
+
steps,
|
|
119
|
+
concurrency: renderer_1.RenderInternals.getActualConcurrency(parallelism),
|
|
120
|
+
doneIn: Date.now() - renderStart,
|
|
121
|
+
}) + '\n');
|
|
122
|
+
if (process.env.DEBUG) {
|
|
123
|
+
remotion_1.Internals.perf.logPerf();
|
|
124
|
+
}
|
|
100
125
|
if (shouldOutputImageSequence) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
log_1.Log.error(`codec = ${codec}, imageFormat = ${imageFormat}`);
|
|
107
|
-
process.exit(1);
|
|
126
|
+
log_1.Log.info(chalk_1.default.green('\nYour image sequence is ready!'));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
if (typeof crf !== 'number') {
|
|
130
|
+
throw new TypeError('CRF is unexpectedly not a number');
|
|
108
131
|
}
|
|
109
|
-
|
|
110
|
-
|
|
132
|
+
const dirName = path_1.default.dirname(absoluteOutputFile);
|
|
133
|
+
if (!fs_1.default.existsSync(dirName)) {
|
|
134
|
+
fs_1.default.mkdirSync(dirName, {
|
|
135
|
+
recursive: true,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
const stitchingProgress = (0, progress_bar_1.createProgressBar)();
|
|
139
|
+
stitchingProgress.update((0, progress_bar_1.makeStitchingProgress)({
|
|
140
|
+
doneIn: null,
|
|
141
|
+
frames: 0,
|
|
142
|
+
steps,
|
|
143
|
+
totalFrames,
|
|
144
|
+
}));
|
|
145
|
+
const stitchStart = Date.now();
|
|
146
|
+
await (0, renderer_1.stitchFramesToVideo)({
|
|
147
|
+
dir: outputDir,
|
|
148
|
+
width: config.width,
|
|
149
|
+
height: config.height,
|
|
150
|
+
fps: config.fps,
|
|
151
|
+
outputLocation: absoluteOutputFile,
|
|
152
|
+
force: overwrite,
|
|
111
153
|
imageFormat,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
154
|
+
pixelFormat,
|
|
155
|
+
codec,
|
|
156
|
+
proResProfile,
|
|
157
|
+
crf,
|
|
158
|
+
assetsInfo,
|
|
159
|
+
parallelism,
|
|
160
|
+
ffmpegExecutable,
|
|
161
|
+
onProgress: (frame) => {
|
|
162
|
+
stitchingProgress.update((0, progress_bar_1.makeStitchingProgress)({
|
|
163
|
+
doneIn: null,
|
|
164
|
+
frames: frame,
|
|
165
|
+
steps,
|
|
166
|
+
totalFrames,
|
|
167
|
+
}));
|
|
116
168
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
169
|
+
onDownload: (src) => {
|
|
170
|
+
if (src.startsWith('data:')) {
|
|
171
|
+
log_1.Log.info('\nWriting Data URL to file: ', src.substring(0, 30) + '...');
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
log_1.Log.info('\nDownloading asset... ', src);
|
|
175
|
+
}
|
|
120
176
|
},
|
|
121
|
-
|
|
122
|
-
serveUrl,
|
|
123
|
-
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'verbose'),
|
|
124
|
-
envVariables,
|
|
125
|
-
frameRange,
|
|
126
|
-
parallelism,
|
|
127
|
-
puppeteerInstance,
|
|
128
|
-
quality,
|
|
177
|
+
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
129
178
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
179
|
+
stitchingProgress.update((0, progress_bar_1.makeStitchingProgress)({
|
|
180
|
+
doneIn: Date.now() - stitchStart,
|
|
181
|
+
frames: totalFrames,
|
|
182
|
+
steps,
|
|
183
|
+
totalFrames,
|
|
184
|
+
}) + '\n');
|
|
185
|
+
log_1.Log.verbose('Cleaning up...');
|
|
186
|
+
try {
|
|
187
|
+
if (process.platform === 'win32') {
|
|
188
|
+
// Properly delete directories because Windows doesn't seem to like fs.
|
|
189
|
+
await (0, delete_directory_1.deleteDirectory)(outputDir);
|
|
190
|
+
await (0, delete_directory_1.deleteDirectory)(bundled);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
await Promise.all([
|
|
194
|
+
((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(outputDir, {
|
|
195
|
+
recursive: true,
|
|
196
|
+
}),
|
|
197
|
+
((_b = fs_1.default.promises.rm) !== null && _b !== void 0 ? _b : fs_1.default.promises.rmdir)(bundled, {
|
|
198
|
+
recursive: true,
|
|
199
|
+
}),
|
|
200
|
+
]);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
log_1.Log.warn('Could not clean up directory.');
|
|
205
|
+
log_1.Log.warn(err);
|
|
206
|
+
log_1.Log.warn('Do you have minimum required Node.js version?');
|
|
207
|
+
}
|
|
208
|
+
log_1.Log.info(chalk_1.default.green('\nYour video is ready!'));
|
|
136
209
|
}
|
|
137
|
-
await (0, renderer_1.renderMedia)({
|
|
138
|
-
outputLocation: absoluteOutputFile,
|
|
139
|
-
codec,
|
|
140
|
-
composition: config,
|
|
141
|
-
crf,
|
|
142
|
-
envVariables,
|
|
143
|
-
ffmpegExecutable,
|
|
144
|
-
frameRange,
|
|
145
|
-
imageFormat,
|
|
146
|
-
inputProps,
|
|
147
|
-
onProgress: (update) => {
|
|
148
|
-
encodedDoneIn = update.encodedDoneIn;
|
|
149
|
-
encodedFrames = update.encodedFrames;
|
|
150
|
-
renderedDoneIn = update.renderedDoneIn;
|
|
151
|
-
stitchStage = update.stitchStage;
|
|
152
|
-
renderedFrames = update.renderedFrames;
|
|
153
|
-
updateRenderProgress();
|
|
154
|
-
},
|
|
155
|
-
puppeteerInstance,
|
|
156
|
-
overwrite,
|
|
157
|
-
parallelism,
|
|
158
|
-
pixelFormat,
|
|
159
|
-
proResProfile,
|
|
160
|
-
quality,
|
|
161
|
-
serveUrl,
|
|
162
|
-
onDownload: (src) => {
|
|
163
|
-
const id = Math.random();
|
|
164
|
-
const download = {
|
|
165
|
-
id,
|
|
166
|
-
name: src,
|
|
167
|
-
progress: 0,
|
|
168
|
-
};
|
|
169
|
-
downloads.push(download);
|
|
170
|
-
updateRenderProgress();
|
|
171
|
-
return ({ percent }) => {
|
|
172
|
-
download.progress = percent;
|
|
173
|
-
updateRenderProgress();
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
|
-
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'verbose'),
|
|
177
|
-
onStart: ({ frameCount }) => {
|
|
178
|
-
totalFrames = frameCount;
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
log_1.Log.info();
|
|
182
|
-
log_1.Log.info();
|
|
183
210
|
const seconds = Math.round((Date.now() - startTime) / 1000);
|
|
184
211
|
log_1.Log.info([
|
|
185
212
|
'- Total render time:',
|
|
@@ -188,19 +215,7 @@ const render = async () => {
|
|
|
188
215
|
].join(' '));
|
|
189
216
|
log_1.Log.info('-', 'Output can be found at:');
|
|
190
217
|
log_1.Log.info(chalk_1.default.cyan(`▶️ ${absoluteOutputFile}`));
|
|
191
|
-
|
|
192
|
-
try {
|
|
193
|
-
await renderer_1.RenderInternals.deleteDirectory(await urlOrBundle);
|
|
194
|
-
}
|
|
195
|
-
catch (err) {
|
|
196
|
-
log_1.Log.warn('Could not clean up directory.');
|
|
197
|
-
log_1.Log.warn(err);
|
|
198
|
-
log_1.Log.warn('Do you have minimum required Node.js version?');
|
|
199
|
-
}
|
|
200
|
-
log_1.Log.info(chalk_1.default.green('\nYour video is ready!'));
|
|
201
|
-
closeServer().catch((err) => {
|
|
202
|
-
log_1.Log.error('Could not close web server', err);
|
|
203
|
-
});
|
|
218
|
+
await closeBrowserPromise;
|
|
204
219
|
};
|
|
205
220
|
exports.render = render;
|
|
206
221
|
//# sourceMappingURL=render.js.map
|