/Youtube-mp3-downloader-light

The lightest and easiest way of downloading Mp3/Videos from YouTube without leaving the shell :airplane:

Primary LanguageQML

Youtube-Downloader-Light

YTDL is a wrapper around the youtube_dl package to download primarily audio and video from Youtube easily ❤️

Disclaimer

This project has been made for educational purposes using python language and does not support or encourage pirating activities.


Contributors

Started as a fun project, YTDL is at it's current because of contributions from amazing people all over the world.

Basic Usage

Single YouTube mp3 download:

ytd.py <YOUTUBE VIDEO LINK>

Download an entire YouTube playlist in mp3:

ytd.py --playlist <YOUTUBE PLAYLIST LINK>

Single Youtube Video download:

ytd.py --video <YOUTUBE VIDEO LINK>

Download an entire Youtube playlist videos:

ytd.py --video --playlist <YOUTUBE PLAYLIST LINK>

Useful flags to customise downloads :-

  1. -o or --output:- Define the output location for the current session.

  2. --video or -v :- Downloads the video.

  3. --playlist :- Playlist URL.

  4. --playlist-start or -ps : Define the starting point of the playlist.

  5. --playlist-end or -pe :- Define the end point of the playlist.

  6. --playlist-items or -pi :- This command downloads the songs at the mentioned serial numbers.

  7. --default :- Define the default download location.

To download the songs, follow these commands :-

Supported flags are explained below:

Command Function
ytd.py -o . --playlist PLAYLIST_LINK Downloads the entire playlist in the cwd.
ytd.py -o . --playlist PLAYLIST_LINK --playlist-start song_Number Downloads the entire playlist in the cwd from the specified song serial number in the playlist.
ytd.py -o . --playlist PLAYLIST_LINK --playlist-end Song_Number Downloads the playlist in the cwd and stops downloading when it reaches the mentioned song number.
ytd.py -o . --playlist PLAYLIST_LINK --playlist-items song_Number-1, Song_Number-2, ..., Song_Number-x Downloads the songs at the positions of the mentioned serial numbers.
ytd.py -o . --playlist PLAYLIST_LINK --default Downloads the playlist at the default location, the Downloads folder initially.
ytd.py -o . --playlist PLAYLIST_LINK --default /Folder_Name Sets a new download location and downloads the playlist there.

You can use multiple arguments as well, for example, :-

Command Function
ytd.py -o . --playlist PLAYLIST_LINK --playlist-end Song_Number --playlist-start song_Number --default/Folder_Location Downloads the playlist from the start song number to the end song number at the newly assigned download path.

Installation

1. Clone this repository

   $ git clone https://github.com/ionicc/Youtube-mp3-downloader-light
   $ cd Youtube-mp3-downloader-light

2. Setup

Linux and MacOS:

   $ make install

or,

To install for development:

   $ make install-dev

Windows:

If you use make, follow the steps above.
Else, open an admin shell in the project folder, and execute:

> .\install.bat

After the setup, you'll need to download ffmpeg for your system. Then:

  • Unzip the archive to a specified directory. e.g.: C:\libs\ffmpeg.
  • Add ffmpeg to your PATH
> setx path "%PATH%;C:\libs\ffmpeg\bin"

Launch

   $ ./ytd.py    # launch in interactive mode

Launch Options

GUI

1. Install pyQt5

With Conda:

  1. Create new conda environment: conda create -n my_new_env python=3.7
  2. Install pyqt: conda install -c defaults pyqt=5 qt

With pip

pip3 install pyqt5

2. Run

  1. Follow the steps above for Windows or Linux
  2. Go to the folder then run: python ui.py