Automatically redirect to mpv player when playing online video
Project description
Auto play in MPV
Automatically redirect to mpv player when playing online video.
Installation / Usage
- install auto-play-in-mpv:
pip install auto-play-in-mpvoruv tool install auto-play-in-mpv, start the server by executingapimin your terminal. - install tampermonkey/violentmonkey in your browser
- install the script from greasyfork
- just click a video from supported sites. (this script mainly works on bilibili. youtube support is not tested yet)
mpv config
Note that this is just my config example. You may need to change some settings.
If you find mpv is not playing the video, you may need to run mpv https://bilibili.com/video/xxx to test if your mpv profile is working.
Autostart server
It's better to start the websocket server automatically at startup.
- On general platforms: please use my another script user-startup-rs!
- On NixOS: Add this to your
configuration.nixsystemd.user.services.apim = { enable = true; description = "Open online video in local mpv player"; script = "~/.local/bin/apim"; wantedBy = [ "default.target" ]; path = with pkgs; [ mpv yt-dlp ]; }; # do not forget to add your current user to some groups users.users.<your_user_name> = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "video" "render" "audio" ]; };
Supported sites
- bilibili (video, live)
- youtube
TODO
- auto start
- fix behavior on youtube
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auto_play_in_mpv-0.1.4.tar.gz.
File metadata
- Download URL: auto_play_in_mpv-0.1.4.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
823653c2ebb17454bc2eec4b57dfd2934634f3abacc79fdf508619dc0b481e58
|
|
| MD5 |
82402dacc4768181027692d5682c6124
|
|
| BLAKE2b-256 |
61863e38f3831f53f6b0c4c19e631bc152a85eb51b88b6a841ec8a2070a5f2cf
|
File details
Details for the file auto_play_in_mpv-0.1.4-py3-none-any.whl.
File metadata
- Download URL: auto_play_in_mpv-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c669aedccbc76a8e10d14757d2cef233f1cb9c1f512b9afd1eb187d1f518848
|
|
| MD5 |
99e90a10639b2015ce2dc28a5d5a316f
|
|
| BLAKE2b-256 |
3395988fd464490f29e7605c4fe27f78da5e617bedf795be16f6bb0293ee8dfc
|