A lightweight console application that downloads audio tracks from YouTube and saves them as MP3 files.
- 🎶 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
- .NET Framework 4.8 or later
- Visual Studio 2019+ (recommended) or MSBuild
git clone https://github.com/sayborok/YoutubeMp3Downloader.git
cd YoutubeMp3DownloaderOpen YoutubeMp3Downloader.slnx in Visual Studio and build, or use the command line:
msbuild YoutubeMp3Downloader.csproj /t:Restore;Build /p:Configuration=Release.\bin\Release\YoutubeMp3Downloader.exeWhen 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:
Paste a YouTube video URL to download its audio as MP3.
Paste a YouTube playlist URL to download all tracks.
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.
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
| Package | Version | Purpose |
|---|---|---|
| YoutubeExplode | 6.5.7 | YouTube data extraction and stream download |
| AngleSharp | 1.4.0 | HTML parsing (YoutubeExplode dependency) |
This project is licensed under the MIT License — see the LICENSE file for details.
Developed by sayborok