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 » 14 Mar 2013 13:37

YouTube.com 0.7 - GUI for youtube-dl
youtube.xys
(990 Bytes) Downloaded 246 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: 2258
Joined: 27 Jun 2011 15:20

Re: Youtube.com VLC 0.1

Post by Marco » 14 Mar 2013 16:20

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

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: 47075
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Youtube.com VLC 0.1

Post by admin » 14 Mar 2013 17:18

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

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

Re: Youtube.com VLC 0.1

Post by Marco » 14 Mar 2013 17:23

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

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: 47075
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Youtube.com VLC 0.1

Post by admin » 14 Mar 2013 17:29

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: 4353
Joined: 03 Aug 2007 22:30

Re: Youtube.com VLC 0.1

Post by TheQwerty » 14 Mar 2013 17:32

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

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: 2702
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.1

Post by klownboy » 16 Mar 2013 18:13

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

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

Re: Youtube.com VLC 0.1

Post by Marco » 16 Mar 2013 18:16

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

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: 2702
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.2.0 Update!

Post by klownboy » 17 Mar 2013 13:24

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

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

Re: Youtube.com VLC 0.2.0 Update!

Post by 40k » 17 Mar 2013 16:57

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: 2702
Joined: 28 Feb 2012 19:27

Re: Youtube.com VLC 0.2.0 Update!

Post by klownboy » 18 Mar 2013 20:11

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

Post Reply