@remotion/serverless 4.0.391 → 4.0.392
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bestFramesPerFunctionParam: (frameCount: number) => number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bestFramesPerFunctionParam = void 0;
|
|
4
|
+
const serverless_client_1 = require("@remotion/serverless-client");
|
|
5
|
+
// Always update the code in docs/lambda/concurrency.md too
|
|
6
|
+
const bestFramesPerFunctionParam = (frameCount) => {
|
|
7
|
+
// Between 0 and 10 minutes (at 30fps), interpolate the concurrency from 75 to 150
|
|
8
|
+
const concurrency = (0, serverless_client_1.interpolate)(frameCount, [0, 18000], [75, 150], {
|
|
9
|
+
extrapolateRight: 'clamp',
|
|
10
|
+
});
|
|
11
|
+
// At least have 20 as a `framesPerFunction` value
|
|
12
|
+
const framesPerFunction = Math.max(frameCount / concurrency, 20);
|
|
13
|
+
// Evenly distribute: For 21 frames over 2 functions, distribute as 11 + 10 ==> framesPerLambda = 11
|
|
14
|
+
const functionsNeeded = Math.ceil(frameCount / framesPerFunction);
|
|
15
|
+
return Math.ceil(frameCount / functionsNeeded);
|
|
16
|
+
};
|
|
17
|
+
exports.bestFramesPerFunctionParam = bestFramesPerFunctionParam;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/serverless"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/serverless",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.392",
|
|
7
7
|
"description": "A runtime for distributed rendering",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/bundler": "4.0.
|
|
28
|
-
"@remotion/licensing": "4.0.
|
|
29
|
-
"@remotion/serverless-client": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.392",
|
|
27
|
+
"@remotion/bundler": "4.0.392",
|
|
28
|
+
"@remotion/licensing": "4.0.392",
|
|
29
|
+
"@remotion/serverless-client": "4.0.392"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
+
"@remotion/eslint-config-internal": "4.0.392",
|
|
33
33
|
"eslint": "9.19.0"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|