Skip to content
/ ytmp3 Public

A quick and simple Youtube/YTMusic audio file downloader.

License

Notifications You must be signed in to change notification settings

pbl-dev/ytmp3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Mp3 Downloader

A simple Python script for downloading audio from YouTube music using yt-dlp and ffmpeg. This script supports both downloading from a file (like a list) containing YouTube links and inline downloading from a single video URL.

Features

  • Download audio from YouTube or Youtube Music in MP3 format.
  • Supports downloading from a file with multiple YouTube links.
  • Inline downloading for single YouTube video URLs.
  • Dependency check at startup
  • Option to log errors and other information.
  • CLI-based menu for easy user interaction.

Requirements

  • Python 3.7+
  • yt-dlp library
  • ffmpeg installed on your system

Installing dependencies

yt-dlp:

You can install yt-dlp using pip:

pip install yt-dlp

FFmpeg:

Windows:

Using winget:

winget install "FFmpeg (Essentials Build)"

Using chocolatey:

choco install ffmpeg

Ubuntu/Debian:

sudo apt install ffmpeg

MacOS (via Homebrew):

brew install ffmpeg

How to Use

Running the Script To run the script, execute the Python file:

python ytmp3.py

Menu Options

  1. Download from a file containing YouTube links: You will be prompted to enter the file path containing YouTube links (one per line).

  2. Download a single YouTube video by URL: Enter the YouTube video URL, and the script will download the audio.

  3. Exit: Close the script.

Logging

You can enable logging for detailed information or hide all output except errors by answering the prompt during the CLI menu. Logs will be displayed in the console, and errors will be captured and logged if anything goes wrong.

Error Handling

If an error occurs during the download process, the script will log the error and continue with the next download, if applicable. You will be given the option to view the errors after each download.

Dependency Check

On startup, the script will check if yt-dlp and ffmpeg are installed. If they are outdated, the script will show a warning, but you can continue with the program.

Contributing

Feel free to fork this repository and submit pull requests. If you find any issues or have suggestions for improvements, open an issue or contact me directly.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A quick and simple Youtube/YTMusic audio file downloader.

Topics

Resources

License

Stars

Watchers

Forks

Languages