ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.22k stars 9.93k forks source link

youtube-dl.exe only opens a comand promt for a second #30871

Closed Hotlynx16 closed 2 years ago

Hotlynx16 commented 2 years ago

Checklist

Question

WRITE QUESTION HERE Sorry I am a nube at this but when I double click on youtube-dl.exe it opens up a command prompt for just a second and then goes away. Running windows 10 latest version. Tried as an administrator,no go. What could I be doing wrong? I installed the [Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x86) also, no help. I tried running it in compatability mode and ran it as windows 8 and no change.

Xtendera commented 2 years ago

You need to pass in the video URL as an argument. EG: youtube-dl.exe "https://www.youtube.com/watch?v=aqz-KE-bpKQ"

dirkf commented 2 years ago

Open a terminal, aka command prompt, window. Then run the command from the prompt. Don't just double-click on the yt-dl program icon like Notepad.

https://ss64.com/nt/syntax-cmd.html

Hotlynx16 commented 2 years ago

Thanks for the replies, already tried in a command prompt, see attached pic. ACMD

bolshoytoster commented 2 years ago

@Hotlynx16 that's because you're in the wrong folder, you should either cd to where your youtube-dl.exe is or add it's location to your PATH.

It would help if you didn't run the command prompt as admin because then it would start you in your home folder, which is probably closer to where the youtube-dl.exe is.

Hotlynx16 commented 2 years ago

Ok, I did have it in my download folder and tried moving it to my C: drive not in a folder, how about in my user folder??

bolshoytoster commented 2 years ago

@Hotlynx16 if you open a non-admin command prompt then move the youtube-dl.exe to your user folder you should be able to execute it.

Hotlynx16 commented 2 years ago

Thanks, It seems to be working now!!

Hotlynx16 commented 2 years ago

Well I don't know now, it is taking 8 hrs to download a 1.6 gb file, is that normal? I have 200Mbps download!

dirkf commented 2 years ago

It is expected, unless you install the latest development version (git master). YT throttles the download speed unless we respond to a challenge in the media link parameters.

Short solution:

Instead of python, you may need to say python3.

Lee-Carre commented 2 years ago

@Hotlynx16

Since much of this isn't about youtube-dl per se, but using a CLI shell in general, then might I recommend reading Introduction to the Command Line, which will explain a whole lot of context for you (along with usage suggestions, and recipes).

When used skillfully, a CLI is much more powerful than a GUI (scripting & automation for the win).


Separately (meta, @ contributors); perhaps a pointer to such a guide needs to be included in the readme, since this seems to be a common stumbling block for unfamiliar newbies (I recall several duplicate tickets).

I've been thinking of overhauling the documentation (e.g. separating the manual from the readme (while leaving a pointer, of course), so I may submit a PR when I have the time to tackle it properly.

bolshoytoster commented 2 years ago

@Lee-Carre I could probably make a basic GUI for less experienced users using something like tkinter.

garoto commented 2 years ago

Plenty of youtube-dl GUIs around already.

dirkf commented 2 years ago

OP's problem was solved.