Skip to main content

High-performance YouTube video streaming with mpv

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpv_yt-1.0.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpv_yt-1.0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file mpv_yt-1.0.1.tar.gz.

File metadata

  • Download URL: mpv_yt-1.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mpv_yt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 58e3782a4e38614f7261a82f4eceeb9794ebe438d3155d54101a8b8e6d7692ba
MD5 db1a9b33081e4d8d0de190d3ca3788b5
BLAKE2b-256 0c99b42b6e887949a4f4b6f35aadf0623eee5c15e7c0cd401b52cdc2a9a0f6d7

See more details on using hashes here.

File details

Details for the file mpv_yt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mpv_yt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mpv_yt-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97753c828fedb681c6e90272a7a560cc16ca421f8a40c0daff333549566d7f9a
MD5 592c688049fd411f3cddf240cd60bd11
BLAKE2b-256 82d5a2b923de7d0fcf39d0a42552965be8f1dcb307ac64b91349966610b3532f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page