🎥 Make videos programmatically with React
respect preferlossless
Jonny Burger4e9b65769729
diff --git a/packages/lambda/src/functions/helpers/concat-videos.ts b/packages/lambda/src/functions/helpers/concat-videos.tsindex e826e7564e..231f4c7ae1 100644--- a/packages/lambda/src/functions/helpers/concat-videos.ts+++ b/packages/lambda/src/functions/helpers/concat-videos.ts@@ -197,6 +197,7 @@ export const concatVideosS3 = async ({framesPerLambda,binariesDirectory,cancelSignal,+ preferLossless,}: {onProgress: (frames: number) => void;numberOfFrames: number;@@ -211,6 +212,7 @@ export const concatVideosS3 = async ({framesPerLambda: number;binariesDirectory: string | null;cancelSignal: CancelSignal | undefined;+ preferLossless: boolean;}) => {const outfile = join(RenderInternals.tmpDir(REMOTION_CONCATED_TOKEN),@@ -224,7 +226,7 @@ export const concatVideosS3 = async ({const resolvedAudioCodec = RenderInternals.resolveAudioCodec({setting: audioCodec,codec,- preferLossless: false,+ preferLossless,separateAudioTo: null,});diff --git a/packages/lambda/src/functions/helpers/merge-chunks.ts b/packages/lambda/src/functions/helpers/merge-chunks.tsindex 2e6563e928..4ac21a46ea 100644--- a/packages/lambda/src/functions/helpers/merge-chunks.ts+++ b/packages/lambda/src/functions/helpers/merge-chunks.ts@@ -67,6 +67,7 @@ export const mergeChunksAndFinishRender = async (options: {logLevel: LogLevel;framesPerLambda: number;binariesDirectory: string | null;+ preferLossless: boolean;}): Promise<PostRenderData> => {let lastProgressUploaded = 0;@@ -181,6 +182,7 @@ export const mergeChunksAndFinishRender = async (options: {framesPerLambda: options.framesPerLambda,binariesDirectory: options.binariesDirectory,cancelSignal: undefined,+ preferLossless: options.preferLossless,});const encodingStop = Date.now();diff --git a/packages/lambda/src/functions/launch.ts b/packages/lambda/src/functions/launch.tsindex fa28bff3b0..c69cafe148 100644--- a/packages/lambda/src/functions/launch.ts+++ b/packages/lambda/src/functions/launch.ts@@ -408,6 +408,7 @@ const innerLaunchHandler = async ({logLevel: params.logLevel,framesPerLambda,binariesDirectory: null,+ preferLossless: params.preferLossless,});return postRenderData;@@ -463,6 +464,7 @@ export const launchHandler = async (inputProps: allChunksAvailable.inputProps,logLevel: params.logLevel,framesPerLambda: allChunksAvailable.framesPerLambda,+ preferLossless: params.preferLossless,},retries: 2,});diff --git a/packages/lambda/src/functions/merge.ts b/packages/lambda/src/functions/merge.tsindex 74366bd6a0..5664997a4f 100644--- a/packages/lambda/src/functions/merge.ts+++ b/packages/lambda/src/functions/merge.ts@@ -85,6 +85,7 @@ export const mergeHandler = async (logLevel: params.logLevel,framesPerLambda: params.framesPerLambda,binariesDirectory: null,+ preferLossless: params.preferLossless,});return {type: 'success' as const, postRenderData};diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex 72d3b5144c..8cc364f403 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -435,6 +435,7 @@ export type LambdaPayloads = {serializedResolvedProps: SerializedInputProps;logLevel: LogLevel;framesPerLambda: number;+ preferLossless: boolean;};};