YouTube.com 0.7 - GUI for youtube-dl

Discuss and share scripts and script files...
Post Reply
40k
Posts: 234
Joined: 09 Dec 2011 21:25

YouTube.com 0.7 - GUI for youtube-dl

Post by 40k »

YouTube.com 0.7 - GUI for youtube-dl
youtube.xys
(990 Bytes) Downloaded 492 times
Script requirements:
1. Xyplorer version 12.40.000 or higher. Older versions do not support downloads larger than 100mb!
2. (Optional) VLC.exe 2.1.2 or higher. - http://www.videolan.org/vlc/

How to install:
1. Place Youtube.xys into the <xypath>\Data\Scripts folder.
2. Create a catalog entry to load the script or make your own toolbar button.
3. Script is configured through a wizard that appears on first launch.

Release notes current version: 0.7

1. download youtube-dl program and add the executable location to your PATH variable.
https://rg3.github.io/youtube-dl/download.html
2. copy a youtube link into your clipboard with CTRL+C and launch the script. You can also launch the script without link and it will ask you for one.
3. select what video quality level you want
4. youtube-dl will download that video into the current folder.
Last edited by 40k on 06 Dec 2014 00:23, edited 43 times in total.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Youtube.com VLC 0.1

Post by Marco »

Looks cool!
Any reason you prefer <clipboard> over <drop>?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: Youtube.com VLC 0.1

Post by 40k »

Marco wrote:Looks cool!
Any reason you prefer <clipboard> over <drop>?
I haven't experimented with <drop> yet. I presume this would require the user to actively drag the link to the Youtube script button? I can see how that could work. A user may however want to copy a link into their clipboard, finish what they are doing and only then use the script to download their file.

I'm working on making the next version automatically name the file like the Youtube video so there's no more renaming of the YoutubeFile.webm

Any features people would like to see? I make these scripts to learn but it can be difficult to "discover" a new challenge on my own.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Youtube.com VLC 0.1

Post by admin »

Which version of VLC do you use? (It does not seem to work with my old version 0.8.6f)

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Youtube.com VLC 0.1

Post by Marco »

40k wrote:Any features people would like to see? I make these scripts to learn but it can be difficult to "discover" a new challenge on my own.
You could write so that

left click > plays the video in the player choosen by the user (not just VLC)
right click > downloads the video in a folder choosen by the user

http://userscripts.org/scripts/show/62634 might inspire you
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: Youtube.com VLC 0.1

Post by 40k »

admin wrote:Which version of VLC do you use? (It does not seem to work with my old version 0.8.6f)
You'll need at least 2.0 but I strongly recommend you use TwoFlower (2.0.5).
Older versions of VLC are still good for playing local media but Videolan have made huge improvements in streaming video support from 2.0 onward.
Marco wrote:
40k wrote:Any features people would like to see? I make these scripts to learn but it can be difficult to "discover" a new challenge on my own.
You could write so that

left click > plays the video in the player choosen by the user (not just VLC)
right click > downloads the video in a folder choosen by the user

http://userscripts.org/scripts/show/62634 might inspire you
Looking into that this evening! Thanks marco :)
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Youtube.com VLC 0.1

Post by admin »

OK, downloaded VLS 2.0.5 and it works great! Here is a snippet for a droppable user button (you have to adjust the path vlc.exe!!):

Code: Select all

Snip: CTB 1
  XYplorer 12.20.0409, 14.03.2013 17:27:56
Action
  NewUserButton
Name
  Youtube Drop
Icon
  C:\Programme\VideoLAN\VLC\vlc.exe
ScriptL
  "Youtube Drop"
  
   $VLCexe = quote("C:\Programme\VideoLAN\VLC\vlc.exe");
   $YoutubeURL = quote("<drop>");
   $CurrentPath = "<curpath>";
   
   $Command = "$VLCexe --intf=rc $YoutubeURL  :demux=playlist,luaplaylist,dump :demuxdump-file=YoutubeFile.webm --play-and-exit";
   run ($Command, $CurrentPath);
ScriptR
  
FireClick
  0
You drag the URL from the firefox address bar onto the button and the video is saved in the current folder as "YoutubeFile.webm".

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Youtube.com VLC 0.1

Post by TheQwerty »

Nice job! It even works with the PortableApps version of VLC. :appl:

Not sure if it would be possible but I find more often than not I just want the audio from a video so the ability to automatically demux and only output the audio would be awesome.

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: Youtube.com VLC 0.1

Post by 40k »

TheQwerty wrote:Nice job! It even works with the PortableApps version of VLC. :appl:

Not sure if it would be possible but I find more often than not I just want the audio from a video so the ability to automatically demux and only output the audio would be awesome.
Added to my list. That's actually a really easy fix.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.1

Post by klownboy »

Very nice 40k!

I was wondering if anyone had success in dropping the Youtube URL on a XYplorer CTB from Internet Explorer (i.e., using <drop>)? It doesn't work for me, whereas, copying the URL to the clipboard and then hitting the CTB works fine (i.e., using <clipboard>).
Also, I realize the operation takes some time based on video size and connection speed, but does the VLC window take some time to close even after the operation is done? Has anyone seen this one...over 21 million hits...sorry, but it's funny. http://www.youtube.com/watch?v=Q5mHPo2yDG8
By the way, if anyone uses Media Player Classic-Home Cinema - the webm files play fine using it as well.
Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Youtube.com VLC 0.1

Post by Marco »

Probably IE is partly sandboxed
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: Youtube.com VLC 0.1

Post by 40k »

klownboy wrote:Very nice 40k!

I was wondering if anyone had success in dropping the Youtube URL on a XYplorer CTB from Internet Explorer (i.e., using <drop>)? It doesn't work for me, whereas, copying the URL to the clipboard and then hitting the CTB works fine (i.e., using <clipboard>).
Also, I realize the operation takes some time based on video size and connection speed, but does the VLC window take some time to close even after the operation is done? Has anyone seen this one...over 21 million hits...sorry, but it's funny. http://www.youtube.com/watch?v=Q5mHPo2yDG8
By the way, if anyone uses Media Player Classic-Home Cinema - the webm files play fine using it as well.
Thanks,
Ken
Version 0.2 is up.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.2.0 Update!

Post by klownboy »

Hi again 40k,
It's even nicer now. One minor suggestion, you could take advantage of the new internal script, "_Initialize" which will be automatically read at the start of any script in which it appears. In that you can set all your global variables and your permanent one just once instead of under each menu heading. You can even put the entire contents of your sub "_Get Title" and eliminate calling it under the 3 menu headings. You can go one step further and use the new internal script, "_Terminate", which is automaticaly read and performed at the end of the script which contains it, and unset the permanent variable.
Thanks again,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: Youtube.com VLC 0.2.0 Update!

Post by 40k »

So I just discovered it is possible to download Youtube videos using the readurl script function. No VLC, just pure Xyplorer. Mind = blown.

This will only work for downloading the full video as you still need a demuxer to get the audio or video track separate. It also looks like I will have to regex into oblivion to get it working but it's working!
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.2.0 Update!

Post by klownboy »

Sounds great 40k...being able to download the full video from XYplorer without the need of VLC. The full video with picture and sound is what most people would be doing most of the time anyway.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply