From 9855987cbc4c539c611becaee34b7425da751036 Mon Sep 17 00:00:00 2001 From: Supositware Date: Sat, 13 Jul 2024 14:05:37 +0200 Subject: [PATCH] Don't reencode HEVC as discord now supports it --- commands/utility/download.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 97383f0..6562815 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -193,6 +193,7 @@ async function download(url, interaction, originalInteraction, format = undefine } // If the video format is not one compatible with Discord, reencode it unless autocrop is choosen in which case it gets reencoded anyway. + /* Update: Discord now support hevc if (!interaction.doAutocrop) { const bannedFormats = ['hevc']; const codec = await utils.getVideoCodec(output); @@ -203,7 +204,9 @@ async function download(url, interaction, originalInteraction, format = undefine await utils.ffmpeg(['-i', oldOutput, '-vcodec', 'libx264', '-acodec', 'aac', output]); } } - else if (interaction.doAutocrop && !compressInteraction.doCompress) { + else + */ + if (interaction.doAutocrop && !compressInteraction.doCompress) { const oldOutput = output; output = `${os.tmpdir()}/autocrop${file}`; await utils.autoCrop(oldOutput, output);