Skip to main content

ytmp3-dl

Download a YouTube playlist as tagged MP3 files, with album art looked up automatically.

  • Extracts the best audio stream with yt-dlp, converts it with ffmpeg.
  • Parses Artist - Title out of messy video titles, preferring YouTube Music metadata.
  • Finds real album art on iTunes, Deezer and the Cover Art Archive; falls back to the thumbnail.
  • Writes ID3v2.4 tags (title, artist, album, year, genre, track number) and embeds the cover.
  • Keeps a download archive, so reruns resume instead of starting over.

Requirements

  • Python 3.10+
  • ffmpeg on your PATH
  • A JavaScript runtime on your PATH: deno, node, bun or quickjs — YouTube hides its audio formats behind a JS "n challenge", and without a runtime every download fails.

Install

uv tool install ytmp3-dl     # isolated, on your PATH
pipx install ytmp3-dl        # same, via pipx
pip install ytmp3-dl         # into the current environment
uvx ytmp3-dl "<url>"         # no install, one-off run

Usage

ytmp3 "https://www.youtube.com/playlist?list=PLxxxxxxxx"

Files land in downloads/<Playlist Name>/Artist - Title.mp3. Use --dry-run to see the track list first, and ytmp3 --help for every flag.

ytmp3 "<url>" --output ~/Music --quality 320 --concurrency 4 --number --save-cover

Private or age-gated playlists need cookies:

ytmp3 "<url>" --cookies-from-browser firefox

Documentation

Full docs live in the wiki, and in docs/ in this repo:

Page Contents
Installation Install methods, ffmpeg, JS runtimes.
Usage Every flag, with examples.
Cover Art How art is found, scored and embedded.
Cookies Getting past "Sign in to confirm you're not a bot".
Troubleshooting Common errors and fixes.
Development Layout, tests, release process.

Development

uv sync
uv run pytest
uv run ruff check .

Licence and use

Apache-2.0, see LICENSE. Downloading is subject to YouTube's Terms of Service and to the rights covering each video. Use it for content you own, content licensed for reuse, or where you otherwise have permission.

Metadata

Release files for ytmp3-dl 1.0.0

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

Source distribution (sdist)

Source distribution for ytmp3-dl 1.0.0
File Size Uploaded
ytmp3_dl-1.0.0.tar.gz 24.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ytmp3-dl 1.0.0
File Interpreter ABI Platform
ytmp3_dl-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / ytmp3_dl-1.0.0.tar.gz

Download URL ytmp3_dl-1.0.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
39e332547ae1d28bc5474dddad41a3b138fc8f694bba752d0b40aefb7e3aef5a
BLAKE2b-256 checksum
How to use checksums
a239a39f16c02011485d35161562845d6b6490529e9f62af1cb8f0a004e76014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ytmp3_dl-1.0.0-py3-none-any.whl

Download URL ytmp3_dl-1.0.0-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
469e7fb411cd4c23cfea541515691df4ddc6f58f7fcfd855bbf42b71b7932074
BLAKE2b-256 checksum
How to use checksums
979389e21244b1419dce976a1a7e12bc6208f95d8e2d032891a423bd97d49cf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

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