Page 1 of 7

YouTube.com 0.7 - GUI for youtube-dl

Posted: 14 Mar 2013 13:37
by 40k
YouTube.com 0.7 - GUI for youtube-dl
youtube.xys
(990 Bytes) Downloaded 341 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.

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 16:20
by Marco
Looks cool!
Any reason you prefer <clipboard> over <drop>?

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:15
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.

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:18
by admin
Which version of VLC do you use? (It does not seem to work with my old version 0.8.6f)

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:23
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

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:24
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 :)

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:29
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".

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:32
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.

Re: Youtube.com VLC 0.1

Posted: 14 Mar 2013 17:34
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.

Re: Youtube.com VLC 0.1

Posted: 16 Mar 2013 18:13
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

Re: Youtube.com VLC 0.1

Posted: 16 Mar 2013 18:16
by Marco
Probably IE is partly sandboxed

Re: Youtube.com VLC 0.1

Posted: 16 Mar 2013 18:26
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.

Re: Youtube.com VLC 0.2.0 Update!

Posted: 17 Mar 2013 13:24
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

Re: Youtube.com VLC 0.2.0 Update!

Posted: 17 Mar 2013 16:57
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!

Re: Youtube.com VLC 0.2.0 Update!

Posted: 18 Mar 2013 20:11
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