@remotion/renderer 2.4.3 → 2.5.0-alpha.7f7dd1f1

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.
Files changed (34) hide show
  1. package/dist/convert-mp3-to-pcm.d.ts +7 -0
  2. package/dist/convert-mp3-to-pcm.d.ts.map +1 -0
  3. package/dist/convert-mp3-to-pcm.js +41 -0
  4. package/dist/convert-mp3-to-pcm.js.map +1 -0
  5. package/dist/create-ffmpeg-complex-filter.d.ts +4 -1
  6. package/dist/create-ffmpeg-complex-filter.d.ts.map +1 -1
  7. package/dist/handle-null-audio.d.ts +1 -0
  8. package/dist/handle-null-audio.d.ts.map +1 -0
  9. package/dist/handle-null-audio.js +2 -0
  10. package/dist/handle-null-audio.js.map +1 -0
  11. package/dist/puppeteer-screenshot.d.ts +0 -1
  12. package/dist/puppeteer-screenshot.d.ts.map +1 -1
  13. package/dist/screenshot-dom-element.d.ts +0 -1
  14. package/dist/screenshot-dom-element.d.ts.map +1 -1
  15. package/dist/screenshot-task.d.ts +0 -1
  16. package/dist/screenshot-task.d.ts.map +1 -1
  17. package/dist/stitcher.d.ts +2 -2
  18. package/dist/validate-frame.d.ts +2 -0
  19. package/dist/validate-frame.d.ts.map +1 -0
  20. package/dist/validate-frame.js +25 -0
  21. package/dist/validate-frame.js.map +1 -0
  22. package/dist/validate-quality.d.ts +1 -0
  23. package/dist/validate-quality.d.ts.map +1 -0
  24. package/dist/validate-quality.js +2 -0
  25. package/dist/validate-quality.js.map +1 -0
  26. package/package.json +3 -3
  27. package/dist/get-pro-res-profile-name.d.ts +0 -3
  28. package/dist/get-pro-res-profile-name.d.ts.map +0 -1
  29. package/dist/get-pro-res-profile-name.js +0 -26
  30. package/dist/get-pro-res-profile-name.js.map +0 -1
  31. package/dist/run-ffmpeg-command.d.ts +0 -6
  32. package/dist/run-ffmpeg-command.d.ts.map +0 -1
  33. package/dist/run-ffmpeg-command.js +0 -25
  34. package/dist/run-ffmpeg-command.js.map +0 -1
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,41 @@
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
@@ -0,0 +1 @@
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,6 +1,9 @@
1
1
  import { FfmpegFilterCalculation } from './calculate-ffmpeg-filters';
2
2
  export declare const createFfmpegComplexFilter: (filters: FfmpegFilterCalculation[]) => Promise<{
3
- complexFilterFlag: [string, string] | null;
3
+ complexFilterFlag: [
4
+ string,
5
+ string
6
+ ] | null;
4
7
  cleanup: () => void;
5
8
  }>;
6
9
  //# sourceMappingURL=create-ffmpeg-complex-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-ffmpeg-complex-filter.d.ts","sourceRoot":"","sources":["../src/create-ffmpeg-complex-filter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAmBnE,eAAO,MAAM,yBAAyB,YAC5B,uBAAuB,EAAE,KAChC,QAAQ;IACV,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB,CA2BA,CAAC"}
1
+ {"version":3,"file":"create-ffmpeg-complex-filter.d.ts","sourceRoot":"","sources":["../src/create-ffmpeg-complex-filter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAmBnE,eAAO,MAAM,yBAAyB,YAC5B,uBAAuB,EAAE,KAChC,QAAQ;IACV,iBAAiB,EAAE;QAAC,MAAM;QAAE,MAAM;KAAC,GAAG,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB,CA2BA,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=handle-null-audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-null-audio.d.ts","sourceRoot":"","sources":["../src/handle-null-audio.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=handle-null-audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-null-audio.js","sourceRoot":"","sources":["../src/handle-null-audio.ts"],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Page, ScreenshotOptions } from 'puppeteer-core';
3
2
  export declare const screenshot: (page: Page, options?: ScreenshotOptions) => Promise<Buffer | string | void>;
4
3
  //# sourceMappingURL=puppeteer-screenshot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"puppeteer-screenshot.d.ts","sourceRoot":"","sources":["../src/puppeteer-screenshot.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,IAAI,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,UAAU,SAChB,IAAI,YACD,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,CAyFhC,CAAC"}
1
+ {"version":3,"file":"puppeteer-screenshot.d.ts","sourceRoot":"","sources":["../src/puppeteer-screenshot.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,UAAU,SAChB,IAAI,YACD,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,CAyFhC,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import puppeteer from 'puppeteer-core';
3
2
  import { ImageFormat } from 'remotion';
4
3
  export declare const screenshotDOMElement: ({ page, imageFormat, quality, opts, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot-dom-element.d.ts","sourceRoot":"","sources":["../src/screenshot-dom-element.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,oBAAoB;UAM1B,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;;;;;MAKxB,QAAQ,MAAM,CAuBjB,CAAC"}
1
+ {"version":3,"file":"screenshot-dom-element.d.ts","sourceRoot":"","sources":["../src/screenshot-dom-element.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,oBAAoB;UAM1B,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;;;;;MAKxB,QAAQ,MAAM,CAuBjB,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Page, ScreenshotOptions } from 'puppeteer-core';
3
2
  export declare const _screenshotTask: (page: Page, format: 'png' | 'jpeg', options: ScreenshotOptions) => Promise<Buffer | string>;
4
3
  //# sourceMappingURL=screenshot-task.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot-task.d.ts","sourceRoot":"","sources":["../src/screenshot-task.ts"],"names":[],"mappings":";AACA,OAAO,EAAa,IAAI,EAAE,iBAAiB,EAAS,MAAM,gBAAgB,CAAC;AAG3E,eAAO,MAAM,eAAe,SACrB,IAAI,UACF,KAAK,GAAG,MAAM,WACb,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,CAqCzB,CAAC"}
1
+ {"version":3,"file":"screenshot-task.d.ts","sourceRoot":"","sources":["../src/screenshot-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,iBAAiB,EAAS,MAAM,gBAAgB,CAAC;AAG3E,eAAO,MAAM,eAAe,SACrB,IAAI,UACF,KAAK,GAAG,MAAM,WACb,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,CAqCzB,CAAC"}
@@ -7,14 +7,14 @@ export declare const stitchFramesToVideo: (options: {
7
7
  outputLocation: string;
8
8
  force: boolean;
9
9
  assetsInfo: RenderAssetInfo;
10
- imageFormat?: "png" | "jpeg" | "none" | undefined;
10
+ imageFormat?: "none" | "png" | "jpeg" | undefined;
11
11
  pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
12
12
  codec?: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | undefined;
13
13
  crf?: number | undefined;
14
14
  parallelism?: number | null | undefined;
15
15
  onProgress?: ((progress: number) => void) | undefined;
16
16
  onDownload?: ((src: string) => void) | undefined;
17
- proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
17
+ proResProfile?: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
18
18
  verbose?: boolean | undefined;
19
19
  }) => Promise<void>;
20
20
  //# sourceMappingURL=stitcher.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const validateFrame: (frame: number, durationInFrames: number) => void;
2
+ //# sourceMappingURL=validate-frame.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=validate-quality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality.d.ts","sourceRoot":"","sources":["../src/validate-quality.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=validate-quality.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-quality.js","sourceRoot":"","sources":["../src/validate-quality.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "2.4.3",
3
+ "version": "2.5.0-alpha.7f7dd1f1",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -15,12 +15,12 @@
15
15
  "url": "https://github.com/remotion-dev/remotion"
16
16
  },
17
17
  "dependencies": {
18
- "@remotion/bundler": "^2.4.3",
18
+ "@remotion/bundler": "2.5.0-alpha.7f7dd1f1",
19
19
  "execa": "^4.0.2",
20
20
  "got": "11.8.2",
21
21
  "p-limit": "^3.1.0",
22
22
  "puppeteer-core": "^10.2.0",
23
- "remotion": "^2.4.3",
23
+ "remotion": "2.5.0-alpha.7f7dd1f1",
24
24
  "sanitize-filename": "^1.6.3",
25
25
  "serve-handler": "^6.1.3",
26
26
  "xns": "^2.0.7"
@@ -1,3 +0,0 @@
1
- import { Codec, ProResProfile } from 'remotion';
2
- export declare const getProResProfileName: (codec: Codec, proResProfile: ProResProfile | undefined) => string | null;
3
- //# sourceMappingURL=get-pro-res-profile-name.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,26 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}