Youtube-mp3-!!better!! Downloader Npm — Instant & Simple
downloader.download("VIDEO_ID_HERE", "audio.mp3"); downloader.on("finished", () => console.log("Done")); ``` This tool is for personal/educational use only. Respect copyright laws and YouTube's ToS.
Clone the repo and convert your first video today. README.md snippet for GitHub (Short version) If you are writing documentation for your repository that uses this package: youtube-mp3-downloader npm
Create an index.js file:
const YoutubeMp3Downloader = require("youtube-mp3-downloader"); // Configure the downloader const downloader = new YoutubeMp3Downloader({ outputPath: "./downloads", // Where the MP3s will go youtubeVideoQuality: "highest", // Video quality to fetch audio from queueParallelism: 2, // How many downloads at once progressTimeout: 2000, // How often to emit 'progress' allowWebm: false // Prefer mp4 audio streams }); Here is how you download a file. You will need the YouTube Video ID (the string after ?v= in the URL). downloader
const downloader = new YoutubeMp3Downloader({ outputPath: "./mp3s", youtubeVideoQuality: "highestaudio", }); README