@remotion/serverless-client 4.0.364 → 4.0.365

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 (67) hide show
  1. package/dist/esm/index.mjs +1 -1
  2. package/package.json +5 -5
  3. package/.turbo/turbo-formatting.log +0 -4
  4. package/.turbo/turbo-lint.log +0 -15
  5. package/.turbo/turbo-make.log +0 -3
  6. package/bundle.ts +0 -15
  7. package/dist/test/best-frames.test.d.ts +0 -1
  8. package/dist/test/best-frames.test.js +0 -16
  9. package/dist/test/dont-contain-forbidden.test.d.ts +0 -1
  10. package/dist/test/dont-contain-forbidden.test.js +0 -18
  11. package/dist/test/expected-out-name.test.d.ts +0 -1
  12. package/dist/test/expected-out-name.test.js +0 -168
  13. package/dist/test/min-max.test.d.ts +0 -1
  14. package/dist/test/min-max.test.js +0 -24
  15. package/dist/test/most-expensive-chunks.test.d.ts +0 -1
  16. package/dist/test/most-expensive-chunks.test.js +0 -163
  17. package/eslint.config.mjs +0 -5
  18. package/src/await.ts +0 -1
  19. package/src/best-frames-per-function-param.ts +0 -18
  20. package/src/calculate-chunk-times.ts +0 -42
  21. package/src/compress-props.ts +0 -179
  22. package/src/constants.ts +0 -408
  23. package/src/docs-url.ts +0 -1
  24. package/src/error-category.ts +0 -14
  25. package/src/estimate-price-from-bucket.ts +0 -59
  26. package/src/expected-out-name.ts +0 -83
  27. package/src/format-costs-info.ts +0 -24
  28. package/src/get-custom-out-name.ts +0 -44
  29. package/src/get-files-in-folder.ts +0 -6
  30. package/src/get-or-create-bucket.ts +0 -85
  31. package/src/get-overall-progress-from-storage.ts +0 -47
  32. package/src/get-overall-progress.ts +0 -42
  33. package/src/index.ts +0 -125
  34. package/src/input-props-keys.ts +0 -7
  35. package/src/inspect-error.ts +0 -63
  36. package/src/make-bucket-name.ts +0 -9
  37. package/src/make-timeout-error.ts +0 -51
  38. package/src/make-timeout-message.ts +0 -118
  39. package/src/min-max.ts +0 -34
  40. package/src/most-expensive-chunks.ts +0 -46
  41. package/src/overall-render-progress.ts +0 -30
  42. package/src/progress.ts +0 -330
  43. package/src/provider-implementation.ts +0 -268
  44. package/src/render-has-audio-video.ts +0 -28
  45. package/src/render-metadata.ts +0 -61
  46. package/src/render-progress.ts +0 -58
  47. package/src/return-values.ts +0 -45
  48. package/src/serialize-artifact.ts +0 -66
  49. package/src/stream-to-string.ts +0 -14
  50. package/src/streaming/streaming.ts +0 -148
  51. package/src/test/best-frames.test.ts +0 -15
  52. package/src/test/dont-contain-forbidden.test.ts +0 -14
  53. package/src/test/expected-out-name.test.ts +0 -200
  54. package/src/test/min-max.test.ts +0 -25
  55. package/src/test/most-expensive-chunks.test.ts +0 -167
  56. package/src/truthy.ts +0 -5
  57. package/src/types.ts +0 -82
  58. package/src/validate-bucket-name.ts +0 -34
  59. package/src/validate-download-behavior.ts +0 -26
  60. package/src/validate-frames-per-function.ts +0 -125
  61. package/src/validate-outname.ts +0 -63
  62. package/src/validate-privacy.ts +0 -20
  63. package/src/validate-webhook.ts +0 -18
  64. package/src/webhook-types.ts +0 -36
  65. package/src/write-error-to-storage.ts +0 -23
  66. package/tsconfig.json +0 -18
  67. package/tsconfig.tsbuildinfo +0 -1
@@ -833,7 +833,7 @@ var validateFramesPerFunction = ({
833
833
  import * as tty from "tty";
834
834
 
835
835
  // ../core/dist/esm/version.mjs
836
- var VERSION = "4.0.364";
836
+ var VERSION = "4.0.365";
837
837
 
838
838
  // ../renderer/dist/esm/error-handling.mjs
839
839
  var isColorSupported = () => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/serverless-client"
4
4
  },
5
5
  "name": "@remotion/serverless-client",
6
- "version": "4.0.364",
6
+ "version": "4.0.365",
7
7
  "main": "dist",
8
8
  "sideEffects": false,
9
9
  "scripts": {
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "dependencies": {},
25
25
  "devDependencies": {
26
- "remotion": "4.0.364",
27
- "@remotion/streaming": "4.0.364",
28
- "@remotion/renderer": "4.0.364",
29
- "@remotion/eslint-config-internal": "4.0.364",
26
+ "remotion": "4.0.365",
27
+ "@remotion/streaming": "4.0.365",
28
+ "@remotion/renderer": "4.0.365",
29
+ "@remotion/eslint-config-internal": "4.0.365",
30
30
  "eslint": "9.19.0"
31
31
  },
32
32
  "exports": {
@@ -1,4 +0,0 @@
1
-
2
- $ prettier --experimental-cli src --check
3
- [?25l- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ Checking formatting...| Checking formatting.../ Checking formatting...- Checking formatting...\ src/docs-url.ts| src/docs-url.ts/ src/get-custom-out-name.ts- src/error-category.ts\ src/error-category.ts| src/input-props-keys.ts/ src/input-props-keys.ts- src/input-props-keys.ts\ src/input-props-keys.ts| src/input-props-keys.ts/ src/input-props-keys.ts- src/estimate-price-from-bucket.ts\ src/estimate-price-from-bucket.ts| src/estimate-price-from-bucket.ts/ src/get-files-in-folder.ts- src/get-files-in-folder.ts\ src/get-files-in-folder.ts| src/get-files-in-folder.ts/ src/get-files-in-folder.ts- src/get-files-in-folder.ts\ src/index.ts| src/best-frames-per-function-param.ts/ src/best-frames-per-function-param.ts- src/make-timeout-error.ts\ src/make-timeout-message.ts| src/get-or-create-bucket.ts/ src/get-or-create-bucket.ts- src/calculate-chunk-times.ts\ src/min-max.ts| src/most-expensive-chunks.ts/ src/truthy.ts- src/types.ts\ src/stream-to-string.ts| src/test/best-frames.test.ts/ src/test/dont-contain-forbidden.test.ts- src/test/most-expensive-chunks.test.ts\ src/progress.ts| src/streaming/streaming.ts[?25hChecking formatting...
4
- [?25hAll matched files use Prettier code style!
@@ -1,15 +0,0 @@
1
-
2
- $ eslint src
3
- =============
4
-
5
- WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
6
-
7
- You may find that it works just fine, or you may not.
8
-
9
- SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.7.0
10
-
11
- YOUR TYPESCRIPT VERSION: 5.8.2
12
-
13
- Please only submit bug reports when using the officially supported version.
14
-
15
- =============
@@ -1,3 +0,0 @@
1
-
2
- $ tsc -d && bun --env-file=../.env.bundle bundle.ts
3
- [11.65ms] Generated.
package/bundle.ts DELETED
@@ -1,15 +0,0 @@
1
- import {buildPackage} from '../.monorepo/builder';
2
-
3
- await buildPackage({
4
- formats: {
5
- cjs: 'use-tsc',
6
- esm: 'build',
7
- },
8
- external: [],
9
- entrypoints: [
10
- {
11
- path: 'src/index.ts',
12
- target: 'node',
13
- },
14
- ],
15
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const best_frames_per_function_param_1 = require("../best-frames-per-function-param");
5
- (0, bun_test_1.test)('Get reasonable framesPerFunction defaults', () => {
6
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(20)).toEqual(20);
7
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(21)).toEqual(11);
8
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(100)).toEqual(20);
9
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(2000)).toEqual(24);
10
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(4000)).toEqual(44);
11
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(8000)).toEqual(74);
12
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(10000)).toEqual(86);
13
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(14000)).toEqual(105);
14
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(18000)).toEqual(120);
15
- (0, bun_test_1.expect)((0, best_frames_per_function_param_1.bestFramesPerFunctionParam)(216000)).toEqual(1440);
16
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +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
- const bun_test_1 = require("bun:test");
7
- const path_1 = __importDefault(require("path"));
8
- (0, bun_test_1.test)('Should not contain forbidden imports', async () => {
9
- const output = await Bun.build({
10
- external: ['@remotion/renderer', 'react/jsx-runtime'],
11
- entrypoints: [path_1.default.join(__filename, '..', '..', 'index.ts')],
12
- });
13
- (0, bun_test_1.expect)(output.outputs.length).toBe(1);
14
- const text = await output.outputs[0].text();
15
- (0, bun_test_1.expect)(text).not.toContain('jsx-runtime');
16
- (0, bun_test_1.expect)(text).not.toContain('"@remotion/renderer"');
17
- (0, bun_test_1.expect)(text).not.toContain("'@remotion/renderer'");
18
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,168 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const expected_out_name_1 = require("../expected-out-name");
5
- const bucketName = 'remotionlambda-98fsduf';
6
- const testRenderMetadata = {
7
- compositionId: 'react-svg',
8
- estimatedRenderLambdaInvokations: 100,
9
- estimatedTotalLambdaInvokations: 100,
10
- framesPerLambda: 20,
11
- imageFormat: 'png',
12
- type: 'video',
13
- inputProps: {
14
- type: 'payload',
15
- payload: '{}',
16
- },
17
- lambdaVersion: '2022-02-14',
18
- memorySizeInMb: 2048,
19
- functionName: 'remotion-render-4-0-187-mem3000mb-disk10000mb-120sec',
20
- rendererFunctionName: 'remotion-render-4-0-187-mem3000mb-disk10000mb-120sec',
21
- outName: undefined,
22
- region: 'eu-central',
23
- renderId: '9n8dsfafs',
24
- siteId: 'my-site',
25
- startedDate: Date.now(),
26
- totalChunks: 20,
27
- privacy: 'public',
28
- everyNthFrame: 1,
29
- frameRange: [0, 199],
30
- audioCodec: null,
31
- deleteAfter: null,
32
- numberOfGifLoops: null,
33
- downloadBehavior: { type: 'play-in-browser' },
34
- audioBitrate: null,
35
- muted: false,
36
- metadata: null,
37
- codec: 'h264',
38
- dimensions: {
39
- width: 1920,
40
- height: 1080,
41
- },
42
- scale: 1,
43
- };
44
- (0, bun_test_1.test)('Should get a custom outname', () => {
45
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
46
- renderMetadata: testRenderMetadata,
47
- bucketName,
48
- customCredentials: null,
49
- bucketNamePrefix: 'remotionlambda-',
50
- })).toEqual({
51
- customCredentials: null,
52
- renderBucketName: 'remotionlambda-98fsduf',
53
- key: 'renders/9n8dsfafs/out.mp4',
54
- });
55
- });
56
- (0, bun_test_1.test)('Should save to a different outname', () => {
57
- const newRenderMetadata = {
58
- ...testRenderMetadata,
59
- outName: {
60
- bucketName: 'my-bucket',
61
- key: 'my-key',
62
- },
63
- };
64
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
65
- renderMetadata: newRenderMetadata,
66
- bucketName,
67
- customCredentials: null,
68
- bucketNamePrefix: 'remotionlambda-',
69
- })).toEqual({
70
- customCredentials: null,
71
- renderBucketName: 'my-bucket',
72
- key: 'my-key',
73
- });
74
- });
75
- (0, bun_test_1.test)('For stills', () => {
76
- const newRenderMetadata = {
77
- ...testRenderMetadata,
78
- codec: null,
79
- type: 'still',
80
- imageFormat: 'png',
81
- };
82
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
83
- renderMetadata: newRenderMetadata,
84
- bucketName,
85
- customCredentials: null,
86
- bucketNamePrefix: 'remotionlambda-',
87
- })).toEqual({
88
- customCredentials: null,
89
- renderBucketName: 'remotionlambda-98fsduf',
90
- key: 'renders/9n8dsfafs/out.png',
91
- });
92
- });
93
- (0, bun_test_1.test)('Just a custom name', () => {
94
- const newRenderMetadata = {
95
- ...testRenderMetadata,
96
- type: 'still',
97
- imageFormat: 'jpeg',
98
- codec: null,
99
- outName: 'justaname.jpeg',
100
- };
101
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
102
- renderMetadata: newRenderMetadata,
103
- bucketName,
104
- customCredentials: null,
105
- bucketNamePrefix: 'remotionlambda-',
106
- })).toEqual({
107
- customCredentials: null,
108
- renderBucketName: 'remotionlambda-98fsduf',
109
- key: 'renders/9n8dsfafs/justaname.jpeg',
110
- });
111
- });
112
- (0, bun_test_1.test)('Should throw on invalid names', () => {
113
- const newRenderMetadata = {
114
- ...testRenderMetadata,
115
- type: 'still',
116
- imageFormat: 'png',
117
- codec: null,
118
- outName: '👺.jpeg',
119
- };
120
- (0, bun_test_1.expect)(() => {
121
- (0, expected_out_name_1.getExpectedOutName)({
122
- renderMetadata: newRenderMetadata,
123
- bucketName,
124
- customCredentials: null,
125
- bucketNamePrefix: 'remotionlambda-',
126
- });
127
- }).toThrow(/The S3 Key must match the RegExp/);
128
- });
129
- (0, bun_test_1.test)('Should allow outName an outname with a slash', () => {
130
- const newRenderMetadata = {
131
- ...testRenderMetadata,
132
- codec: null,
133
- audioCodec: null,
134
- type: 'still',
135
- imageFormat: 'jpeg',
136
- outName: 'justa/name.jpeg',
137
- };
138
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
139
- renderMetadata: newRenderMetadata,
140
- bucketName,
141
- customCredentials: null,
142
- bucketNamePrefix: 'remotionlambda-',
143
- })).toEqual({
144
- customCredentials: null,
145
- key: 'renders/9n8dsfafs/justa/name.jpeg',
146
- renderBucketName: 'remotionlambda-98fsduf',
147
- });
148
- });
149
- (0, bun_test_1.test)('Should allow outName an outname with colon', () => {
150
- const newRenderMetadata = {
151
- ...testRenderMetadata,
152
- codec: null,
153
- audioCodec: null,
154
- type: 'still',
155
- imageFormat: 'jpeg',
156
- outName: 'ap-east-1:xxxxxx/video/XXXXX-0b9ba84XXXX.mp4',
157
- };
158
- (0, bun_test_1.expect)((0, expected_out_name_1.getExpectedOutName)({
159
- renderMetadata: newRenderMetadata,
160
- bucketName,
161
- customCredentials: null,
162
- bucketNamePrefix: 'remotionlambda-',
163
- })).toEqual({
164
- customCredentials: null,
165
- key: 'renders/9n8dsfafs/ap-east-1:xxxxxx/video/XXXXX-0b9ba84XXXX.mp4',
166
- renderBucketName: 'remotionlambda-98fsduf',
167
- });
168
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const min_max_1 = require("../min-max");
5
- (0, bun_test_1.describe)('min() and max()', () => {
6
- (0, bun_test_1.test)('Implemented min() functions correctly', () => {
7
- (0, bun_test_1.expect)((0, min_max_1.min)([0, -30, 90, -120, 0])).toBe(-120);
8
- });
9
- (0, bun_test_1.test)('Implemented max() functions correctly', () => {
10
- (0, bun_test_1.expect)((0, min_max_1.max)([0, -30, 90, -120, 0])).toBe(90);
11
- });
12
- (0, bun_test_1.test)('min() should throw on empty arr', () => {
13
- (0, bun_test_1.expect)(() => (0, min_max_1.min)([])).toThrow(/Array of 0 length/);
14
- });
15
- (0, bun_test_1.test)('max() should throw on empty arr', () => {
16
- (0, bun_test_1.expect)(() => (0, min_max_1.min)([])).toThrow(/Array of 0 length/);
17
- });
18
- const bigArray = new Array(300000).fill(true).map((_, i) => {
19
- return i;
20
- });
21
- (0, bun_test_1.test)('Custom max() should not throw', () => {
22
- (0, bun_test_1.expect)((0, min_max_1.max)(bigArray)).toBe(299999);
23
- });
24
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,163 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bun_test_1 = require("bun:test");
4
- const most_expensive_chunks_1 = require("../most-expensive-chunks");
5
- (0, bun_test_1.test)('Should calculate most expensive chunks', () => {
6
- const most = (0, most_expensive_chunks_1.getMostExpensiveChunks)({
7
- parsedTimings: [
8
- {
9
- chunk: 0,
10
- rendered: 1000,
11
- start: 0,
12
- },
13
- {
14
- chunk: 1,
15
- rendered: 4000,
16
- start: 2000,
17
- },
18
- {
19
- chunk: 2,
20
- rendered: 5000,
21
- start: 2000,
22
- },
23
- {
24
- chunk: 3,
25
- rendered: 3000,
26
- start: 2000,
27
- },
28
- {
29
- chunk: 4,
30
- rendered: 100000,
31
- start: 2000,
32
- },
33
- {
34
- chunk: 5,
35
- rendered: 2001,
36
- start: 2000,
37
- },
38
- {
39
- chunk: 6,
40
- rendered: 2500,
41
- start: 2000,
42
- },
43
- ],
44
- framesPerFunction: 10,
45
- firstFrame: 0,
46
- lastFrame: 99,
47
- });
48
- (0, bun_test_1.expect)(most).toEqual([
49
- { timeInMilliseconds: 98000, chunk: 4, frameRange: [40, 49] },
50
- { timeInMilliseconds: 3000, chunk: 2, frameRange: [20, 29] },
51
- { timeInMilliseconds: 2000, chunk: 1, frameRange: [10, 19] },
52
- { timeInMilliseconds: 1000, chunk: 0, frameRange: [0, 9] },
53
- { timeInMilliseconds: 1000, chunk: 3, frameRange: [30, 39] },
54
- ]);
55
- });
56
- (0, bun_test_1.test)('Render starting from frame 10 should have correct offset', () => {
57
- const framesPerFunction = 10;
58
- const firstFrame = 10;
59
- const lastFrame = 99;
60
- const most = (0, most_expensive_chunks_1.getMostExpensiveChunks)({
61
- parsedTimings: [
62
- {
63
- chunk: 0,
64
- rendered: 1000,
65
- start: 0,
66
- },
67
- {
68
- chunk: 1,
69
- rendered: 4000,
70
- start: 2000,
71
- },
72
- {
73
- chunk: 2,
74
- rendered: 5000,
75
- start: 2000,
76
- },
77
- {
78
- chunk: 3,
79
- rendered: 3000,
80
- start: 2000,
81
- },
82
- {
83
- chunk: 4,
84
- rendered: 100000,
85
- start: 2000,
86
- },
87
- {
88
- chunk: 5,
89
- rendered: 2001,
90
- start: 2000,
91
- },
92
- {
93
- chunk: 6,
94
- rendered: 2500,
95
- start: 2000,
96
- },
97
- ],
98
- framesPerFunction,
99
- firstFrame,
100
- lastFrame,
101
- });
102
- (0, bun_test_1.expect)(most).toEqual([
103
- { timeInMilliseconds: 98000, chunk: 4, frameRange: [50, 59] },
104
- { timeInMilliseconds: 3000, chunk: 2, frameRange: [30, 39] },
105
- { timeInMilliseconds: 2000, chunk: 1, frameRange: [20, 29] },
106
- { timeInMilliseconds: 1000, chunk: 0, frameRange: [10, 19] },
107
- { timeInMilliseconds: 1000, chunk: 3, frameRange: [40, 49] },
108
- ]);
109
- });
110
- (0, bun_test_1.test)('Render starting from frame 10 and last chunk in most expensive should be corret', () => {
111
- const framesPerFunction = 10;
112
- const firstFrame = 10;
113
- const lastFrame = 79;
114
- const most = (0, most_expensive_chunks_1.getMostExpensiveChunks)({
115
- parsedTimings: [
116
- {
117
- chunk: 0,
118
- rendered: 1000,
119
- start: 0,
120
- },
121
- {
122
- chunk: 1,
123
- rendered: 4000,
124
- start: 2000,
125
- },
126
- {
127
- chunk: 2,
128
- rendered: 5000,
129
- start: 2000,
130
- },
131
- {
132
- chunk: 3,
133
- rendered: 3000,
134
- start: 2000,
135
- },
136
- {
137
- chunk: 4,
138
- rendered: 100000,
139
- start: 2000,
140
- },
141
- {
142
- chunk: 5,
143
- rendered: 2001,
144
- start: 2000,
145
- },
146
- {
147
- chunk: 6,
148
- rendered: 125000,
149
- start: 2000,
150
- },
151
- ],
152
- framesPerFunction,
153
- firstFrame,
154
- lastFrame,
155
- });
156
- (0, bun_test_1.expect)(most).toEqual([
157
- { timeInMilliseconds: 123000, chunk: 6, frameRange: [70, 79] },
158
- { timeInMilliseconds: 98000, chunk: 4, frameRange: [50, 59] },
159
- { timeInMilliseconds: 3000, chunk: 2, frameRange: [30, 39] },
160
- { timeInMilliseconds: 2000, chunk: 1, frameRange: [20, 29] },
161
- { timeInMilliseconds: 1000, chunk: 0, frameRange: [10, 19] },
162
- ]);
163
- });
package/eslint.config.mjs DELETED
@@ -1,5 +0,0 @@
1
- import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
-
3
- const config = remotionFlatConfig({react: false});
4
-
5
- export default config;
package/src/await.ts DELETED
@@ -1 +0,0 @@
1
- export type Await<T> = T extends PromiseLike<infer U> ? U : T;
@@ -1,18 +0,0 @@
1
- // Always update the code in docs/lambda/concurrency.md too
2
-
3
- import {interpolate} from 'remotion/no-react';
4
-
5
- export const bestFramesPerFunctionParam = (frameCount: number) => {
6
- // Between 0 and 10 minutes (at 30fps), interpolate the concurrency from 75 to 150
7
- const concurrency = interpolate(frameCount, [0, 18000], [75, 150], {
8
- extrapolateRight: 'clamp',
9
- });
10
-
11
- // At least have 20 as a `framesPerFunction` value
12
- const framesPerFunction = Math.max(frameCount / concurrency, 20);
13
-
14
- // Evenly distribute: For 21 frames over 2 functions, distribute as 11 + 10 ==> framesPerLambda = 11
15
- const functionsNeeded = Math.ceil(frameCount / framesPerFunction);
16
-
17
- return Math.ceil(frameCount / functionsNeeded);
18
- };
@@ -1,42 +0,0 @@
1
- import {max, min} from './min-max';
2
- import type {ParsedTiming} from './types';
3
-
4
- const getAbsoluteTime = (parsedTimings: ParsedTiming[]) => {
5
- if (parsedTimings.length === 0) {
6
- return 0;
7
- }
8
-
9
- const allEnds = parsedTimings.map((p) => p.rendered);
10
- const allStarts = parsedTimings.map((p) => p.start);
11
-
12
- const biggestEnd = max(allEnds);
13
- const smallestStart = min(allStarts);
14
-
15
- return Math.max(0, biggestEnd - smallestStart);
16
- };
17
-
18
- export const calculateChunkTimes = ({
19
- type,
20
- timings,
21
- }: {
22
- type: 'combined-time-for-cost-calculation' | 'absolute-time';
23
- timings: ParsedTiming[];
24
- }) => {
25
- const parsedTimings = timings;
26
-
27
- const absoluteTime = getAbsoluteTime(parsedTimings);
28
-
29
- if (type === 'combined-time-for-cost-calculation') {
30
- const totalEncodingTimings = parsedTimings
31
- .map((p) => Math.max(0, p.rendered - p.start))
32
- .reduce((a, b) => a + b, 0);
33
-
34
- return totalEncodingTimings + absoluteTime;
35
- }
36
-
37
- if (type === 'absolute-time') {
38
- return absoluteTime;
39
- }
40
-
41
- throw new Error('invalid time for calculate chunk times');
42
- };