From d45e447a928ad12779394701740d26184f0f69b7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 27 Feb 2020 14:57:14 +0100 Subject: [PATCH] Recode video to mp4 --- commands/utility/download.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 92f872b..914dc4b 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -66,7 +66,7 @@ class DownloadCommand extends Command { if (err); }); } - return youtubedl.exec(link, ['-o', `${os.tmpdir()}/${fileName}`], {}, async function(err) { + return youtubedl.exec(link, ['--recode-video', 'mp4', '-o', `${os.tmpdir()}/${fileName}`], {}, async function(err) { if (err) { console.error(err); loadingmsg.delete(); @@ -81,7 +81,6 @@ class DownloadCommand extends Command { fs.renameSync(`${os.tmpdir()}/${fileName}`, `${os.tmpdir()}/${fileName}.${ext}`); } - let file = fs.statSync(`${os.tmpdir()}/${fileName}.${ext}`); let fileSize = file.size / 1000000.0;