axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
1.92k stars 105 forks source link

Error setting yt-dlp executable in Windows 10 #616

Open parasiteoflife opened 5 months ago

parasiteoflife commented 5 months ago

What operating system are you using?

Windows 10

What version of Tartube are you using?

2.5.0

If your bug report is "I can't download this video", please provide a link to the video

After updating to 2.5.0 I started receiving a message that mingw64\bin\yt-dlp.exe was missing when up until now Tartube was using the executable available in my PATH. Anyways I went a set up a custom path for the executable pointing to C:\Windows\yt-dlp.exe and although the "default path" in there points to an executable file too whenever I start a download (I'm using classic mode) I get an error because Tartube wants to load the custom path as if I specified a python file, it tries to run python3 -X utf8 C:\Windows\yt-dlp.exe and obviously errors out, please allow us to use the executable available in PATH again.

axcore commented 5 months ago

I tested this, but the Classic Mode download was successful. (I moved yt-dlp.exe from ..\mingw64\bin\ to C:\Users\MYNAME\Desktop, and I set the custom path in Tartube preferences).

tartube1 tartube2

Please show me a screenshot of Tartube's Output tab, when the video fails to download. You could also try downloading the same video that I tested.

parasiteoflife commented 5 months ago

python3_2024-01-23_17-57-44

Also I just noticed --no-cookies --cookies-from-browser have been stripped from the custom command (this goes before "firefox:...")

parasiteoflife commented 5 months ago

Forgot the previous pic:

python3_2024-01-23_17-56-59

axcore commented 5 months ago

--ffmpeg-location

This is not supported on MS Windows. Please remove it until we have solved your actual problem. You should also remove all the other unnecessary stuff like--mark-watched.

I suggest that you click Edit > System preferences > Options > Download options, and add a temporary set of download options. When your problem is solved, you can delete those options, and continue with your normal download options.

C:\Windows

I am not a Windows programmer, so I am not sure it's a good idea to create new files in this folder. (Maybe it's ok, I don't know - I am not a Windows programmer).

Try doing what I did: put the yt-dlp.exe on your desktop, so the path will be C:\Users\MYNAME\Desktop\yt-dlp.exe

parasiteoflife commented 5 months ago

--ffmpeg-location

This is not supported on MS Windows.

You mean in Tartube? Because yt-dlp supports it.

I am not a Windows programmer, so I am not sure it's a good idea to create new files in this folder. (Maybe it's ok, I don't know - I am not a Windows programmer).

Though adding additional paths to the PATH env var is better the env vars in Windows support a limited amount of characters, I already surpassed the max length so I have to rely on copying files to the Windows directory (as that is in the PATH var by default already), is not bad per sé, I mean, is dangerous if you don't know what you are doing but that applies to everything.


Here is the new output:

python3_2024-01-24_13-53-01

By the way if I run the same command (or even just python -X utf8 C:\Windows\yt-dlp.exe) on CMD I get the same output, when we set up a custom path we should either be able to tell if we want to use python to launch the program or just directly don't use it. Only works launching it that way if we have installed yt-dlp through pip, using the Windows build doesn't work.

axcore commented 5 months ago

You mean in Tartube? Because yt-dlp supports it.

Yes, yt-dlp supports it but MSYS2 does not.

when we set up a custom path we should either be able to tell if we want to use python to launch the program or just directly don't use it

That would be a simple change, but if you run yt-dlp.exe instead of python3 -X utf8 yt-dlpyou won't be able to download any video whose name contains a unicode character (for example, Japanese and Korean alphabets).

parasiteoflife commented 5 months ago

That would be a simple change, but if you run yt-dlp.exe instead of python3 -X utf8 yt-dlpyou won't be able to download any video whose name contains a unicode character (for example, Japanese and Korean alphabets).

Then I guess a message should be added that the only supported builds (at least on Windows) are the ones from pip. I'll use the downloader from Tartube in this case because I do want unicode characters.

Bolb389 commented 4 months ago

Hello, I downloaded yt-dlp.exe from this page (Windows (Win7 SP1+) standalone x64 binary (recommended for Windows)), unfortunately this is still not working. Can you tell me which version can I use on Windows ?