Lately,  I have not been able to get the wireless router to work - I need to be able to use my Eee laptop to watch GoogleTalk videos for things like Django and jQuery talks, among others, on the couch, ( or when there’s actually Sun out here in WA, on the patio ).

So I needed a smooth way of getting videos onto my laptop, by downloading them from my desktop since I can longer connect to the Internet on the Eee.

Note: Even if you have a wireless connection - and thus you can just connect directly through your laptop and play them right there - there’s still the obvious advantage of playing files that are already downloaded and completely local: Minimal or no skipping frames

What I needed: ( let’s talk Use Case, informally speaking)     ( if this looks tedious to read - it probably is - then just go straight to the yellow box below, those are the actual steps to set this up for you on your Windows desktop)

1. I’m working on my Desktop, and I suddenly come across a link to a video (preferably longer than the 10 min ones)
2. I want to run a quick command, using slickrun, and this script will ask me for the youtube URL.
3. This script will download the file(s) - if the youtube URL points to a playlist, I want all of those videos.
That’s it pretty much.  The second half of this “use case”, this requirement I have,  is

4. I plug in my USB Flash drive into my desktop, and run some other command to simply copy the files to it,
… but this is pretty trivial, so not worth mentioning here, how to go about it.


The answer to this is youtube-dl.py, found at youtube-dl

The quickest way to set this up - assuming you’re on Windows due to the slickrun utility

1. Establish which directory you will use to download your videos (let’s say, for this example, it’s e:\tube_videos)

2. Download youtube-dl to this directory, naming it “youtube-dl.py”

Did I forget “download python first”? Yes I did.
Go to python.org and get 2.6 since I”m not sure youtube-dl works with 3.0 - http://python.org/download/releases/2.6.1/

3. Download slickrun from bayden.com/SlickRun/

4. When slickrun is installed, create a new “MagicWord” ( slickrun uses this term to refer to a macro, really).  Here are the field values for this particular magicword

MagicWord itself:   call it anything, I called it run_tube_single_url myself

Filename or URL:  c:\Python26\python.exe

Start Mode: Leave it at Normal window

Parameters:  C:\video\youtube-dl.py -o %(title)s.%(ext)s $I$

Startup Path:  c:\tube_videos

Notes: When you run a slickrun command, this text shows up for this command, so you can use it help remind you exactly what to give the slickrun dialog box as an answer, something like: “What url do you want?”.


Here is how you use it (ya see, all that tedium above was worth it)

1. You see a long YouTube that’s just too long to watch on the desktop, so you copy the URL to clipboard
2. Keyboard combo: The Slickrun trigger key combo is: WINDOWSKEY-Q
This key combo will open up a very compact black sliver of a command line:

You see this: (actually you’ll need to start typing “run..”, and it will auto-complete) hit Enter

You see this: paste in the YouTube URL

3. You’ll see a DOS console box appear, and the video(s) being downloaded
4. When it’s done (the dos box disappears), check your c:\videos folder, . The FLV file will be there..

p.s. What if you want to first collect a bunch of different Youtube URL’s into a text file, one url on a line, and then run the youtube-dl batch to get them all at one time (so you can go away and run errands).

Simple, just add to the command line: -a youtubeurls.txt, assuming you named the file youtubeurls.txt of course.

I actually created an entirely separate slickrun MagicWord for this one, calling it run_tube_multiple_urls so that I wouldn’t have to keep changing the Parameters box. I’ll leave this up to you.



Post a comment
Name: 
Email: 
URL: 
Comments: