Open GrumpyBear57 opened 3 years ago
I know it's been over a year but have you resolved this by any chance?
If not, youtube-dl
has been superseeded by yt-dlp
so you could try upgrading to this.
Also, in your log I saw error [ytdl_hook] youtube-dl failed: not found or not enough permissions
so make sure that the youtube-dl.exe
or yt-dlp.exe
are set to be copied to the output directory as per the instructions in the README.
Mpv.NET (lib) Version v1.2.0
Describe the bug I'm unable to get youtube videos to play, in either my own application (which I thought was at fault at first since it's .NET Core 3.1 WPF) or the example application provided in this repo.
I've tested several different combinations of different versions mpvlib, ytdl, and the ytdl-hooks lua script.
I figure the reason why keeping all existing versions the same fails is because ytdl is out of date and no longer works on youtube, so I updated it to the latest (which I tested, and it works in the latest version of mpv standalone), but that still didn't work so I updated the ytdl-hooks script, still nothing, and as I already knew updating the the latest mpv also doesn't work.
To Reproduce Steps to reproduce the behavior:
lib/
folder of example wpf projectplayer.EnableYouTubeDl();
beforeplayer.Load()
player.Load()
to use a youtube URL (I've tried several, but the one I'm currently using isplayer.Load("https://www.youtube.com/watch?v=PXFFEM2UxmY");
FWIW)Expected behavior The youtube video should load and start playing in the application window
Additional context Here's the
MpvLogLevel.Debug
output https://gist.github.com/GrumpyBear57/3d46c7411b7cf6179520bdbe7eabc95a To me it looks like ytdl is technically running, just failing to grab the video from yt properly, but when I runyoutube-dl.exe -F https://www.youtube.com/watch?v=PXFFEM2UxmY
(or with-f bestvideo
) directly from thelib/
directory, it works fine, and as mentioned above, using the same ytdl exe works with mpv standalone.Interestingly, when I set my own project to debug log, I don't get any output when loading a youtube video, but do when loading a local file. Again, I'm running .NET Core 3.1 for that, so that may be an explanation as to minor differences in output?
Any help figuring this out would be greatly appreciated, let me know if you need any additional information or testing from me.
EDIT: Fixed typo I had in my youtube url, it still fails with the same output, but actually links to the video now
EDIT 2: Some additional things I forgot to mention but realized I probably should (will add more edits here if I think of anything else to test -- unless I fix it, then I'll post a new comment)
ytdl-hooks.lua
to setpath = "lib\\youtube-dl.exe"
(even tried doing./lib/youtube-dl.exe
for shits and giggles), along with checking file permissions on it (windows did seem to be blocking it at first, but after unblocking it it still doesn't work)player.YouTubeDlVideoQuality = YouTubeDlVideoQuality.Medium;
beforeplayer.Load()
to no avail