npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

new-youtube-exec

v1.0.5

Published

YouTube-Exec is a versatile tool for downloading audio files from YouTube videos. It utilizes the youtube-dl-exec library to extract audio details and the fluent-ffmpeg library to download the audio files in MP3 format. With youtube-exec, you can easily f

Downloads

100

Readme

⭐️ If you find YouTube-Exec useful, give it a star on GitHub

Unleash the Power of YouTube Downloads! 💪🔥💻

  • Effortlessly download audio and video content from YouTube. 🎵🎬💽
  • Utilizes the powerful youtube-dl-exec library for extracting details. 📚🔍💡
  • Seamless fetching of files using the reliable fluent-ffmpeg library. 🔄⚙️🔊
  • Access and download your favorite audio and video treasures from YouTube. 🎉🔑💎
  • Say goodbye to limitations and enjoy a world of boundless possibilities. 🚫🌍🔓💫

| | | | -------------- | --------------------------------------------------------------------------------------------------- | | License | License | | Latest Version | npm |

To embark on your YouTube downloading adventure with YouTube-Exec, you'll need to have Node.js installed on your system. Fear not! The installation process is as easy as a few simple commands:

  • Using yarn or npm or pnpm
$ yarn add youtube-exec
$ npm install youtube-exec
$ pnpm install youtube-exec

To download audio from YouTube, you can use the dlAudio function provided by YouTube-Exec. Here's an example of how to use it:

const { dlAudio } = require("youtube-exec");

// Using async/await
try {
  await dlAudio({
    url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    folder: "downloads", // optional, default: "youtube-exec"
    filename: "filename", // optional, default: video title
    quality: "best", // or "lowest"; default: "best"
  });
  console.log("Audio downloaded successfully! 🔊🎉");
} catch (err) {
  console.error("An error occurred:", err.message);
}

// Using Promises
dlAudio({
  url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  folder: "downloads", // optional, default: "youtube-exec"
  filename: "filename", // optional, default: video title
  quality: "best", // or "lowest"; default: "best"
})
  .then(() => {
    console.log("Audio downloaded successfully! 🔊🎉");
  })
  .catch((err) => {
    console.error("An error occurred:", err.message);
  });

To download videos with audio from YouTube, you can use the dlAudioVideo function provided by YouTube-Exec. Here's an example of how to use it:

const { dlAudioVideo } = require("youtube-exec");

// Using async/await
try {
  await dlAudioVideo({
    url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    folder: "downloads", // optional, default: "youtube-exec"
    filename: "filename", // optional, default: video title
    resolution: 720, // 144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320; default: 480
  });
  console.log("Video downloaded successfully! 🎥🔊🎉");
} catch (err) {
  console.error("An error occurred:", err.message);
}

// Using Promises
dlAudioVideo({
  url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  folder: "downloads", // optional, default: "youtube-exec"
  filename: "filename", // optional, default: video title
  resolution: 720, // 144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320; default: 480
})
  .then(() => {
    console.log("Video downloaded successfully! 🎥🔊🎉");
  })
  .catch((err) => {
    console.error("An error occurred:", err.message);
  });

To download videos without audio from YouTube, you can use the dlVideo function provided by YouTube-Exec. Here's an example of how to use it:

const { dlVideo } = require("youtube-exec");

// Using async/await
try {
  await dlVideo({
    url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    folder: "downloads", // optional, default: "youtube-exec"
    filename: "filename", // optional, default: video title
    resolution: 720, // 144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320; default: 480
  });
  console.log("Video downloaded successfully! 🎥🎉");
} catch (err) {
  console.error("An error occurred:", err.message);
}

// Using Promises
dlVideo({
  url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  folder: "downloads", // optional, default: "youtube-exec"
  filename: "filename", // optional, default: video title
  resolution: 720, // 144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320; default: 480
})
  .then(() => {
    console.log("Video downloaded successfully! 🎥🎉");
  })
  .catch((err) => {
    console.error("An error occurred:", err.message);
  });
  • Install the package globally:
$ npm install -g youtube-exec # sudo required for global install

The "audio" command allows you to download audio from a YouTube video. It accepts the following options:

  • url: The URL of the YouTube video (required).
  • folder: The output folder name (optional).
  • filename: The output filename (excluding extension) (optional, defaults to video title).
  • quality: The audio quality ("best" or "lowest") (optional, defaults to "best").

Here's an example of how to use the "audio" command:

$ yarn global add youtube-exec # needs to be installed globally
$ youtube-exec audio --url "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --folder "downloads" --filename "filename" --quality "best"

The "video-with-audio" command allows you to download video with audio from a YouTube video. It accepts the following options:

  • url: The URL of the YouTube video (required).
  • folder: The output folder name (optional).
  • filename: The output filename (excluding extension) (optional, defaults to video title).
  • resolution: The video resolution (144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320) (optional, defaults to 480).

Here's an example of how to use the "video-with-audio" command:

$ yarn global add youtube-exec # needs to be installed globally
$ youtube-exec video-with-audio --url "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --folder "downloads" --filename "filename" --resolution 720

The "video" command allows you to download video without audio from a YouTube video. It accepts the following options:

  • url: The URL of the YouTube video (required).
  • folder: The output folder name (optional).
  • filename: The output filename (excluding extension) (optional, defaults to video title).
  • resolution: The video resolution (144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320) (optional, defaults to 480).

Here's an example of how to use the "video" command:

$ yarn global add youtube-exec # needs to be installed globally
$ youtube-exec video --url "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --folder "downloads" --filename "filename" --resolution 720
  • Extract video and audio details from YouTube effortlessly
  • Download audio files from YouTube videos 🎵🔊
  • Download videos with audio from YouTube 🎥🔊
  • Choose audio quality (best or lowest) 🔊🥇
  • Choose video resolution (144, 240, 360, 480, 720, 1080, 1440, 2160, or 4320) 🎥📺
  • Simple and intuitive API 🚀
  • CLI support for easy downloading 💻⚡
  • ✅ Permission is hereby granted, free of charge, to any person obtaining a copy of the YouTube-Exec software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  • 📋 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

  • 🚀 The Software is provided "as is," without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.

  • 🔗 The Software may utilize third-party libraries, including but not limited to youtube-dl-exec and fluent-ffmpeg. Any such libraries are subject to their respective licenses and terms.

  • 🔒 Users of the Software acknowledge that the extraction and downloading of audio and video content from YouTube may be subject to legal restrictions and terms of use imposed by YouTube or other relevant entities. It is the responsibility of the users to comply with all applicable laws, regulations, and terms of use when using the Software.

  • 👥 The Software is intended for personal and non-commercial use only. Any commercial use of the Software requires explicit permission from the authors.