Coder Social home page Coder Social logo

ytmp3-js's Introduction

YTMP3

Important
Please note, that this project is not stable and will not be updated frequently in the future. This project is not intended to be used in production scenarios (e.g., published on the npm repository).

YTMP3 is a small project aimed at downloading audio from YouTube videos. It provides a simple command-line interface to convert either a single URL from input argument or bunch of YouTube URLs from a file into audio files (i.e., batch download). All downloaded audio files are saved in download directory, relative from project's root directory and all downloaded audio files converted into MP3 codec automatically.

โ›” Limitations

The download queries should not exceed 15 queries (URLs) at the same process. If the URLs in given file exceed than 15, remaining URLs after first 15 will not included. We were still working with this limitation and want to make it more reliable to process more than 15 queries without misbehaves.

A further limitation is that the progression percentages seem inaccurate and stacked over other progress while downloading a batch. For a single download, the progress percentages acts fine without stacking (since there is only one thread).

Usage

Install Requirements Dependencies

npm install

Download

node index.js <URL | FILE>

Note
Make sure the input file is not empty and only contains YouTube URLs (including YouTube Music URLs). Also, ensure that the file does not end with a new line character at the end of the file (EOF), as this could lead to errors during URL parsing.

Example of input file:

https://m.youtube.com/watch?v=<VIDEO_ID>
https://youtu.be/<VIDEO_ID>
https://www.youtube.com/watch?v=<VIDEO_ID>
https://music.youtube.com/watch?v=<VIDEO_ID>

In example above, each URL has a different pattern:

  • https://m.youtube.com
    This YouTube URL is commonly found in the YouTube mobile app. The m before youtube is an abbreviation of mobile.

  • https://youtu.be
    Same as above, it's commonly found in the YouTube mobile app, but the new one.

  • https://www.youtube.com
    This YouTube URL is globally used to determine YouTube URLs and supports both mobile and desktop platforms. The www itself is an abbreviation of World Wide Web.

  • https://music.youtube.com
    This YouTube URL is identified as a YouTube Music URL.

Acknowledgements

This project utilizes the following libraries and APIs:

  • ytdl-core - A JavaScript library for downloading YouTube videos.
  • fluent-ffmpeg - A library that fluents ffmpeg command-line usage, easy to use Node.js module.

Note
Because this project uses fluent-ffmpeg dependency, make sure that you have ffmpeg installed on your system. This also including all necessary encoding libraries like libmp3lame for MP3 codec conversion.

Special thanks to the authors and contributors of these libraries for their valuable work.

License

This project is licensed under MIT License. For more details, see LICENSE file.

ytmp3-js's People

Contributors

mitsuki31 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.