The smartest YouTube โ MP3 downloader. Auto-tags with MusicBrainz, embeds album art, fetches lyrics, upgrades quality via Soulseek.
Project description
๐ต youtune
The smartest YouTube โ MP3 downloader
Auto-tags with MusicBrainz ยท Embeds album art ยท Fetches lyrics ยท Upgrades quality via Soulseek ยท Normalizes loudness ยท Smart renaming
One command. Perfect MP3.
pip install youtune
youtune "https://youtube.com/watch?v=dQw4w9WgXcQ"
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ youtune v1.0.0 โ
โ The smartest YouTube โ MP3 downloader โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ต Rick Astley โ Never Gonna Give You Up (confidence: 90%)
โ
Metadata found via MusicBrainz
๐ Album: Whenever You Need Somebody
๐
Year: 1987
#๏ธโฃ Track: 1
๐ Lyrics found (36 lines)
๐ผ๏ธ Cover art embedded
๐ Renamed โ Rick Astley - Never Gonna Give You Up.mp3
โจ Done!
The problem
yt-dlp -x --audio-format mp3 "https://youtube.com/watch?v=..." gives you:
- โ Filename:
Rick Astley - Never Gonna Give You Up (Official Music Video) [HD Remaster].mp3 - โ No artist, album, year, or track number
- โ No album art
- โ No lyrics
- โ 128kbps YouTube audio, no loudness normalization
- โ Messy filenames with junk like "(Official Video)", "[HD]", etc.
youtune fixes all of that โ automatically.
Features
| Feature | What it does | |
|---|---|---|
| ๐ง | Smart title parsing | Strips "Official Music Video [HD Remaster]" โ extracts clean artist + song |
| ๐ท๏ธ | MusicBrainz tagging | Looks up the real recording โ writes ID3v2 tags (artist, album, year, track #, genre) |
| ๐ผ๏ธ | Album art | Fetches cover from Cover Art Archive โ embeds in MP3 |
| ๐ | Lyrics | Fetches synced/plaintext lyrics from lrclib โ embeds in file |
| ๐ฅ | Soulseek upgrade | Searches Soulseek for FLAC/320kbps โ replaces YouTube download |
| ๐ | Loudness normalization | EBU R128 normalization โ no more quiet/blasting tracks |
| ๐ | Playlists | Download + tag entire playlists in one shot |
| โ๏ธ | Smart renaming | Rick Astley - Never Gonna Give You Up.mp3 not vevo_aU_official(1).mp3 |
| ๐ | Dry-run search | youtune search "Artist - Song" โ preview metadata without downloading |
| ๐ | Thousands of sites | Works with any site yt-dlp supports โ not just YouTube |
Install
pip install youtune
Prerequisites: yt-dlp and ffmpeg must be on your PATH:
# macOS
brew install yt-dlp ffmpeg
# Ubuntu / Debian
sudo apt install ffmpeg && pip install yt-dlp
# Windows (winget)
winget install yt-dlp.yt-dlp Gyan.FFmpeg
# Arch
sudo pacman -S yt-dlp ffmpeg
Optional: Soulseek support
pip install youtune[soulseek]
Usage
Download & auto-tag a track
youtune "https://youtube.com/watch?v=dQw4w9WgXcQ"
Download with lyrics + loudness normalization
youtune "https://youtube.com/watch?v=..." --lyrics --normalize
Download a playlist
youtune "https://youtube.com/playlist?list=PL..." -o ~/Music/Playlist
Upgrade quality via Soulseek
youtune "https://youtube.com/watch?v=..." \
--soulseek \
--soulseek-user myusername \
--soulseek-pass mypassword
Downloads from YouTube first, then searches Soulseek for FLAC or 320kbps. If found, replaces the YouTube file.
Preview metadata (no download)
youtune search "Radiohead - Everything In Its Right Place"
Skip everything, just download
youtune "https://youtube.com/watch?v=..." --no-tag --no-art --no-rename
How it works
YouTube URL
โ
โผ
โโโโโโโโโโโโโโ
โ yt-dlp โ Extract audio โ MP3
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ Parse โ "Rick Astley - Never Gonna Give You Up (Official Video) [HD]"
โ title โ โ artist: "Rick Astley", song: "Never Gonna Give You Up"
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ MusicBrainz โ Lookup recording โ album, year, track #, MBIDs
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ Cover Art โ Fetch from Cover Art Archive โ embed in MP3
โ Archive โ
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ lrclib โ Fetch synced lyrics โ embed in MP3
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ mutagen โ Write ID3v2 tags + APIC art + USLT lyrics
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ Soulseek โ (optional) Search for FLAC/320 โ replace YouTube file
โโโโโโโฌโโโโโโโ
โ
โผ
Artist - Title.mp3 โจ
(clean, tagged, art, lyrics)
All options
usage: youtune download [-h] [-o OUTPUT] [-q QUALITY] [--normalize] [--lyrics]
[--no-tag] [--no-art] [--no-rename] [--soulseek]
[--soulseek-user USER] [--soulseek-pass PASS]
[--prefer-flac] [--min-bitrate N] [--keep-youtube]
URL
-o, --output Output directory (default: .)
-q, --quality Audio quality 0 (best) โ 9 (worst)
--normalize Apply EBU R128 loudness normalization
--lyrics Fetch & embed lyrics
--no-tag Skip MusicBrainz tagging
--no-art Skip cover art
--no-rename Keep original filename
--soulseek Search Soulseek for better quality
--soulseek-user Soulseek username
--soulseek-pass Soulseek password
--prefer-flac Prefer FLAC from Soulseek (default: true)
--min-bitrate Minimum Soulseek bitrate (default: 256)
--keep-youtube Keep YouTube file when Soulseek upgrades
FAQ
Does it work with Spotify / SoundCloud / Bandcamp?
Yes! youtune works with any URL that yt-dlp supports โ that's thousands of sites.
What if MusicBrainz doesn't have the track?
youtune falls back to the parsed YouTube title. You'll still get a clean filename and basic ID3 tags from whatever was parsed.
What's the Soulseek upgrade?
YouTube audio is typically 128kbps AAC. Soulseek is a P2P network where people share FLAC and 320kbps MP3s. If you enable --soulseek, youtune will search for and download a higher-quality version to replace the YouTube rip. Requires a free Soulseek account.
Can I use it in scripts / CI?
Yes โ exit code 0 on success, non-zero on failure. Use -v for debug logging. No interactive prompts.
Why not just use beets?
beets is great for library management, but it's a heavy setup. youtune is zero-config โ one command and you're done. You can pipe youtune output into beets if you want both.
Contributing
Contributions welcome! See CONTRIBUTING.md.
Related projects
- yt-dlp โ the download engine that makes this possible
- MusicBrainz โ open music encyclopedia
- Cover Art Archive โ free cover art API
- lrclib โ open-source lyrics database
- mutagen โ Python audio metadata library
- beets โ the music organizer for obsessives
- slsk-batchdl โ Soulseek batch downloader
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youtune-1.0.1.tar.gz.
File metadata
- Download URL: youtune-1.0.1.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30ccbed86b9d18dbc6ea8ae6971500177b0c5fe1ebfb024fe3f09d74b30d14d
|
|
| MD5 |
1f9468b5bc6d44803d41d0064bfdf51d
|
|
| BLAKE2b-256 |
47a71f4b26fbf7df757d67fe1c4f9c74d059864c61e505d7c4cfed875afd4220
|
File details
Details for the file youtune-1.0.1-py3-none-any.whl.
File metadata
- Download URL: youtune-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca38c2483a767c93d05a193d042e1d7be346bf641d8caac880721bd641aa8068
|
|
| MD5 |
f67cd294c70829c4076111e0cb2a8054
|
|
| BLAKE2b-256 |
9a6522fb8d4debb280147bb2778f84b631e83218e922f597254fd9cb9fcdfca4
|