Skip to main content

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

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.

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtune-1.2.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtune-1.2.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file youtune-1.2.1.tar.gz.

File metadata

  • Download URL: youtune-1.2.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for youtune-1.2.1.tar.gz
Algorithm Hash digest
SHA256 4a8e785668daa908d6a9e531aac5c6c093e8c8c845718bef1d2d23b0ae0b813a
MD5 74bf8034dad2454f29a9f6c9df4ccb25
BLAKE2b-256 5ff27e1aa7aeaa0f5e4ef490fa744f7316f34d3dc63ccf5656b93757894e5938

See more details on using hashes here.

File details

Details for the file youtune-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: youtune-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for youtune-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f25582b4021bfad56c060459a5ce3cb22d4986740f0445515bee301af429496
MD5 efd7bff244dec3964c7cffc6f4698fa1
BLAKE2b-256 52e69c97dbb9af9228b4478a413e3041d8eada1a3e18f8bdc3b687c7586fd324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page