Skip to content

🎥 Make videos programmatically with React

pass CRF all the way through

Jonny Burger8b75b5a73f8a
diff --git a/packages/example/src/simulate-lambda.ts b/packages/example/src/simulate-lambda.ts
index 68d012a7c4..3c386c132b 100644
--- a/packages/example/src/simulate-lambda.ts
+++ b/packages/example/src/simulate-lambda.ts
@@ -47,6 +47,7 @@ const start = async () => {
onProgress: () => console.log('progress'),
output: 'out/combined.mp4',
numberOfGifLoops: null,
+ crf: null,
});
};
diff --git a/packages/lambda/src/functions/helpers/concat-videos.ts b/packages/lambda/src/functions/helpers/concat-videos.ts
index c31c0c6491..503f0eb004 100644
--- a/packages/lambda/src/functions/helpers/concat-videos.ts
+++ b/packages/lambda/src/functions/helpers/concat-videos.ts
@@ -165,6 +165,7 @@ export const concatVideosS3 = async ({
expectedBucketOwner,
fps,
numberOfGifLoops,
+ crf,
}: {
bucket: string;
expectedFiles: number;
@@ -176,6 +177,7 @@ export const concatVideosS3 = async ({
expectedBucketOwner: string;
fps: number;
numberOfGifLoops: number | null;
+ crf: number | null;
}) => {
const outdir = join(RenderInternals.tmpDir(CONCAT_FOLDER_TOKEN), 'bucket');
if (existsSync(outdir)) {
@@ -213,6 +215,7 @@ export const concatVideosS3 = async ({
codec: codecForCombining,
fps,
numberOfGifLoops,
+ crf,
});
combine.end();
diff --git a/packages/lambda/src/functions/launch.ts b/packages/lambda/src/functions/launch.ts
index 65ee79ea41..757c06d7e1 100644
--- a/packages/lambda/src/functions/launch.ts
+++ b/packages/lambda/src/functions/launch.ts
@@ -327,6 +327,7 @@ const innerLaunchHandler = async (params: LambdaPayload, options: Options) => {
expectedBucketOwner: options.expectedBucketOwner,
fps,
numberOfGifLoops: params.numberOfGifLoops,
+ crf: params.crf ?? null,
});
if (!encodingStop) {
encodingStop = Date.now();