@remotion/renderer 4.0.0-audio.35 → 4.0.0-audio.36

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 (92) hide show
  1. package/dist/assets/get-asset-audio-details.js +5 -2
  2. package/dist/assets/get-asset-audio-details.js.map +1 -1
  3. package/dist/assets-to-ffmpeg-inputs.d.ts +2 -2
  4. package/dist/assets-to-ffmpeg-inputs.d.ts.map +1 -1
  5. package/dist/assets-to-ffmpeg-inputs.js +5 -5
  6. package/dist/assets-to-ffmpeg-inputs.js.map +1 -1
  7. package/dist/convert-mp3-to-pcm.d.ts +7 -0
  8. package/dist/convert-mp3-to-pcm.d.ts.map +1 -0
  9. package/dist/convert-mp3-to-pcm.js +41 -0
  10. package/dist/convert-mp3-to-pcm.js.map +1 -0
  11. package/dist/convert-to-pcm.d.ts +0 -0
  12. package/dist/convert-to-pcm.d.ts.map +0 -0
  13. package/dist/convert-to-pcm.js +0 -0
  14. package/dist/convert-to-pcm.js.map +0 -0
  15. package/dist/create-ffmpeg-merge-filter.d.ts +0 -0
  16. package/dist/create-ffmpeg-merge-filter.d.ts.map +0 -0
  17. package/dist/create-ffmpeg-merge-filter.js +0 -0
  18. package/dist/create-ffmpeg-merge-filter.js.map +0 -0
  19. package/dist/create-silent-audio.d.ts +0 -0
  20. package/dist/create-silent-audio.d.ts.map +0 -0
  21. package/dist/create-silent-audio.js +0 -0
  22. package/dist/create-silent-audio.js.map +0 -0
  23. package/dist/ffmpeg-filter-file.d.ts +0 -0
  24. package/dist/ffmpeg-filter-file.d.ts.map +0 -0
  25. package/dist/ffmpeg-filter-file.js +0 -0
  26. package/dist/ffmpeg-filter-file.js.map +0 -0
  27. package/dist/get-duration-from-frame-range.d.ts +0 -0
  28. package/dist/get-duration-from-frame-range.d.ts.map +0 -0
  29. package/dist/get-duration-from-frame-range.js +0 -0
  30. package/dist/get-duration-from-frame-range.js.map +0 -0
  31. package/dist/get-extension-from-codec.d.ts +1 -1
  32. package/dist/get-frame-number-length.d.ts +8 -0
  33. package/dist/get-frame-number-length.d.ts.map +1 -0
  34. package/dist/get-frame-number-length.js +30 -0
  35. package/dist/get-frame-number-length.js.map +1 -0
  36. package/dist/get-frame-range.d.ts +3 -0
  37. package/dist/get-frame-range.d.ts.map +1 -0
  38. package/dist/get-frame-range.js +23 -0
  39. package/dist/get-frame-range.js.map +1 -0
  40. package/dist/handle-javascript-exception.d.ts +32 -0
  41. package/dist/handle-javascript-exception.d.ts.map +1 -0
  42. package/dist/handle-javascript-exception.js +82 -0
  43. package/dist/handle-javascript-exception.js.map +1 -0
  44. package/dist/handle-null-audio.d.ts +1 -0
  45. package/dist/handle-null-audio.d.ts.map +1 -0
  46. package/dist/handle-null-audio.js +2 -0
  47. package/dist/handle-null-audio.js.map +1 -0
  48. package/dist/is-local-file.d.ts +2 -0
  49. package/dist/is-local-file.d.ts.map +1 -0
  50. package/dist/is-local-file.js +13 -0
  51. package/dist/is-local-file.js.map +1 -0
  52. package/dist/merge-audio-track.d.ts +0 -0
  53. package/dist/merge-audio-track.d.ts.map +0 -0
  54. package/dist/merge-audio-track.js +0 -0
  55. package/dist/merge-audio-track.js.map +0 -0
  56. package/dist/min-max.d.ts +3 -0
  57. package/dist/min-max.d.ts.map +1 -0
  58. package/dist/min-max.js +34 -0
  59. package/dist/min-max.js.map +1 -0
  60. package/dist/p-limit.d.ts +0 -0
  61. package/dist/p-limit.d.ts.map +0 -0
  62. package/dist/p-limit.js +0 -0
  63. package/dist/p-limit.js.map +0 -0
  64. package/dist/preprocess-audio-track.d.ts +0 -0
  65. package/dist/preprocess-audio-track.d.ts.map +0 -0
  66. package/dist/preprocess-audio-track.js +0 -0
  67. package/dist/preprocess-audio-track.js.map +0 -0
  68. package/dist/prespawn-ffmpeg.d.ts +0 -0
  69. package/dist/prespawn-ffmpeg.d.ts.map +0 -0
  70. package/dist/prespawn-ffmpeg.js +0 -0
  71. package/dist/prespawn-ffmpeg.js.map +0 -0
  72. package/dist/provide-screenshot.d.ts +1 -0
  73. package/dist/provide-screenshot.d.ts.map +1 -1
  74. package/dist/puppeteer-screenshot.d.ts +1 -0
  75. package/dist/puppeteer-screenshot.d.ts.map +1 -1
  76. package/dist/render-video.d.ts +38 -0
  77. package/dist/render-video.d.ts.map +1 -0
  78. package/dist/render-video.js +169 -0
  79. package/dist/render-video.js.map +1 -0
  80. package/dist/screenshot-dom-element.d.ts +1 -0
  81. package/dist/screenshot-dom-element.d.ts.map +1 -1
  82. package/dist/screenshot-task.d.ts +1 -0
  83. package/dist/screenshot-task.d.ts.map +1 -1
  84. package/dist/validate-frame.d.ts +2 -0
  85. package/dist/validate-frame.d.ts.map +1 -0
  86. package/dist/validate-frame.js +25 -0
  87. package/dist/validate-frame.js.map +1 -0
  88. package/dist/validate-quality.d.ts +1 -0
  89. package/dist/validate-quality.d.ts.map +1 -0
  90. package/dist/validate-quality.js +2 -0
  91. package/dist/validate-quality.js.map +1 -0
  92. package/package.json +4 -4
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.getAssetAudioDetails = void 0;
4
- const p_limit_1 = require("../p-limit");
7
+ const p_limit_1 = __importDefault(require("p-limit"));
5
8
  const get_audio_channels_1 = require("./get-audio-channels");
6
9
  async function getAssetAudioDetails(options) {
7
10
  const uniqueAssets = [...new Set(options.assetPaths)];
8
11
  const actualParallelism = 2;
9
- const parallelLimit = (0, p_limit_1.pLimit)(actualParallelism);
12
+ const parallelLimit = (0, p_limit_1.default)(actualParallelism);
10
13
  const audioChannelTasks = uniqueAssets.map((path) => parallelLimit(() => (0, get_audio_channels_1.getAudioChannels)(path)));
11
14
  const result = await Promise.all(audioChannelTasks);
12
15
  const mappedResults = result.map((channels, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"get-asset-audio-details.js","sourceRoot":"","sources":["../../src/assets/get-asset-audio-details.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAClC,6DAAsD;AAG/C,KAAK,UAAU,oBAAoB,CAAC,OAE1C;IACA,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACtD,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,aAAa,GAAG,IAAA,gBAAM,EAAC,iBAAiB,CAAC,CAAC;IAChD,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACnD,aAAa,CAAC,GAAG,EAAE,CAAC,IAAA,qCAAgB,EAAC,IAAI,CAAC,CAAC,CAC3C,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEpD,MAAM,aAAa,GAAkC,MAAM,CAAC,GAAG,CAC9D,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;QACnB,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAC,QAAQ,EAAC,CAAC,CAAC;IAC1C,CAAC,CACD,CAAC;IAEF,OAAO,IAAI,GAAG,CAA4B,aAAa,CAAC,CAAC;AAC1D,CAAC;AAlBD,oDAkBC"}
1
+ {"version":3,"file":"get-asset-audio-details.js","sourceRoot":"","sources":["../../src/assets/get-asset-audio-details.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,6DAAsD;AAG/C,KAAK,UAAU,oBAAoB,CAAC,OAE1C;IACA,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACtD,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,aAAa,GAAG,IAAA,iBAAM,EAAC,iBAAiB,CAAC,CAAC;IAChD,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACnD,aAAa,CAAC,GAAG,EAAE,CAAC,IAAA,qCAAgB,EAAC,IAAI,CAAC,CAAC,CAC3C,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEpD,MAAM,aAAa,GAAkC,MAAM,CAAC,GAAG,CAC9D,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;QACnB,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAC,QAAQ,EAAC,CAAC,CAAC;IAC1C,CAAC,CACD,CAAC;IAEF,OAAO,IAAI,GAAG,CAA4B,aAAa,CAAC,CAAC;AAC1D,CAAC;AAlBD,oDAkBC"}
@@ -1,5 +1,5 @@
1
- export declare const assetToFfmpegInputs: ({ asset: audioMixFile, isAudioOnly, frameCount, fps, }: {
2
- asset: string | null;
1
+ export declare const assetsToFfmpegInputs: ({ assets, isAudioOnly, frameCount, fps, }: {
2
+ assets: string[];
3
3
  isAudioOnly: boolean;
4
4
  frameCount: number;
5
5
  fps: number;
@@ -1 +1 @@
1
- {"version":3,"file":"assets-to-ffmpeg-inputs.d.ts","sourceRoot":"","sources":["../src/assets-to-ffmpeg-inputs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;WAMxB,MAAM,GAAG,IAAI;iBACP,OAAO;gBACR,MAAM;SACb,MAAM;MACR;IAAC,MAAM;IAAE,MAAM;CAAC,EAUnB,CAAC"}
1
+ {"version":3,"file":"assets-to-ffmpeg-inputs.d.ts","sourceRoot":"","sources":["../src/assets-to-ffmpeg-inputs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;YAMxB,MAAM,EAAE;iBACH,OAAO;gBACR,MAAM;SACb,MAAM;MACR;IAAC,MAAM;IAAE,MAAM;CAAC,EAUnB,CAAC"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assetToFfmpegInputs = void 0;
4
- const assetToFfmpegInputs = ({ asset: audioMixFile, isAudioOnly, frameCount, fps, }) => {
5
- if (isAudioOnly && audioMixFile === null) {
3
+ exports.assetsToFfmpegInputs = void 0;
4
+ const assetsToFfmpegInputs = ({ assets, isAudioOnly, frameCount, fps, }) => {
5
+ if (isAudioOnly && assets.length === 0) {
6
6
  return [
7
7
  ['-f', 'lavfi'],
8
8
  ['-i', 'anullsrc'],
9
9
  ['-t', (frameCount / fps).toFixed(4)],
10
10
  ];
11
11
  }
12
- return [['-i', audioMixFile]];
12
+ return assets.map((path) => ['-i', path]);
13
13
  };
14
- exports.assetToFfmpegInputs = assetToFfmpegInputs;
14
+ exports.assetsToFfmpegInputs = assetsToFfmpegInputs;
15
15
  //# sourceMappingURL=assets-to-ffmpeg-inputs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets-to-ffmpeg-inputs.js","sourceRoot":"","sources":["../src/assets-to-ffmpeg-inputs.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,CAAC,EACnC,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,UAAU,EACV,GAAG,GAMH,EAAsB,EAAE;IACxB,IAAI,WAAW,IAAI,YAAY,KAAK,IAAI,EAAE;QACzC,OAAO;YACN,CAAC,IAAI,EAAE,OAAO,CAAC;YACf,CAAC,IAAI,EAAE,UAAU,CAAC;YAClB,CAAC,IAAI,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SACrC,CAAC;KACF;IAED,OAAO,CAAC,CAAC,IAAI,EAAE,YAAsB,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
1
+ {"version":3,"file":"assets-to-ffmpeg-inputs.js","sourceRoot":"","sources":["../src/assets-to-ffmpeg-inputs.ts"],"names":[],"mappings":";;;AAAO,MAAM,oBAAoB,GAAG,CAAC,EACpC,MAAM,EACN,WAAW,EACX,UAAU,EACV,GAAG,GAMH,EAAsB,EAAE;IACxB,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvC,OAAO;YACN,CAAC,IAAI,EAAE,OAAO,CAAC;YACf,CAAC,IAAI,EAAE,UAAU,CAAC;YAClB,CAAC,IAAI,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SACrC,CAAC;KACF;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B"}
@@ -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,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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  import { Codec } from 'remotion';
2
- export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "mp4" | "mkv" | "mov" | "webm";
2
+ export declare const getFileExtensionFromCodec: (codec: Codec, type: 'chunk' | 'final') => "mp3" | "aac" | "wav" | "webm" | "mp4" | "mkv" | "mov";
3
3
  //# sourceMappingURL=get-extension-from-codec.d.ts.map
@@ -0,0 +1,8 @@
1
+ export declare const getFrameInfo: ({ dir, isAudioOnly, }: {
2
+ dir: string;
3
+ isAudioOnly: boolean;
4
+ }) => Promise<{
5
+ numberLength: number;
6
+ startNumber: number;
7
+ } | null>;
8
+ //# sourceMappingURL=get-frame-number-length.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-frame-number-length.d.ts","sourceRoot":"","sources":["../src/get-frame-number-length.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;SAInB,MAAM;iBACE,OAAO;;kBAEN,MAAM;iBACP,MAAM;SAiBnB,CAAC"}
@@ -0,0 +1,30 @@
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.getFrameInfo = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const min_max_1 = require("./min-max");
9
+ // If the biggest frame has the number 100 (3 digits), we need to tell FFMPEG
10
+ // that it has to expect up to three digits, etc. We calculate the length of
11
+ // the biggest number.
12
+ const getFrameInfo = async ({ dir, isAudioOnly, }) => {
13
+ if (isAudioOnly) {
14
+ return null;
15
+ }
16
+ const files = await fs_1.default.promises.readdir(dir);
17
+ const numbers = files
18
+ .filter((f) => f.match(/element-([0-9]+)/))
19
+ .map((f) => {
20
+ var _a;
21
+ return (_a = f.match(/element-([0-9]+)/)) === null || _a === void 0 ? void 0 : _a[1];
22
+ })
23
+ .map((f) => Number(f));
24
+ const biggestNumber = (0, min_max_1.max)(numbers);
25
+ const smallestNumber = (0, min_max_1.min)(numbers);
26
+ const numberLength = String(biggestNumber).length;
27
+ return { numberLength, startNumber: smallestNumber };
28
+ };
29
+ exports.getFrameInfo = getFrameInfo;
30
+ //# sourceMappingURL=get-frame-number-length.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-frame-number-length.js","sourceRoot":"","sources":["../src/get-frame-number-length.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,uCAAmC;AAEnC,6EAA6E;AAC7E,4EAA4E;AAC5E,sBAAsB;AACf,MAAM,YAAY,GAAG,KAAK,EAAE,EAClC,GAAG,EACH,WAAW,GAIX,EAGE,EAAE;IACJ,IAAI,WAAW,EAAE;QAChB,OAAO,IAAI,CAAC;KACZ;IAED,MAAM,KAAK,GAAG,MAAM,YAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,KAAK;SACnB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;SAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;QACV,OAAO,MAAA,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,0CAAG,CAAC,CAAW,CAAC;IACnD,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,aAAa,GAAG,IAAA,aAAG,EAAC,OAAO,CAAC,CAAC;IACnC,MAAM,cAAc,GAAG,IAAA,aAAG,EAAC,OAAO,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAC,CAAC;AACpD,CAAC,CAAC;AAzBW,QAAA,YAAY,gBAyBvB"}
@@ -0,0 +1,3 @@
1
+ import { FrameRange } from 'remotion';
2
+ export declare const getFrameCount: (totalDuration: number, frameRange: FrameRange | null) => number;
3
+ //# sourceMappingURL=get-frame-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-frame-range.d.ts","sourceRoot":"","sources":["../src/get-frame-range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,aAAa,kBACV,MAAM,cACT,UAAU,GAAG,IAAI,KAC3B,MA8BF,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFrameCount = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const getFrameCount = (totalDuration, frameRange) => {
6
+ remotion_1.Internals.validateFrameRange(frameRange);
7
+ if (!frameRange) {
8
+ return totalDuration;
9
+ }
10
+ if (typeof frameRange === 'number') {
11
+ if (frameRange < 0 || frameRange >= totalDuration) {
12
+ throw new Error(`Frame number is out of range, must be between 0 and ${totalDuration - 1} but got ${frameRange}`);
13
+ }
14
+ return 1;
15
+ }
16
+ const [start, end] = frameRange;
17
+ if (frameRange[1] >= totalDuration || frameRange[0] < 0) {
18
+ throw new Error(`Frame range ${frameRange.join('-')} is not in between 0-${totalDuration - 1}`);
19
+ }
20
+ return end - start + 1;
21
+ };
22
+ exports.getFrameCount = getFrameCount;
23
+ //# sourceMappingURL=get-frame-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-frame-range.js","sourceRoot":"","sources":["../src/get-frame-range.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAExC,MAAM,aAAa,GAAG,CAC5B,aAAqB,EACrB,UAA6B,EACpB,EAAE;IACX,oBAAS,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAEzC,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,aAAa,CAAC;KACrB;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QACnC,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,IAAI,aAAa,EAAE;YAClD,MAAM,IAAI,KAAK,CACd,uDACC,aAAa,GAAG,CACjB,YAAY,UAAU,EAAE,CACxB,CAAC;SACF;QAED,OAAO,CAAC,CAAC;KACT;IAED,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,UAAU,CAAC;IAEhC,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,aAAa,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;QACxD,MAAM,IAAI,KAAK,CACd,eAAe,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,wBAClC,aAAa,GAAG,CACjB,EAAE,CACF,CAAC;KACF;IAED,OAAO,GAAG,GAAG,KAAK,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC;AAjCW,QAAA,aAAa,iBAiCxB"}
@@ -0,0 +1,32 @@
1
+ import {Page} from 'puppeteer-core';
2
+ import {SymbolicatedStackFrame} from '../symbolicate-stacktrace';
3
+ export declare class ErrorWithStackFrame extends Error {
4
+ stackFrames: SymbolicatedStackFrame[];
5
+ frame: number | null;
6
+ errorType: string;
7
+ delayRenderCall: SymbolicatedStackFrame[] | null;
8
+ constructor({
9
+ message,
10
+ _stackFrames,
11
+ _frame,
12
+ _errorType,
13
+ _delayRenderCall,
14
+ }: {
15
+ message: string;
16
+ _stackFrames: SymbolicatedStackFrame[];
17
+ _frame: number | null;
18
+ _errorType: string;
19
+ _delayRenderCall: SymbolicatedStackFrame[] | null;
20
+ });
21
+ }
22
+ export declare const removeDelayRenderStack: (message: string) => string;
23
+ export declare const handleJavascriptException: ({
24
+ page,
25
+ onError,
26
+ frame,
27
+ }: {
28
+ page: Page;
29
+ frame: number | null;
30
+ onError: (err: Error) => void;
31
+ }) => () => void;
32
+ // # sourceMappingURL=handle-javascript-exception.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-javascript-exception.d.ts","sourceRoot":"","sources":["../src/handle-javascript-exception.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAW,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EACN,sBAAsB,EAEtB,MAAM,0BAA0B,CAAC;AAElC,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;gBAErC,EACX,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,gBAAgB,GAChB,EAAE;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,sBAAsB,EAAE,CAAC;QACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;KAClD;CAOD;AAmBD,eAAO,MAAM,sBAAsB,YAAa,MAAM,WAOrD,CAAC;AAaF,eAAO,MAAM,yBAAyB;UAK/B,IAAI;WACH,MAAM,GAAG,IAAI;mBACL,KAAK,KAAK,IAAI;gBA8C7B,CAAC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleJavascriptException = exports.removeDelayRenderStack = exports.ErrorWithStackFrame = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const delay_render_embedded_stack_1 = require("./delay-render-embedded-stack");
6
+ const symbolicate_stacktrace_1 = require("./symbolicate-stacktrace");
7
+ class ErrorWithStackFrame extends Error {
8
+ constructor({ message, _stackFrames, _frame, _errorType, _delayRenderCall, }) {
9
+ super(message);
10
+ this.stackFrames = _stackFrames;
11
+ this.frame = _frame;
12
+ this.errorType = _errorType;
13
+ this.delayRenderCall = _delayRenderCall;
14
+ }
15
+ }
16
+ exports.ErrorWithStackFrame = ErrorWithStackFrame;
17
+ const cleanUpErrorMessage = (exception) => {
18
+ var _a, _b, _c, _d;
19
+ let errorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
20
+ const errorType = (_b = exception.exceptionDetails.exception) === null || _b === void 0 ? void 0 : _b.className;
21
+ const prefix = `${errorType}: `;
22
+ if (errorMessage.startsWith(prefix)) {
23
+ errorMessage = errorMessage.substring(prefix.length);
24
+ }
25
+ const frames = (_d = (_c = exception.exceptionDetails.stackTrace) === null || _c === void 0 ? void 0 : _c.callFrames.length) !== null && _d !== void 0 ? _d : 0;
26
+ const split = errorMessage.split('\n');
27
+ return split.slice(0, split.length - frames).join('\n');
28
+ };
29
+ const removeDelayRenderStack = (message) => {
30
+ const index = message.indexOf(remotion_1.DELAY_RENDER_CALLSTACK_TOKEN);
31
+ if (index === -1) {
32
+ return message;
33
+ }
34
+ return message.substring(0, index);
35
+ };
36
+ exports.removeDelayRenderStack = removeDelayRenderStack;
37
+ const callFrameToStackFrame = (callFrame) => {
38
+ return {
39
+ columnNumber: callFrame.columnNumber,
40
+ fileName: callFrame.url,
41
+ functionName: callFrame.functionName,
42
+ lineNumber: callFrame.lineNumber,
43
+ };
44
+ };
45
+ const handleJavascriptException = ({ page, onError, frame, }) => {
46
+ const client = page._client;
47
+ const handler = async (exception) => {
48
+ var _a, _b;
49
+ const rawErrorMessage = (_a = exception.exceptionDetails.exception) === null || _a === void 0 ? void 0 : _a.description;
50
+ const cleanErrorMessage = cleanUpErrorMessage(exception);
51
+ const err = new Error((0, exports.removeDelayRenderStack)(cleanErrorMessage));
52
+ err.stack = rawErrorMessage;
53
+ if (!exception.exceptionDetails.stackTrace) {
54
+ onError(err);
55
+ return;
56
+ }
57
+ const errorType = (_b = exception.exceptionDetails.exception) === null || _b === void 0 ? void 0 : _b.className;
58
+ const delayRenderStack = await (0, delay_render_embedded_stack_1.parseDelayRenderEmbeddedStack)(cleanErrorMessage);
59
+ try {
60
+ const sym = await (0, symbolicate_stacktrace_1.symbolicateStackTrace)(exception.exceptionDetails.stackTrace
61
+ .callFrames.map((f) => callFrameToStackFrame(f)));
62
+ const symbolicatedErr = new ErrorWithStackFrame({
63
+ message: (0, exports.removeDelayRenderStack)(cleanErrorMessage),
64
+ _stackFrames: sym,
65
+ _frame: frame,
66
+ _errorType: errorType,
67
+ _delayRenderCall: delayRenderStack,
68
+ });
69
+ onError(symbolicatedErr);
70
+ }
71
+ catch (errorVisualizingError) {
72
+ console.log('error symbolicating error:', errorVisualizingError);
73
+ onError(err);
74
+ }
75
+ };
76
+ client.on('Runtime.exceptionThrown', handler);
77
+ return () => {
78
+ client.off('Runtime.exceptionThrown', handler);
79
+ };
80
+ };
81
+ exports.handleJavascriptException = handleJavascriptException;
82
+ //# sourceMappingURL=handle-javascript-exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-javascript-exception.js","sourceRoot":"","sources":["../src/handle-javascript-exception.ts"],"names":[],"mappings":";;;AAEA,uCAAsD;AACtD,+EAA4E;AAC5E,qEAGkC;AAElC,MAAa,mBAAoB,SAAQ,KAAK;IAM7C,YAAY,EACX,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,gBAAgB,GAOhB;QACA,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC;IACzC,CAAC;CACD;AAzBD,kDAyBC;AAED,MAAM,mBAAmB,GAAG,CAC3B,SAAgD,EAC/C,EAAE;;IACH,IAAI,YAAY,GAAG,MAAA,SAAS,CAAC,gBAAgB,CAAC,SAAS,0CACpD,WAAqB,CAAC;IACzB,MAAM,SAA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,CAAC,EAAE,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAE9C,OAAO,GAAG,EAAE;QACX,MAAM,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC,CAAC;AACH,CAAC,CAAC;AArDW,QAAA,yBAAyB,6BAqDpC"}
@@ -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":""}
@@ -0,0 +1,2 @@
1
+ export declare const isServeUrl: (potentialUrl: string) => boolean;
2
+ //# sourceMappingURL=is-local-file.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ export declare const min: (arr: number[]) => number;
2
+ export declare const max: (arr: number[]) => number;
3
+ //# sourceMappingURL=min-max.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min-max.d.ts","sourceRoot":"","sources":["../src/min-max.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,GAAG,QAAS,MAAM,EAAE,WAchC,CAAC;AAEF,eAAO,MAAM,GAAG,QAAS,MAAM,EAAE,WAchC,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ // Standard library Math.min and Math.max can throw
3
+ // if array length is very long. Fixing this with own implementation
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.max = exports.min = void 0;
6
+ const min = (arr) => {
7
+ if (arr.length === 0) {
8
+ throw new Error('Array of 0 length');
9
+ }
10
+ let smallest = arr[0];
11
+ for (let i = 0; i < arr.length; i++) {
12
+ const elem = arr[i];
13
+ if (elem < smallest) {
14
+ smallest = elem;
15
+ }
16
+ }
17
+ return smallest;
18
+ };
19
+ exports.min = min;
20
+ const max = (arr) => {
21
+ if (arr.length === 0) {
22
+ throw new Error('Array of 0 length');
23
+ }
24
+ let biggest = arr[0];
25
+ for (let i = 0; i < arr.length; i++) {
26
+ const elem = arr[i];
27
+ if (elem > biggest) {
28
+ biggest = elem;
29
+ }
30
+ }
31
+ return biggest;
32
+ };
33
+ exports.max = max;
34
+ //# sourceMappingURL=min-max.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min-max.js","sourceRoot":"","sources":["../src/min-max.ts"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,oEAAoE;;;AAE7D,MAAM,GAAG,GAAG,CAAC,GAAa,EAAE,EAAE;IACpC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACrC;IAED,IAAI,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,IAAI,GAAG,QAAQ,EAAE;YACpB,QAAQ,GAAG,IAAI,CAAC;SAChB;KACD;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAdW,QAAA,GAAG,OAcd;AAEK,MAAM,GAAG,GAAG,CAAC,GAAa,EAAE,EAAE;IACpC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACrC;IAED,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,IAAI,GAAG,OAAO,EAAE;YACnB,OAAO,GAAG,IAAI,CAAC;SACf;KACD;IAED,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAdW,QAAA,GAAG,OAcd"}
package/dist/p-limit.d.ts CHANGED
File without changes
File without changes
package/dist/p-limit.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import puppeteer from 'puppeteer-core';
2
3
  import { ImageFormat } from 'remotion';
3
4
  export declare const provideScreenshot: ({ page, imageFormat, options, quality, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"provide-screenshot.d.ts","sourceRoot":"","sources":["../src/provide-screenshot.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,iBAAiB;UAMvB,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;aAClB;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB;MACE,QAAQ,MAAM,CAUjB,CAAC"}
1
+ {"version":3,"file":"provide-screenshot.d.ts","sourceRoot":"","sources":["../src/provide-screenshot.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,iBAAiB;UAMvB,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;aAClB;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB;MACE,QAAQ,MAAM,CAUjB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Page, ScreenshotOptions } from 'puppeteer-core';
2
3
  export declare const screenshot: (page: Page, options?: ScreenshotOptions) => Promise<Buffer | string | void>;
3
4
  //# 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;AAIvD,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;AAIvD,eAAO,MAAM,UAAU,SAChB,IAAI,YACD,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,CAyFhC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { Browser as PuppeteerBrowser } from 'puppeteer-core';
2
+ import { Browser, Codec, FfmpegExecutable, FrameRange, PixelFormat, ProResProfile, TCompMetadata } from 'remotion';
3
+ export declare type RenderVideoOnDownload = (src: string) => void;
4
+ export declare type RenderVideoOnProgress = (progress: {
5
+ renderedFrames: number;
6
+ encodedFrames: number;
7
+ encodedDoneIn: number | null;
8
+ renderedDoneIn: number | null;
9
+ stitchStage: 'encoding' | 'muxing';
10
+ }) => void;
11
+ export declare type RenderVideoOptions = {
12
+ proResProfile: ProResProfile | undefined;
13
+ parallelism: number | null;
14
+ parallelEncoding: boolean;
15
+ crf: number | null;
16
+ outputDir: string;
17
+ config: TCompMetadata;
18
+ imageFormat: 'png' | 'jpeg' | 'none';
19
+ ffmpegExecutable: FfmpegExecutable;
20
+ inputProps: object;
21
+ pixelFormat: PixelFormat;
22
+ codec: Codec;
23
+ envVariables: Record<string, string>;
24
+ quality: number | undefined;
25
+ frameRange: FrameRange | null;
26
+ browser: Browser;
27
+ serveUrl: string;
28
+ openedBrowser: PuppeteerBrowser;
29
+ overwrite: boolean;
30
+ absoluteOutputFile: string;
31
+ onProgress: RenderVideoOnProgress;
32
+ shouldOutputImageSequence: boolean;
33
+ fileExtension: string | null;
34
+ bundled: string;
35
+ onDownload: (src: string) => void;
36
+ };
37
+ export declare const renderVideo: ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, shouldOutputImageSequence, fileExtension, bundled, onDownload, }: RenderVideoOptions) => Promise<void>;
38
+ //# sourceMappingURL=render-video.d.ts.map
@@ -0,0 +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,UAAU,GAAG,QAAQ,CAAC;CACnC,KAAK,IAAI,CAAC;AAEX,oBAAY,kBAAkB,GAAG;IAChC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,qBAAqB,CAAC;IAClC,yBAAyB,EAAE,OAAO,CAAC;IACnC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,WAAW,4TAyBrB,kBAAkB,kBAuKpB,CAAC"}
@@ -0,0 +1,169 @@
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.renderVideo = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const remotion_1 = require("remotion");
10
+ const stitcher_1 = require("./stitcher");
11
+ const render_1 = require("./render");
12
+ const renderVideo = async ({ parallelism, proResProfile, parallelEncoding, crf, outputDir, config, imageFormat, ffmpegExecutable, inputProps, pixelFormat, codec, envVariables, quality, frameRange, browser, serveUrl, openedBrowser, absoluteOutputFile, onProgress, overwrite, shouldOutputImageSequence, fileExtension, bundled, onDownload, }) => {
13
+ var _a, _b;
14
+ let stitcherFfmpeg;
15
+ let preStitcher;
16
+ let encodedFrames = 0;
17
+ let renderedFrames = 0;
18
+ let preEncodedFileLocation;
19
+ let renderedDoneIn = null;
20
+ let encodedDoneIn = null;
21
+ const renderStart = Date.now();
22
+ if (parallelEncoding) {
23
+ if (typeof crf !== 'number') {
24
+ throw new TypeError('CRF is unexpectedly not a number');
25
+ }
26
+ preEncodedFileLocation = path_1.default.join(outputDir, 'pre-encode.' + fileExtension);
27
+ preStitcher = await (0, stitcher_1.spawnFfmpeg)({
28
+ dir: outputDir,
29
+ width: config.width,
30
+ height: config.height,
31
+ fps: config.fps,
32
+ outputLocation: preEncodedFileLocation,
33
+ force: true,
34
+ imageFormat,
35
+ pixelFormat,
36
+ codec,
37
+ proResProfile,
38
+ crf,
39
+ parallelism,
40
+ onProgress: (frame) => {
41
+ encodedFrames = frame;
42
+ onProgress({
43
+ encodedFrames,
44
+ renderedFrames,
45
+ encodedDoneIn: null,
46
+ renderedDoneIn: null,
47
+ stitchStage: 'encoding',
48
+ });
49
+ },
50
+ verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
51
+ parallelEncoding,
52
+ webpackBundle: bundled,
53
+ ffmpegExecutable,
54
+ assetsInfo: { assets: [] },
55
+ });
56
+ stitcherFfmpeg = preStitcher.task;
57
+ }
58
+ const renderer = (0, render_1.renderFrames)({
59
+ config,
60
+ onFrameUpdate: (frame) => {
61
+ renderedFrames = frame;
62
+ onProgress({
63
+ encodedFrames,
64
+ renderedFrames,
65
+ encodedDoneIn,
66
+ renderedDoneIn,
67
+ stitchStage: 'encoding',
68
+ });
69
+ },
70
+ parallelism,
71
+ parallelEncoding,
72
+ outputDir,
73
+ onStart: () => {
74
+ renderedFrames = 0;
75
+ onProgress({
76
+ encodedDoneIn,
77
+ encodedFrames,
78
+ renderedDoneIn,
79
+ renderedFrames,
80
+ // TODO: Keep a state
81
+ stitchStage: 'encoding',
82
+ });
83
+ },
84
+ inputProps,
85
+ envVariables,
86
+ imageFormat,
87
+ quality,
88
+ browser,
89
+ frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
90
+ puppeteerInstance: openedBrowser,
91
+ writeFrame: async (buffer) => {
92
+ var _a;
93
+ (_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.write(buffer);
94
+ },
95
+ serveUrl,
96
+ });
97
+ const { assetsInfo } = await renderer;
98
+ if (stitcherFfmpeg) {
99
+ (_a = stitcherFfmpeg === null || stitcherFfmpeg === void 0 ? void 0 : stitcherFfmpeg.stdin) === null || _a === void 0 ? void 0 : _a.end();
100
+ await stitcherFfmpeg;
101
+ (_b = preStitcher === null || preStitcher === void 0 ? void 0 : preStitcher.cleanup) === null || _b === void 0 ? void 0 : _b.call(preStitcher);
102
+ }
103
+ const closeBrowserPromise = openedBrowser.close();
104
+ renderedDoneIn = Date.now() - renderStart;
105
+ onProgress({
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
+ }
118
+ if (typeof crf !== 'number') {
119
+ throw new TypeError('CRF is unexpectedly not a number');
120
+ }
121
+ const dirName = path_1.default.dirname(absoluteOutputFile);
122
+ if (!fs_1.default.existsSync(dirName)) {
123
+ fs_1.default.mkdirSync(dirName, {
124
+ recursive: true,
125
+ });
126
+ }
127
+ const stitchStart = Date.now();
128
+ await (0, stitcher_1.stitchFramesToVideo)({
129
+ dir: outputDir,
130
+ width: config.width,
131
+ height: config.height,
132
+ fps: config.fps,
133
+ outputLocation: absoluteOutputFile,
134
+ preEncodedFileLocation,
135
+ force: overwrite,
136
+ imageFormat,
137
+ pixelFormat,
138
+ codec,
139
+ proResProfile,
140
+ crf,
141
+ assetsInfo,
142
+ parallelism,
143
+ ffmpegExecutable,
144
+ onProgress: (frame) => {
145
+ onProgress({
146
+ encodedFrames: frame,
147
+ renderedFrames,
148
+ renderedDoneIn,
149
+ encodedDoneIn,
150
+ stitchStage: 'muxing',
151
+ });
152
+ },
153
+ // TODO: Optimization, Now can download before!
154
+ onDownload,
155
+ webpackBundle: bundled,
156
+ verbose: remotion_1.Internals.Logging.isEqualOrBelowLogLevel('verbose'),
157
+ });
158
+ encodedDoneIn = Date.now() - stitchStart;
159
+ onProgress({
160
+ encodedDoneIn,
161
+ encodedFrames,
162
+ renderedDoneIn,
163
+ renderedFrames,
164
+ stitchStage: 'muxing',
165
+ });
166
+ await closeBrowserPromise;
167
+ };
168
+ exports.renderVideo = renderVideo;
169
+ //# sourceMappingURL=render-video.js.map
@@ -0,0 +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;AAuC/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,yBAAyB,EACzB,aAAa,EACb,OAAO,EACP,UAAU,GACU,EAAE,EAAE;;IACxB,IAAI,cAAqD,CAAC;IAC1D,IAAI,WAAW,CAAC;IAChB,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,sBAA0C,CAAC;IAC/C,IAAI,cAAc,GAAkB,IAAI,CAAC;IACzC,IAAI,aAAa,GAAkB,IAAI,CAAC;IACxC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE/B,IAAI,gBAAgB,EAAE;QACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC5B,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;SACxD;QAED,sBAAsB,GAAG,cAAI,CAAC,IAAI,CACjC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B,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,UAAU,CAAC;gBACV,aAAa,EAAE,KAAK;gBACpB,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,WAAW,EAAE,QAAQ;aACrB,CAAC,CAAC;QACJ,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,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;IACzC,UAAU,CAAC;QACV,aAAa;QACb,aAAa;QACb,cAAc;QACd,cAAc;QACd,WAAW,EAAE,QAAQ;KACrB,CAAC,CAAC;IAEH,MAAM,mBAAmB,CAAC;AAC3B,CAAC,CAAC;AAhMW,QAAA,WAAW,eAgMtB"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import puppeteer from 'puppeteer-core';
2
3
  import { ImageFormat } from 'remotion';
3
4
  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;AAIrC,eAAO,MAAM,oBAAoB;UAM1B,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;;;;;MAKxB,QAAQ,MAAM,CAoCjB,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;AAIrC,eAAO,MAAM,oBAAoB;UAM1B,UAAU,IAAI;iBACP,WAAW;aACf,MAAM,GAAG,SAAS;;;;;MAKxB,QAAQ,MAAM,CAoCjB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Page, ScreenshotOptions } from 'puppeteer-core';
2
3
  import { StillImageFormat } from 'remotion';
3
4
  export declare const _screenshotTask: (page: Page, format: StillImageFormat, options: ScreenshotOptions) => Promise<Buffer | string>;
@@ -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;AAC3E,OAAO,EAAY,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,eAAe,SACrB,IAAI,UACF,gBAAgB,WACf,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;AAC3E,OAAO,EAAY,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,eAAe,SACrB,IAAI,UACF,gBAAgB,WACf,iBAAiB,KACxB,QAAQ,MAAM,GAAG,MAAM,CAqCzB,CAAC"}
@@ -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": "4.0.0-audio.35+765608889",
3
+ "version": "4.0.0-audio.36+fa4e5defb",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,10 +20,10 @@
20
20
  "url": "https://github.com/remotion-dev/remotion/issues"
21
21
  },
22
22
  "dependencies": {
23
- "@remotion/bundler": "4.0.0-audio.35+765608889",
23
+ "@remotion/bundler": "4.0.0-audio.36+fa4e5defb",
24
24
  "execa": "5.1.1",
25
25
  "puppeteer-core": "13.5.1",
26
- "remotion": "4.0.0-audio.35+765608889",
26
+ "remotion": "4.0.0-audio.36+fa4e5defb",
27
27
  "serve-handler": "6.1.3",
28
28
  "source-map": "^0.8.0-beta.0"
29
29
  },
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "765608889aa560d027572316346036783c185483"
63
+ "gitHead": "fa4e5defbd0883770aaff300543b2e50e6617dec"
64
64
  }