Recode video to mp4
This commit is contained in:
parent
e537ecc20e
commit
d45e447a92
1 changed files with 1 additions and 2 deletions
|
@ -66,7 +66,7 @@ class DownloadCommand extends Command {
|
||||||
if (err);
|
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) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
|
@ -81,7 +81,6 @@ class DownloadCommand extends Command {
|
||||||
fs.renameSync(`${os.tmpdir()}/${fileName}`, `${os.tmpdir()}/${fileName}.${ext}`);
|
fs.renameSync(`${os.tmpdir()}/${fileName}`, `${os.tmpdir()}/${fileName}.${ext}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let file = fs.statSync(`${os.tmpdir()}/${fileName}.${ext}`);
|
let file = fs.statSync(`${os.tmpdir()}/${fileName}.${ext}`);
|
||||||
let fileSize = file.size / 1000000.0;
|
let fileSize = file.size / 1000000.0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue