Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

velimirpaleksic/bulk-youtube-to-mp3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YouTube MP3 Downloader

This Python script downloads YouTube videos as MP3 files using yt-dlp.

Features

  • Downloads the best available audio quality.
  • Converts the audio to MP3 format (192kbps).
  • Supports bulk downloading from a text file containing video URLs.
  • Uses yt-dlp for improved performance and compatibility.

Requirements

Ensure you have the following installed:

  • Python 3.x
  • yt-dlp
  • ffmpeg

Install Dependencies

Run the following command to install yt-dlp:

pip install yt-dlp

You also need to install ffmpeg if it's not already available on your system:

  • Windows: Download from FFmpeg official site and add it to your system PATH.
  • Linux/macOS: Install using a package manager, e.g.,
    sudo apt install ffmpeg  # Debian/Ubuntu
    brew install ffmpeg      # macOS

Usage

Download a Single Video as MP3

Modify the script to call download_video_as_mp3(video_url), replacing video_url with the actual YouTube link.

Bulk Download from a File

  1. Create a text file (e.g., video_urls.txt) and list YouTube video URLs, one per line.
  2. Run the script:
    python bulk_yt_to_mp3.py

How It Works

  • The script reads video URLs from video_urls.txt.
  • It downloads the best available audio stream.
  • The audio is converted to MP3 format (192kbps) using ffmpeg.

License

This project is licensed under the MIT License.

Contact

Releases

No releases published

Packages

No packages published

Languages