百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Y

youtube-mpv

> 编程语言
开源

Chrome扩展可以添加上下文菜单选项来播放用mpv播放的youtube(和被支持的其他youtube-dl)视频.

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Chrome扩展可以添加上下文菜单选项来播放用mpv播放的youtube(和被支持的其他youtube-dl)视频.

ytdl server

Chrome extension and Firefox add-on that adds context menu option to play youtube videos with mpv (or other external player).

Requirements

  1. Chrome like/Firefox browser.
  2. python2 or python3
  3. youtube_dl module
  4. mpv or similar

Installation

Server side:

Arch Linux

Install the AUR package, youtube-mpv-git.

systemd unit files

In order to install the server with systemd, you will need to copy

  • youtube-mpv.service to /etc/systemd/user/youtube-mpv.service

Then you can install it with:

$ systemctl --user  youtube-mpv.service

Note: these unit files assume ytdl_server.py is installed at /opt/youtube-mpv-git/ytdl_server.py. You will need to amend the paths if you have installed it elsewhere.

Ubuntu

./install-ubuntu.sh

make sure you don't run this script as root (without sudo)

**Note: ** for playlist support add ytdl-raw-options=yes-playlist= to your mpv.conf file.

Client side (browser):

  1. chrome://extensions/
  2. tick Developer mode
  3. Load unpacked extension...
  4. Choose chrome directory of this project.

Usage

  1. Navigate to script's directory.
  2. Run python ytdl_server.py.

Configuration

Change port, host or player, player options

Modify ytdl_config.py file.

General (mpv) player options should be set (usually) in ~/.config/mpv/config. Specific options like provided --no-terminal should be put in OPTS variable and separated with space ie: --no-terminal --screen 1.

Receive native notifications on errors

Modify ytdl_config.py to set the NOTIFY_COMMAND to a command, such as notify-send on Linux to provide native notifications when a video cannot be found.

How does it work

Whenever 'Play with mpv' is selected in browser, url http://127.0.0.1:9000/p?i= is sent to listening server. Server checks if url is supported, extracts video url and starts player.

Credits

agiz, dcrystalj, ihavenoface, jamietanna

License

GPLv2

Issues· 3 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言