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

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_in_mpv-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f944b1ad9d4bb78a6c1d1573dc0d68a538d4b9e14e7465d46ac83c1ab57cb54d
MD5 58dc90d48f41584ed5b56b830df488f1
BLAKE2b-256 3c031059f746a67b5094efe835242a91e403ae2a7265d26ee4ec2cfefe014d44

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: open_in_mpv-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 779c5f88ff6db8e39fb5a7126e7b6a1379881d64d5f356a7ddb9cb21bf202c08
MD5 61caf8783306f95a528e0c7fc85ebae2
BLAKE2b-256 31ce6b079c4cab545404ea202c7582a8a9a75fbb328488e3b57a61c4fed8e86c

See more details on using hashes here.

Provenance

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