🎥 Make videos programmatically with React
remove CRF in combineVideos()
Jonny Burger12206c703ad4
diff --git a/packages/example/src/simulate-lambda.ts b/packages/example/src/simulate-lambda.tsindex 3c386c132b..68d012a7c4 100644--- a/packages/example/src/simulate-lambda.ts+++ b/packages/example/src/simulate-lambda.ts@@ -47,7 +47,6 @@ 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.tsindex 503f0eb004..c31c0c6491 100644--- a/packages/lambda/src/functions/helpers/concat-videos.ts+++ b/packages/lambda/src/functions/helpers/concat-videos.ts@@ -165,7 +165,6 @@ export const concatVideosS3 = async ({expectedBucketOwner,fps,numberOfGifLoops,- crf,}: {bucket: string;expectedFiles: number;@@ -177,7 +176,6 @@ 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)) {@@ -215,7 +213,6 @@ 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.tsindex 757c06d7e1..65ee79ea41 100644--- a/packages/lambda/src/functions/launch.ts+++ b/packages/lambda/src/functions/launch.ts@@ -327,7 +327,6 @@ const innerLaunchHandler = async (params: LambdaPayload, options: Options) => {expectedBucketOwner: options.expectedBucketOwner,fps,numberOfGifLoops: params.numberOfGifLoops,- crf: params.crf ?? null,});if (!encodingStop) {encodingStop = Date.now();diff --git a/packages/renderer/src/combine-videos.ts b/packages/renderer/src/combine-videos.tsindex c6b2502a6a..2cb0722502 100644--- a/packages/renderer/src/combine-videos.ts+++ b/packages/renderer/src/combine-videos.ts@@ -4,7 +4,6 @@ import execa from 'execa';import {rmdirSync, rmSync, writeFileSync} from 'fs';import {join} from 'path';import type {Codec} from './codec';-import {codecSupportsCrf} from './codec-supports-media';import {getAudioCodecName} from './get-audio-codec-name';import {isAudioCodec} from './is-audio-codec';import {parseFfmpegProgress} from './parse-ffmpeg-progress';@@ -19,7 +18,6 @@ export const combineVideos = async ({codec,fps,numberOfGifLoops,- crf,}: {files: string[];filelistDir: string;@@ -29,15 +27,12 @@ export const combineVideos = async ({codec: Codec;fps: number;numberOfGifLoops: number | null;- crf: number | null;}) => {const fileList = files.map((p) => `file '${p}'`).join('\n');const fileListTxt = join(filelistDir, 'files.txt');writeFileSync(fileListTxt, fileList);- const supportsCrf = codecSupportsCrf(codec);-try {const task = execa('ffmpeg',@@ -63,8 +58,6 @@ export const combineVideos = async ({// Set max bitrate up to 1024kbps, will choose lower if that's too much'-b:a','512K',- supportsCrf ? '-crf' : null,- supportsCrf ? String(crf) : null,codec === 'h264' ? '-movflags' : null,codec === 'h264' ? 'faststart' : null,'-shortest',