From 40ec734e39b2402805e43a9f430bfb548eac93e9 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 28 Oct 2019 13:25:33 +0100 Subject: [PATCH] Force output format to be mp4 --- commands/fun/vidshittifier.js | 4 ++-- commands/fun/ytp.js | 2 +- commands/utility/download.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/fun/vidshittifier.js b/commands/fun/vidshittifier.js index 4e17b075..300e76c5 100644 --- a/commands/fun/vidshittifier.js +++ b/commands/fun/vidshittifier.js @@ -56,7 +56,7 @@ class vidshittifierCommand extends Command { let loadingmsg = await message.channel.send('Processing '); if (url) { - return youtubedl.exec(url, ['-o', input], {}, function(err) { + return youtubedl.exec(url, ['--merge-output-format', 'mp4', '-o', input], {}, function(err) { if (err) { console.error(err); loadingmsg.delete(); @@ -70,7 +70,7 @@ class vidshittifierCommand extends Command { } function shittifie() { - exec(`ffmpeg -i ${input} ${option} -vcodec libx264 -r 15 ${output}`) + exec(`ffmpeg -i ${input} ${option} -vcodec libx264 -r 15 -f mp4 ${output}`) .then(() => { loadingmsg.delete(); message.delete(); diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index 5e4e6421..42ac7d92 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -54,7 +54,7 @@ class ytpCommand extends Command { } if (url) { - return youtubedl.exec(url, ['-o', `./asset/ytp/userVid/${message.id}.mp4`], {}, function(err) { + return youtubedl.exec(url, ['--merge-output-format', 'mp4', '-o', `./asset/ytp/userVid/${message.id}.mp4`], {}, function(err) { if (err) { console.error(err); loadingmsg.delete(); diff --git a/commands/utility/download.js b/commands/utility/download.js index 9021b6bc..9d94ff5d 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -50,7 +50,7 @@ class DownloadCommand extends Command { if (err); }); } - return youtubedl.exec(args.link, ['-o', `${os.tmpdir()}/${fileName}.mp4`], {}, async function(err, output) { + return youtubedl.exec(args.link, ['--merge-output-format', 'mp4', '-o', `${os.tmpdir()}/${fileName}.mp4`], {}, async function(err, output) { if (err) { console.error(err); loadingmsg.delete();