Force output format to be mp4

This commit is contained in:
loicbersier 2019-10-28 13:25:33 +01:00
parent 9f8fc1afc4
commit 40ec734e39
3 changed files with 4 additions and 4 deletions

View file

@ -56,7 +56,7 @@ class vidshittifierCommand extends Command {
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>'); let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');
if (url) { if (url) {
return youtubedl.exec(url, ['-o', input], {}, function(err) { return youtubedl.exec(url, ['--merge-output-format', 'mp4', '-o', input], {}, function(err) {
if (err) { if (err) {
console.error(err); console.error(err);
loadingmsg.delete(); loadingmsg.delete();
@ -70,7 +70,7 @@ class vidshittifierCommand extends Command {
} }
function shittifie() { 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(() => { .then(() => {
loadingmsg.delete(); loadingmsg.delete();
message.delete(); message.delete();

View file

@ -54,7 +54,7 @@ class ytpCommand extends Command {
} }
if (url) { 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) { if (err) {
console.error(err); console.error(err);
loadingmsg.delete(); loadingmsg.delete();

View file

@ -50,7 +50,7 @@ class DownloadCommand extends Command {
if (err); 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) { if (err) {
console.error(err); console.error(err);
loadingmsg.delete(); loadingmsg.delete();