@remotion/renderer 2.6.3 → 2.6.4
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 +3 -3
- package/dist/assets/download-and-map-assets-to-file.js.map +1 -1
- package/dist/assets/sanitize-filename.d.ts +2 -0
- package/dist/assets/sanitize-filename.d.ts.map +1 -0
- package/dist/assets/sanitize-filename.js +59 -0
- package/dist/assets/sanitize-filename.js.map +1 -0
- package/dist/assets/sanitize-filepath.d.ts +2 -0
- package/dist/assets/sanitize-filepath.d.ts.map +1 -0
- package/dist/assets/sanitize-filepath.js +16 -0
- package/dist/assets/sanitize-filepath.js.map +1 -0
- package/dist/assets/truncate-utf8-bytes.d.ts +2 -0
- package/dist/assets/truncate-utf8-bytes.d.ts.map +1 -0
- package/dist/assets/truncate-utf8-bytes.js +38 -0
- package/dist/assets/truncate-utf8-bytes.js.map +1 -0
- package/dist/get-pro-res-profile-name.d.ts +3 -0
- package/dist/get-pro-res-profile-name.d.ts.map +1 -0
- package/dist/get-pro-res-profile-name.js +26 -0
- package/dist/get-pro-res-profile-name.js.map +1 -0
- package/dist/render-video.d.ts +8 -7
- package/dist/render-video.d.ts.map +1 -1
- package/dist/render-video.js +24 -55
- package/dist/render-video.js.map +1 -1
- package/dist/run-ffmpeg-command.d.ts +6 -0
- package/dist/run-ffmpeg-command.d.ts.map +1 -0
- package/dist/run-ffmpeg-command.js +25 -0
- package/dist/run-ffmpeg-command.js.map +1 -0
- package/package.json +4 -5
- package/dist/convert-mp3-to-pcm.d.ts +0 -7
- package/dist/convert-mp3-to-pcm.d.ts.map +0 -1
- package/dist/convert-mp3-to-pcm.js +0 -41
- package/dist/convert-mp3-to-pcm.js.map +0 -1
- package/dist/handle-null-audio.d.ts +0 -1
- package/dist/handle-null-audio.d.ts.map +0 -1
- package/dist/handle-null-audio.js +0 -2
- package/dist/handle-null-audio.js.map +0 -1
- package/dist/is-local-file.d.ts +0 -2
- package/dist/is-local-file.d.ts.map +0 -1
- package/dist/is-local-file.js +0 -13
- package/dist/is-local-file.js.map +0 -1
- package/dist/validate-frame.d.ts +0 -2
- package/dist/validate-frame.d.ts.map +0 -1
- package/dist/validate-frame.js +0 -25
- package/dist/validate-frame.js.map +0 -1
- package/dist/validate-quality.d.ts +0 -1
- package/dist/validate-quality.d.ts.map +0 -1
- package/dist/validate-quality.js +0 -2
- package/dist/validate-quality.js.map +0 -1
|
@@ -9,7 +9,7 @@ const fs_2 = require("fs");
|
|
|
9
9
|
const got_1 = __importDefault(require("got"));
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
11
|
const remotion_1 = require("remotion");
|
|
12
|
-
const
|
|
12
|
+
const sanitize_filepath_1 = require("./sanitize-filepath");
|
|
13
13
|
const isDownloadingMap = {};
|
|
14
14
|
const hasBeenDownloadedMap = {};
|
|
15
15
|
const listeners = {};
|
|
@@ -129,14 +129,14 @@ const getSanitizedFilenameForAssetUrl = ({ src, isRemote, webpackBundle, }) => {
|
|
|
129
129
|
}
|
|
130
130
|
const { pathname, search } = new URL(src);
|
|
131
131
|
if (!isRemote) {
|
|
132
|
-
return path_1.default.join(webpackBundle, (0,
|
|
132
|
+
return path_1.default.join(webpackBundle, (0, sanitize_filepath_1.sanitizeFilePath)(pathname));
|
|
133
133
|
}
|
|
134
134
|
const split = pathname.split('.');
|
|
135
135
|
const fileExtension = split.length > 1 && split[split.length - 1]
|
|
136
136
|
? `.${split[split.length - 1]}`
|
|
137
137
|
: '';
|
|
138
138
|
const hashedFileName = String((0, remotion_1.random)(`${pathname}${search}`)).replace('0.', '');
|
|
139
|
-
return path_1.default.join(webpackBundle, (0,
|
|
139
|
+
return path_1.default.join(webpackBundle, (0, sanitize_filepath_1.sanitizeFilePath)(hashedFileName + fileExtension));
|
|
140
140
|
};
|
|
141
141
|
exports.getSanitizedFilenameForAssetUrl = getSanitizedFilenameForAssetUrl;
|
|
142
142
|
const downloadAndMapAssetsToFileUrl = async ({ localhostAsset, webpackBundle, onDownload, }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-and-map-assets-to-file.js","sourceRoot":"","sources":["../../src/assets/download-and-map-assets-to-file.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,2BAAgD;AAChD,8CAAsB;AACtB,gDAAwB;AAExB,uCAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"download-and-map-assets-to-file.js","sourceRoot":"","sources":["../../src/assets/download-and-map-assets-to-file.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,2BAAgD;AAChD,8CAAsB;AACtB,gDAAwB;AAExB,uCAAmD;AACnD,2DAAqD;AAErD,MAAM,gBAAgB,GAA6B,EAAE,CAAC;AACtD,MAAM,oBAAoB,GAA6B,EAAE,CAAC;AAC1D,MAAM,SAAS,GAAoC,EAAE,CAAC;AAEtD,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QACpB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;KACpB;IAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACpC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC/C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QACpB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;KACpB;IAED,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACrC,gBAAgB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC9B,oBAAoB,CAAC,GAAG,CAAC,GAAG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;AA1BW,QAAA,6BAA6B,iCA0BxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-filename.d.ts","sourceRoot":"","sources":["../../src/assets/sanitize-filename.ts"],"names":[],"mappings":"AAoDA,eAAO,MAAM,gBAAgB,UAAW,MAAM,WAQ7C,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Inlined from https://github.com/parshap/node-sanitize-filename/blob/master/index.js
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.sanitizeFilename = void 0;
|
|
5
|
+
const truncate_utf8_bytes_1 = require("./truncate-utf8-bytes");
|
|
6
|
+
/**
|
|
7
|
+
* Replaces characters in strings that are illegal/unsafe for filenames.
|
|
8
|
+
* Unsafe characters are either removed or replaced by a substitute set
|
|
9
|
+
* in the optional `options` object.
|
|
10
|
+
*
|
|
11
|
+
* Illegal Characters on Various Operating Systems
|
|
12
|
+
* / ? < > \ : * | "
|
|
13
|
+
* https://kb.acronis.com/content/39790
|
|
14
|
+
*
|
|
15
|
+
* Unicode Control codes
|
|
16
|
+
* C0 0x00-0x1f & C1 (0x80-0x9f)
|
|
17
|
+
* http://en.wikipedia.org/wiki/C0_and_C1_control_codes
|
|
18
|
+
*
|
|
19
|
+
* Reserved filenames on Unix-based systems (".", "..")
|
|
20
|
+
* Reserved filenames in Windows ("CON", "PRN", "AUX", "NUL", "COM1",
|
|
21
|
+
* "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
|
|
22
|
+
* "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and
|
|
23
|
+
* "LPT9") case-insesitively and with or without filename extensions.
|
|
24
|
+
*
|
|
25
|
+
* Capped at 255 characters in length.
|
|
26
|
+
* http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
|
|
27
|
+
*
|
|
28
|
+
* @param {String} input Original filename
|
|
29
|
+
* @param {Object} options {replacement: String | Function }
|
|
30
|
+
* @return {String} Sanitized filename
|
|
31
|
+
*/
|
|
32
|
+
const illegalRe = /[/?<>\\:*|"]/g;
|
|
33
|
+
// eslint-disable-next-line no-control-regex
|
|
34
|
+
const controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
|
35
|
+
const reservedRe = /^\.+$/;
|
|
36
|
+
const windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
|
|
37
|
+
const windowsTrailingRe = /[. ]+$/;
|
|
38
|
+
function sanitize(input, replacement) {
|
|
39
|
+
if (typeof input !== 'string') {
|
|
40
|
+
throw new Error('Input must be string');
|
|
41
|
+
}
|
|
42
|
+
const sanitized = input
|
|
43
|
+
.replace(illegalRe, replacement)
|
|
44
|
+
.replace(controlRe, replacement)
|
|
45
|
+
.replace(reservedRe, replacement)
|
|
46
|
+
.replace(windowsReservedRe, replacement)
|
|
47
|
+
.replace(windowsTrailingRe, replacement);
|
|
48
|
+
return (0, truncate_utf8_bytes_1.truncateUtf8Bytes)(sanitized, 255);
|
|
49
|
+
}
|
|
50
|
+
const sanitizeFilename = (input) => {
|
|
51
|
+
const replacement = '';
|
|
52
|
+
const output = sanitize(input, replacement);
|
|
53
|
+
if (replacement === '') {
|
|
54
|
+
return output;
|
|
55
|
+
}
|
|
56
|
+
return sanitize(output, '');
|
|
57
|
+
};
|
|
58
|
+
exports.sanitizeFilename = sanitizeFilename;
|
|
59
|
+
//# sourceMappingURL=sanitize-filename.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-filename.js","sourceRoot":"","sources":["../../src/assets/sanitize-filename.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+DAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,SAAS,GAAG,eAAe,CAAC;AAClC,4CAA4C;AAC5C,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,MAAM,UAAU,GAAG,OAAO,CAAC;AAC3B,MAAM,iBAAiB,GAAG,+CAA+C,CAAC;AAC1E,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC,SAAS,QAAQ,CAAC,KAAa,EAAE,WAAmB;IACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACxC;IAED,MAAM,SAAS,GAAG,KAAK;SACrB,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC;SAC/B,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC;SAC/B,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC;SAChC,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC;SACvC,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAC1C,OAAO,IAAA,uCAAiB,EAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC1C,CAAC;AAEM,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;IACjD,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC5C,IAAI,WAAW,KAAK,EAAE,EAAE;QACvB,OAAO,MAAM,CAAC;KACd;IAED,OAAO,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-filepath.d.ts","sourceRoot":"","sources":["../../src/assets/sanitize-filepath.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,WAKtD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sanitizeFilePath = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const sanitize_filename_1 = require("./sanitize-filename");
|
|
9
|
+
const sanitizeFilePath = (pathToSanitize) => {
|
|
10
|
+
return pathToSanitize
|
|
11
|
+
.split(path_1.default.sep)
|
|
12
|
+
.map((s) => (0, sanitize_filename_1.sanitizeFilename)(s))
|
|
13
|
+
.join(path_1.default.sep);
|
|
14
|
+
};
|
|
15
|
+
exports.sanitizeFilePath = sanitizeFilePath;
|
|
16
|
+
//# sourceMappingURL=sanitize-filepath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-filepath.js","sourceRoot":"","sources":["../../src/assets/sanitize-filepath.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,2DAAqD;AAE9C,MAAM,gBAAgB,GAAG,CAAC,cAAsB,EAAE,EAAE;IAC1D,OAAO,cAAc;SACnB,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,oCAAgB,EAAC,CAAC,CAAC,CAAC;SAC/B,IAAI,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncate-utf8-bytes.d.ts","sourceRoot":"","sources":["../../src/assets/truncate-utf8-bytes.ts"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAkCnE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.truncateUtf8Bytes = void 0;
|
|
4
|
+
function isHighSurrogate(codePoint) {
|
|
5
|
+
return codePoint >= 0xd800 && codePoint <= 0xdbff;
|
|
6
|
+
}
|
|
7
|
+
function isLowSurrogate(codePoint) {
|
|
8
|
+
return codePoint >= 0xdc00 && codePoint <= 0xdfff;
|
|
9
|
+
}
|
|
10
|
+
const getLength = Buffer.byteLength.bind(Buffer);
|
|
11
|
+
function truncateUtf8Bytes(string, byteLength) {
|
|
12
|
+
if (typeof string !== 'string') {
|
|
13
|
+
throw new Error('Input must be string');
|
|
14
|
+
}
|
|
15
|
+
const charLength = string.length;
|
|
16
|
+
let curByteLength = 0;
|
|
17
|
+
let codePoint;
|
|
18
|
+
let segment;
|
|
19
|
+
for (let i = 0; i < charLength; i += 1) {
|
|
20
|
+
codePoint = string.charCodeAt(i);
|
|
21
|
+
segment = string[i];
|
|
22
|
+
if (isHighSurrogate(codePoint) &&
|
|
23
|
+
isLowSurrogate(string.charCodeAt(i + 1))) {
|
|
24
|
+
i += 1;
|
|
25
|
+
segment += string[i];
|
|
26
|
+
}
|
|
27
|
+
curByteLength += getLength(segment);
|
|
28
|
+
if (curByteLength === byteLength) {
|
|
29
|
+
return string.slice(0, i + 1);
|
|
30
|
+
}
|
|
31
|
+
if (curByteLength > byteLength) {
|
|
32
|
+
return string.slice(0, i - segment.length + 1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return string;
|
|
36
|
+
}
|
|
37
|
+
exports.truncateUtf8Bytes = truncateUtf8Bytes;
|
|
38
|
+
//# sourceMappingURL=truncate-utf8-bytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncate-utf8-bytes.js","sourceRoot":"","sources":["../../src/assets/truncate-utf8-bytes.ts"],"names":[],"mappings":";;;AAAA,SAAS,eAAe,CAAC,SAAiB;IACzC,OAAO,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC;AACnD,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACxC,OAAO,SAAS,IAAI,MAAM,I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ts","sourceRoot":"","sources":["../src/get-pro-res-profile-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,oBAAoB,UACzB,KAAK,iBACG,aAAa,GAAG,SAAS,KACtC,MAAM,GAAG,IAqBX,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProResProfileName = void 0;
|
|
4
|
+
const getProResProfileName = (codec, proResProfile) => {
|
|
5
|
+
if (codec !== 'prores') {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
switch (proResProfile) {
|
|
9
|
+
case '4444-xq':
|
|
10
|
+
return '5';
|
|
11
|
+
case '4444':
|
|
12
|
+
return '4';
|
|
13
|
+
case 'hq':
|
|
14
|
+
return '3';
|
|
15
|
+
case 'standard':
|
|
16
|
+
return '2';
|
|
17
|
+
case 'light':
|
|
18
|
+
return '1';
|
|
19
|
+
case 'proxy':
|
|
20
|
+
return '0';
|
|
21
|
+
default:
|
|
22
|
+
return '3';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.getProResProfileName = getProResProfileName;
|
|
26
|
+
//# sourceMappingURL=get-pro-res-profile-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pro-res-profile-name.js","sourceRoot":"","sources":["../src/get-pro-res-profile-name.ts"],"names":[],"mappings":";;;AAEO,MAAM,oBAAoB,GAAG,CACnC,KAAY,EACZ,aAAwC,EACxB,EAAE;IAClB,IAAI,KAAK,KAAK,QAAQ,EAAE;QACvB,OAAO,IAAI,CAAC;KACZ;IAED,QAAQ,aAAa,EAAE;QACtB,KAAK,SAAS;YACb,OAAO,GAAG,CAAC;QACZ,KAAK,MAAM;YACV,OAAO,GAAG,CAAC;QACZ,KAAK,IAAI;YACR,OAAO,GAAG,CAAC;QACZ,KAAK,UAAU;YACd,OAAO,GAAG,CAAC;QACZ,KAAK,OAAO;YACX,OAAO,GAAG,CAAC;QACZ,KAAK,OAAO;YACX,OAAO,GAAG,CAAC;QACZ;YACC,OAAO,GAAG,CAAC;KACZ;AACF,CAAC,CAAC;AAxBW,QAAA,oBAAoB,wBAwB/B"}
|
package/dist/render-video.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Browser as PuppeteerBrowser } from 'puppeteer-core';
|
|
2
2
|
import { Browser, Codec, FfmpegExecutable, FrameRange, PixelFormat, ProResProfile, TCompMetadata } from 'remotion';
|
|
3
|
-
export declare type
|
|
4
|
-
export declare type
|
|
3
|
+
export declare type RenderMediaOnDownload = (src: string) => void;
|
|
4
|
+
export declare type StitchingState = 'encoding' | 'muxing';
|
|
5
|
+
export declare type RenderMediaOnProgress = (progress: {
|
|
5
6
|
renderedFrames: number;
|
|
6
7
|
encodedFrames: number;
|
|
7
8
|
encodedDoneIn: number | null;
|
|
8
9
|
renderedDoneIn: number | null;
|
|
9
|
-
stitchStage:
|
|
10
|
+
stitchStage: StitchingState;
|
|
10
11
|
}) => void;
|
|
11
|
-
export declare type
|
|
12
|
+
export declare type RenderMediaOptions = {
|
|
12
13
|
proResProfile: ProResProfile | undefined;
|
|
13
14
|
parallelism: number | null;
|
|
14
15
|
parallelEncoding: boolean;
|
|
@@ -28,11 +29,11 @@ export declare type RenderVideoOptions = {
|
|
|
28
29
|
openedBrowser: PuppeteerBrowser;
|
|
29
30
|
overwrite: boolean;
|
|
30
31
|
absoluteOutputFile: string;
|
|
31
|
-
onProgress
|
|
32
|
-
shouldOutputImageSequence: boolean;
|
|
32
|
+
onProgress?: RenderMediaOnProgress;
|
|
33
33
|
fileExtension: string | null;
|
|
34
34
|
bundled: string;
|
|
35
35
|
onDownload: (src: string) => void;
|
|
36
|
+
dumpBrowserLogs: boolean;
|
|
36
37
|
};
|
|
37
|
-
export declare const
|
|
38
|
+
export declare const renderMedia: ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, fileExtension, bundled, onDownload, dumpBrowserLogs, }: RenderMediaOptions) => Promise<void>;
|
|
38
39
|
//# sourceMappingURL=render-video.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-video.d.ts","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACN,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,UAAU,EAEV,WAAW,EACX,aAAa,EACb,aAAa,EACb,MAAM,UAAU,CAAC;AAIlB,oBAAY,qBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1D,oBAAY,qBAAqB,GAAG,CAAC,QAAQ,EAAE;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"render-video.d.ts","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACN,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,UAAU,EAEV,WAAW,EACX,aAAa,EACb,aAAa,EACb,MAAM,UAAU,CAAC;AAIlB,oBAAY,qBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1D,oBAAY,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnD,oBAAY,qBAAqB,GAAG,CAAC,QAAQ,EAAE;IAC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@ -3,14 +3,15 @@ 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.renderMedia = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const remotion_1 = require("remotion");
|
|
10
10
|
const stitcher_1 = require("./stitcher");
|
|
11
11
|
const render_1 = require("./render");
|
|
12
|
-
const
|
|
12
|
+
const renderMedia = async ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, fileExtension, bundled, onDownload, dumpBrowserLogs, }) => {
|
|
13
13
|
var _a, _b;
|
|
14
|
+
let stitchStage = 'encoding';
|
|
14
15
|
let stitcherFfmpeg;
|
|
15
16
|
let preStitcher;
|
|
16
17
|
let encodedFrames = 0;
|
|
@@ -19,6 +20,15 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
19
20
|
let renderedDoneIn = null;
|
|
20
21
|
let encodedDoneIn = null;
|
|
21
22
|
const renderStart = Date.now();
|
|
23
|
+
const callUpdate = () => {
|
|
24
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress({
|
|
25
|
+
encodedDoneIn,
|
|
26
|
+
encodedFrames,
|
|
27
|
+
renderedDoneIn,
|
|
28
|
+
renderedFrames,
|
|
29
|
+
stitchStage,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
22
32
|
if (parallelEncoding) {
|
|
23
33
|
if (typeof crf !== 'number') {
|
|
24
34
|
throw new TypeError('CRF is unexpectedly not a number');
|
|
@@ -39,13 +49,7 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
39
49
|
parallelism,
|
|
40
50
|
onProgress: (frame) => {
|
|
41
51
|
encodedFrames = frame;
|
|
42
|
-
|
|
43
|
-
encodedFrames,
|
|
44
|
-
renderedFrames,
|
|
45
|
-
encodedDoneIn: null,
|
|
46
|
-
renderedDoneIn: null,
|
|
47
|
-
stitchStage: 'encoding',
|
|
48
|
-
});
|
|
52
|
+
callUpdate();
|
|
49
53
|
},
|
|
50
54
|
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
51
55
|
parallelEncoding,
|
|
@@ -55,31 +59,17 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
55
59
|
});
|
|
56
60
|
stitcherFfmpeg = preStitcher.task;
|
|
57
61
|
}
|
|
58
|
-
const
|
|
62
|
+
const { assetsInfo } = await (0, render_1.renderFrames)({
|
|
59
63
|
config,
|
|
60
64
|
onFrameUpdate: (frame) => {
|
|
61
65
|
renderedFrames = frame;
|
|
62
|
-
|
|
63
|
-
encodedFrames,
|
|
64
|
-
renderedFrames,
|
|
65
|
-
encodedDoneIn,
|
|
66
|
-
renderedDoneIn,
|
|
67
|
-
stitchStage: 'encoding',
|
|
68
|
-
});
|
|
66
|
+
callUpdate();
|
|
69
67
|
},
|
|
70
68
|
parallelism,
|
|
71
|
-
parallelEncoding,
|
|
72
69
|
outputDir,
|
|
73
70
|
onStart: () => {
|
|
74
71
|
renderedFrames = 0;
|
|
75
|
-
|
|
76
|
-
encodedDoneIn,
|
|
77
|
-
encodedFrames,
|
|
78
|
-
renderedDoneIn,
|
|
79
|
-
renderedFrames,
|
|
80
|
-
// TODO: Keep a state
|
|
81
|
-
stitchStage: 'encoding',
|
|
82
|
-
});
|
|
72
|
+
callUpdate();
|
|
83
73
|
},
|
|
84
74
|
inputProps,
|
|
85
75
|
envVariables,
|
|
@@ -93,8 +83,8 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
93
83
|
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
|
|
94
84
|
},
|
|
95
85
|
serveUrl,
|
|
86
|
+
dumpBrowserLogs,
|
|
96
87
|
});
|
|
97
|
-
const { assetsInfo } = await renderer;
|
|
98
88
|
if (stitcherFfmpeg) {
|
|
99
89
|
(_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.end();
|
|
100
90
|
await stitcherFfmpeg;
|
|
@@ -102,19 +92,7 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
102
92
|
}
|
|
103
93
|
const closeBrowserPromise = openedBrowser.close();
|
|
104
94
|
renderedDoneIn = Date.now() - renderStart;
|
|
105
|
-
|
|
106
|
-
encodedFrames,
|
|
107
|
-
renderedFrames,
|
|
108
|
-
renderedDoneIn,
|
|
109
|
-
encodedDoneIn,
|
|
110
|
-
stitchStage: 'encoding',
|
|
111
|
-
});
|
|
112
|
-
if (process.env.DEBUG) {
|
|
113
|
-
remotion_1.Internals.perf.logPerf();
|
|
114
|
-
}
|
|
115
|
-
if (shouldOutputImageSequence) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
95
|
+
callUpdate();
|
|
118
96
|
if (typeof crf !== 'number') {
|
|
119
97
|
throw new TypeError('CRF is unexpectedly not a number');
|
|
120
98
|
}
|
|
@@ -142,28 +120,19 @@ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf,
|
|
|
142
120
|
parallelism,
|
|
143
121
|
ffmpegExecutable,
|
|
144
122
|
onProgress: (frame) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
renderedDoneIn,
|
|
149
|
-
encodedDoneIn,
|
|
150
|
-
stitchStage: 'muxing',
|
|
151
|
-
});
|
|
123
|
+
stitchStage = 'muxing';
|
|
124
|
+
encodedFrames = frame;
|
|
125
|
+
callUpdate();
|
|
152
126
|
},
|
|
153
127
|
// TODO: Optimization, Now can download before!
|
|
154
128
|
onDownload,
|
|
155
129
|
webpackBundle: bundled,
|
|
156
130
|
verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
|
|
157
131
|
});
|
|
132
|
+
encodedFrames = config.durationInFrames;
|
|
158
133
|
encodedDoneIn = Date.now() - stitchStart;
|
|
159
|
-
|
|
160
|
-
encodedDoneIn,
|
|
161
|
-
encodedFrames,
|
|
162
|
-
renderedDoneIn,
|
|
163
|
-
renderedFrames,
|
|
164
|
-
stitchStage: 'muxing',
|
|
165
|
-
});
|
|
134
|
+
callUpdate();
|
|
166
135
|
await closeBrowserPromise;
|
|
167
136
|
};
|
|
168
|
-
exports.
|
|
137
|
+
exports.renderMedia = renderMedia;
|
|
169
138
|
//# sourceMappingURL=render-video.js.map
|
package/dist/render-video.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-video.js","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":";;;;;;AACA,4CAAoB;AACpB,gDAAwB;AAExB,uCASkB;AAClB,yCAA4D;AAC5D,qCAAsC;
|
|
1
|
+
{"version":3,"file":"render-video.js","sourceRoot":"","sources":["../src/render-video.ts"],"names":[],"mappings":";;;;;;AACA,4CAAoB;AACpB,gDAAwB;AAExB,uCASkB;AAClB,yCAA4D;AAC5D,qCAAsC;AAyC/B,MAAM,WAAW,GAAG,KAAK,EAAE,EACjC,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,KAAK,EACL,YAAY,EACZ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,aAAa,EACb,OAAO,EACP,UAAU,EACV,eAAe,GACK,EAAE,EAAE;;IACxB,IAAI,WAAW,GAAmB,UAAU,CAAC;IAC7C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C,YAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC5B,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE;YACrB,SAAS,EAAE,IAAI;SACf,CAAC,CAAC;KACH;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC/B,MAAM,IAAA,8BAAmB,EAAC;QACzB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,cAAc,EAAE,kBAAkB;QAClC,sBAAsB;QACtB,KAAK,EAAE,SAAS;QAChB,WAAW;QACX,WAAW;QACX,KAAK;QACL,aAAa;QACb,GAAG;QACH,UAAU;QACV,WAAW;QACX,gBAAgB;QAChB,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;YAC7B,WAAW,GAAG,QAAQ,CAAC;YACvB,aAAa,GAAG,KAAK,CAAC;YACtB,UAAU,EAAE,CAAC;QACd,CAAC;QACD,+CAA+C;QAC/C,UAAU;QACV,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE,oBAAS,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC;KAC5D,CAAC,CAAC;IACH,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACxC,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;IACzC,UAAU,EAAE,CAAC;IACb,MAAM,mBAAmB,CAAC;AAC3B,CAAC,CAAC;AAhKW,QAAA,WAAW,eAgKtB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import execa from 'execa';
|
|
2
|
+
export declare const ENABLE_WASM_FFMPEG = true;
|
|
3
|
+
export declare const wasmFfmpeg: import("@ffmpeg/ffmpeg").FFmpeg;
|
|
4
|
+
export declare const load: Promise<void>;
|
|
5
|
+
export declare const runFfmpegCommand: (args: string[], isRenderBad: boolean, options?: execa.Options<string> | undefined) => Promise<execa.ExecaReturnValue<string>>;
|
|
6
|
+
//# sourceMappingURL=run-ffmpeg-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-ffmpeg-command.d.ts","sourceRoot":"","sources":["../src/run-ffmpeg-command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,eAAO,MAAM,UAAU,iCAA4B,CAAC;AACpD,eAAO,MAAM,IAAI,eAAoB,CAAC;AAEtC,eAAO,MAAM,gBAAgB,SACtB,MAAM,EAAE,eACD,OAAO,yFAgBpB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runFfmpegCommand = exports.load = exports.wasmFfmpeg = exports.ENABLE_WASM_FFMPEG = void 0;
|
|
7
|
+
const ffmpeg_1 = require("@ffmpeg/ffmpeg");
|
|
8
|
+
const execa_1 = __importDefault(require("execa"));
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
exports.ENABLE_WASM_FFMPEG = true;
|
|
11
|
+
exports.wasmFfmpeg = ffmpeg_1.createFFmpeg({ log: true });
|
|
12
|
+
exports.load = exports.wasmFfmpeg.load();
|
|
13
|
+
const runFfmpegCommand = async (args, isRenderBad, options) => {
|
|
14
|
+
await exports.load;
|
|
15
|
+
await exports.wasmFfmpeg.run(...args);
|
|
16
|
+
if (isRenderBad) {
|
|
17
|
+
await fs_1.default.promises.writeFile('./hi.mp4',
|
|
18
|
+
// eslint-disable-next-line new-cap
|
|
19
|
+
exports.wasmFfmpeg.FS('readFile', 'hi.mp4'));
|
|
20
|
+
}
|
|
21
|
+
console.log('wasm done');
|
|
22
|
+
return execa_1.default('ffmpeg', args, options);
|
|
23
|
+
};
|
|
24
|
+
exports.runFfmpegCommand = runFfmpegCommand;
|
|
25
|
+
//# sourceMappingURL=run-ffmpeg-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-ffmpeg-command.js","sourceRoot":"","sources":["../src/run-ffmpeg-command.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA4C;AAC5C,kDAA0B;AAC1B,4CAAoB;AAEP,QAAA,kBAAkB,GAAG,IAAI,CAAC;AAE1B,QAAA,UAAU,GAAG,qBAAY,CAAC,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAC;AACvC,QAAA,IAAI,GAAG,kBAAU,CAAC,IAAI,EAAE,CAAC;AAE/B,MAAM,gBAAgB,GAAG,KAAK,EACpC,IAAc,EACd,WAAoB,EACpB,OAAuB,EACtB,EAAE;IACH,MAAM,YAAI,CAAC;IAEX,MAAM,kBAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9B,IAAI,WAAW,EAAE;QAChB,MAAM,YAAE,CAAC,QAAQ,CAAC,SAAS,CAC1B,UAAU;QACV,mCAAmC;QACnC,kBAAU,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CACnC,CAAC;KACF;IAED,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,OAAO,eAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC,CAAC;AAlBW,QAAA,gBAAgB,oBAkB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@remotion/bundler": "2.6.
|
|
19
|
+
"@remotion/bundler": "2.6.4",
|
|
20
20
|
"@testing-library/dom": "^8.7.2",
|
|
21
21
|
"execa": "^4.0.2",
|
|
22
22
|
"got": "11.8.2",
|
|
23
23
|
"p-limit": "^3.1.0",
|
|
24
24
|
"puppeteer-core": "^10.2.0",
|
|
25
|
-
"remotion": "2.6.
|
|
26
|
-
"sanitize-filename": "^1.6.3",
|
|
25
|
+
"remotion": "2.6.4",
|
|
27
26
|
"serve-handler": "^6.1.3"
|
|
28
27
|
},
|
|
29
28
|
"peerDependencies": {
|
|
@@ -46,5 +45,5 @@
|
|
|
46
45
|
"publishConfig": {
|
|
47
46
|
"access": "public"
|
|
48
47
|
},
|
|
49
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "729afee8ec8dd9c59a5aa087d135997e5ccf53b3"
|
|
50
49
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const getPcmOutputName: (inputName: string) => string;
|
|
2
|
-
export declare const conversionStarted: {
|
|
3
|
-
[key: string]: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare const convertMp3ToPcm: (source: string) => Promise<string>;
|
|
6
|
-
export declare const clearMp3Conversions: () => void;
|
|
7
|
-
//# sourceMappingURL=convert-mp3-to-pcm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-mp3-to-pcm.d.ts","sourceRoot":"","sources":["../src/convert-mp3-to-pcm.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,cAAe,MAAM,WAMjD,CAAC;AAQF,eAAO,MAAM,iBAAiB,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAM,CAAC;AAE9D,eAAO,MAAM,eAAe,WAAkB,MAAM,oBAcnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAI/B,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// For the h264-mkv format, we need to convert an MP3 file to PCM first
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.clearMp3Conversions = exports.convertMp3ToPcm = exports.conversionStarted = exports.getPcmOutputName = void 0;
|
|
8
|
-
const execa_1 = __importDefault(require("execa"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const getPcmOutputName = (inputName) => {
|
|
11
|
-
const dirname = path_1.default.dirname(inputName);
|
|
12
|
-
const extension = path_1.default.extname(inputName);
|
|
13
|
-
const filename = path_1.default.basename(inputName, extension);
|
|
14
|
-
return path_1.default.join(dirname, `${filename}-converted.wav`);
|
|
15
|
-
};
|
|
16
|
-
exports.getPcmOutputName = getPcmOutputName;
|
|
17
|
-
const isMp3 = async (source) => {
|
|
18
|
-
const { stderr } = await (0, execa_1.default)('ffprobe', [source]);
|
|
19
|
-
return stderr.includes('Audio: mp3');
|
|
20
|
-
};
|
|
21
|
-
exports.conversionStarted = {};
|
|
22
|
-
const convertMp3ToPcm = async (source) => {
|
|
23
|
-
const outname = (0, exports.getPcmOutputName)(source);
|
|
24
|
-
if (!(await isMp3(source))) {
|
|
25
|
-
return source;
|
|
26
|
-
}
|
|
27
|
-
if (exports.conversionStarted[source]) {
|
|
28
|
-
return outname;
|
|
29
|
-
}
|
|
30
|
-
exports.conversionStarted[source] = true;
|
|
31
|
-
await (0, execa_1.default)('ffmpeg', ['-y', '-i', source, (0, exports.getPcmOutputName)(source)]);
|
|
32
|
-
return outname;
|
|
33
|
-
};
|
|
34
|
-
exports.convertMp3ToPcm = convertMp3ToPcm;
|
|
35
|
-
const clearMp3Conversions = () => {
|
|
36
|
-
Object.keys(exports.conversionStarted).forEach((key) => {
|
|
37
|
-
delete exports.conversionStarted[key];
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
exports.clearMp3Conversions = clearMp3Conversions;
|
|
41
|
-
//# sourceMappingURL=convert-mp3-to-pcm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-mp3-to-pcm.js","sourceRoot":"","sources":["../src/convert-mp3-to-pcm.ts"],"names":[],"mappings":";AAAA,uEAAuE;;;;;;AAEvE,kDAA0B;AAC1B,gDAAwB;AAEjB,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACrD,MAAM,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,cAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAErD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,QAAQ,gBAAgB,CAAC,CAAC;AACxD,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAEF,MAAM,KAAK,GAAG,KAAK,EAAE,MAAc,EAAE,EAAE;IACtC,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAA,eAAK,EAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAElD,OAAO,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC,CAAC;AAEW,QAAA,iBAAiB,GAA6B,EAAE,CAAC;AAEvD,MAAM,eAAe,GAAG,KAAK,EAAE,MAAc,EAAE,EAAE;IACvD,MAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE;QAC3B,OAAO,MAAM,CAAC;KACd;IAED,IAAI,yBAAiB,CAAC,MAAM,CAAC,EAAE;QAC9B,OAAO,OAAO,CAAC;KACf;IAED,yBAAiB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEjC,MAAM,IAAA,eAAK,EAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACtE,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B;AAEK,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACvC,MAAM,CAAC,IAAI,CAAC,yBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9C,OAAO,yBAAiB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=handle-null-audio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handle-null-audio.d.ts","sourceRoot":"","sources":["../src/handle-null-audio.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handle-null-audio.js","sourceRoot":"","sources":["../src/handle-null-audio.ts"],"names":[],"mappings":""}
|
package/dist/is-local-file.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-local-file.d.ts","sourceRoot":"","sources":["../src/is-local-file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,iBAAkB,MAAM,YAY9C,CAAC"}
|
package/dist/is-local-file.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isServeUrl = void 0;
|
|
4
|
-
const isServeUrl = (potentialUrl) => {
|
|
5
|
-
// Theoretically not a valid URL but handle the most basic cases of forgetting protocol in front
|
|
6
|
-
if (potentialUrl.startsWith('www.') ||
|
|
7
|
-
potentialUrl.includes('amazonaws.com')) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
return (potentialUrl.startsWith('https://') || !potentialUrl.startsWith('http://'));
|
|
11
|
-
};
|
|
12
|
-
exports.isServeUrl = isServeUrl;
|
|
13
|
-
//# sourceMappingURL=is-local-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-local-file.js","sourceRoot":"","sources":["../src/is-local-file.ts"],"names":[],"mappings":";;;AAAO,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAE,EAAE;IAClD,gGAAgG;IAChG,IACC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC;QAC/B,YAAY,CAAC,QAAQ,CAAC,eAAe,CAAC,EACrC;QACD,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,CACN,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,CAC1E,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB"}
|
package/dist/validate-frame.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-frame.d.ts","sourceRoot":"","sources":["../src/validate-frame.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAW,MAAM,oBAAoB,MAAM,SAgCpE,CAAC"}
|
package/dist/validate-frame.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateFrame = void 0;
|
|
4
|
-
const validateFrame = (frame, durationInFrames) => {
|
|
5
|
-
if (typeof frame === 'undefined') {
|
|
6
|
-
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
7
|
-
}
|
|
8
|
-
if (typeof frame !== 'number') {
|
|
9
|
-
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
10
|
-
}
|
|
11
|
-
if (frame < 0) {
|
|
12
|
-
throw new RangeError(`Frame ${frame} cannot be negative`);
|
|
13
|
-
}
|
|
14
|
-
if (!Number.isFinite(frame)) {
|
|
15
|
-
throw new RangeError(`Frame ${frame} is not finite`);
|
|
16
|
-
}
|
|
17
|
-
if (frame % 1 !== 0) {
|
|
18
|
-
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
19
|
-
}
|
|
20
|
-
if (frame > durationInFrames - 1) {
|
|
21
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.validateFrame = validateFrame;
|
|
25
|
-
//# sourceMappingURL=validate-frame.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-frame.js","sourceRoot":"","sources":["../src/validate-frame.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,gBAAwB,EAAE,EAAE;IACxE,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QACjC,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;KAC9D;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,MAAM,IAAI,SAAS,CAClB,gDAAgD,KAAK,EAAE,CACvD,CAAC;KACF;IAED,IAAI,KAAK,GAAG,CAAC,EAAE;QACd,MAAM,IAAI,UAAU,CAAC,SAAS,KAAK,qBAAqB,CAAC,CAAC;KAC1D;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC5B,MAAM,IAAI,UAAU,CAAC,SAAS,KAAK,gBAAgB,CAAC,CAAC;KACrD;IAED,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;QACpB,MAAM,IAAI,UAAU,CACnB,kDAAkD,KAAK,EAAE,CACzD,CAAC;KACF;IAED,IAAI,KAAK,GAAG,gBAAgB,GAAG,CAAC,EAAE;QACjC,MAAM,IAAI,UAAU,CACnB,oBAAoB,KAAK,gCAAgC,gBAAgB,yDACxE,gBAAgB,GAAG,CACpB,EAAE,CACF,CAAC;KACF;AACF,CAAC,CAAC;AAhCW,QAAA,aAAa,iBAgCxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=validate-quality.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-quality.d.ts","sourceRoot":"","sources":["../src/validate-quality.ts"],"names":[],"mappings":""}
|
package/dist/validate-quality.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-quality.js","sourceRoot":"","sources":["../src/validate-quality.ts"],"names":[],"mappings":""}
|