@remotion/cli 3.0.0-lambda.143 → 3.0.0-lambda.151
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/IFrameWrapper.d.ts +6 -0
- package/dist/editor/components/IFrameWrapper.d.ts.map +1 -0
- package/dist/editor/components/IFrameWrapper.js +19 -0
- package/dist/editor/components/IFrameWrapper.js.map +1 -0
- package/dist/editor/components/KeyboardShortcuts.d.ts +1 -0
- package/dist/editor/components/KeyboardShortcuts.d.ts.map +1 -0
- package/dist/editor/components/KeyboardShortcuts.js +2 -0
- package/dist/editor/components/KeyboardShortcuts.js.map +1 -0
- package/dist/editor/components/LoopToggle.d.ts.map +1 -1
- package/dist/editor/components/LoopToggle.js +5 -0
- package/dist/editor/components/LoopToggle.js.map +1 -1
- package/dist/editor/components/MenuToolbar.js +1 -1
- package/dist/editor/components/MenuToolbar.js.map +1 -1
- package/dist/editor/components/NewComposition/ModalHeader.d.ts +3 -0
- package/dist/editor/components/NewComposition/ModalHeader.d.ts.map +1 -0
- package/dist/editor/components/NewComposition/ModalHeader.js +29 -0
- package/dist/editor/components/NewComposition/ModalHeader.js.map +1 -0
- package/dist/editor/helpers/css-reset.d.ts +3 -0
- package/dist/editor/helpers/css-reset.d.ts.map +1 -0
- package/dist/editor/helpers/css-reset.js +9 -0
- package/dist/editor/helpers/css-reset.js.map +1 -0
- package/dist/empty-audio.d.ts +2 -0
- package/dist/empty-audio.d.ts.map +1 -0
- package/dist/empty-audio.js +5 -0
- package/dist/empty-audio.js.map +1 -0
- package/dist/get-cli-options.d.ts +0 -1
- package/dist/get-cli-options.d.ts.map +1 -1
- package/dist/get-cli-options.js +0 -3
- package/dist/get-cli-options.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/progress-bar.d.ts +14 -5
- package/dist/progress-bar.d.ts.map +1 -1
- package/dist/progress-bar.js +14 -5
- package/dist/progress-bar.js.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +128 -201
- package/dist/render.js.map +1 -1
- package/dist/setup-cache.d.ts +2 -1
- package/dist/setup-cache.d.ts.map +1 -1
- package/dist/setup-cache.js +5 -1
- package/dist/setup-cache.js.map +1 -1
- package/dist/still.d.ts.map +1 -1
- package/dist/still.js +17 -13
- package/dist/still.js.map +1 -1
- package/package.json +7 -7
- package/dist/cycle-browser-tabs.d.ts +0 -7
- package/dist/cycle-browser-tabs.d.ts.map +0 -1
- package/dist/cycle-browser-tabs.js +0 -24
- package/dist/cycle-browser-tabs.js.map +0 -1
- package/dist/editor/components/FramePersister.d.ts +0 -4
- package/dist/editor/components/FramePersister.d.ts.map +0 -1
- package/dist/editor/components/FramePersister.js +0 -28
- package/dist/editor/components/FramePersister.js.map +0 -1
- package/dist/editor/components/MediaVolumeSlider.d.ts +0 -3
- package/dist/editor/components/MediaVolumeSlider.d.ts.map +0 -1
- package/dist/editor/components/MediaVolumeSlider.js +0 -113
- package/dist/editor/components/MediaVolumeSlider.js.map +0 -1
- package/dist/editor/components/Menu/Checkmark.d.ts +0 -2
- package/dist/editor/components/Menu/Checkmark.d.ts.map +0 -1
- package/dist/editor/components/Menu/Checkmark.js +0 -11
- package/dist/editor/components/Menu/Checkmark.js.map +0 -1
- package/dist/editor/components/Menu/is-menu-click.d.ts +0 -1
- package/dist/editor/components/Menu/is-menu-click.d.ts.map +0 -1
- package/dist/editor/components/Menu/is-menu-click.js +0 -2
- package/dist/editor/components/Menu/is-menu-click.js.map +0 -1
- package/dist/editor/components/NewComposition/LazyLoadNewComposition.d.ts +0 -6
- package/dist/editor/components/NewComposition/LazyLoadNewComposition.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/LazyLoadNewComposition.js +0 -32
- package/dist/editor/components/NewComposition/LazyLoadNewComposition.js.map +0 -1
- package/dist/editor/components/NewComposition.d.ts +0 -3
- package/dist/editor/components/NewComposition.d.ts.map +0 -1
- package/dist/editor/components/NewComposition.js +0 -47
- package/dist/editor/components/NewComposition.js.map +0 -1
- package/dist/editor/components/NewSequence.d.ts +0 -3
- package/dist/editor/components/NewSequence.d.ts.map +0 -1
- package/dist/editor/components/NewSequence.js +0 -47
- package/dist/editor/components/NewSequence.js.map +0 -1
- package/dist/editor/components/Spacing.d.ts +0 -7
- package/dist/editor/components/Spacing.d.ts.map +0 -1
- package/dist/editor/components/Spacing.js +0 -18
- package/dist/editor/components/Spacing.js.map +0 -1
- package/dist/editor/components/Timeline/LoopIndicator.d.ts +0 -5
- package/dist/editor/components/Timeline/LoopIndicator.d.ts.map +0 -1
- package/dist/editor/components/Timeline/LoopIndicator.js +0 -37
- package/dist/editor/components/Timeline/LoopIndicator.js.map +0 -1
- package/dist/editor/helpers/isCompositionStill.d.ts +0 -1
- package/dist/editor/helpers/isCompositionStill.d.ts.map +0 -1
- package/dist/editor/helpers/isCompositionStill.js +0 -2
- package/dist/editor/helpers/isCompositionStill.js.map +0 -1
- package/dist/editor/helpers/validate-composition-name.d.ts +0 -3
- package/dist/editor/helpers/validate-composition-name.d.ts.map +0 -1
- package/dist/editor/helpers/validate-composition-name.js +0 -15
- package/dist/editor/helpers/validate-composition-name.js.map +0 -1
- package/dist/editor/hooks/get-el-size.d.ts +0 -8
- package/dist/editor/hooks/get-el-size.d.ts.map +0 -1
- package/dist/editor/hooks/get-el-size.js +0 -43
- package/dist/editor/hooks/get-el-size.js.map +0 -1
- package/dist/editor/icons/fast-back.d.ts +0 -3
- package/dist/editor/icons/fast-back.d.ts.map +0 -1
- package/dist/editor/icons/fast-back.js +0 -9
- package/dist/editor/icons/fast-back.js.map +0 -1
- package/dist/editor/icons/fast-forward.d.ts +0 -3
- package/dist/editor/icons/fast-forward.d.ts.map +0 -1
- package/dist/editor/icons/fast-forward.js +0 -9
- package/dist/editor/icons/fast-forward.js.map +0 -1
- package/dist/editor/state/global-menu-id.d.ts +0 -4
- package/dist/editor/state/global-menu-id.d.ts.map +0 -1
- package/dist/editor/state/global-menu-id.js +0 -11
- package/dist/editor/state/global-menu-id.js.map +0 -1
- package/dist/editor/state/menu-selection.d.ts +0 -8
- package/dist/editor/state/menu-selection.d.ts.map +0 -1
- package/dist/editor/state/menu-selection.js +0 -14
- package/dist/editor/state/menu-selection.js.map +0 -1
package/dist/render.js
CHANGED
|
@@ -10,7 +10,6 @@ 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");
|
|
14
13
|
const get_cli_options_1 = require("./get-cli-options");
|
|
15
14
|
const get_composition_id_1 = require("./get-composition-id");
|
|
16
15
|
const initialize_render_cli_1 = require("./initialize-render-cli");
|
|
@@ -18,40 +17,38 @@ const log_1 = require("./log");
|
|
|
18
17
|
const parse_command_line_1 = require("./parse-command-line");
|
|
19
18
|
const progress_bar_1 = require("./progress-bar");
|
|
20
19
|
const setup_cache_1 = require("./setup-cache");
|
|
21
|
-
const user_passed_output_location_1 = require("./user-passed-output-location");
|
|
22
20
|
const validate_ffmpeg_version_1 = require("./validate-ffmpeg-version");
|
|
23
21
|
const render = async () => {
|
|
24
|
-
var _a, _b, _c, _d;
|
|
25
22
|
const startTime = Date.now();
|
|
26
23
|
const file = parse_command_line_1.parsedCli._[1];
|
|
27
|
-
const fullPath =
|
|
24
|
+
const fullPath = renderer_1.RenderInternals.isServeUrl(file)
|
|
25
|
+
? file
|
|
26
|
+
: path_1.default.join(process.cwd(), file);
|
|
28
27
|
await (0, initialize_render_cli_1.initializeRenderCli)('sequence');
|
|
29
|
-
const { codec, proResProfile, parallelism,
|
|
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' });
|
|
30
29
|
if (!absoluteOutputFile) {
|
|
31
30
|
throw new Error('assertion error - expected absoluteOutputFile to not be null');
|
|
32
31
|
}
|
|
33
32
|
await (0, validate_ffmpeg_version_1.checkAndValidateFfmpegVersion)({
|
|
34
33
|
ffmpegExecutable: remotion_1.Internals.getCustomFfmpegExecutable(),
|
|
35
34
|
});
|
|
36
|
-
const browserInstance = renderer_1.
|
|
35
|
+
const browserInstance = (0, renderer_1.openBrowser)(browser, {
|
|
37
36
|
browserExecutable,
|
|
38
37
|
shouldDumpIo: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
39
38
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const {
|
|
49
|
-
const
|
|
50
|
-
const openedBrowser = await browserInstance;
|
|
39
|
+
const steps = [
|
|
40
|
+
renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
|
|
41
|
+
'rendering',
|
|
42
|
+
shouldOutputImageSequence ? null : 'stitching',
|
|
43
|
+
].filter(remotion_1.Internals.truthy);
|
|
44
|
+
const urlOrBundle = renderer_1.RenderInternals.isServeUrl(fullPath)
|
|
45
|
+
? Promise.resolve(fullPath)
|
|
46
|
+
: await (0, setup_cache_1.bundleOnCli)(fullPath, steps);
|
|
47
|
+
const { serveUrl, closeServer } = await renderer_1.RenderInternals.prepareServer(await urlOrBundle);
|
|
48
|
+
const puppeteerInstance = await browserInstance;
|
|
51
49
|
const comps = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
52
|
-
browser,
|
|
53
50
|
inputProps,
|
|
54
|
-
|
|
51
|
+
puppeteerInstance,
|
|
55
52
|
envVariables,
|
|
56
53
|
});
|
|
57
54
|
const compositionId = (0, get_composition_id_1.getCompositionId)(comps);
|
|
@@ -67,203 +64,122 @@ const render = async () => {
|
|
|
67
64
|
const outputDir = shouldOutputImageSequence
|
|
68
65
|
? absoluteOutputFile
|
|
69
66
|
: await fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'react-motion-render'));
|
|
70
|
-
if (!outputDir) {
|
|
71
|
-
throw new Error('Assertion error: Expected outputDir to not be null');
|
|
72
|
-
}
|
|
73
67
|
log_1.Log.verbose('Output dir', outputDir);
|
|
74
68
|
const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)();
|
|
75
69
|
let totalFrames = 0;
|
|
76
|
-
|
|
77
|
-
let stitcherFfmpeg;
|
|
78
|
-
let preStitcher;
|
|
79
|
-
let encodedFrames = null;
|
|
70
|
+
let encodedFrames = 0;
|
|
80
71
|
let renderedFrames = 0;
|
|
81
|
-
let
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
72
|
+
let encodedDoneIn = null;
|
|
73
|
+
let renderedDoneIn = null;
|
|
74
|
+
let stitchStage = 'encoding';
|
|
75
|
+
const downloads = [];
|
|
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,
|
|
83
|
+
totalFrames,
|
|
84
|
+
concurrency: renderer_1.RenderInternals.getActualConcurrency(parallelism),
|
|
85
|
+
doneIn: renderedDoneIn,
|
|
86
|
+
steps,
|
|
87
|
+
},
|
|
88
|
+
stitching: shouldOutputImageSequence
|
|
89
|
+
? null
|
|
90
|
+
: {
|
|
91
|
+
doneIn: encodedDoneIn,
|
|
92
|
+
frames: encodedFrames,
|
|
93
|
+
stage: stitchStage,
|
|
94
|
+
steps,
|
|
95
|
+
totalFrames,
|
|
96
|
+
},
|
|
97
|
+
downloads,
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
if (shouldOutputImageSequence) {
|
|
101
|
+
fs_1.default.mkdirSync(absoluteOutputFile, {
|
|
102
|
+
recursive: true,
|
|
103
|
+
});
|
|
104
|
+
if (imageFormat === 'none') {
|
|
105
|
+
log_1.Log.error('Cannot render an image sequence with a codec that renders no images.');
|
|
106
|
+
log_1.Log.error(`codec = ${codec}, imageFormat = ${imageFormat}`);
|
|
107
|
+
process.exit(1);
|
|
101
108
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
dir: outputDir,
|
|
105
|
-
width: config.width,
|
|
106
|
-
height: config.height,
|
|
107
|
-
fps: config.fps,
|
|
108
|
-
outputLocation: preEncodedFileLocation,
|
|
109
|
-
force: true,
|
|
109
|
+
await (0, renderer_1.renderFrames)({
|
|
110
|
+
config,
|
|
110
111
|
imageFormat,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
crf,
|
|
115
|
-
parallelism,
|
|
116
|
-
onProgress: (frame) => {
|
|
117
|
-
encodedFrames = frame;
|
|
112
|
+
inputProps,
|
|
113
|
+
onFrameUpdate: (rendered) => {
|
|
114
|
+
renderedFrames = rendered;
|
|
118
115
|
updateRenderProgress();
|
|
119
116
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
onStart: ({ frameCount }) => {
|
|
118
|
+
totalFrames = frameCount;
|
|
119
|
+
return updateRenderProgress();
|
|
120
|
+
},
|
|
121
|
+
outputDir,
|
|
122
|
+
serveUrl,
|
|
123
|
+
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
124
|
+
envVariables,
|
|
125
|
+
frameRange,
|
|
126
|
+
parallelism,
|
|
127
|
+
puppeteerInstance,
|
|
128
|
+
quality,
|
|
125
129
|
});
|
|
126
|
-
|
|
130
|
+
renderedDoneIn = Date.now() - startTime;
|
|
131
|
+
updateRenderProgress();
|
|
132
|
+
log_1.Log.info();
|
|
133
|
+
log_1.Log.info();
|
|
134
|
+
log_1.Log.info(chalk_1.default.green('\nYour image sequence is ready!'));
|
|
135
|
+
return;
|
|
127
136
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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;
|
|
132
153
|
updateRenderProgress();
|
|
133
154
|
},
|
|
155
|
+
puppeteerInstance,
|
|
156
|
+
overwrite,
|
|
134
157
|
parallelism,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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);
|
|
142
170
|
updateRenderProgress();
|
|
171
|
+
return ({ percent }) => {
|
|
172
|
+
download.progress = percent;
|
|
173
|
+
updateRenderProgress();
|
|
174
|
+
};
|
|
143
175
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
quality,
|
|
148
|
-
browser,
|
|
149
|
-
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
150
|
-
puppeteerInstance: openedBrowser,
|
|
151
|
-
writeFrame: async (buffer) => {
|
|
152
|
-
var _a;
|
|
153
|
-
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
176
|
+
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
177
|
+
onStart: ({ frameCount }) => {
|
|
178
|
+
totalFrames = frameCount;
|
|
154
179
|
},
|
|
155
|
-
serveUrl,
|
|
156
180
|
});
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.end();
|
|
160
|
-
await stitcherFfmpeg;
|
|
161
|
-
(_b = preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.cleanup) === null || _b === void 0 ? void 0 : _b.call(preStitcher);
|
|
162
|
-
}
|
|
163
|
-
const closeBrowserPromise = openedBrowser.close();
|
|
164
|
-
const finalizedRenderProgress = {
|
|
165
|
-
frames: totalFrames,
|
|
166
|
-
totalFrames,
|
|
167
|
-
steps,
|
|
168
|
-
concurrency: renderer_1.RenderInternals.getActualConcurrency(parallelism),
|
|
169
|
-
doneIn: Date.now() - renderStart,
|
|
170
|
-
};
|
|
171
|
-
renderProgress.update((0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
172
|
-
rendering: finalizedRenderProgress,
|
|
173
|
-
stitching: {
|
|
174
|
-
doneIn: null,
|
|
175
|
-
frames: encodedFrames !== null && encodedFrames !== void 0 ? encodedFrames : 0,
|
|
176
|
-
steps: 0,
|
|
177
|
-
stage: 'encoding',
|
|
178
|
-
totalFrames,
|
|
179
|
-
},
|
|
180
|
-
}) + '\n');
|
|
181
|
-
if (process.env.DEBUG) {
|
|
182
|
-
remotion_1.Internals.perf.logPerf();
|
|
183
|
-
}
|
|
184
|
-
if (shouldOutputImageSequence) {
|
|
185
|
-
log_1.Log.info(chalk_1.default.green('\nYour image sequence is ready!'));
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
if (typeof crf !== 'number') {
|
|
189
|
-
throw new TypeError('CRF is unexpectedly not a number');
|
|
190
|
-
}
|
|
191
|
-
const dirName = path_1.default.dirname(absoluteOutputFile);
|
|
192
|
-
if (!fs_1.default.existsSync(dirName)) {
|
|
193
|
-
fs_1.default.mkdirSync(dirName, {
|
|
194
|
-
recursive: true,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
const stitchStart = Date.now();
|
|
198
|
-
await (0, renderer_1.stitchFramesToVideo)({
|
|
199
|
-
dir: outputDir,
|
|
200
|
-
width: config.width,
|
|
201
|
-
height: config.height,
|
|
202
|
-
fps: config.fps,
|
|
203
|
-
outputLocation: absoluteOutputFile,
|
|
204
|
-
preEncodedFileLocation,
|
|
205
|
-
force: overwrite,
|
|
206
|
-
imageFormat,
|
|
207
|
-
pixelFormat,
|
|
208
|
-
codec,
|
|
209
|
-
proResProfile,
|
|
210
|
-
crf,
|
|
211
|
-
assetsInfo,
|
|
212
|
-
parallelism,
|
|
213
|
-
ffmpegExecutable,
|
|
214
|
-
onProgress: (frame) => {
|
|
215
|
-
(0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
216
|
-
rendering: finalizedRenderProgress,
|
|
217
|
-
stitching: {
|
|
218
|
-
doneIn: null,
|
|
219
|
-
frames: frame,
|
|
220
|
-
steps,
|
|
221
|
-
totalFrames,
|
|
222
|
-
stage: 'encoding',
|
|
223
|
-
},
|
|
224
|
-
});
|
|
225
|
-
},
|
|
226
|
-
onDownload: (src) => {
|
|
227
|
-
log_1.Log.info('Downloading asset... ', src);
|
|
228
|
-
},
|
|
229
|
-
webpackBundle: bundled,
|
|
230
|
-
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
231
|
-
});
|
|
232
|
-
renderProgress.update((0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
233
|
-
rendering: finalizedRenderProgress,
|
|
234
|
-
stitching: {
|
|
235
|
-
doneIn: Date.now() - stitchStart,
|
|
236
|
-
frames: totalFrames,
|
|
237
|
-
steps,
|
|
238
|
-
totalFrames,
|
|
239
|
-
stage: 'muxing',
|
|
240
|
-
},
|
|
241
|
-
}) + '\n');
|
|
242
|
-
log_1.Log.verbose('Cleaning up...');
|
|
243
|
-
try {
|
|
244
|
-
if (process.platform === 'win32') {
|
|
245
|
-
// Properly delete directories because Windows doesn't seem to like fs.
|
|
246
|
-
await (0, delete_directory_1.deleteDirectory)(outputDir);
|
|
247
|
-
await (0, delete_directory_1.deleteDirectory)(bundled);
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
await Promise.all([
|
|
251
|
-
((_c = fs_1.default.promises.rm) !== null && _c !== void 0 ? _c : fs_1.default.promises.rmdir)(outputDir, {
|
|
252
|
-
recursive: true,
|
|
253
|
-
}),
|
|
254
|
-
((_d = fs_1.default.promises.rm) !== null && _d !== void 0 ? _d : fs_1.default.promises.rmdir)(bundled, {
|
|
255
|
-
recursive: true,
|
|
256
|
-
}),
|
|
257
|
-
]);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
catch (err) {
|
|
261
|
-
log_1.Log.warn('Could not clean up directory.');
|
|
262
|
-
log_1.Log.warn(err);
|
|
263
|
-
log_1.Log.warn('Do you have minimum required Node.js version?');
|
|
264
|
-
}
|
|
265
|
-
log_1.Log.info(chalk_1.default.green('\nYour video is ready!'));
|
|
266
|
-
}
|
|
181
|
+
log_1.Log.info();
|
|
182
|
+
log_1.Log.info();
|
|
267
183
|
const seconds = Math.round((Date.now() - startTime) / 1000);
|
|
268
184
|
log_1.Log.info([
|
|
269
185
|
'- Total render time:',
|
|
@@ -272,8 +188,19 @@ const render = async () => {
|
|
|
272
188
|
].join(' '));
|
|
273
189
|
log_1.Log.info('-', 'Output can be found at:');
|
|
274
190
|
log_1.Log.info(chalk_1.default.cyan(`▶️ ${absoluteOutputFile}`));
|
|
275
|
-
|
|
276
|
-
|
|
191
|
+
log_1.Log.verbose('Cleaning up...');
|
|
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
|
+
});
|
|
277
204
|
};
|
|
278
205
|
exports.render = render;
|
|
279
206
|
//# sourceMappingURL=render.js.map
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":";;;;;;AAAA,iDAO4B;AAC5B,kDAA0B;AAC1B,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,uCAAmC;AACnC,uDAAgD;AAChD,6DAAsD;AACtD,mEAA4D;AAC5D,+BAA0B;AAC1B,6DAA+C;AAC/C,iDAIwB;AACxB,+CAA0C;AAE1C,uEAAwE;AAEjE,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,8BAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,0BAAe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AG,CAAC,IAAI,CAAC,eAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3B,SAAG,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAxOW,QAAA,MAAM,UAwOjB"}
|
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-cache.d.ts","sourceRoot":"","sources":["../src/setup-cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup-cache.d.ts","sourceRoot":"","sources":["../src/setup-cache.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAElC,eAAO,MAAM,WAAW,aAAoB,MAAM,SAAS,UAAU,EAAE,oBAuCtE,CAAC"}
|
package/dist/setup-cache.js
CHANGED
|
@@ -15,7 +15,11 @@ const bundleOnCli = async (fullPath, steps) => {
|
|
|
15
15
|
const bundleStartTime = Date.now();
|
|
16
16
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)();
|
|
17
17
|
const bundled = await (0, bundler_1.bundle)(fullPath, (progress) => {
|
|
18
|
-
bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
|
|
18
|
+
bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
|
|
19
|
+
progress: progress / 100,
|
|
20
|
+
steps,
|
|
21
|
+
doneIn: null,
|
|
22
|
+
}));
|
|
19
23
|
}, {
|
|
20
24
|
enableCaching: shouldCache,
|
|
21
25
|
});
|
package/dist/setup-cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-cache.js","sourceRoot":"","sources":["../src/setup-cache.ts"],"names":[],"mappings":";;;AAAA,+CAA2D;AAC3D,uCAAmC;AACnC,+BAA0B;AAC1B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,IAAI,CAAC,CAAC;IAC3E,IAAI,iBAAiB,IAAI,CAAC,kBAAkB,EAAE;QAC7C,SAAG,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;KAChE;IAED,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAvCW,QAAA,WAAW,eAuCtB"}
|
package/dist/still.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"still.d.ts","sourceRoot":"","sources":["../src/still.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"still.d.ts","sourceRoot":"","sources":["../src/still.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,KAAK,qBA8IjB,CAAC"}
|
package/dist/still.js
CHANGED
|
@@ -21,7 +21,9 @@ const user_passed_output_location_1 = require("./user-passed-output-location");
|
|
|
21
21
|
const still = async () => {
|
|
22
22
|
const startTime = Date.now();
|
|
23
23
|
const file = parse_command_line_1.parsedCli._[1];
|
|
24
|
-
const fullPath =
|
|
24
|
+
const fullPath = renderer_1.RenderInternals.isServeUrl(file)
|
|
25
|
+
? file
|
|
26
|
+
: path_1.default.join(process.cwd(), file);
|
|
25
27
|
await (0, initialize_render_cli_1.initializeRenderCli)('still');
|
|
26
28
|
const userOutput = path_1.default.resolve(process.cwd(), (0, user_passed_output_location_1.getUserPassedOutputLocation)());
|
|
27
29
|
if (userOutput.endsWith('.jpeg') || userOutput.endsWith('.jpg')) {
|
|
@@ -45,20 +47,25 @@ const still = async () => {
|
|
|
45
47
|
!userOutput.endsWith('.jpeg')) {
|
|
46
48
|
log_1.Log.warn(`Rendering a JPEG, expected a .jpg or .jpeg extension but got ${userOutput}`);
|
|
47
49
|
}
|
|
48
|
-
const browserInstance = renderer_1.
|
|
50
|
+
const browserInstance = (0, renderer_1.openBrowser)(browser, {
|
|
49
51
|
browserExecutable,
|
|
50
52
|
shouldDumpIo: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
51
53
|
});
|
|
52
54
|
(0, fs_1.mkdirSync)(path_1.default.join(userOutput, '..'), {
|
|
53
55
|
recursive: true,
|
|
54
56
|
});
|
|
55
|
-
const steps =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const steps = [
|
|
58
|
+
renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
|
|
59
|
+
'rendering',
|
|
60
|
+
].filter(remotion_1.Internals.truthy);
|
|
61
|
+
const urlOrBundle = renderer_1.RenderInternals.isServeUrl(fullPath)
|
|
62
|
+
? Promise.resolve(fullPath)
|
|
63
|
+
: await (0, setup_cache_1.bundleOnCli)(fullPath, steps);
|
|
64
|
+
const { serveUrl, closeServer } = await renderer_1.RenderInternals.prepareServer(await urlOrBundle);
|
|
65
|
+
const puppeteerInstance = await browserInstance;
|
|
66
|
+
const comps = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
60
67
|
inputProps,
|
|
61
|
-
|
|
68
|
+
puppeteerInstance,
|
|
62
69
|
envVariables,
|
|
63
70
|
});
|
|
64
71
|
const compositionId = (0, get_composition_id_1.getCompositionId)(comps);
|
|
@@ -68,8 +75,6 @@ const still = async () => {
|
|
|
68
75
|
}
|
|
69
76
|
const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)();
|
|
70
77
|
const renderStart = Date.now();
|
|
71
|
-
const { port, close } = await renderer_1.RenderInternals.serveStatic(bundled);
|
|
72
|
-
const serveUrl = `http://localhost:${port}`;
|
|
73
78
|
try {
|
|
74
79
|
await (0, renderer_1.renderStill)({
|
|
75
80
|
composition,
|
|
@@ -77,7 +82,6 @@ const still = async () => {
|
|
|
77
82
|
output: userOutput,
|
|
78
83
|
serveUrl,
|
|
79
84
|
quality,
|
|
80
|
-
browser,
|
|
81
85
|
dumpBrowserLogs: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
82
86
|
envVariables,
|
|
83
87
|
imageFormat,
|
|
@@ -90,8 +94,8 @@ const still = async () => {
|
|
|
90
94
|
(0, handle_common_errors_1.handleCommonError)(err);
|
|
91
95
|
process.exit(1);
|
|
92
96
|
}
|
|
93
|
-
const closeBrowserPromise =
|
|
94
|
-
|
|
97
|
+
const closeBrowserPromise = puppeteerInstance.close();
|
|
98
|
+
closeServer().catch((err) => {
|
|
95
99
|
log_1.Log.error('Could not close web server', err);
|
|
96
100
|
});
|
|
97
101
|
renderProgress.update((0, progress_bar_1.makeRenderingProgress)({
|
package/dist/still.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"still.js","sourceRoot":"","sources":["../src/still.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"still.js","sourceRoot":"","sources":["../src/still.ts"],"names":[],"mappings":";;;;;;AAAA,iDAK4B;AAC5B,kDAA0B;AAC1B,2BAA6B;AAC7B,gDAAwB;AACxB,uCAA2C;AAC3C,uDAAgD;AAChD,6DAAsD;AACtD,iEAAyD;AACzD,mEAA4D;AAC5D,+BAA0B;AAC1B,6DAA+C;AAC/C,iDAGwB;AACxB,+CAA0C;AAE1C,+EAA0E;AAEnE,MAAM,KAAK,GAAG,KAAK,IAAI,EAAE;IAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,8BAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,0BAAe,CAAC,UAAU,CAAC,IAAI,CAAC;QAChD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IAElC,MAAM,IAAA,2CAAmB,EAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAA,yDAA2B,GAAE,CAAC,CAAC;IAE9E,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,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AAC,IAAI,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,CAAC;IACzC,MAAM,mBAAmB,CAAC;AAC3B,CAAC,CAAC;AA9IW,QAAA,KAAK,SA8IhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.0.0-lambda.
|
|
3
|
+
"version": "3.0.0-lambda.151+ba8c212b9",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@remotion/bundler": "3.0.0-lambda.
|
|
23
|
-
"@remotion/media-utils": "3.0.0-lambda.
|
|
24
|
-
"@remotion/player": "3.0.0-lambda.
|
|
25
|
-
"@remotion/renderer": "3.0.0-lambda.
|
|
22
|
+
"@remotion/bundler": "3.0.0-lambda.151+ba8c212b9",
|
|
23
|
+
"@remotion/media-utils": "3.0.0-lambda.151+ba8c212b9",
|
|
24
|
+
"@remotion/player": "3.0.0-lambda.151+ba8c212b9",
|
|
25
|
+
"@remotion/renderer": "3.0.0-lambda.151+ba8c212b9",
|
|
26
26
|
"ansi-diff": "^1.1.1",
|
|
27
27
|
"better-opn": "^2.1.1",
|
|
28
28
|
"chalk": "^4.1.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"esbuild": "^0.11.12",
|
|
31
31
|
"execa": "^4.0.2",
|
|
32
32
|
"minimist": "^1.2.5",
|
|
33
|
-
"remotion": "3.0.0-lambda.
|
|
33
|
+
"remotion": "3.0.0-lambda.151+ba8c212b9",
|
|
34
34
|
"semver": "^7.3.4",
|
|
35
35
|
"webpack": "5.60.0"
|
|
36
36
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "ba8c212b9580b4fa1b3fca8b74771f54d5dc8e94"
|
|
58
58
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RenderInternals } from '@remotion/renderer';
|
|
2
|
-
declare type Await<T> = T extends PromiseLike<infer U> ? U : T;
|
|
3
|
-
export declare const cycleBrowserTabs: (openedBrowser: Await<ReturnType<typeof RenderInternals.openBrowser>>) => {
|
|
4
|
-
stopCycling: () => void;
|
|
5
|
-
};
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=cycle-browser-tabs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cycle-browser-tabs.d.ts","sourceRoot":"","sources":["../src/cycle-browser-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAGnD,aAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvD,eAAO,MAAM,gBAAgB,kBACb,MAAM,WAAW,OAAO,gBAAgB,WAAW,CAAC,CAAC;;CAmBpE,CAAC"}
|