|
|
|
|
|
by Sir_Cmpwn
4095 days ago
|
|
If it interests anyone here, I have written a Firefox extension that forces YouTube videos to play in an external video player (mpv in my case). You can get it here (only for Linux): https://github.com/SirCmpwn/ExternalPlayer I got fed up with the YouTube player and wrote this in an afternoon instead. |
|
I see you are using youtube-dl. I did too at first, but quickly swapped for YouTubeCenter plugin - it extracts link to mp4 directly in the javascript, my additional javascript grabs that and substitutes YT player window with big PLAY button with a link to custom protocol "magnet1:https://r2---sn-2apm-f5fee.googlevideo.com/videoplayback?sou....
Copying the way browsers open magnet links was the quickest and easiest way I found of passing links directly to a third party program. I simply made a new one, called it magnet1, and directed it towards \AppData\Roaming\smplayer\mplayer.bat %1
.
mplayer.bat:
echo off
set var=%1
start "" "C:\Users\bofh\AppData\Roaming\smplayer\smplayer" "%var:~9%
exit
.
cut first 9 characters (magnet1:) and run mplayer, that again was the only way I found of starting new program without keeping command line window open. No delay between clicking and starting video, no unnecesary command prompt window with youtube-dl running. I also have a second custom protocol that starts yet another bat file sending link directly to my TV - one click on a page and YT clip starts playing on the TV in the next room :o)
Feels like duct tape and glue, but works flawlessly :)
https://github.com/YePpHa/YouTubeCenter