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.

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.3.tar.gz
  • Upload date:
  • Size: 12.6 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.3.tar.gz
Algorithm Hash digest
SHA256 4b2e88992ddece61b51988643ceba51e46d39d3d24b8d599f9a64e5c2f189f38
MD5 bc3b0fc5057235353c637614186600a7
BLAKE2b-256 46b94909d734d9acb0ee60658b8c2feeeb69cd3683114edaced3e23e4a346d1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: open_in_mpv-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a24d3d06e793c113eec6a3c4d3f45fc4796fb864c6117c367e393a0b4366910
MD5 a33ff0e68ceb10aaf9985f3cce2f5fcf
BLAKE2b-256 f0dd9186d0112e9abe2ec55f794a7096926be9b472734e1c3b5cf30b5f8be64a

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