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) QA Tests Coverage Status Documentation Status mypy pre-commit pydocstyle pytest Ruff Downloads Stargazers

@Tatsh Mastodon Follow

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.2.tar.gz (12.7 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.1.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.10 Linux/6.14.3-gentoo-limelight

File hashes

Hashes for open_in_mpv-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6a7d8f0490c2204e02ec0db329fa460fb0c3fdeadf339fd2c524e78c271cbc32
MD5 144b31fa788260cd8413d5e1813e6369
BLAKE2b-256 a61ffb444c263324affff747e81921f6f4ad5d704e7b7484b78cc7f733382ee7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.10 Linux/6.14.3-gentoo-limelight

File hashes

Hashes for open_in_mpv-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0cc5da2a5634fdc3f5adc48de2838eb1f51d17e15f3c1bd663d7fb63ba237498
MD5 900a24c5e623d338dcee4d2b91337197
BLAKE2b-256 ce4f2ea61855178eb0a659dace9ad053fd723a8e515d437b7fbf1b103377770c

See more details on using hashes here.

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