Skip to main content

ytmp3-dl

CI PyPI Python Downloads Licence Ruff

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 .
scripts/test_ci.sh           # the whole CI gate, locally

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.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 ytmp3-dl 1.0.1
File Size Uploaded
ytmp3_dl-1.0.1.tar.gz 24.9 kB Details

Built distribution (wheel)

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

Total release size: 45.9 kB

Release files / ytmp3_dl-1.0.1.tar.gz

Download URL ytmp3_dl-1.0.1.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
96158dabae944c8e867f673f1e64f73f54e358a0ccbaf802e80a463efe8b67ea
BLAKE2b-256 checksum
How to use checksums
87773ee33fb3d63337503865ad044139303ade298be752b0175442b86ecb0117
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.1-py3-none-any.whl

Download URL ytmp3_dl-1.0.1-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e2b0fea5a8ad4fa00b7c0d2658bc4dca61762dde7114ae36d456b175fb0b9af
BLAKE2b-256 checksum
How to use checksums
63cc90b3617bd3e3849820f4c46af3447b334e216660da503a36b534fd0f9d79
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

This release

1.0.1 This release

2 release files

1.0.0

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