Recode video to mp4

This commit is contained in:
loicbersier 2020-02-27 14:57:14 +01:00
parent e537ecc20e
commit d45e447a92

View file

@ -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;