--max-filesize didint do anything

This commit is contained in:
loicbersier 2019-01-19 17:41:55 +01:00
parent 34b41410fd
commit 39c2546dfe

View file

@ -30,7 +30,7 @@ class DownloadCommand extends Command {
let big = false; let big = false;
if (link.includes('http') || link.includes('www')) { if (link.includes('http') || link.includes('www')) {
let video = youtubedl(link, [`--username=${fbuser}`, `--password=${fbpasswd}`, '--max-filesize', '8M']); let video = youtubedl(link, [`--username=${fbuser}`, `--password=${fbpasswd}`]);
video.pipe(fs.createWriteStream('./video.mp4')); video.pipe(fs.createWriteStream('./video.mp4'));
video.on('error', function error(err) { video.on('error', function error(err) {
console.log('error 2:', err); console.log('error 2:', err);
@ -55,7 +55,7 @@ class DownloadCommand extends Command {
output: 'videoReady.mp4', output: 'videoReady.mp4',
preset: 'General/Gmail Small 10 Minutes 288p30' preset: 'General/Gmail Small 10 Minutes 288p30'
}; };
//Compress vid if bigger than 8MB
hbjs.spawn(options) hbjs.spawn(options)
.on('start', function() { .on('start', function() {
message.channel.send('Vid bigger than 8MB compressing now ( This can take a long time!)'); message.channel.send('Vid bigger than 8MB compressing now ( This can take a long time!)');