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.1.3.tar.gz (21.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.1.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: youtune-1.1.3.tar.gz
  • Upload date:
  • Size: 21.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.1.3.tar.gz
Algorithm Hash digest
SHA256 754a7563fdfe4eac010e8120c338119d6902c84d221c5262b5bdd66a04f41e43
MD5 8c4f39b84be97810547405f6711954f8
BLAKE2b-256 7dfc7712797c61634e46a07e9406ac7f6af5fd1dfa99f8000e7b75b16423dcfd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtune-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a80706c72756a587b725689d54e3a4936ee7ba0578d5d298d3afa3f600f0cbe1
MD5 d7d0b438acecbede9b4c415f2a1e37bb
BLAKE2b-256 f4f3928fd472492133ba0997242d9811817e67be82c115470b2bacc9a38e4748

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