https://github.com/chathuraprasanga/youtube-playlist-mp3-downloader
A lightweight Python script to download YouTube playlist videos as high-quality MP3s, optimized for downloading music playlists with clean download progress and file naming. Built with yt-dlp and FFmpeg.
https://github.com/chathuraprasanga/youtube-playlist-mp3-downloader
audio-download cli-tool ffmpeg mp3-converter music-downloader python-script terminal-app youtube-downloader youtube-playlist yt-dlp
Last synced: about 2 months ago
JSON representation
A lightweight Python script to download YouTube playlist videos as high-quality MP3s, optimized for downloading music playlists with clean download progress and file naming. Built with yt-dlp and FFmpeg.
- Host: GitHub
- URL: https://github.com/chathuraprasanga/youtube-playlist-mp3-downloader
- Owner: chathuraprasanga
- License: mit
- Created: 2025-06-19T06:02:48.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-19T06:12:14.000Z (4 months ago)
- Last Synced: 2025-06-24T00:02:07.524Z (4 months ago)
- Topics: audio-download, cli-tool, ffmpeg, mp3-converter, music-downloader, python-script, terminal-app, youtube-downloader, youtube-playlist, yt-dlp
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ต YouTube Playlist MP3 Downloader
A Python script to download all songs in a YouTube playlist as MP3 files using `yt-dlp` and `ffmpeg`.
---
## ๐ฆ Features
* โ
Download YouTube playlist as MP3
* โ
Automatic audio extraction and conversion using `ffmpeg`
* โ
Clean console output with real-time progress, download speed, and file size
* โ
Playlist title and total video count shown
* โ
Files saved into `downloads_mp3` directory
---
## ๐ง Requirements
* Python 3.8 or above
* [`yt-dlp`](https://github.com/yt-dlp/yt-dlp)
* [`ffmpeg`](https://ffmpeg.org/)
### Install requirements:
```bash
pip install yt-dlp
```
**Install `ffmpeg`:**
* macOS: `brew install ffmpeg`
* Ubuntu/Debian: `sudo apt install ffmpeg`
* Windows (with Chocolatey): `choco install ffmpeg`
---
## ๐ How to Use
1. Clone or download this repository.
2. Open `youtube_mp3_downloader.py` and set your playlist URL:
```python
PLAYLIST_URL = "https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID"
```
3. Run the script:
```bash
python3 main.py
```
4. MP3 files will be saved in the `downloads_mp3/` folder.
---
## ๐ Folder Structure
```
main.py # Main script
downloads_mp3/ # Folder where MP3s are saved
```
---
## ๐ Output Example
```text
๐
Fetching playlist info...
๐ Playlist: My Favorite Songs
๐ฎ Total videos: 12
[Downloading] -> ๐ต Song Title.webm 2.10MiB/4.00MiB (52.5%) 700.3 KB/s
[Downloaded] -> ๐ต Song Title.webm 3.88MB
...
โ
Done! MP3s saved in: downloads_mp3
```
---
## ๐ง Notes
* Only audio is downloaded (no video).
* Audio is converted to `.mp3` using `ffmpeg`.
* If you receive rate-limit or network errors, try a different network or VPN.
---
## ๐ Customization
To change the audio quality:
```python
'preferredquality': '192' # Can be set to '320' for highest quality
```
To change the output folder:
```python
OUTPUT_FOLDER = "my_music_folder"
```
---
## ๐ชฏ Troubleshooting
* **ffmpeg not found** โ Make sure it's installed and in your system PATH.
* **Playlist not fetching** โ Confirm itโs public and accessible.
* **HTTP 403/400 errors** โ Retry later or use a VPN.
---
## ๐ค Contributing
Feel free to fork, enhance or raise issues.
---
## ๐ License
This project is licensed under the MIT License.
---
## ๐ Credits
* Python 3
* Built using [yt\_dlp](https://github.com/yt-dlp/yt-dlp)
* Terminal output styled manually
* Special thanks to **ChatGPT-4o** for assistance in scripting and logic design โจ