Skip to content

sayborok/YoutubeMp3Downloader

Repository files navigation

YouTube Mp3 Downloader 🎵

A lightweight console application that downloads audio tracks from YouTube and saves them as MP3 files.

.NET Framework License

Features

  • 🎶 Single Video — Download audio from any YouTube video URL
  • 📋 Playlist — Download an entire YouTube playlist at once
  • 📄 Batch (.txt) — Load multiple URLs from a text file and download all
  • 🔊 Automatically selects the highest bitrate audio stream
  • 📁 Saves files with sanitized, clean filenames
  • 🎨 Color-coded console output for easy progress tracking

Prerequisites

Getting Started

Clone the Repository

git clone https://github.com/sayborok/YoutubeMp3Downloader.git
cd YoutubeMp3Downloader

Build

Open YoutubeMp3Downloader.slnx in Visual Studio and build, or use the command line:

msbuild YoutubeMp3Downloader.csproj /t:Restore;Build /p:Configuration=Release

Run

.\bin\Release\YoutubeMp3Downloader.exe

Usage

When you launch the application, you'll see an interactive menu:

╔══════════════════════════════════════╗
║     YouTube Mp3 Downloader v1.0     ║
╠══════════════════════════════════════╣
║  [1] Download single video          ║
║  [2] Download playlist              ║
║  [3] Download from .txt file        ║
╚══════════════════════════════════════╝

Select an option:

Option 1 — Single Video

Paste a YouTube video URL to download its audio as MP3.

Option 2 — Playlist

Paste a YouTube playlist URL to download all tracks.

Option 3 — Batch from .txt

Provide the path to a .txt file where each line contains a YouTube URL (video or playlist). The app will process all of them sequentially.

Example urls.txt:

https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/watch?v=abcdefghijk
https://www.youtube.com/playlist?list=PLxxxxxxx

Downloaded MP3 files will be saved to the DownloadedMusic/ folder.

Project Structure

YoutubeMp3Downloader/
├── Program.cs                    # Application entry point & menu
├── IYoutubeAudioDownloader.cs    # Download service interface
├── YoutubeAudioDownloader.cs     # Download service implementation
├── ILogger.cs                    # Logger interface
├── ConsoleLogger.cs              # Console logger implementation
├── Properties/
│   └── AssemblyInfo.cs
├── App.config
└── YoutubeMp3Downloader.csproj

Dependencies

Package Version Purpose
YoutubeExplode 6.5.7 YouTube data extraction and stream download
AngleSharp 1.4.0 HTML parsing (YoutubeExplode dependency)

License

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

Author

Developed by sayborok

About

A lightweight console application that downloads audio tracks from YouTube and saves them as MP3 files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages