[SOLVED] I can't get a program added to path propernly nor run it

DynV

Distinguished
Aug 13, 2009
280
5
18,785
I've downloaded a program yesterday and since there was no installer, I created a folder then moved it in the appropriate Program Files folder then added the corresponding path entry in the GUI Advanced system settings (through the context menu of "This PC"), which is %ProgramFiles(x86)%\youtube-dl-2020.03.08\youtube-dl.exe. I then tried the following in vain
C:\Users\MY_USER_NAME>echo %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe;C:\Users\MY_USER_NAME\AppData\Local\Microsoft\WindowsApps;

C:\Users\MY_USER_NAME>youtube-dl
'youtube-dl' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\MY_USER_NAME>youtube-dl --help
'youtube-dl' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\MY_USER_NAME>youtube-dl.exe --help
'youtube-dl.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\MY_USER_NAME>"C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe" --help
Usage: youtube-dl.exe [OPTIONS] URL [URL...]

Options:
General Options:
[...]

C:\Users\MY_USER_NAME\Downloads>"C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe" -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'
View: https://www.youtube.com/watch?v=alQUyaybZgo

The system cannot find the file specified.

C:\Users\MY_USER_NAME\Downloads>"C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'
View: https://www.youtube.com/watch?v=alQUyaybZgo
"
'"C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'
View: https://www.youtube.com/watch?v=alQUyaybZgo
"' is not recognized as an internal or external command,
operable program or batch file.


Would you kindly help me properly do the 2nd-to-last command?

Moderators: I'm using FF 74.0 on Win 10 V1909 and I can't use the quote option in this post. Also, would you let me know how to include a URL so that it doesn't get integrated (so that there isn't an embedded video instead of a youtube URL) and do it to this message ? I used a different font color as a workaround.
 
Solution
i know youtube went to a new format a couple years ago which breaks up the audio and video. the batch downloader i suggested can put them back together again into one file.

it's possible, this tool does not know how to do this which would give the error you are seeing. you may need some new codec installed to get it into the format you want it to be in. that's just a guess based on my experience using the batch downloader. i ended up with that one after numerous others had not been updated yet to handle the new format from the site. been a couple years but i assume most tools have been updated by now but that's just a guess on my part.

seems like you're on your way and just need that last piece of the puzzle. i wish i had the answer...

Math Geek

Titan
Ambassador
there are plenty of add-ons from FF that let's you do this without all this trouble :)

a simple add-on with a button click that will save the video for you. search the add-on page.

edit: according to this https://www.videohelp.com/software/youtube-dl

the command you need seems right but the problem is the command line can't find the exe your telling it to use. you can change the directory to where the file is and it'll probably run. i'd have to look up again how to add the exe path to the cli so it already knows where it is. have not had to do that in a long time.

finally the site also adds this note:

Might require Microsoft Visual C++ 2010 Redistributable Package (x86) for Windows

check and see if you have that installed and/or if you need to get it.
 
Last edited:

DynV

Distinguished
Aug 13, 2009
280
5
18,785
The command worked for the option --help, I doubt the program would be responsive at all if a requirement was missing. Perhaps you didn't notice but I added something to the path, which I thought was appropriate.
 

Math Geek

Titan
Ambassador
i noticed the variations and the one that finally got the --help to work.

that's what made me think of the C++ note from the help site. otherwise i'm not sure why it won't run the exe file.

there is a portable version of this listed there as well.

https://www.videohelp.com/download/youtube-dl.exe

i tried it but i can't seem to see what it did. a search did not turn up the youtube-dl.exe file anywhere on my system.... really at a loss as to how this is supposed to work. wish i could help but can't seem to see what is missing here :(

if you wish to use something else, i have used this one in the past.
https://veryutils.com/youtube-downloader
simple drag and drop the link and off it goes. i used it to batch grab a whole tv series that was on there for an old show. 6 seasons grabbed in a couple minutes with no problem....
 

DynV

Distinguished
Aug 13, 2009
280
5
18,785
I did some extra searching and used windows - How do I use spaces in the Command Prompt? - Stack Overflow as a base and came up with
C:\Users\MY_USER_NAME\Downloads>"C:\Program Files (x86)\youtube-dl-2020.03.08\youtube-dl.exe" "-f bestvideo[height<=480]+bestaudio/best[height<=480]"
View: https://www.youtube.com/watch?v=alQUyaybZgo

[youtube] alQUyaybZgo: Downloading webpage
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: Cocteau Twins - Wax And Wane (De Meervaart, Amsterdam 29th January 1983) [Soundboard Sync]-alQUyaybZgo.f135.mp4
[download] 100% of 14.87MiB in 00:04
[download] Destination: Cocteau Twins - Wax And Wane (De Meervaart, Amsterdam 29th January 1983) [Soundboard Sync]-alQUyaybZgo.f251.webm
[download] 100% of 3.61MiB in 00:01

C:\Users\MY_USER_NAME\Downloads>

although there's an issue but I'm not sure it's because of Windows: there's no MKV containment. Perhaps it's related to permission, or perhaps the Windows version has issues.

In addition I'm wondering how I can make path work for this case as neither of those work:
C:\Users\MY_USER_NAME\Downloads>youtube-dl "-f bestvideo[height<=480]+bestaudio/best[height<=480]"
View: https://www.youtube.com/watch?v=6KnYw4EwYGc

'youtube-dl' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\MY_USER_NAME\Downloads>youtube-dl.exe "-f bestvideo[height<=480]+bestaudio/best[height<=480]"
View: https://www.youtube.com/watch?v=6KnYw4EwYGc

'youtube-dl.exe' is not recognized as an internal or external command,
operable program or batch file.

and the program path is still in PATH, as in the OP.
 

Math Geek

Titan
Ambassador
i know youtube went to a new format a couple years ago which breaks up the audio and video. the batch downloader i suggested can put them back together again into one file.

it's possible, this tool does not know how to do this which would give the error you are seeing. you may need some new codec installed to get it into the format you want it to be in. that's just a guess based on my experience using the batch downloader. i ended up with that one after numerous others had not been updated yet to handle the new format from the site. been a couple years but i assume most tools have been updated by now but that's just a guess on my part.

seems like you're on your way and just need that last piece of the puzzle. i wish i had the answer for you, but other than my general info i have nothing specific for that tool :(
 
Solution