From b391e05ed343c5e82837e27a27fbf57ebb7abeb1 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 18 Sep 2024 01:20:22 +0200 Subject: [PATCH] no need that much room now that we have exact audio bitrate --- src/scripts/renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/renderer.ts b/src/scripts/renderer.ts index eb44b56..bfa9dd0 100644 --- a/src/scripts/renderer.ts +++ b/src/scripts/renderer.ts @@ -120,7 +120,7 @@ const main = async () => { // Compress video if needed if (newFile.size > maxSizeDiscord) { - const targetSize = maxSizeDiscord - 2; // keep some room + const targetSize = maxSizeDiscord - 1; // keep some room // https://trac.ffmpeg.org/wiki/Encode/H.264#twopass const bitrate = Math.floor((targetSize * 8388.608) / newFile.duration);