@remotion/lambda 4.0.131 → 4.0.133

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.
@@ -3,5 +3,8 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [number, number][];
6
+ chunks: [
7
+ number,
8
+ number
9
+ ][];
7
10
  };
@@ -1,3 +1,3 @@
1
1
  import type { AudioCodec } from '@remotion/renderer';
2
- export declare const canConcatAudioSeamlessly: (audioCodec: AudioCodec | null) => boolean;
2
+ export declare const canConcatAudioSeamlessly: (audioCodec: AudioCodec | null, chunkDurationInFrames: number) => boolean;
3
3
  export declare const canConcatVideoSeamlessly: (codec: string) => boolean;
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.canConcatVideoSeamlessly = exports.canConcatAudioSeamlessly = void 0;
4
4
  // Cannot do WAV yet, because currently assumes AAC in+outpoint
5
5
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
- const canConcatAudioSeamlessly = (audioCodec) => {
6
+ const canConcatAudioSeamlessly = (audioCodec, chunkDurationInFrames) => {
7
+ // Rendering a chunk that is too small generates too much overhead
8
+ // and is currently buggy
9
+ if (chunkDurationInFrames <= 4) {
10
+ return false;
11
+ }
7
12
  return audioCodec === 'aac';
8
13
  };
9
14
  exports.canConcatAudioSeamlessly = canConcatAudioSeamlessly;
@@ -145,7 +145,7 @@ const concatVideosS3 = async ({ onProgress, numberOfFrames, codec, fps, numberOf
145
145
  preferLossless,
146
146
  separateAudioTo: null,
147
147
  });
148
- const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(resolvedAudioCodec);
148
+ const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(resolvedAudioCodec, framesPerLambda);
149
149
  const seamlessVideo = (0, can_concat_seamlessly_1.canConcatVideoSeamlessly)(codec);
150
150
  await renderer_1.RenderInternals.combineVideos({
151
151
  files,
@@ -189,6 +189,7 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
189
189
  colorSpace: params.colorSpace,
190
190
  preferLossless: params.preferLossless,
191
191
  compositionStart: realFrameRange[0],
192
+ framesPerLambda,
192
193
  };
193
194
  return payload;
194
195
  });
@@ -66,7 +66,7 @@ const renderHandler = async (params, options, logs) => {
66
66
  codec: params.codec,
67
67
  preferLossless: params.preferLossless,
68
68
  });
69
- const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(defaultAudioCodec);
69
+ const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(defaultAudioCodec, params.framesPerLambda);
70
70
  const seamlessVideo = (0, can_concat_seamlessly_1.canConcatVideoSeamlessly)(params.codec);
71
71
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, `Preparing for rendering a chunk. Audio = ${seamlessAudio ? 'seamless' : 'normal'}, Video = ${seamlessVideo ? 'seamless' : 'normal'}`, params.logLevel);
72
72
  const chunkCodec = params.codec === 'gif'
@@ -263,6 +263,7 @@ export type LambdaPayloads = {
263
263
  deleteAfter: DeleteAfter | null;
264
264
  colorSpace: ColorSpace;
265
265
  compositionStart: number;
266
+ framesPerLambda: number;
266
267
  };
267
268
  still: {
268
269
  type: LambdaRoutines.still;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { LogLevel } from '@remotion/renderer';
4
2
  import https from 'https';
5
3
  import http from 'node:http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.131",
3
+ "version": "4.0.133",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -26,10 +26,10 @@
26
26
  "aws-policies": "^1.0.1",
27
27
  "mime-types": "2.1.34",
28
28
  "zod": "3.22.3",
29
- "@remotion/bundler": "4.0.131",
30
- "@remotion/cli": "4.0.131",
31
- "@remotion/renderer": "4.0.131",
32
- "remotion": "4.0.131"
29
+ "@remotion/renderer": "4.0.133",
30
+ "@remotion/bundler": "4.0.133",
31
+ "remotion": "4.0.133",
32
+ "@remotion/cli": "4.0.133"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@jonny/eslint-config": "3.0.276",
@@ -44,11 +44,11 @@
44
44
  "ts-node": "^10.8.0",
45
45
  "vitest": "0.31.1",
46
46
  "zip-lib": "^0.7.2",
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.131",
48
- "@remotion/bundler": "4.0.131"
47
+ "@remotion/bundler": "4.0.133",
48
+ "@remotion/compositor-linux-arm64-gnu": "4.0.133"
49
49
  },
50
50
  "peerDependencies": {
51
- "@remotion/bundler": "4.0.131"
51
+ "@remotion/bundler": "4.0.133"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"
Binary file