A simple and efficient command-line tool to download YouTube videos and convert them to MP3 format with high audio quality.
- Download YouTube videos as MP3 files
- High-quality audio extraction (192 kbps)
- Automatic library updates on download failures
- Interactive loading animation
- Continuous download mode for multiple files
- Automatic format conversion using FFmpeg
Before running this application, ensure you have the following installed:
- Python 3.7 or higher
- FFmpeg (required for audio conversion)
Windows:
- Download FFmpeg from ffmpeg.org
- Extract the archive and add the
binfolder to your system PATH - Verify installation:
ffmpeg -version
- Clone this repository:
git clone https://github.com/yourusername/ytmp3.git
cd ytmp3- Install required Python packages:
pip install yt-dlp pytube- Configure the download destination in
ytmp3.py:
destination = r"C:\Users\YourUsername\Music"python ytmp3.py- Edit
ytmp3.batand update the path to yourytmp3.pyfile - Double-click
ytmp3.batto run
Once started, the program will prompt you to enter a YouTube URL:
Masukkan Link Youtube:
>> https://www.youtube.com/watch?v=example
The download will begin automatically, and the MP3 file will be saved to your configured destination folder.
Edit the following variables in ytmp3.py to customize behavior:
destination: Output directory for downloaded MP3 filespreferredquality: Audio quality (default: 192 kbps)outtmpl: Output filename template
- yt-dlp - YouTube video downloader
- pytube - YouTube video metadata extraction
- FFmpeg - Audio/video processing
The application includes automatic error recovery:
- If a download fails, it automatically updates the yt-dlp library
- Retries the download after library update
- Displays clear status messages throughout the process
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for personal use only. Please respect YouTube's Terms of Service and copyright laws. Only download content you have permission to download.
Contributions are welcome! Please feel free to submit a Pull Request.
Fikri Armia Fahmi
- Built with yt-dlp for reliable YouTube downloads
- Uses FFmpeg for high-quality audio conversion