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.3.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.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_in_mpv-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 42dba70abb5b711d137205185db4ef08250d2cc84d5b95a681873a36d8fc8355
MD5 bb05ff91ebe7fd1133028ce5556f4516
BLAKE2b-256 6099803ea7c31e5f98be9dc0fee4f9a22fd37b52ef5581e52df13ff943181c07

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_in_mpv-0.2.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: open_in_mpv-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 60c0da52c482eb496cd46dfa5120733f1d02aefc5c2664a7191be915f8e59303
MD5 a706d80cd99004cefa1396f278807395
BLAKE2b-256 96fd005034117d8535da71099409eb08899812bbd0868fba96fcb512cd54ea50

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_in_mpv-0.2.3-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