Skip to main content

🎵 youtune

The smartest YouTube → MP3 downloader

PyPI Python Tests License: MIT Stars

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.

License

MIT

Metadata

Release files for youtune 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtune 1.2.1
File Size Uploaded Provenance Actions
youtune-1.2.1.tar.gz 22.0 kB Without provenance Details for youtune-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for youtune 1.2.1
File Interpreter ABI Platform Actions
youtune-1.2.1-py3-none-any.whl Python 3 none any Details for youtune-1.2.1-py3-none-any.whl

Total release size: 42.4 kB

Release files / youtune-1.2.1.tar.gz

Download URL youtune-1.2.1.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8e785668daa908d6a9e531aac5c6c093e8c8c845718bef1d2d23b0ae0b813a
BLAKE2b-256 checksum
How to use checksums
5ff27e1aa7aeaa0f5e4ef490fa744f7316f34d3dc63ccf5656b93757894e5938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Release files / youtune-1.2.1-py3-none-any.whl

Download URL youtune-1.2.1-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f25582b4021bfad56c060459a5ce3cb22d4986740f0445515bee301af429496
BLAKE2b-256 checksum
How to use checksums
52e69c97dbb9af9228b4478a413e3041d8eada1a3e18f8bdc3b687c7586fd324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.12

Security for youtune 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page