jely2002 / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
6.5k stars 454 forks source link

Open Video Downloader does not install its own binaries #401

Open karikamiya opened 2 years ago

karikamiya commented 2 years ago

Describe the bug Open Video Downloader does not install its own copy of yt-dlp-unix

To Reproduce Steps to reproduce the behavior:

  1. Open App
  2. Paste Link
  3. Click Add
  4. Get Error "python3: can't open file '/home/{user}/.youtube-dl-gui/yt-dlp-unix':[Errno 2] No such file or directory"

Expected behavior Open Video Downloader should self-install required binaries

Screenshots If applicable, add screenshots to help explain your problem.

Additional info (please complete the following information):

dieselbabyy commented 2 years ago

Yeah, also getting this error on ubuntu 20.04

VinceDevJs commented 2 years ago

me to on pop os 22.04

karikamiya commented 2 years ago

its dead jim... F😢

mj0123456789 commented 1 year ago

Hi, would be grateful if someone could give the solution to that issue. Months without OpenVideoDownloader since I reinstalled my Linux Ubuntu workstation (worked fine before). Cheers.

Umbral-Tension commented 1 year ago

Similar to this solution, I was able to fix this by manually grabbing the file it wants from here: https://github.com/yt-dlp/yt-dlp/blob/master/README.md#release-files

I use Mint also and I used the one named yt-dlp, renamed it to yt-dlp-unix (per the error message), and put it in ~/.youtube-dl-gui/

I think yt-dlp_linux is for Redhat linux distros and Mint is Debian.

drcreazy commented 1 year ago

Thanks @Umbral-Tension Just to summary the fix is:

cd ~/.youtube-dl-gui
wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O yt-dlp-unix
chmod 755 ffmpeg ffprobe yt-dlp-unix
mj0123456789 commented 1 year ago

Great. See https://github.com/jely2002/youtube-dl-gui/issues/389 on the same topic. Cheers.

FrancoisSchnell commented 1 year ago

Thanks @Umbral-Tension :) had the same problem on Linux Mint 21. Maybe something to add in the FAQ.

andnorxor commented 1 year ago

This is a bug which happens due wrong download links and deprecated version fetching (regex) for yt-dlp in the function getRemoteVersion. https://github.com/jely2002/youtube-dl-gui/blob/29f63a51d4ee224dcde27a0a0fbc522cc5874b9d/modules/BinaryUpdater.js#L61

As a consequence this function will return always null.

A hotfix might look as follows. But I suggest doing a clenup of this functionality as it is very fragile in terms of assumptions about how the yt-dlp project uses github and it introduces a dependency on the latest version of yt-dlp. I'd rather go with fixed/pre-defined versions of external dependencies.

NB.: if you want to use the standalone yt-dlp_unix executable you also have to modify the file modules/types/Query.js. Otherwise the command will get prefixed with your installed python version.

    async getRemoteVersion() {
        const filename = process.platform === 'win32' ? 'yt-dlp.exe' : 'yt-dlp';
        const downloadURLTmpl = (version, filename) => `https://github.com/yt-dlp/yt-dlp/releases/download/${version}/${filename}`;
        const latestURL = "https://github.com/yt-dlp/yt-dlp/releases/latest";

        try {
            await axios.get(latestURL, {
                  responseType: 'document',
                  maxRedirects: 0
              });
        } catch (err) {
            const res = err.response;
            if (err.response == null) {
                console.error('An error occurred while retrieving the latest yt-dlp version data.')
                return null;
            }
            if (res.status === 302) {
                const version = res.headers.location
                    .match(/tag\/(?<version>\d{4}\.\d{2}\.\d{2})/)
                    .groups
                    .version;

                const downloadURL = downloadURLTmpl(version, filename);
                return {
                    remoteVersion: version ? version : null,
                    remoteUrl: downloadURL ? downloadURL : null,
                };
            } else {
                console.error('Did not get redirect for the latest version link. Status: ' + err.response.status);
                return null;
            }
        }
        return null;
    }
unknown10777 commented 1 year ago

Also received this error on 2.4.0. It just cannot download the libraries and show me with an error with no 'file not found'.