This Python script downloads audio from a YouTube video URL or playlist and converts it to MP3 files at 192 kbps. It utilizes the yt-dlp
library for downloading, pydub
for audio conversion, and mutagen
for embedding metadata.
- Downloads audio from a YouTube video or playlist.
- Converts the audio to MP3 files with a bitrate of 192 kbps.
- Embeds metadata (title, artist, album) into the MP3 files.
- Automatically checks if
ffmpeg
is installed and configures its path forpydub
. - Cleans up temporary files after conversion.
- Python 3.11 Python 3.11.6 Installer
- ffmpeg (must be installed and added to PATH)
- Python packages:
yt-dlp
pydub
mutagen
If you have any issues, join our Discord - Fnbubbles420 Org Community.
- Head to the channel
free-music
- Ping
Bubbles
for support.
Run this command in Command Prompt or PowerShell as Administrator:
winget install --id Gyan.FFmpeg -e --source winget
- Download the latest
ffmpeg
build from ffmpeg.org or gyan.dev. - Extract the files and add the
bin
directory (e.g.,C:\ffmpeg\bin
) to your system PATH.
- Verify
ffmpeg
installation by running:
ffmpeg -version
Install the required packages by running:
pip install yt-dlp pydub mutagen
- Clone or download this repository.
Click the link to read Instructions 📄.
- Run the script:
python main.py
-
Choose whether to download a single track or a playlist:
- Enter
track
orplaylist
when prompted.
- Enter
-
Enter the YouTube URL when prompted.
$ python main.py FFmpeg found at: C:\path\to\ffmpeg.exe Do you want to download a single track or a playlist?
(Enter 'track' or 'playlist'): playlist
Enter the YouTube URL: https://www.youtube.com/playlist?list=example Downloading and converting audio...
Processing metadata for Track Title...
Download and conversion completed!
MP3 files saved in: downloaded_audio/
- FFmpeg Not Found: If you see the message
FFmpeg is not installed or not found in PATH
, please ensure thatffmpeg
is installed and correctly added to your PATH. - Metadata Not Embedded: Ensure the
.info.json
files are being generated byyt-dlp
and the script has write access to the output directory.
- Ensure
ffmpeg
is installed and added to your system PATH sopydub
can locate it. - If installed with
winget
,ffmpeg
may be located atC:\Users\<username>\AppData\Local\Microsoft\WinGet\Links
.
- This project is proprietary, and all rights are reserved by the author.
- Unauthorized copying, distribution, or modification of this project is strictly prohibited.
- You must have written permission from the developer or the FNBUBBLES420 ORG to use or distribute this project.