@remotion/renderer 3.3.58 → 3.3.60
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/assets/download-map.d.ts +1 -1
- package/dist/assets/download-map.js +5 -5
- package/dist/browser/BrowserFetcher.js +1 -1
- package/dist/browser/BrowserRunner.js +2 -2
- package/dist/browser/Launcher.js +5 -3
- package/dist/combine-videos.js +1 -1
- package/dist/create-ffmpeg-merge-filter.js +1 -12
- package/dist/delete-directory.d.ts +1 -1
- package/dist/delete-directory.js +31 -5
- package/dist/error-handling/handle-javascript-exception.js +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/merge-audio-track.js +20 -16
- package/dist/render-frames.js +8 -1
- package/dist/render-media.d.ts +10 -7
- package/dist/render-media.js +8 -4
- package/dist/render-still.js +5 -1
- package/dist/stitch-frames-to-video.js +6 -8
- package/package.json +10 -10
|
@@ -65,5 +65,5 @@ export declare type RenderAssetInfo = {
|
|
|
65
65
|
downloadMap: DownloadMap;
|
|
66
66
|
};
|
|
67
67
|
export declare const makeDownloadMap: () => DownloadMap;
|
|
68
|
-
export declare const cleanDownloadMap: (downloadMap: DownloadMap) =>
|
|
68
|
+
export declare const cleanDownloadMap: (downloadMap: DownloadMap) => void;
|
|
69
69
|
export {};
|
|
@@ -67,11 +67,11 @@ const makeDownloadMap = () => {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
exports.makeDownloadMap = makeDownloadMap;
|
|
70
|
-
const cleanDownloadMap =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
const cleanDownloadMap = (downloadMap) => {
|
|
71
|
+
(0, delete_directory_1.deleteDirectory)(downloadMap.downloadDir);
|
|
72
|
+
(0, delete_directory_1.deleteDirectory)(downloadMap.complexFilter);
|
|
73
|
+
(0, delete_directory_1.deleteDirectory)(downloadMap.compositingDir);
|
|
74
74
|
// Assets dir must be last since the others are contained
|
|
75
|
-
|
|
75
|
+
(0, delete_directory_1.deleteDirectory)(downloadMap.assetDir);
|
|
76
76
|
};
|
|
77
77
|
exports.cleanDownloadMap = cleanDownloadMap;
|
|
@@ -310,7 +310,7 @@ class BrowserFetcher {
|
|
|
310
310
|
async remove(revision) {
|
|
311
311
|
const folderPath = __classPrivateFieldGet(this, _BrowserFetcher_instances, "m", _BrowserFetcher_getFolderPath).call(this, revision);
|
|
312
312
|
(0, assert_1.assert)(await existsAsync(folderPath), `Failed to remove: revision ${revision} is not downloaded`);
|
|
313
|
-
|
|
313
|
+
(0, delete_directory_1.deleteDirectory)(folderPath);
|
|
314
314
|
}
|
|
315
315
|
/**
|
|
316
316
|
* @param revision - The revision to get info for.
|
|
@@ -110,12 +110,12 @@ class BrowserRunner {
|
|
|
110
110
|
}
|
|
111
111
|
__classPrivateFieldSet(this, _BrowserRunner_closed, false, "f");
|
|
112
112
|
__classPrivateFieldSet(this, _BrowserRunner_processClosing, new Promise((fulfill, reject) => {
|
|
113
|
-
this.proc.once('exit',
|
|
113
|
+
this.proc.once('exit', () => {
|
|
114
114
|
__classPrivateFieldSet(this, _BrowserRunner_closed, true, "f");
|
|
115
115
|
// Cleanup as processes exit.
|
|
116
116
|
try {
|
|
117
117
|
if (fs.existsSync(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"))) {
|
|
118
|
-
|
|
118
|
+
(0, delete_directory_1.deleteDirectory)(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"));
|
|
119
119
|
}
|
|
120
120
|
fulfill();
|
|
121
121
|
}
|
package/dist/browser/Launcher.js
CHANGED
|
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.ChromeLauncher = void 0;
|
|
27
30
|
/**
|
|
@@ -39,14 +42,13 @@ exports.ChromeLauncher = void 0;
|
|
|
39
42
|
* See the License for the specific language governing permissions and
|
|
40
43
|
* limitations under the License.
|
|
41
44
|
*/
|
|
42
|
-
const
|
|
45
|
+
const fs_1 = __importDefault(require("fs"));
|
|
43
46
|
const os = __importStar(require("os"));
|
|
44
47
|
const path = __importStar(require("path"));
|
|
45
48
|
const assert_1 = require("./assert");
|
|
46
49
|
const Browser_1 = require("./Browser");
|
|
47
50
|
const BrowserFetcher_1 = require("./BrowserFetcher");
|
|
48
51
|
const BrowserRunner_1 = require("./BrowserRunner");
|
|
49
|
-
const mkdtempAsync = fs.promises.mkdtemp;
|
|
50
52
|
const tmpDir = () => {
|
|
51
53
|
return process.env.PUPPETEER_TMP_DIR || os.tmpdir();
|
|
52
54
|
};
|
|
@@ -70,7 +72,7 @@ class ChromeLauncher {
|
|
|
70
72
|
}
|
|
71
73
|
// Check for the user data dir argument, which will always be set even
|
|
72
74
|
// with a custom directory specified via the userDataDir option.
|
|
73
|
-
const userDataDir = await
|
|
75
|
+
const userDataDir = await fs_1.default.promises.mkdtemp(path.join(tmpDir(), 'puppeteer_dev_chrome_profile-'));
|
|
74
76
|
chromeArguments.push(`--user-data-dir=${userDataDir}`);
|
|
75
77
|
let chromeExecutable = executablePath;
|
|
76
78
|
if (!chromeExecutable) {
|
package/dist/combine-videos.js
CHANGED
|
@@ -52,7 +52,7 @@ const combineVideos = async (options) => {
|
|
|
52
52
|
].filter(truthy_1.truthy));
|
|
53
53
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
54
54
|
if (onProgress) {
|
|
55
|
-
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString());
|
|
55
|
+
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(data.toString('utf8'));
|
|
56
56
|
if (parsed !== undefined) {
|
|
57
57
|
onProgress(parsed);
|
|
58
58
|
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFfmpegMergeFilter = void 0;
|
|
4
|
-
const truthy_1 = require("./truthy");
|
|
5
4
|
const createFfmpegMergeFilter = (inputs) => {
|
|
6
|
-
|
|
7
|
-
.fill(true)
|
|
8
|
-
.map((_, i) => (i % 2 === 0 ? `c${i}` : null))
|
|
9
|
-
.filter(truthy_1.truthy)
|
|
10
|
-
.join('+');
|
|
11
|
-
const rightChannel = new Array(inputs * 2)
|
|
12
|
-
.fill(true)
|
|
13
|
-
.map((_, i) => (i % 2 === 1 ? `c${i}` : null))
|
|
14
|
-
.filter(truthy_1.truthy)
|
|
15
|
-
.join('+');
|
|
16
|
-
return `[0:a][1:a]amerge=inputs=${inputs},pan=stereo|c0=${leftChannel}|c1=${rightChannel}[a]`;
|
|
5
|
+
return `[0:a][1:a]amix=inputs=${inputs},pan=stereo[a]`;
|
|
17
6
|
};
|
|
18
7
|
exports.createFfmpegMergeFilter = createFfmpegMergeFilter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const deleteDirectory: (directory: string) =>
|
|
1
|
+
export declare const deleteDirectory: (directory: string) => void;
|
package/dist/delete-directory.js
CHANGED
|
@@ -1,30 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.deleteDirectory = void 0;
|
|
7
30
|
const execa_1 = __importDefault(require("execa"));
|
|
8
|
-
const fs_1 =
|
|
31
|
+
const fs_1 = __importStar(require("fs"));
|
|
9
32
|
const is_serve_url_1 = require("./is-serve-url");
|
|
10
|
-
const deleteDirectory =
|
|
33
|
+
const deleteDirectory = (directory) => {
|
|
11
34
|
var _a;
|
|
12
35
|
if ((0, is_serve_url_1.isServeUrl)(directory)) {
|
|
13
36
|
return;
|
|
14
37
|
}
|
|
38
|
+
if (!(0, fs_1.existsSync)(directory)) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
15
41
|
if (process.platform === 'win32') {
|
|
16
42
|
// We use del before to remove all files inside the directories otherwise
|
|
17
43
|
// rmdir will throw an error.
|
|
18
|
-
|
|
44
|
+
execa_1.default.sync('cmd', ['/c', 'del', '/f', '/s', '/q', directory]);
|
|
19
45
|
try {
|
|
20
|
-
|
|
46
|
+
execa_1.default.sync('cmd', ['/c', 'rmdir', '/s', '/q', directory]);
|
|
21
47
|
}
|
|
22
48
|
catch (err) {
|
|
23
49
|
// Is not a directory
|
|
24
50
|
}
|
|
25
51
|
}
|
|
26
52
|
else {
|
|
27
|
-
|
|
53
|
+
((_a = fs_1.default.rmSync) !== null && _a !== void 0 ? _a : fs_1.default.rmdirSync)(directory, {
|
|
28
54
|
recursive: true,
|
|
29
55
|
});
|
|
30
56
|
}
|
|
@@ -16,6 +16,9 @@ exports.ErrorWithStackFrame = ErrorWithStackFrame;
|
|
|
16
16
|
const cleanUpErrorMessage = (exception) => {
|
|
17
17
|
var _a, _b, _c, _d;
|
|
18
18
|
let errorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
|
|
19
|
+
if (!errorMessage) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
19
22
|
const errorType = (_b = exception.exceptionDetails.exception) === null || _b === void 0 ? void 0 : _b.className;
|
|
20
23
|
const prefix = `${errorType}: `;
|
|
21
24
|
if (errorMessage.startsWith(prefix)) {
|
|
@@ -46,6 +49,13 @@ const handleJavascriptException = ({ page, onError, frame, }) => {
|
|
|
46
49
|
var _a, _b, _c;
|
|
47
50
|
const rawErrorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
|
|
48
51
|
const cleanErrorMessage = cleanUpErrorMessage(exception);
|
|
52
|
+
if (!cleanErrorMessage) {
|
|
53
|
+
console.error(exception);
|
|
54
|
+
const err = new Error(rawErrorMessage);
|
|
55
|
+
err.stack = rawErrorMessage;
|
|
56
|
+
onError(err);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
49
59
|
if (!exception.exceptionDetails.stackTrace) {
|
|
50
60
|
const err = new Error(removeDelayRenderStack(cleanErrorMessage));
|
|
51
61
|
err.stack = rawErrorMessage;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare const RenderInternals: {
|
|
|
64
64
|
}) => void;
|
|
65
65
|
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
|
|
66
66
|
tmpDir: (str: string) => string;
|
|
67
|
-
deleteDirectory: (directory: string) =>
|
|
67
|
+
deleteDirectory: (directory: string) => void;
|
|
68
68
|
isServeUrl: (potentialUrl: string) => boolean;
|
|
69
69
|
ensureOutputDirectory: (outputLocation: string) => void;
|
|
70
70
|
getRealFrameRange: (durationInFrames: number, frameRange: import("./frame-range").FrameRange | null) => [number, number];
|
|
@@ -133,7 +133,7 @@ export declare const RenderInternals: {
|
|
|
133
133
|
isValidLogLevel: (level: string) => boolean;
|
|
134
134
|
perf: typeof perf;
|
|
135
135
|
makeDownloadMap: () => import("./assets/download-map").DownloadMap;
|
|
136
|
-
cleanDownloadMap: (downloadMap: import("./assets/download-map").DownloadMap) =>
|
|
136
|
+
cleanDownloadMap: (downloadMap: import("./assets/download-map").DownloadMap) => void;
|
|
137
137
|
convertToPositiveFrameIndex: ({ frame, durationInFrames, }: {
|
|
138
138
|
frame: number;
|
|
139
139
|
durationInFrames: number;
|
|
@@ -38,28 +38,32 @@ const mergeAudioTrackUnlimited = async ({ ffmpegExecutable, outName, files, numb
|
|
|
38
38
|
if (files.length >= 32) {
|
|
39
39
|
const chunked = (0, chunk_1.chunk)(files, 10);
|
|
40
40
|
const tempPath = (0, tmp_dir_1.tmpDir)('remotion-large-audio-mixing');
|
|
41
|
-
|
|
42
|
-
const
|
|
41
|
+
try {
|
|
42
|
+
const chunkNames = await Promise.all(chunked.map(async (chunkFiles, i) => {
|
|
43
|
+
const chunkOutname = path_1.default.join(tempPath, `chunk-${i}.wav`);
|
|
44
|
+
await (0, exports.mergeAudioTrack)({
|
|
45
|
+
ffmpegExecutable,
|
|
46
|
+
files: chunkFiles,
|
|
47
|
+
numberOfSeconds,
|
|
48
|
+
outName: chunkOutname,
|
|
49
|
+
downloadMap,
|
|
50
|
+
remotionRoot,
|
|
51
|
+
});
|
|
52
|
+
return chunkOutname;
|
|
53
|
+
}));
|
|
43
54
|
await (0, exports.mergeAudioTrack)({
|
|
44
55
|
ffmpegExecutable,
|
|
45
|
-
files:
|
|
56
|
+
files: chunkNames,
|
|
46
57
|
numberOfSeconds,
|
|
47
|
-
outName
|
|
58
|
+
outName,
|
|
48
59
|
downloadMap,
|
|
49
60
|
remotionRoot,
|
|
50
61
|
});
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
numberOfSeconds,
|
|
57
|
-
outName,
|
|
58
|
-
downloadMap,
|
|
59
|
-
remotionRoot,
|
|
60
|
-
});
|
|
61
|
-
await (0, delete_directory_1.deleteDirectory)(tempPath);
|
|
62
|
-
return;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
(0, delete_directory_1.deleteDirectory)(tempPath);
|
|
66
|
+
}
|
|
63
67
|
}
|
|
64
68
|
const { complexFilterFlag: mergeFilter, cleanup } = await (0, create_ffmpeg_complex_filter_1.createFfmpegComplexFilter)(files.length, downloadMap);
|
|
65
69
|
const args = [
|
package/dist/render-frames.js
CHANGED
|
@@ -300,7 +300,11 @@ const renderFrames = (options) => {
|
|
|
300
300
|
remotion_1.Internals.validateDimension(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
|
301
301
|
remotion_1.Internals.validateDimension(composition.width, 'width', 'in the `config` object passed to `renderFrames()`');
|
|
302
302
|
remotion_1.Internals.validateFps(composition.fps, 'in the `config` object of `renderFrames()`', false);
|
|
303
|
-
remotion_1.Internals.validateDurationInFrames(
|
|
303
|
+
remotion_1.Internals.validateDurationInFrames({
|
|
304
|
+
durationInFrames: composition.durationInFrames,
|
|
305
|
+
component: 'in the `config` object passed to `renderFrames()`',
|
|
306
|
+
allowFloats: false,
|
|
307
|
+
});
|
|
304
308
|
if (options.quality !== undefined && options.imageFormat !== 'jpeg') {
|
|
305
309
|
throw new Error("You can only pass the `quality` option if `imageFormat` is 'jpeg'.");
|
|
306
310
|
}
|
|
@@ -324,6 +328,9 @@ const renderFrames = (options) => {
|
|
|
324
328
|
return new Promise((resolve, reject) => {
|
|
325
329
|
var _a, _b, _c;
|
|
326
330
|
const cleanup = [];
|
|
331
|
+
if (!options.downloadMap) {
|
|
332
|
+
cleanup.push(() => (0, download_map_1.cleanDownloadMap)(downloadMap));
|
|
333
|
+
}
|
|
327
334
|
const onError = (err) => {
|
|
328
335
|
reject(err);
|
|
329
336
|
};
|
package/dist/render-media.d.ts
CHANGED
|
@@ -60,13 +60,16 @@ export declare type RenderMediaOptions = {
|
|
|
60
60
|
cancelSignal?: CancelSignal;
|
|
61
61
|
browserExecutable?: BrowserExecutable;
|
|
62
62
|
verbose?: boolean;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
internal?: {
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Only for Remotion internal usage
|
|
66
|
+
*/
|
|
67
|
+
downloadMap?: DownloadMap;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Only for Remotion internal usage
|
|
70
|
+
*/
|
|
71
|
+
onCtrlCExit?: (fn: () => void) => void;
|
|
72
|
+
};
|
|
70
73
|
preferLossless?: boolean;
|
|
71
74
|
muted?: boolean;
|
|
72
75
|
enforceAudioTrack?: boolean;
|
package/dist/render-media.js
CHANGED
|
@@ -56,7 +56,7 @@ const getConcurrency = (others) => {
|
|
|
56
56
|
* @see [Documentation](https://www.remotion.dev/docs/renderer/render-media)
|
|
57
57
|
*/
|
|
58
58
|
const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprobeExecutable, inputProps, pixelFormat, codec, envVariables, frameRange, puppeteerInstance, outputLocation, onProgress, overwrite, onDownload, dumpBrowserLogs, onBrowserLog, onStart, timeoutInMilliseconds, chromiumOptions, scale, browserExecutable, port, cancelSignal, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, onSlowestFrames, audioCodec, ...options }) => {
|
|
59
|
-
var _a, _b, _c, _d, _e;
|
|
59
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
60
60
|
const remotionRoot = (0, find_closest_package_json_1.findRemotionRoot)();
|
|
61
61
|
(0, validate_ffmpeg_1.validateFfmpeg)(ffmpegExecutable !== null && ffmpegExecutable !== void 0 ? ffmpegExecutable : null, remotionRoot, 'ffmpeg');
|
|
62
62
|
(0, quality_1.validateQuality)(options.quality);
|
|
@@ -95,7 +95,7 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
95
95
|
let encodedDoneIn = null;
|
|
96
96
|
let cancelled = false;
|
|
97
97
|
const renderStart = Date.now();
|
|
98
|
-
const downloadMap = (_d = options.downloadMap) !== null &&
|
|
98
|
+
const downloadMap = (_e = (_d = options.internal) === null || _d === void 0 ? void 0 : _d.downloadMap) !== null && _e !== void 0 ? _e : (0, download_map_1.makeDownloadMap)();
|
|
99
99
|
const { estimatedUsage, freeMemory, hasEnoughMemory } = (0, prestitcher_memory_usage_1.shouldUseParallelEncoding)({
|
|
100
100
|
height: composition.height,
|
|
101
101
|
width: composition.width,
|
|
@@ -116,7 +116,7 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
116
116
|
}
|
|
117
117
|
const imageFormat = (0, is_audio_codec_1.isAudioCodec)(codec)
|
|
118
118
|
? 'none'
|
|
119
|
-
: (
|
|
119
|
+
: (_f = options.imageFormat) !== null && _f !== void 0 ? _f : 'jpeg';
|
|
120
120
|
const quality = imageFormat === 'jpeg' ? options.quality : undefined;
|
|
121
121
|
(0, image_format_1.validateSelectedPixelFormatAndImageFormatCombination)(pixelFormat, imageFormat);
|
|
122
122
|
const preEncodedFileLocation = parallelEncoding
|
|
@@ -125,6 +125,9 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
125
125
|
const outputDir = parallelEncoding
|
|
126
126
|
? null
|
|
127
127
|
: fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'react-motion-render'));
|
|
128
|
+
if (((_g = options.internal) === null || _g === void 0 ? void 0 : _g.onCtrlCExit) && outputDir) {
|
|
129
|
+
options.internal.onCtrlCExit(() => (0, delete_directory_1.deleteDirectory)(outputDir));
|
|
130
|
+
}
|
|
128
131
|
(0, validate_even_dimensions_with_codec_1.validateEvenDimensionsWithCodec)({
|
|
129
132
|
codec,
|
|
130
133
|
height: composition.height,
|
|
@@ -353,12 +356,13 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
353
356
|
throw err;
|
|
354
357
|
})
|
|
355
358
|
.finally(() => {
|
|
359
|
+
var _a;
|
|
356
360
|
if (preEncodedFileLocation !== null &&
|
|
357
361
|
fs_1.default.existsSync(preEncodedFileLocation)) {
|
|
358
362
|
(0, delete_directory_1.deleteDirectory)(path_1.default.dirname(preEncodedFileLocation));
|
|
359
363
|
}
|
|
360
364
|
// Clean download map if it was not passed in
|
|
361
|
-
if (!(options === null ||
|
|
365
|
+
if (!((_a = options.internal) === null || _a === void 0 ? void 0 : _a.downloadMap)) {
|
|
362
366
|
(0, download_map_1.cleanDownloadMap)(downloadMap);
|
|
363
367
|
}
|
|
364
368
|
// Clean temporary image frames when rendering ends or fails
|
package/dist/render-still.js
CHANGED
|
@@ -52,7 +52,11 @@ const innerRenderStill = async ({ composition, quality, imageFormat = 'png', ser
|
|
|
52
52
|
remotion_1.Internals.validateDimension(composition.height, 'height', 'in the `config` object passed to `renderStill()`');
|
|
53
53
|
remotion_1.Internals.validateDimension(composition.width, 'width', 'in the `config` object passed to `renderStill()`');
|
|
54
54
|
remotion_1.Internals.validateFps(composition.fps, 'in the `config` object of `renderStill()`', false);
|
|
55
|
-
remotion_1.Internals.validateDurationInFrames(
|
|
55
|
+
remotion_1.Internals.validateDurationInFrames({
|
|
56
|
+
durationInFrames: composition.durationInFrames,
|
|
57
|
+
component: 'in the `config` object passed to `renderStill()`',
|
|
58
|
+
allowFloats: false,
|
|
59
|
+
});
|
|
56
60
|
(0, image_format_1.validateNonNullImageFormat)(imageFormat);
|
|
57
61
|
remotion_1.Internals.validateFrame(frame, composition.durationInFrames);
|
|
58
62
|
const stillFrame = (0, convert_to_positive_frame_index_1.convertToPositiveFrameIndex)({
|
|
@@ -100,12 +100,10 @@ const getAssetsData = async ({ assets, onDownload, fps, expectedFrames, verbose,
|
|
|
100
100
|
remotionRoot,
|
|
101
101
|
});
|
|
102
102
|
onProgress(1);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}),
|
|
108
|
-
]);
|
|
103
|
+
(0, delete_directory_1.deleteDirectory)(downloadMap.audioMixing);
|
|
104
|
+
preprocessed.forEach((p) => {
|
|
105
|
+
(0, delete_directory_1.deleteDirectory)(p);
|
|
106
|
+
});
|
|
109
107
|
return outName;
|
|
110
108
|
};
|
|
111
109
|
const spawnFfmpeg = async (options, remotionRoot) => {
|
|
@@ -206,7 +204,7 @@ const spawnFfmpeg = async (options, remotionRoot) => {
|
|
|
206
204
|
await ffmpegTask;
|
|
207
205
|
(_p = options.onProgress) === null || _p === void 0 ? void 0 : _p.call(options, expectedFrames);
|
|
208
206
|
if (audio) {
|
|
209
|
-
|
|
207
|
+
(0, delete_directory_1.deleteDirectory)(path_1.default.dirname(audio));
|
|
210
208
|
}
|
|
211
209
|
const file = await new Promise((resolve, reject) => {
|
|
212
210
|
if (tempFile) {
|
|
@@ -221,7 +219,7 @@ const spawnFfmpeg = async (options, remotionRoot) => {
|
|
|
221
219
|
resolve(null);
|
|
222
220
|
}
|
|
223
221
|
});
|
|
224
|
-
|
|
222
|
+
(0, delete_directory_1.deleteDirectory)(options.assetsInfo.downloadMap.stitchFrames);
|
|
225
223
|
return {
|
|
226
224
|
getLogs: () => '',
|
|
227
225
|
task: Promise.resolve(file),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.60",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"execa": "5.1.1",
|
|
26
26
|
"extract-zip": "2.0.1",
|
|
27
|
-
"remotion": "3.3.
|
|
27
|
+
"remotion": "3.3.60",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.7.0"
|
|
30
30
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"vitest": "0.24.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
53
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
54
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
55
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
56
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
57
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
58
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
52
|
+
"@remotion/compositor-darwin-arm64": "3.3.60",
|
|
53
|
+
"@remotion/compositor-darwin-x64": "3.3.60",
|
|
54
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.60",
|
|
55
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.60",
|
|
56
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.60",
|
|
57
|
+
"@remotion/compositor-linux-x64-musl": "3.3.60",
|
|
58
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.60"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"remotion",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "60797b0861ef1017cec53ba656214cbc10db011b"
|
|
71
71
|
}
|