| HA, I did similar thing for Opera 12.xx on windows with mplayer :-) 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 |
Side note, oh boy do you need to get some Linux in your life. That's the hackiest thing I've ever seen on Windows for something that'd take minutes to implement on Linux.