JannikHv / gydl

gydl (Graphical YouTube-Download) is a GUI wrapper around yt-dlp.
GNU General Public License v2.0
151 stars 22 forks source link

Can not download video #32

Open DasJott opened 4 years ago

DasJott commented 4 years ago

I don't know if it is the gui or the underlaying tool. I entered a valid URL and wanted to download a yt video. But it won't download. Instead I am asked to check the URL - which is perfectly correct.

Terminal says: ERROR: requested format not available which sounds a little different already. But still, even if I change the format to the correct resolution it won't work. I don't know, which file format I have to expect.

image

flopezre commented 3 years ago

Dosen't work on Ubuntu Mate 20.04

mmayfield commented 3 years ago

For me this happened because it looks like python was expecting an integer or different length value for quality(it was passing on the first number of the height, 7 for 720, 1 for 1080, 3 for 360). I'm not super versed so in python so I'm not exactly sure why but I solved this by changing def get_quality(self): return self.quality.get_active_text()[0] to def get_quality(self): return self.quality.get_active_text()

in gydl.py and after this change I was able to download videos.

mmayfield commented 3 years ago

I don't know if the maintainer will take pull requests as it looks like it may not be active. I have forked it and made some changes. Even properly parsing the resolution settings doesn't completely fix video downloads. It appears the filtering method used in youtube-dl doesn't properly detect if the format/resolution choices are available and it's luck of the draw whether it is detected or not. Instead I implemented a file availability query, grep for the requested settings and pass them with the id instead of the filters. It seems to work pretty well this way but fails for playlists and when the options aren't available. Due to this I set the options to "best" for playlists and when the selected options aren't available. I'm open to further changes and will be monitoring the fork.