New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use youtube-dl with mpv on Windows #4727
Comments
Passing the URL directly on the command-line is fine, eg. typing something like |
Hi,
And if I drop a URL from my bookmarks it doesn't load properly. Any ideas? |
That's a python issue. Either install python 3.6.x and then |
Also, a Windows specific issue, you can try the steps mentioned here: |
Thank you both. This fix worked for me:
Why not mention these fixes in the mpv manual/wiki/builds pages? In case it's a common issue. |
because disabling the certificate check allows for a man-in-the-middle attack, instead you should figure out why the certificate check is failing |
It's failing because official youtube-dl.exe uses Python 3.4 which hasn't had new binary releases for years. Python 2.7.x could be possible but then introduce unicode errors. |
I use a Firefox add-on called "Watch with MPV". In its settings, there is a pointer to the MPV executable. I just click the button when on YouTube and the video opens up and plays in MPV. (Note: I have youtube-dl in my MPV folder). A link to the add-on is below: https://addons.mozilla.org/en-US/firefox/addon/watch-with-mpv/ |
Is there a way to see youtube comments in mpv with some scripts or something? |
@sleek22 @Keith94 and to anyone who wants to automatically open videos from YouTube in mpv: First we'll create the custom url scheme. This is os-level based. By doing so, we can invoke mpv by using this path: mpvyoutube is chosen by me, you can take anything you want.
The location of the batch file (which we'll create) doesn't matter, just ensure that you include it in the .reg file. We cannot run mpv directly with the URL we want because the argument "%1" also contains the prefix "mpvyoutube://". This is my batch:
Now we have to add an entry in the Preferences file of Chrome (skip this step if you use Firefox) It should be something like this (in case it's empty): Insert the following into the brackets: In the end it should look like this: Now start Chrome. It should be possible to run the following command: A prompt is displayed, which you can ignore. It won't appear when we run it from the context of YouTube. Now we need a Tampermonkey/Greasemonkey script that can automatically stop the videos and run the custom url to invoke mpv. Here's the original code: The only change is that I added the following line in the function 'stopPlayback': Just replace "mpvyoutube" with your own prefix. Save the script and you're good to go. The videos should automatically stop in the browser and open in mpv. |
I read on the mpv builds for Windows to place youtube-dl.exe in the install folder. But how does that allow YouTube videos to be played with mpv? Is there a specific command line option or other?
The text was updated successfully, but these errors were encountered: