mpv-yt
A command-line tool to stream YouTube videos with mpv.
Prerequisites
Requires mpv media player to be installed and available in your system's PATH.
Installation
pip install mpv-yt
Usage
The tool can be invoked with the play command, followed by a YouTube video URL or ID. If no identifier is provided, the tool will prompt for input.
Interactive Mode
Run the command without a video identifier to be prompted for one. Then, select the desired stream quality from the interactive list.
play
Direct Playback
Provide a YouTube URL or video ID directly as an argument.
play "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# or
play dQw4w9WgXcQ
Quality Selection
Specify a video quality to bypass the interactive selection. The tool supports specific resolutions (e.g., 1080p, 720p), highest, or lowest.
play dQw4w9WgXcQ --quality 1080p
Audio-Only Mode
Use the --audio flag to stream only the audio track.
play dQw4w9WgXcQ --audio
Options
| Argument | Short | Description |
|---|---|---|
identifier |
The YouTube URL or Video ID to play. | |
--quality <quality> |
-q |
Set a preferred quality (e.g., 1080p, highest, lowest). |
--audio |
-a |
Play audio only. |
Metadata
Release files for mpv-yt 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mpv_yt-1.0.1.tar.gz | 6.0 kB | Without provenance | Details for mpv_yt-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mpv_yt-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for mpv_yt-1.0.1-py3-none-any.whl |
Total release size: 12.5 kB
Release files / mpv_yt-1.0.1.tar.gz
| Download URL | mpv_yt-1.0.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58e3782a4e38614f7261a82f4eceeb9794ebe438d3155d54101a8b8e6d7692ba
|
|
BLAKE2b-256 checksum How to use checksums |
0c99b42b6e887949a4f4b6f35aadf0623eee5c15e7c0cd401b52cdc2a9a0f6d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / mpv_yt-1.0.1-py3-none-any.whl
| Download URL | mpv_yt-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97753c828fedb681c6e90272a7a560cc16ca421f8a40c0daff333549566d7f9a
|
|
BLAKE2b-256 checksum How to use checksums |
82d5a2b923de7d0fcf39d0a42552965be8f1dcb307ac64b91349966610b3532f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for mpv-yt 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.