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

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.

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.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

open_in_mpv-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.12 Linux/6.3.5-gentoo-limelight

File hashes

Hashes for open_in_mpv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 400bf74663d44e460df84498381342cf76d31b09f13b5a554f86ec8ac36434e2
MD5 047be4ceb03fd7e661e1a1249438a459
BLAKE2b-256 0d1c2820f26e08d4a8006b1328a5044811d90732b618dc4e2335ff6cfeea409b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.12 Linux/6.3.5-gentoo-limelight

File hashes

Hashes for open_in_mpv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4457dabf0a2f26f760e15e60da12ce1cdf9c58562c1296c475d0b4dbc6ef71d3
MD5 7e07c77c34d27738cdf4a889a3eb545d
BLAKE2b-256 932481835a779748397f01d36597aea6f7d7e8fa54d0dd5669548b741ec1ea6c

See more details on using hashes here.

Supported by

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