[Guide] How to send Youtube, Twitch.. to mpv from your browser #14506
Replies: 5 comments 3 replies
-
Bookmark |
Beta Was this translation helpful? Give feedback.
-
tampermonkey script: Use shortcut key(default ctrl+v) to play video from clipboard, supports file, webdav and jellyfin. |
Beta Was this translation helpful? Give feedback.
-
For those who want to support this feature in their own programs, here are the simple steps install protocolcreate mpv.reg file
install protocol, note that you must use Windows-style separators
Now when you open the link mpv-easy:abcd through the browser, the browser will pop up the following prompt message send message to mpvWhen you use mpv-easy://abcd to start the mpv player, the parameter actually received by the mpv program is mpv-easy://abcd
After reinstalling the reg file, you can use link to play the video
Some optimizationsAlthough we can use encodeURIComponent to pass arbitrary parameters to mpv on the web, there are still some problems max lengthThe maximum length of a windows URL is 2048, which is sufficient for most scenarios. program flickerStarting mpv via powershell, there will be a very short program flicker playlistmpv only supports playlist via m3u files In order to solve the above problems, we can implement a transfer program
Compress the data using gzip on the web, then convert it to base64 encoding, which can solve any encoding problems and reduce the link length I used the above ideas to implement mpv-easy-play-with |
Beta Was this translation helpful? Give feedback.
-
""""And patch your browser handlers.json (about:support -> Open Profile Folder) using this (Paste the content of your handlers.json to the textarea -> Copy -> Paste back to your handlers.json: handlers.json Patcher"""" I could not understand this part. Would you please elaborate? @gunir |
Beta Was this translation helpful? Give feedback.
-
I don´t understand . |
Beta Was this translation helpful? Give feedback.
-
Original Thread: #9364
For people who curious, this is a plugin that allows the use of
mpv://
protocol: protocol_hook.luaYou need to install this script to your Userscript Manager (preferbly Violentmoney): Handlers Helper.user.js
And patch your browser handlers.json (
about:support
->Open Profile Folder
) using this (Paste the content of yourhandlers.json
to the textarea -> Copy -> Paste back to yourhandlers.json
: handlers.json PatcherFor advanced usage, install m3u8.user.js to enable watching from websites that yt-dlp doesn't support: m3u8.user.js
If you do everything correctly, congrats, this is how you use it: DEMO VIDEO
Absolutely game changer, no more copying pasting, just drag and drop.
Enjoy!
Beta Was this translation helpful? Give feedback.
All reactions