Download from Youtube

All hardware and software related discussion topics here. Advice, discussion and opinions on either topic are welcome.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

Thank you. On another thing: i have been using the yt-dlp a lot lately, because I think it's safer than 9xbuddy. But it's a hassle, because commandline etc. but I guess there's a way to attach several commands to the right-click menu, or context menu. In Windows. It would involve writing a batch file and registry entry. I'll keep you posted.
Last edited by Triela on Sun Oct 15, 2023 9:01 pm, edited 1 time in total.
User avatar
Night457
Global Moderator
Posts: 8832
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Writing a (working) batch file and changing a registry entry (correctly) is less of a hassle than commandline commands? OK. Creating new options on the right-click menu does sound pretty intriguing, however. It would not surprise me for Linux but for Windows it does.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

Night457 wrote: Sat Oct 14, 2023 1:40 pm Writing a (working) batch file and changing a registry entry (correctly) is less of a hassle than commandline commands?
Just thinking about YOUR memory banks ..... really, really old guy... :mrgreen: :mrgreen: :mrgreen: :mrgreen: :D :D .... yup, I used a G-A reference... sue me. 8-) 8-)
OK. Creating new options on the right-click menu does sound pretty intriguing, however. It would not surprise me for Linux but for Windows it does.
what if you could have three of your most used commands in there?
Big problem is this: in the FFmpeg stuff which already works, the variable is the filename which is then inserted into the commandline.
How do l get to do that with the clipboard???
the workaround would obviously be an empty file with the youtube code as a filename
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   1 likes

(maybe these last 3-4 post should be moved to a separte thread?)
[MODERATOR EDIT: O.K., good idea. Moved posts starting at Oct 13, 2023 from "What is the longest you ever had to wait for a download to finish? UPDATE It's been 310 days. Spoiler ALERT" to "Download from Youtube"]


I got it working on my rickety Lenovo Legend AMD Ryzen 5 5600H, with Ye Olde Windows 10(22H2) Home, so maybe it'll work for you youngster wid all dem flashy Pear Mac devices ??? ;) ;)

The batch file:
[Code] The reg file:
[Code] [Image]

[Image]

How to use this:
1. create a map, and replace ADirectoryOfyourChoosing with your chosen name and path.
2. Create the registry entry, close the registry editor.
3. copy the youtube video IDentifier code, that's the 11 characters after the "=" and before the "&" for example =nYaInWNa1hE from the video
4. create an empty text with the youtube ID so here: nYaInWNa1hE.txt
5. Rightclick on the textfile, click the option Video: YtDlpSimple

Note:
- you can change "YtDlpSimple" and "Video: YtDlpSimple" to names of your own liking.
- in the batch file you can delete everything after the REM
I'm trying to workout how to get the batchfile to work with the clipboard

Have phun with it.
Last edited by Triela on Sun Oct 15, 2023 9:38 pm, edited 2 times in total.
User avatar
Night457
Global Moderator
Posts: 8832
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Indeed that is very clever. But once the effort has been made to set up the additional right-click menu option, is it actually any faster? Creating the temporary empty text file seems to introduce just a bit too much complexity. That is the one part where I have my doubts.

I tried to think through all the steps of the two methods.

New right-click menu option:
Highlight and CTRL-C portion of url
Right-click in Windows Explorer
Click the option "New / Text document"
CTRL+V
Enter
Right-click on this new text file
Click the option "Video: YtDlpSimple"
Delete temporary text file
versus Old option
Highlight and CTRL-C url
Right-click on download folder
Click the option "Open command window here"
Type "yt-dlp"
Right-click on Command Window header
Click the option Edit / Paste
Enter
Your method involves carefully selecting a portion of the url, which is slightly more tricky than selecting all of it. Your method does not involve any actual typing, while the old one involves typing "yt-dlp". Both involve two Right-click options and one Enter. The old method involves the annoying technique of Pasting in the Command Window, which may have been simplified in newer versions of Windows. (But I don't know.)

[I realize there are different ways to copy and paste, but I had to choose the one I could remember and use in my laptop setup of not having a mouse, only a touchpad. So I typed them as CTRL+C and CTRL+V. And in my case the "Right click" is usually the Menu key per my preference, except on the Command Window header where I have to Right click the touchpad.]

I won't be using your solution in my WINDOWS 8.1, but I do certainly appreciate the thought behind your coding! I can sorta follow it from what I sorta remember of coding. I did not really look at your Registry edit because RegEdit always makes my head hurt!
Triela wrote: Sun Oct 15, 2023 11:09 am I'm trying to workout how to get the batchfile to work with the clipboard
If you accomplish that, I will be really impressed -- AND it will remove my question about the new method being faster!
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

You make good points, however, in the cases of:
- getting the highest vid quality
- getting subtitles with the video
- getting just the subs
- getting a playlist
- getting just the audio
- getting the highest audio quality
... one could easily create these six batch and reg entries and and use that. These commands take considerably more typing than just the six characters of "yt-dlp" :mrgreen: :mrgreen: :mrgreen:
User avatar
Night457
Global Moderator
Posts: 8832
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Yt-dlp defaults to highest video and audio quality, although sometimes I want LESS than that for codec compatibility. For the more complex common commands, I can see how your shortcut could help. There is of course the time spent creating and "installing" the batch-command shortcuts and editing the Registry, so the question is then how many videos have to be downloaded for the new method to start saving time. Youngsters have alot of videos remaining to download but I don't know about this oldtimer. :icon_old

It is almost like you would be building a GUI through right-menu selections. There is supposedly a yt-dlp gui, which I would think ought to have your suggestions as top-level options. I have not looked into installing and using it, however, so I don't know.

Let us know if you succeed in working from the clipboard rather than a dummy temporary text file.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   1 likes

for now it seems to work via a dummy text AND the clipboard...
needs work .... gonna go Powershell mosdef
[Code]
User avatar
Night457
Global Moderator
Posts: 8832
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Triela wrote: Thu Oct 19, 2023 12:58 pm
NOW I am really impressed!!!!

I made a valiant attempt to read your code but I am out of practice. Thankfully you have it well-commented so I could generally follow it. That it still uses a dummy file but that it is the coding doing it rather than being done manually removes my primary original objection and makes this easier. But I have a few questions.

WHAT is the option "-cit"?? You use it for the captions, but I can not find any yt-dlp documentation that explains it. Your PDF YT-DLP Cheat-sheet uses it for a playlist or an entire channel. The GitHub documentation does not have it at all, with subtitles AND playlists using different options.

WHERE does it Display the Menu? Command Window? A right-click submenu?

Thank you. I find this fascinating!
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   1 likes

Night457 wrote: Thu Oct 19, 2023 6:06 pm Thank you. I find this fascinating!
okay, it took some time, but here it is. Copy paste this into a .bat file. Please let me know if this works for you. I have pinned to the Taskbar, but you can also pin it to the Start Menu, whatever is to your likee-likee....
[Code]
Post Reply