@remotion/renderer 4.0.106 → 4.0.108
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-and-map-assets-to-file.js +1 -7
- package/dist/assets/download-map.d.ts +3 -0
- package/dist/assets/download-map.js +13 -0
- package/dist/browser/Connection.js +0 -2
- package/dist/call-ffmpeg.d.ts +9 -0
- package/dist/call-ffmpeg.js +13 -1
- package/dist/check-apple-silicon.d.ts +3 -0
- package/dist/check-apple-silicon.js +42 -0
- package/dist/compositor/compose.js +4 -1
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/options/color-space.d.ts +1 -1
- package/dist/pixel-format.d.ts +1 -1
- package/dist/prepare-server.js +2 -0
- package/dist/pure.d.ts +3 -3
- package/dist/screenshot-task.js +4 -3
- package/dist/stitch-frames-to-video.js +32 -31
- package/dist/validate-output-filename.d.ts +1 -1
- package/package.json +9 -9
|
@@ -37,9 +37,6 @@ const download_file_1 = require("./download-file");
|
|
|
37
37
|
const sanitize_filepath_1 = require("./sanitize-filepath");
|
|
38
38
|
const waitForAssetToBeDownloaded = ({ src, downloadDir, downloadMap, }) => {
|
|
39
39
|
var _a, _b;
|
|
40
|
-
if (process.env.NODE_ENV === 'test') {
|
|
41
|
-
console.log('waiting for asset to be downloaded', src);
|
|
42
|
-
}
|
|
43
40
|
if ((_a = downloadMap.hasBeenDownloadedMap[src]) === null || _a === void 0 ? void 0 : _a[downloadDir]) {
|
|
44
41
|
return Promise.resolve((_b = downloadMap.hasBeenDownloadedMap[src]) === null || _b === void 0 ? void 0 : _b[downloadDir]);
|
|
45
42
|
}
|
|
@@ -142,9 +139,6 @@ const downloadAsset = async ({ src, downloadMap, indent, logLevel, }) => {
|
|
|
142
139
|
downloadMap.isDownloadingMap[src] = {};
|
|
143
140
|
}
|
|
144
141
|
downloadMap.isDownloadingMap[src][downloadDir] = true;
|
|
145
|
-
if (process.env.NODE_ENV === 'test') {
|
|
146
|
-
console.log('Actually downloading asset', src);
|
|
147
|
-
}
|
|
148
142
|
downloadMap.emitter.dispatchDownload(src);
|
|
149
143
|
if (src.startsWith('data:')) {
|
|
150
144
|
const [assetDetails, assetData] = src.substring('data:'.length).split(',');
|
|
@@ -238,7 +232,7 @@ const getSanitizedFilenameForAssetUrl = ({ src, downloadDir, contentDisposition,
|
|
|
238
232
|
const fileExtension = split.length > 1 && split[split.length - 1]
|
|
239
233
|
? `.${split[split.length - 1]}`
|
|
240
234
|
: '';
|
|
241
|
-
const hashedFileName = String((0, no_react_1.random)(`${pathname}${search}`)).replace('0.', '');
|
|
235
|
+
const hashedFileName = String((0, no_react_1.random)(`${src}${pathname}${search}`)).replace('0.', '');
|
|
242
236
|
const filename = hashedFileName + fileExtension;
|
|
243
237
|
return node_path_1.default.join(downloadDir, (0, sanitize_filepath_1.sanitizeFilePath)(filename));
|
|
244
238
|
};
|
|
@@ -45,6 +45,7 @@ const makeDownloadMap = () => {
|
|
|
45
45
|
const dir = (0, tmp_dir_1.tmpDir)(packageJson
|
|
46
46
|
? `remotion-v${packageJson.version.replace(/\./g, '-')}-assets`
|
|
47
47
|
: 'remotion-assets');
|
|
48
|
+
let prevented = false;
|
|
48
49
|
return {
|
|
49
50
|
isDownloadingMap: {},
|
|
50
51
|
hasBeenDownloadedMap: {},
|
|
@@ -62,10 +63,22 @@ const makeDownloadMap = () => {
|
|
|
62
63
|
compositingDir: makeAndReturn(dir, 'remotion-compositing-temp-dir'),
|
|
63
64
|
compositorCache: {},
|
|
64
65
|
emitter: new offthread_video_server_1.OffthreadVideoServerEmitter(),
|
|
66
|
+
preventCleanup: () => {
|
|
67
|
+
prevented = true;
|
|
68
|
+
},
|
|
69
|
+
allowCleanup: () => {
|
|
70
|
+
prevented = false;
|
|
71
|
+
},
|
|
72
|
+
isPreventedFromCleanup: () => {
|
|
73
|
+
return prevented;
|
|
74
|
+
},
|
|
65
75
|
};
|
|
66
76
|
};
|
|
67
77
|
exports.makeDownloadMap = makeDownloadMap;
|
|
68
78
|
const cleanDownloadMap = (downloadMap) => {
|
|
79
|
+
if (downloadMap.isPreventedFromCleanup()) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
69
82
|
(0, delete_directory_1.deleteDirectory)(downloadMap.downloadDir);
|
|
70
83
|
(0, delete_directory_1.deleteDirectory)(downloadMap.complexFilter);
|
|
71
84
|
(0, delete_directory_1.deleteDirectory)(downloadMap.compositingDir);
|
|
@@ -29,7 +29,6 @@ exports.CDPSession = exports.CDPSessionEmittedEvents = exports.Connection = void
|
|
|
29
29
|
* limitations under the License.
|
|
30
30
|
*/
|
|
31
31
|
const logger_1 = require("../logger");
|
|
32
|
-
const assert_1 = require("./assert");
|
|
33
32
|
const Errors_1 = require("./Errors");
|
|
34
33
|
const EventEmitter_1 = require("./EventEmitter");
|
|
35
34
|
const ConnectionEmittedEvents = {
|
|
@@ -228,7 +227,6 @@ class CDPSession extends EventEmitter_1.EventEmitter {
|
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
else {
|
|
231
|
-
(0, assert_1.assert)(!object.id);
|
|
232
230
|
this.emit(object.method, object.params);
|
|
233
231
|
}
|
|
234
232
|
}
|
package/dist/call-ffmpeg.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import execa from 'execa';
|
|
3
|
+
import type { SpawnOptionsWithoutStdio } from 'node:child_process';
|
|
2
4
|
import type { LogLevel } from './log-level';
|
|
3
5
|
export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
|
|
4
6
|
bin: 'ffmpeg' | 'ffprobe';
|
|
@@ -7,3 +9,10 @@ export declare const callFf: ({ args, bin, indent, logLevel, options, }: {
|
|
|
7
9
|
logLevel: LogLevel;
|
|
8
10
|
options?: execa.Options<string> | undefined;
|
|
9
11
|
}) => execa.ExecaChildProcess<string>;
|
|
12
|
+
export declare const callFfNative: ({ args, bin, indent, logLevel, options, }: {
|
|
13
|
+
bin: 'ffmpeg' | 'ffprobe';
|
|
14
|
+
args: (string | null)[];
|
|
15
|
+
indent: boolean;
|
|
16
|
+
logLevel: LogLevel;
|
|
17
|
+
options?: SpawnOptionsWithoutStdio | undefined;
|
|
18
|
+
}) => import("child_process").ChildProcessWithoutNullStreams;
|
package/dist/call-ffmpeg.js
CHANGED
|
@@ -3,8 +3,9 @@ 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.callFf = void 0;
|
|
6
|
+
exports.callFfNative = exports.callFf = void 0;
|
|
7
7
|
const execa_1 = __importDefault(require("execa"));
|
|
8
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
9
|
const node_fs_1 = require("node:fs");
|
|
9
10
|
const path_1 = __importDefault(require("path"));
|
|
10
11
|
const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
@@ -20,3 +21,14 @@ const callFf = ({ args, bin, indent, logLevel, options, }) => {
|
|
|
20
21
|
});
|
|
21
22
|
};
|
|
22
23
|
exports.callFf = callFf;
|
|
24
|
+
const callFfNative = ({ args, bin, indent, logLevel, options, }) => {
|
|
25
|
+
const executablePath = (0, get_executable_path_1.getExecutablePath)(bin, indent, logLevel);
|
|
26
|
+
if (!process.env.READ_ONLY_FS) {
|
|
27
|
+
(0, node_fs_1.chmodSync)(executablePath, 0o755);
|
|
28
|
+
}
|
|
29
|
+
return (0, node_child_process_1.spawn)(executablePath, args.filter(truthy_1.truthy), {
|
|
30
|
+
cwd: path_1.default.dirname(executablePath),
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.callFfNative = callFfNative;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkNodeVersionAndWarnAboutRosetta = exports.gLibCErrorMessage = void 0;
|
|
4
|
+
const logger_1 = require("./logger");
|
|
5
|
+
const gLibCErrorMessage = (libCString) => {
|
|
6
|
+
const split = libCString.split('.');
|
|
7
|
+
if (split.length !== 2) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if (split[0] === '2' && Number(split[1]) >= 35) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
if (Number(split[0]) > 2) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return `Rendering videos requires glibc 2.35 or higher. Your system has glibc ${libCString}.`;
|
|
17
|
+
};
|
|
18
|
+
exports.gLibCErrorMessage = gLibCErrorMessage;
|
|
19
|
+
const checkLibCRequirement = (logLevel, indent) => {
|
|
20
|
+
const { report } = process;
|
|
21
|
+
if (report) {
|
|
22
|
+
// @ts-expect-error no types
|
|
23
|
+
const { glibcVersionRuntime } = report.getReport().header;
|
|
24
|
+
if (!glibcVersionRuntime) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const error = (0, exports.gLibCErrorMessage)(glibcVersionRuntime);
|
|
28
|
+
if (error) {
|
|
29
|
+
logger_1.Log.warn({ logLevel, indent }, error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const checkNodeVersionAndWarnAboutRosetta = (logLevel, indent) => {
|
|
34
|
+
const version = process.version.replace('v', '').split('.');
|
|
35
|
+
const majorVersion = Number(version[0]);
|
|
36
|
+
const requiredNodeVersion = 16;
|
|
37
|
+
if (majorVersion < 16) {
|
|
38
|
+
throw new Error(`Remotion requires at least Node ${requiredNodeVersion}. You currently have ${process.version}. Update your node version to ${requiredNodeVersion} to use Remotion.`);
|
|
39
|
+
}
|
|
40
|
+
checkLibCRequirement(logLevel, indent);
|
|
41
|
+
};
|
|
42
|
+
exports.checkNodeVersionAndWarnAboutRosetta = checkNodeVersionAndWarnAboutRosetta;
|
|
@@ -88,7 +88,10 @@ const callCompositor = (payload, indent, logLevel) => {
|
|
|
88
88
|
try {
|
|
89
89
|
child.stdin.write(payload, (e) => {
|
|
90
90
|
if (e) {
|
|
91
|
-
|
|
91
|
+
if (e instanceof Error && e.message.includes('EPIPE')) {
|
|
92
|
+
reject(new Error('Compositor stdin closed unexpectedly,' +
|
|
93
|
+
Buffer.concat(stderrChunks).toString('utf-8')));
|
|
94
|
+
}
|
|
92
95
|
return;
|
|
93
96
|
}
|
|
94
97
|
child.stdin.end();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
2
|
import type { Codec } from './codec';
|
|
3
3
|
import type { FileExtension } from './file-extensions';
|
|
4
|
-
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
export declare const getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: AudioCodec | null) => FileExtension;
|
|
5
|
+
export declare const makeFileExtensionMap: () => Record<string, ("h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif")[]>;
|
|
6
6
|
export declare const defaultCodecsForFileExtension: Record<FileExtension, Codec>;
|
|
@@ -6,6 +6,6 @@ export declare const colorSpaceOption: {
|
|
|
6
6
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
docLink: string;
|
|
8
8
|
ssrName: string;
|
|
9
|
-
type: "
|
|
9
|
+
type: "default" | "bt709" | "bt2020-ncl";
|
|
10
10
|
};
|
|
11
11
|
export declare const validateColorSpace: (option: unknown) => void;
|
package/dist/pixel-format.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { Codec } from './codec';
|
|
|
2
2
|
export declare const validPixelFormats: readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"];
|
|
3
3
|
export type PixelFormat = (typeof validPixelFormats)[number];
|
|
4
4
|
export declare const DEFAULT_PIXEL_FORMAT: PixelFormat;
|
|
5
|
-
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "
|
|
5
|
+
export declare const validPixelFormatsForCodec: (codec: Codec) => readonly ["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"] | ("yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le")[];
|
|
6
6
|
export declare const validateSelectedPixelFormatAndCodecCombination: (pixelFormat: PixelFormat | undefined, codec: Codec) => undefined;
|
package/dist/prepare-server.js
CHANGED
|
@@ -83,6 +83,8 @@ const prepareServer = async ({ webpackConfigOrServeUrl, port, remotionRoot, conc
|
|
|
83
83
|
}
|
|
84
84
|
return close();
|
|
85
85
|
},
|
|
86
|
+
// This should be kept localhost, even if the server is bound to ::1,
|
|
87
|
+
// to prevent "Failed to load resource: net::ERR_FAILED Access to image at 'http://localhost:3000/proxy?src=http%3A%2F%2F%5B%3A%3A%5D%3A3000%2Fpublic%2Fframer.webm&time=0&transparent=false' from origin 'http://[::]:3000' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`".
|
|
86
88
|
serveUrl: `http://localhost:${serverPort}`,
|
|
87
89
|
offthreadPort: serverPort,
|
|
88
90
|
compositor,
|
package/dist/pure.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const NoReactAPIs: {
|
|
2
2
|
wrapWithErrorHandling: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
|
|
3
3
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
|
4
|
-
getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
5
|
-
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
4
|
+
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;
|
|
5
|
+
validateOutputFilename: <T_1 extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
6
6
|
codec: T_1;
|
|
7
|
-
audioCodec: "
|
|
7
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
8
8
|
extension: string;
|
|
9
9
|
preferLossless: boolean;
|
|
10
10
|
}) => void;
|
package/dist/screenshot-task.js
CHANGED
|
@@ -56,12 +56,13 @@ const screenshotTask = async ({ format, height, omitBackground, page, width, pat
|
|
|
56
56
|
width,
|
|
57
57
|
},
|
|
58
58
|
captureBeyondViewport: true,
|
|
59
|
-
optimizeForSpeed:
|
|
59
|
+
optimizeForSpeed: true,
|
|
60
60
|
// We find that there is a 0.1% framedrop when rendering under memory pressure
|
|
61
61
|
// which can be circumvented by disabling this option on Lambda.
|
|
62
|
-
// To be determined: Is this a problem with Lambda,
|
|
62
|
+
// To be determined: Is this a problem with Lambda, or the Chrome version
|
|
63
63
|
// we are using on Lambda?
|
|
64
|
-
|
|
64
|
+
// We already found out that the problem is not a general Linux problem.
|
|
65
|
+
fromSurface: !process.env.DISABLE_FROM_SURFACE,
|
|
65
66
|
});
|
|
66
67
|
result = value;
|
|
67
68
|
}
|
|
@@ -11,6 +11,7 @@ const version_1 = require("remotion/version");
|
|
|
11
11
|
const calculate_asset_positions_1 = require("./assets/calculate-asset-positions");
|
|
12
12
|
const convert_assets_to_file_urls_1 = require("./assets/convert-assets-to-file-urls");
|
|
13
13
|
const download_and_map_assets_to_file_1 = require("./assets/download-and-map-assets-to-file");
|
|
14
|
+
const download_map_1 = require("./assets/download-map");
|
|
14
15
|
const audio_codec_1 = require("./audio-codec");
|
|
15
16
|
const call_ffmpeg_1 = require("./call-ffmpeg");
|
|
16
17
|
const codec_1 = require("./codec");
|
|
@@ -101,6 +102,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
101
102
|
// encodingBufferSize is not a bitrate but need to be validated using the same format
|
|
102
103
|
(0, validate_videobitrate_1.validateBitrate)(encodingBufferSize, 'encodingBufferSize');
|
|
103
104
|
(0, validate_1.validateFps)(fps, 'in `stitchFramesToVideo()`', false);
|
|
105
|
+
assetsInfo.downloadMap.preventCleanup();
|
|
104
106
|
const proResProfileName = (0, get_prores_profile_name_1.getProResProfileName)(codec, proResProfile);
|
|
105
107
|
const mediaSupport = (0, codec_supports_media_1.codecSupportsMedia)(codec);
|
|
106
108
|
const shouldRenderAudio = mediaSupport.audio &&
|
|
@@ -208,10 +210,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
208
210
|
}
|
|
209
211
|
});
|
|
210
212
|
(0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.stitchFrames);
|
|
211
|
-
return
|
|
212
|
-
getLogs: () => '',
|
|
213
|
-
task: Promise.resolve(file),
|
|
214
|
-
};
|
|
213
|
+
return Promise.resolve(file);
|
|
215
214
|
}
|
|
216
215
|
const ffmpegArgs = [
|
|
217
216
|
...(preEncodedFileLocation
|
|
@@ -269,7 +268,7 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
269
268
|
logLevel,
|
|
270
269
|
tag: 'stitchFramesToVideo()',
|
|
271
270
|
}, finalFfmpegString.join(' '));
|
|
272
|
-
const task = (0, call_ffmpeg_1.
|
|
271
|
+
const task = (0, call_ffmpeg_1.callFfNative)({
|
|
273
272
|
bin: 'ffmpeg',
|
|
274
273
|
args: finalFfmpegString,
|
|
275
274
|
indent,
|
|
@@ -278,12 +277,12 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
278
277
|
cancelSignal === null || cancelSignal === void 0 ? void 0 : cancelSignal(() => {
|
|
279
278
|
task.kill();
|
|
280
279
|
});
|
|
281
|
-
let
|
|
280
|
+
let ffmpegStderr = '';
|
|
282
281
|
let isFinished = false;
|
|
283
282
|
(_a = task.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
284
283
|
var _a;
|
|
285
284
|
const str = data.toString();
|
|
286
|
-
|
|
285
|
+
ffmpegStderr += str;
|
|
287
286
|
if (onProgress) {
|
|
288
287
|
const parsed = (0, parse_ffmpeg_progress_1.parseFfmpegProgress)(str);
|
|
289
288
|
// FFMPEG bug: In some cases, FFMPEG does hang after it is finished with it's job
|
|
@@ -302,35 +301,37 @@ const innerStitchFramesToVideo = async ({ assetsInfo, audioBitrate, audioCodec,
|
|
|
302
301
|
}
|
|
303
302
|
}
|
|
304
303
|
});
|
|
305
|
-
return {
|
|
306
|
-
task
|
|
307
|
-
(0
|
|
308
|
-
|
|
309
|
-
(
|
|
310
|
-
|
|
304
|
+
return new Promise((resolve, reject) => {
|
|
305
|
+
task.once('close', (code, signal) => {
|
|
306
|
+
if (code === 0) {
|
|
307
|
+
assetsInfo.downloadMap.allowCleanup();
|
|
308
|
+
if (tempFile === null) {
|
|
309
|
+
(0, download_map_1.cleanDownloadMap)(assetsInfo.downloadMap);
|
|
310
|
+
return resolve(null);
|
|
311
|
+
}
|
|
312
|
+
node_fs_1.promises
|
|
313
|
+
.readFile(tempFile)
|
|
314
|
+
.then((f) => {
|
|
315
|
+
resolve(f);
|
|
316
|
+
})
|
|
317
|
+
.catch((e) => {
|
|
318
|
+
reject(e);
|
|
319
|
+
})
|
|
320
|
+
.finally(() => {
|
|
321
|
+
(0, download_map_1.cleanDownloadMap)(assetsInfo.downloadMap);
|
|
322
|
+
});
|
|
311
323
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
(0, delete_directory_1.deleteDirectory)(node_path_1.default.dirname(tempFile)),
|
|
318
|
-
(0, delete_directory_1.deleteDirectory)(assetsInfo.downloadMap.stitchFrames),
|
|
319
|
-
]);
|
|
320
|
-
})
|
|
321
|
-
.then(([file]) => file);
|
|
322
|
-
}),
|
|
323
|
-
getLogs: () => ffmpegOutput,
|
|
324
|
-
};
|
|
324
|
+
else {
|
|
325
|
+
reject(new Error(`FFmpeg quit with code ${code} ${signal ? `(${signal})` : ''} The FFmpeg output was ${ffmpegStderr}`));
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
});
|
|
325
329
|
};
|
|
326
330
|
const internalStitchFramesToVideo = async (options) => {
|
|
327
331
|
const remotionRoot = (0, find_closest_package_json_1.findRemotionRoot)();
|
|
328
|
-
const
|
|
329
|
-
const happyPath = task.catch(() => {
|
|
330
|
-
throw new Error(getLogs());
|
|
331
|
-
});
|
|
332
|
+
const task = await innerStitchFramesToVideo(options, remotionRoot);
|
|
332
333
|
return Promise.race([
|
|
333
|
-
|
|
334
|
+
task,
|
|
334
335
|
new Promise((_resolve, reject) => {
|
|
335
336
|
var _a;
|
|
336
337
|
(_a = options.cancelSignal) === null || _a === void 0 ? void 0 : _a.call(options, () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec } from './audio-codec';
|
|
2
|
-
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "
|
|
2
|
+
export declare const validateOutputFilename: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">({ codec, audioCodec, extension, preferLossless, }: {
|
|
3
3
|
codec: T;
|
|
4
4
|
audioCodec: AudioCodec | null;
|
|
5
5
|
extension: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.108",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.108"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-
|
|
44
|
-
"@remotion/compositor-darwin-
|
|
45
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-
|
|
48
|
-
"@remotion/compositor-
|
|
49
|
-
"@remotion/compositor-linux-
|
|
43
|
+
"@remotion/compositor-darwin-arm64": "4.0.108",
|
|
44
|
+
"@remotion/compositor-darwin-x64": "4.0.108",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.108",
|
|
46
|
+
"@remotion/compositor-linux-x64-musl": "4.0.108",
|
|
47
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.108",
|
|
48
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.108",
|
|
49
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.108"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|