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>');
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();

View file

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

View file

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