Skip to main content

Open in mpv

QA Lint Python

Context menu item

This browser extension displays a context menu item Open in mpv for links. When clicked it will pass the URL of the link to mpv (which must be PATH).

If you have yt-dlp installed and in PATH, then mpv will try to use it to resolve URLs it cannot handle. This means you can right-click on any YouTube video page or link, choose Open in mpv and view the video with mpv.

Installation

First, install the extension. Quit your browser.

There are many ways to perform the next step. Below is the most basic, assuming you have Pip installed. Before running the commands below, quit your browser.

Gentoo users can simply install media-video/open-in-mpv from my overlay.

pip install --user open-in-mpv
open-in-mpv-install --user

The above will install the native host JSON file to supported Chromium-based browsers whose paths are known, but only if the browser has created the directories before. If you want to force the installation you can pass --force.

See open-in-mpv-install --help for more options. Linux users can pass the --system option to install the native host part of the extension system-wide.

Uninstallation

open-in-mpv-uninstall
pip remove --user open-in-mpv

Uninstall the extension from your browser.

Known issues

Linux: mpv is launched with --gpu-api=opengl because with Vulkan it starts but fails to open a window.

At this time, Windows is not supported by the open-in-mpv Python script. It may work, but it is not supported.

Metadata

Release files for open-in-mpv 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-in-mpv 0.1.0
File Size Uploaded
open_in_mpv-0.1.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for open-in-mpv 0.1.0
File Interpreter ABI Platform
open_in_mpv-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / open_in_mpv-0.1.0.tar.gz

Download URL open_in_mpv-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
400bf74663d44e460df84498381342cf76d31b09f13b5a554f86ec8ac36434e2
BLAKE2b-256 checksum
How to use checksums
0d1c2820f26e08d4a8006b1328a5044811d90732b618dc4e2335ff6cfeea409b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.12 Linux/6.3.5-gentoo-limelight

Release files / open_in_mpv-0.1.0-py3-none-any.whl

Download URL open_in_mpv-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4457dabf0a2f26f760e15e60da12ce1cdf9c58562c1296c475d0b4dbc6ef71d3
BLAKE2b-256 checksum
How to use checksums
932481835a779748397f01d36597aea6f7d7e8fa54d0dd5669548b741ec1ea6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.12 Linux/6.3.5-gentoo-limelight

Release history Release notifications | RSS feed

0.2.3

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.0 This release

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