Skip to content

🎥 Make videos programmatically with React

overall

Jonny Burgerbf6c9a21a4ab
diff --git a/packages/lambda/src/cli/commands/render/progress.ts b/packages/lambda/src/cli/commands/render/progress.ts
index 5bf8ac106f..b3b53091fb 100644
--- a/packages/lambda/src/cli/commands/render/progress.ts
+++ b/packages/lambda/src/cli/commands/render/progress.ts
@@ -24,16 +24,20 @@ type ChunkProgress = {
};
type MultiRenderProgress = {
- lambdaInvokeProgress: LambdaInvokeProgress;
chunkProgress: ChunkProgress;
encodingProgress: EncodingProgress;
cleanupInfo: CleanupInfo | null;
};
const makeInvokeProgress = (
- invokeProgress: LambdaInvokeProgress,
+ overall: RenderProgress,
retriesInfo: ChunkRetry[],
) => {
+ const invokeProgress: LambdaInvokeProgress = {
+ lambdasInvoked: overall.lambdasInvoked,
+ totalLambdas:
+ overall.renderMetadata?.estimatedRenderLambdaInvokations ?? null,
+ };
const {lambdasInvoked, totalLambdas} = invokeProgress;
const progress = totalLambdas === null ? 0 : lambdasInvoked / totalLambdas;
return [
@@ -164,11 +168,6 @@ export const makeMultiProgressFromStatus = (
combinedFrames: status.combinedFrames,
timeToCombine: status.timeToCombine,
},
- lambdaInvokeProgress: {
- lambdasInvoked: status.lambdasInvoked,
- totalLambdas:
- status.renderMetadata?.estimatedRenderLambdaInvokations ?? null,
- },
cleanupInfo: status.cleanup,
};
};
@@ -184,14 +183,16 @@ export const makeProgressString = ({
downloadInfo,
retriesInfo,
totalFrames,
+ overall,
}: {
+ overall: RenderProgress;
progress: MultiRenderProgress;
downloadInfo: DownloadedInfo | null;
retriesInfo: ChunkRetry[];
totalFrames: number | null;
}) => {
return [
- makeInvokeProgress(progress.lambdaInvokeProgress, retriesInfo),
+ makeInvokeProgress(overall, retriesInfo),
...makeRenderProgress({
chunkProgress: progress.chunkProgress,
}),
diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.ts
index 4d2630c5a0..ac8644657d 100644
--- a/packages/lambda/src/cli/commands/render/render.ts
+++ b/packages/lambda/src/cli/commands/render/render.ts
@@ -376,6 +376,7 @@ export const renderCommand = async (
downloadInfo: null,
retriesInfo: status.retriesInfo,
totalFrames: getTotalFrames(status),
+ overall: status,
}),
false,
);
@@ -397,6 +398,7 @@ export const renderCommand = async (
retriesInfo: newStatus.retriesInfo,
downloadInfo: null,
totalFrames: getTotalFrames(newStatus),
+ overall: status,
}),
false,
);
@@ -408,6 +410,7 @@ export const renderCommand = async (
downloadInfo: null,
retriesInfo: newStatus.retriesInfo,
totalFrames: getTotalFrames(newStatus),
+ overall: status,
}),
false,
);
@@ -430,6 +433,7 @@ export const renderCommand = async (
totalSize,
},
totalFrames: getTotalFrames(newStatus),
+ overall: status,
}),
false,
);
@@ -445,6 +449,7 @@ export const renderCommand = async (
totalSize: sizeInBytes,
},
totalFrames: getTotalFrames(newStatus),
+ overall: status,
}),
false,
);