Skip to main content

YouTube Music Downloader

hovnokod

A cross-platform Terminal User Interface (TUI) application for macOS, Windows, and Linux designed to download YouTube Music playlists and tracks with the highest possible audio quality, supporting browser-based authentication, cookie extraction, and audio re-encoding.

TUI

YouTube Music Downloader TUI

GUI

YouTube Music Downloader Desktop GUI


✨ Features

  • Cross-Platform: Runs natively in macOS (Terminal, iTerm2), Linux (Alacritty, Kitty, GNOME Terminal), and Windows (Windows Terminal, PowerShell, CMD).
  • Highest Audio Quality:
    • Automatically queries and extracts the best available audio streams (bestaudio/best), unlocking 256 kbps Opus/AAC when authenticated with YouTube Music Premium.
    • Option to retain original bitstream (zero quality loss) or re-encode with FFmpeg.
  • Flexible Audio Re-Encoding:
    • MP3: Up to 320 kbps CBR or VBR 0.
    • M4A / AAC: High quality 256 kbps AAC.
    • FLAC: Lossless compression container.
    • OPUS: High-efficiency modern codec.
  • Embedded Cover Art & Metadata:
    • Automatically downloads high-resolution artwork and embeds it into MP3 ID3 tags, M4A mp4-atoms, or Opus tags.
    • Automatically tags Track Title, Artist, Album, Track Number, and Release Year.
  • Interactive Browser Authentication & Cookie Grabber:
    • Method 1 (Recommended): Opens YouTube Music in an isolated browser window (Chrome, Brave, Edge, Chromium) with DevTools remote debugging. Sign in to your Google Account, and the app automatically captures and saves session cookies into Netscape cookies.txt format.
    • Method 2 (1-Click Sync): Direct 1-click cookie sync from already-installed browsers (Google Chrome, Mozilla Firefox, Microsoft Edge, Brave, Opera).
    • Method 3 (Manual Import): Import any existing Netscape cookies.txt file.
  • Dark & Light Terminal Background Compatibility:
    • Built-in theme switching (textual-dark, textual-light, nord, solarized-light, solarized-dark, dracula, etc.).
    • Press t or F2 at any time to toggle between Dark and Light mode.
  • Comprehensive Dual Progress Indicators:
    • Current Track Progress Bar: Live percentage, downloaded/total bytes, download speed (e.g. 3.4 MB/s), and ETA countdown.
    • Overall Playlist Progress Bar: Overall progress, completed track counter (e.g. 12 / 20 tracks), and percentage.
    • Live Tracklist Queue: Interactive data table showing track number, title, artist, duration, and real-time status badges (⏳ Pending, ⬇ Downloading, 🔄 Transcoding, ✓ Done, ✗ Error).
    • Activity Log: Dedicated log console displaying real-time download and FFmpeg transcoding output.
  • Automatic Dependency Verification:
    • Automatically verifies system dependencies (FFmpeg, FFprobe, and system browsers) on startup.
    • Warns proactively with exact OS-tailored install commands before broken downloads occur.
    • Dedicated CLI diagnostics command (yt-music-dl --check-deps) and Desktop GUI 🛠 Dependencies viewer.

🚀 Installation & Prerequisites

Prerequisites

  • Python 3.10+
  • FFmpeg: Required for audio extraction, transcoding, and artwork embedding.
    • macOS: brew install ffmpeg
    • Linux (Ubuntu/Debian): sudo apt install ffmpeg
    • Linux (Arch): sudo pacman -S ffmpeg
    • Windows: winget install Gyan.FFmpeg or choco install ffmpeg

Install via pipx (Recommended)

pipx runs the app in an isolated environment and adds yt-music-dl and yt-music-gui to your PATH:

pipx install yt-music-downloader
# Or install directly from GitHub:
pipx install git+https://github.com/tekk/yt-music-downloader.git

Install via uv

uv tool install yt-music-downloader
# Or directly from GitHub:
uv tool install git+https://github.com/tekk/yt-music-downloader.git

Standalone Precompiled Binaries

Check the Latest Releases for:

  • Windows x64 / ARM64: .zip with portable .exe
  • Linux: Standalone .AppImage (runs on any modern distro)
  • Debian / Ubuntu: Native .deb package

Install from Source

git clone https://github.com/tekk/yt-music-downloader.git
cd yt-music-downloader

# Using uv (recommended)
uv venv && uv pip install -e .

# Or using standard venv + pip
python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e .

💻 Usage

Run the application:

yt-music-dl

Or run directly with main.py:

python main.py

CLI Arguments

You can pre-load a playlist URL and settings directly from the terminal:

# Open directly with a playlist URL
yt-music-dl "https://music.youtube.com/playlist?list=PLxxxxxxxxxxxxxxx"

# Set default format and quality
yt-music-dl -f mp3 -q 320

# Specify download directory and custom theme
yt-music-dl -o ~/Music/Albums -t textual-light

# Check system dependencies (FFmpeg, FFprobe, browsers)
yt-music-dl --check-deps

# Show full help
yt-music-dl --help

⌨ Keyboard Shortcuts

Key Action
t / F2 Toggle Dark / Light Theme
i Inspect URL (fetches and displays playlist tracks)
d Start Download
c Cancel Download
l Open Login & Cookie Manager
s Open Settings
q / Ctrl+Q Quit

🔐 Logging In & Premium Audio

YouTube Music delivers higher bitrate streams (e.g. 256kbps AAC / Opus) and unlocks private playlists ("Liked Music") when authenticated:

  1. Press l or click the 🔓 Login badge in the header.
  2. Click 🚀 Open Browser & Login.
  3. Sign into your Google account in the opened window.
  4. The application automatically detects the login event, grabs session cookies, saves them securely to the application config directory, and updates the header badge to 🔒 Logged In.
  5. Alternatively, use the 📥 Sync from Browser dropdown if you are already signed into YouTube Music in your daily browser (Chrome, Firefox, Edge, etc.).

📁 Storage & Configuration Paths

Settings and cookies are stored across OSes in standard user directories via platformdirs:

  • Linux: ~/.config/yt-music-downloader/
  • macOS: ~/Library/Application Support/yt-music-downloader/
  • Windows: %APPDATA%\yt-music-downloader\

Downloaded music defaults to:

  • ~/Music/YT-Music/ (or %USERPROFILE%\Music\YT-Music\ on Windows).
  • Each playlist is automatically organized into its own named subfolder with numbered tracks (01 - Track Name.mp3).

🧪 Running Tests

Run the test suite with pytest:

pytest -v

📄 License

MIT License.

Metadata

Release files for yt-music-downloader 0.0.6

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

Source distribution (sdist)

Source distribution for yt-music-downloader 0.0.6
File Size Uploaded
yt_music_downloader-0.0.6.tar.gz 2.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for yt-music-downloader 0.0.6
File Interpreter ABI Platform
yt_music_downloader-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 MB

Release files / yt_music_downloader-0.0.6.tar.gz

Download URL yt_music_downloader-0.0.6.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5d3d2ca4cb42b0f8a641e749ee7fb8d33180ed8e9e3dce410d9a61233fe83a98
BLAKE2b-256 checksum
How to use checksums
6cab4013ad3980170e8c3aa8a4324113f705ebb7e7bec51110a1a5e20bba1cfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / yt_music_downloader-0.0.6-py3-none-any.whl

Download URL yt_music_downloader-0.0.6-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f63d9ee5c9adce59bebb3b99f7daf558ed4abfb6986fadafe50297f4ae2e241d
BLAKE2b-256 checksum
How to use checksums
c3c35822de1167a8237a355cacf3ca2cc2440d612892e08e5fd8e237a77a8d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.0

2 release files

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

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