2.0.8 • Published 4 months ago

media-downloader-ez v2.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Multi_Color_Bar

media-downloader-ez

A npm package to download video from url (insta, youtube, tiktok, X...) .

  • AutoCompress with limit size
  • Autocrop : auto crop video to remove black bars
  • Rotate : to rotate the video right or left image

Supporting videos :

facebook, tiktok, twitter, instagram, youtube, pinterest, gdrive, capcut, likee, threads

Exemple ez

const MediaDownloader = require('media-downloader-ez'); 

let url = "http://"

MediaDownloader(url, {
            autocrop: true, // auto crop black bars (like tiktok, or insta videos)
            limitSizeMB: "10", // limit size in MB
            rotation: null, // to rotate the video : "right" , "left"
        }) 
       
 

Exemple for discord js :

const MediaDownloader = require('media-downloader-ez');



const Discord = require('discord.js-v11-stable');
const client = new Discord.Client({
    disableEveryone: true
  });

client.on('message', async (message) => {
  try {
    if(message.content.startsWith('!download') && message.content.includes('http')){
        let attachment = await MediaDownloader(message.content, {autocrop: true, limitSizeMB: "10"}); // autocrop yes and compressing if size > 10 MB
        message.channel.send({ content: `Téléchargé par: \`${message.author.username}\``, files: [attachment] });
    }



  } catch (error) {
    console.error('Erreur lors du téléchargement de la vidéo :', error);
    message.reply('Une erreur est survenue lors du téléchargement de la vidéo.').then((m) => { deleteMessage(m); });
  }
});



client.login("your token").catch((err) => {
    console.log('INCORECT TOKEN LOGIN !')
  })

Only safe links :

if (MediaDownloader.isVideoLink(url)) {
  let attachment = await MediaDownloader(url, {
            autocrop: true, 
            limitSizeMB: "10", 
            rotation: "left", // or right or null
        })
}

Multi_Color_Bar

2.0.5

5 months ago

2.0.4

6 months ago

2.0.7

4 months ago

2.0.6

5 months ago

2.0.8

4 months ago

2.0.3

11 months ago

2.0.2

11 months ago

2.0.1

11 months ago

2.0.0

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.3

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago