semicolons

Somewhat better YouTube experience

How cool would it be if only you could get HQ YouTube videos off YouTube without actually having to visit YouTube itself? Say, you get a link to YouTube video, you open it up in a media player of your choice. I mean, the Web 1.0 way — without troublesome Flash player, buffering, stupid comments and advertising punching you in the face. Now that would be really cool, wouldn’t it. That’s exactly what I thought the other day!

I’ve been messing around with various Firefox extensions and multimedia plugins and I have come to the following conclusion — at least for today, there is no easy way to do such a thing with any of the available browser add-ons. I want to paste the URL and hit enter, then have the thing automagically downloaded with the right filename to a given location. As I think of it now, it sounds less like a browser add-on and more like a command-line program. Surprise surprise, someone had similar idea quite a while ago, and instead of writing some stupid blog entries, actually wrote a working program!

What started as a simple 200 lines-long Python script, turned into an actively maintained feature-rich project. I would like to introduce youtube-dl, a small cross-platform program written with a purpose of providing a straightforward YouTube download utility. It has so many options, I strongly encourage you to visit the project’s homepage — even if you don’t feel like using it, it’s kind of shocking how something that most likely began its existence as “OK, use this regex to get me an URL of the darn .flv” kind of thing evolved into a relatively complex project with a number of contributors and people sending in the patches.

If you decide to give it a go, I’d recommend adding something similar to the following line to your .bash_aliases file. Given that, you can just type yt URL to get the best quality video file flawlessly dumped into a given location.

alias yt="python /home/you/Video/YouTube/youtube-dl -b -o /home/you/Video/YouTube/%\(stitle\)s-%\(id\)s.%\(ext\)s"

Ricardo Garcia, author of the script, also has a blog. As it seems to me, it’s updated slightly more regularly and happens to be much more interesting than the one you’re reading right now. For example, I absolutely ♥ his Mercurial vs Git article!

30/03/10
  • home
  • rss
  • about
  • email
  • archive
  • random
  • copyleft © 2011 bart