Metadata-Version: 2.4
Name: mpv-yt
Version: 1.0.0
Summary: High-performance YouTube video streaming with mpv
Author: Mustafa Chyi
Project-URL: Repository, https://github.com/mustafachyi/mpv-yt
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video :: Display
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx[brotli,http2]>=0.28.1
Requires-Dist: anyio>=4.10.0
Requires-Dist: orjson>=3.11.3

# 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

```sh
pip install .
```

## 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.

```sh
play
```

### Direct Playback

Provide a YouTube URL or video ID directly as an argument.

```sh
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`.

```sh
play dQw4w9WgXcQ --quality 1080p
```

### Audio-Only Mode

Use the `--audio` flag to stream only the audio track.

```sh
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.                                                         |
