@remotion/renderer 2.5.2 → 2.5.3
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/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/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 -4
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pro-res-profile-name.d.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"}
|
|
@@ -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.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@remotion/bundler": "^2.5.
|
|
19
|
+
"@remotion/bundler": "^2.5.3",
|
|
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.5.
|
|
25
|
+
"remotion": "^2.5.3",
|
|
26
26
|
"sanitize-filename": "^1.6.3",
|
|
27
27
|
"serve-handler": "^6.1.3",
|
|
28
28
|
"xns": "^2.0.7"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "20ad1b623904cfd5ebefdfa47bcc298326f6ad23"
|
|
51
51
|
}
|
|
@@ -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/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":""}
|