Skip to main content

Host-side of the extension to open any link or page URL in mpv via the browser context menu.

Project description

open-in-mpv

Python versions PyPI - Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status Dependabot Documentation Status mypy uv pytest Ruff Downloads Stargazers pre-commit Prettier

@Tatsh Buy Me A Coffee Libera.Chat Mastodon Follow Patreon

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.

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

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

The above commands will install the native host JSON file to supported Chromium-based browsers whose paths are known for your OS. --force is used on first install to create the necessary paths if they do not exist.

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

Uninstall the extension from your browser. Then follow the steps below depending on how you installed the native messaging host component:

General uninstallation

open-in-mpv-uninstall
pip uninstall open-in-mpv

macOS pkg uninstallation

If you installed open-in-mpv using the macOS pkg installer, follow these steps to completely uninstall it:

  1. Run the uninstall command:

    sudo /usr/local/bin/open-in-mpv-uninstall
    
  2. Remove the package files:

    pkgutil --only-files --files sh.tat.open-in-mpv | tr '\n' '\0' | xargs -n 1 -0 sudo rm -f
    pkgutil --only-dirs --files sh.tat.open-in-mpv | tail -r | tr '\n' '\0' | xargs -n 1 -0 sudo rmdir
    
  3. Forget the package:

    sudo pkgutil --forget sh.tat.open-in-mpv
    

Windows

Uninstall open-in-mpv using Programs & Features.

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.

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

open_in_mpv-0.2.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

open_in_mpv-0.2.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file open_in_mpv-0.2.1.tar.gz.

File metadata

  • Download URL: open_in_mpv-0.2.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for open_in_mpv-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1e07a89fff85450c906351c61f892ac0a11d52e1ca6e5ada5f7ccf1e64264c87
MD5 31e4bb53835a775a43dad26c8935757e
BLAKE2b-256 b7b3ffc019dffc3fa6c7659e176bcba4c2135b06e3a2230d58dd703ac78e2f5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_in_mpv-0.2.1.tar.gz:

Publisher: publish.yml on Tatsh/open-in-mpv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_in_mpv-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: open_in_mpv-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for open_in_mpv-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc02890d2eb82df13051e9ca5d6982326126308b6d0c965578d2270a01b3690
MD5 f828f70befa1e5c4809a02b26a319142
BLAKE2b-256 eaa28df2cea1502aafa54f4002e9584c47c53a8b3372aa354bc26c3692d59b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_in_mpv-0.2.1-py3-none-any.whl:

Publisher: publish.yml on Tatsh/open-in-mpv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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