Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

yt-audio-cli

PyPI version NPM version Crates.io version CI License

Save audio from YouTube as Opus, AAC, MP3 or WAV, with no yt-dlp or FFmpeg.

📝 Changelog · 🐛 Issues

Features

  • 📦 One binary. It needs no Python, yt-dlp or FFmpeg
  • ⚡ Starts in about 1 ms and uses about 10 MB of memory
  • 🎧 Opus and AAC come straight from YouTube, with no second encode
  • 📃 Videos, playlists and a batch file of URLs, with parallel downloads
  • 🔁 A dropped connection resumes from the last byte
  • 🏷️ Writes the title and channel as tags in Opus and MP3 files
  • 🧹 Ctrl-C deletes the files that did not finish
  • 🌍 Linux, macOS and Windows, on x86_64 and arm64

Install

uv tool install yt-audio-cli          # or: pipx install yt-audio-cli
npm install -g @pyyupsk/yt-audio-cli  # or: pnpm add -g, bun add -g
cargo binstall yt-audio-cli           # or: cargo install yt-audio-cli (needs a C compiler)

All of them install the same binary. To run it once, use uvx yt-audio-cli, npx @pyyupsk/yt-audio-cli or bunx @pyyupsk/yt-audio-cli.

Each release also has an archive for every system, with a SHA256SUMS file.

Usage

yt-audio-cli https://youtu.be/E-TVrIwwmpc

The file goes into the current folder, named after the video title.

# Several videos, or a whole playlist
yt-audio-cli URL1 URL2
yt-audio-cli "https://www.youtube.com/playlist?list=PLAYLIST_ID"

# URLs from a file, one per line. Lines that start with # are skipped
yt-audio-cli --batch urls.txt

# Another format and folder
yt-audio-cli -f mp3 -o ~/Music URL

CLI

Option Does
-f, --format <FORMAT> opus (default), aac, mp3 or wav
-o, --output <DIR> Folder for saved files. Default: the current folder
-b, --batch <FILE> Reads URLs from a text file, one per line
-F, --force If the file exists, replaces it
-q, --quality <PRESET> MP3 only: best (320 kbps, default), good (192), small (128)
--bitrate <KBPS> MP3 only: 32 to 320 kbps. Overrides --quality
--no-metadata Writes no title and artist tags
-w, --workers <N> Parallel downloads, 1 to 16. Default: 4
-r, --retries <N> Retries per failed download, 0 to 10. Default: 3
-V, --version Prints the version

Some older videos have no Opus stream. For these, yt-audio-cli uses the AAC stream. If you asked for opus, it encodes the AAC to Opus at 128 kbps and prints a note. AAC and WAV files have no place for tags.

Exit code Means
0 All files were saved or were already there
1 At least one URL failed
2 No URLs were given, or yt-audio-cli cannot read the batch file
130 Stopped with Ctrl-C. Press it twice to quit at once

Moving from 0.2.x

Version 1.0 is a rewrite in Rust that supports YouTube only.

  • The default format is now opus, not mp3. Use -f mp3 to keep the old result
  • -q and --bitrate now apply to MP3 only. Opus and AAC keep the quality of the YouTube stream
  • Print the version with -V. The old -v is gone
  • File names, --batch, -o, -F, -w, -r and --no-metadata work as before

The last Python version is v0.2.4.

Why?

yt-dlp supports more than 1,000 sites and needs Python and FFmpeg for audio. yt-audio-cli does one job: it saves YouTube audio. It asks YouTube for the streams the way the YouTube app for Apple Vision Pro does, so it does not need a JavaScript runtime. Opus and AAC files are copied as they are, not encoded again.

YouTube changes its systems often. If downloads stop working, update to the latest version. If that does not help, open an issue.

License

MIT License © 2026 Pongsakorn Thipayanate

The binary includes LAME for MP3, under the LGPL. The full source is in this repository, so you can build the binary with your own copy of LAME.

Metadata

Release files for yt-audio-cli 1.0.0rc1

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-audio-cli 1.0.0rc1
File Size Uploaded Provenance Actions
yt_audio_cli-1.0.0rc1.tar.gz 322.6 kB With provenance Details for yt_audio_cli-1.0.0rc1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for yt-audio-cli 1.0.0rc1
File Actions
yt_audio_cli-1.0.0rc1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for yt_audio_cli-1.0.0rc1-py3-none-win_amd64.whl
yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_x86_64.whl
yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_aarch64.whl
yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
yt_audio_cli-1.0.0rc1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for yt_audio_cli-1.0.0rc1-py3-none-macosx_11_0_arm64.whl
yt_audio_cli-1.0.0rc1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for yt_audio_cli-1.0.0rc1-py3-none-macosx_10_12_x86_64.whl

Total release size: 19.8 MB

Release files / yt_audio_cli-1.0.0rc1.tar.gz

Download URL yt_audio_cli-1.0.0rc1.tar.gz
Size 322.6 kB
Tags Source
SHA-256 checksum
How to use checksums
74c427fc2942ce3bf3895b40e7c48335a15f2d5984cb8221165c0150fe4cb5e9
BLAKE2b-256 checksum
How to use checksums
463016e0d887fc309b156d9a5504872917782efcac6b4690e0bc031dbcbb2356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-win_amd64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
fde63646f0177d62288f3261fcdb2f8ed0bcbcf0e1e3035cc0a67c269e096182
BLAKE2b-256 checksum
How to use checksums
31d544afeb1ffbbb96a26ec0efcfa5210df13e919f37d0602061890f82f3552f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_x86_64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_x86_64.whl
Size 3.0 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1755d52832e4ce2efc1a35240f700a4abb8c726b1b1360ef313b47dfa33a4ed4
BLAKE2b-256 checksum
How to use checksums
9a8571041215e4d547f639d1208071b5ba5fe9c1ea4dbb06907b8fd63e1a3f50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_aarch64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
132df19a756d10a87943d389b2ba68a20ab0214587562ec0cb242572d22e23f3
BLAKE2b-256 checksum
How to use checksums
bbd1f2c3949eb66187e489dd3e6328f6433dc148236d70e1b2c7c1c86040f6eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b3218e5bbaa6cb32793859179d2d7708ab150435ee8e913c58a793df1130c993
BLAKE2b-256 checksum
How to use checksums
6cef29fae0be93b07a70e6d5a0664ccca655b17bc08822160052fbc69f96af9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
9cc590a1e52a0dbf86819cc4fcf9b6e104a5aadc9ab72790ab62fe807c32c57f
BLAKE2b-256 checksum
How to use checksums
3ebaa26877ab096ea30b27137596f2a247b253c80c6209b1174805676b14bace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-macosx_11_0_arm64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-macosx_11_0_arm64.whl
Size 2.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6680aae20726819e224c8077810ccf2f87f041d302751e3f74f3852fc1a86894
BLAKE2b-256 checksum
How to use checksums
8d2ca150f143575c683f43f648b9ab8ffa92cfe151ad838663e07e7d00bc7018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / yt_audio_cli-1.0.0rc1-py3-none-macosx_10_12_x86_64.whl

Download URL yt_audio_cli-1.0.0rc1-py3-none-macosx_10_12_x86_64.whl
Size 2.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6e9cf79136d0937847cef7eee4e3b810b7de4ae2545041fe10d69463804dc310
BLAKE2b-256 checksum
How to use checksums
876e246c60b33ac9a237fd2bc5cdbedbe6ccdeeaef5a22a7d021a352d3465cea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Security for yt-audio-cli 1.0.0rc1

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for yt_audio_cli-1.0.0rc1.tar.gz

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 Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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