@remotion/renderer 3.2.28 → 3.2.29
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/combine-videos.js +1 -1
- package/dist/ffmpeg-args-hook.d.ts +4 -0
- package/dist/ffmpeg-args-hook.js +2 -0
- package/dist/make-assets-download-dir.d.ts +1 -0
- package/dist/make-assets-download-dir.js +13 -0
- package/dist/render-media.d.ts +1 -0
- package/dist/render-media.js +5 -2
- package/dist/validate-ffmpeg-args-hook.d.ts +2 -0
- package/dist/validate-ffmpeg-args-hook.js +12 -0
- package/dist/validate-ffmpeg-override-fn.d.ts +2 -0
- package/dist/validate-ffmpeg-override-fn.js +12 -0
- package/package.json +3 -3
- package/dist/assets/dl-browser.d.ts +0 -1
- package/dist/assets/dl-browser.js +0 -38
package/dist/combine-videos.js
CHANGED
|
@@ -37,7 +37,7 @@ const combineVideos = async ({ files, filelistDir, output, onProgress, numberOfF
|
|
|
37
37
|
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : codec === 'gif' ? 'gif' : 'copy',
|
|
38
38
|
'-c:a',
|
|
39
39
|
(0, get_audio_codec_name_1.getAudioCodecName)(codec),
|
|
40
|
-
// Set max bitrate up to
|
|
40
|
+
// Set max bitrate up to 512kbps, will choose lower if that's too much
|
|
41
41
|
'-b:a',
|
|
42
42
|
'512K',
|
|
43
43
|
codec === 'h264' ? '-movflags' : null,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const makeAssetsDownloadTmpDir: () => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeAssetsDownloadTmpDir = void 0;
|
|
4
|
+
const tmp_dir_1 = require("./tmp-dir");
|
|
5
|
+
let dir = null;
|
|
6
|
+
const makeAssetsDownloadTmpDir = () => {
|
|
7
|
+
if (dir) {
|
|
8
|
+
return dir;
|
|
9
|
+
}
|
|
10
|
+
dir = (0, tmp_dir_1.tmpDir)('remotion-assets-dir');
|
|
11
|
+
return dir;
|
|
12
|
+
};
|
|
13
|
+
exports.makeAssetsDownloadTmpDir = makeAssetsDownloadTmpDir;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare type RenderMediaOptions = {
|
|
|
61
61
|
muted?: boolean;
|
|
62
62
|
enforceAudioTrack?: boolean;
|
|
63
63
|
ffmpegOverride?: FfmpegOverrideFn;
|
|
64
|
+
disallowParallelEncoding?: boolean;
|
|
64
65
|
} & ServeUrlOrWebpackBundle & ConcurrencyOrParallelism;
|
|
65
66
|
declare type ConcurrencyOrParallelism = {
|
|
66
67
|
concurrency?: number | null;
|
package/dist/render-media.js
CHANGED
|
@@ -79,10 +79,13 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
79
79
|
height: composition.height,
|
|
80
80
|
width: composition.width,
|
|
81
81
|
});
|
|
82
|
-
const parallelEncoding =
|
|
82
|
+
const parallelEncoding = !options.disallowParallelEncoding &&
|
|
83
|
+
hasEnoughMemory &&
|
|
84
|
+
(0, can_use_parallel_encoding_1.canUseParallelEncoding)(codec);
|
|
83
85
|
if (options.verbose) {
|
|
84
86
|
console.log('[PRESTITCHER] Free memory:', freeMemory, 'Estimated usage parallel encoding', estimatedUsage);
|
|
85
|
-
console.log('[
|
|
87
|
+
console.log('[PRESTITCHER]: Codec supports parallel rendering:', (0, can_use_parallel_encoding_1.canUseParallelEncoding)(codec));
|
|
88
|
+
console.log('[PRESTITCHER]: User disallowed parallel encoding:', Boolean(options.disallowParallelEncoding));
|
|
86
89
|
if (parallelEncoding) {
|
|
87
90
|
console.log('[PRESTITCHER] Parallel encoding is enabled.');
|
|
88
91
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFfmpegArgsHook = void 0;
|
|
4
|
+
const validateFfmpegArgsHook = (ffmpegArgsHook) => {
|
|
5
|
+
if (typeof ffmpegArgsHook === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (ffmpegArgsHook && typeof ffmpegArgsHook !== 'function') {
|
|
9
|
+
throw new TypeError(`Argument passed for "ffmpegArgsHook" is not a function: ${ffmpegArgsHook}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.validateFfmpegArgsHook = validateFfmpegArgsHook;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFfmpegOverride = void 0;
|
|
4
|
+
const validateFfmpegOverride = (ffmpegArgsHook) => {
|
|
5
|
+
if (typeof ffmpegArgsHook === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (ffmpegArgsHook && typeof ffmpegArgsHook !== 'function') {
|
|
9
|
+
throw new TypeError(`Argument passed for "ffmpegArgsHook" is not a function: ${ffmpegArgsHook}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.validateFfmpegOverride = validateFfmpegOverride;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.29",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"execa": "5.1.1",
|
|
24
24
|
"extract-zip": "2.0.1",
|
|
25
|
-
"remotion": "3.2.
|
|
25
|
+
"remotion": "3.2.29",
|
|
26
26
|
"source-map": "^0.8.0-beta.0",
|
|
27
27
|
"ws": "8.7.0"
|
|
28
28
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9a2ff4d68324af8d1fe55ebdf94bdadccf446a10"
|
|
61
61
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const downloadBrowser: (url: string) => Promise<void>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.downloadBrowser = void 0;
|
|
4
|
-
const listeners = {};
|
|
5
|
-
const isDownloading = {};
|
|
6
|
-
const waitForFfmpegToBeDownloaded = (url) => {
|
|
7
|
-
return new Promise((resolve) => {
|
|
8
|
-
if (!listeners[url]) {
|
|
9
|
-
listeners[url] = [];
|
|
10
|
-
}
|
|
11
|
-
listeners[url].push(resolve);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
const downloadBrowser = async (url) => {
|
|
15
|
-
if (isDownloading[url]) {
|
|
16
|
-
console.log('WAITING');
|
|
17
|
-
return waitForFfmpegToBeDownloaded(url);
|
|
18
|
-
}
|
|
19
|
-
isDownloading[url] = true;
|
|
20
|
-
await new Promise((resolve) => {
|
|
21
|
-
console.log('DOWNLOADING BROWSER');
|
|
22
|
-
setTimeout(resolve, 20000);
|
|
23
|
-
});
|
|
24
|
-
isDownloading[url] = false;
|
|
25
|
-
if (!listeners[url]) {
|
|
26
|
-
listeners[url] = [];
|
|
27
|
-
}
|
|
28
|
-
listeners[url].forEach((listener) => listener());
|
|
29
|
-
listeners[url] = [];
|
|
30
|
-
};
|
|
31
|
-
exports.downloadBrowser = downloadBrowser;
|
|
32
|
-
(0, exports.downloadBrowser)('https://remotion.dev').then(() => {
|
|
33
|
-
(0, exports.downloadBrowser)('https://remotion.dev').then(() => {
|
|
34
|
-
(0, exports.downloadBrowser)('https://remotion.dev').then(() => console.log('FINISHED DOWNLOADING'));
|
|
35
|
-
(0, exports.downloadBrowser)('https://remotion.dev').then(() => console.log('FINISHED DOWNLOADING'));
|
|
36
|
-
(0, exports.downloadBrowser)('https://remotion.dev').then(() => console.log('FINISHED DOWNLOADING'));
|
|
37
|
-
});
|
|
38
|
-
});
|