That's how I do it.
Actually, because of the annoyance factor of the way youtube-dl works (it requires entirely too much interaction from me, the user), I wrote some Perl glue code that ties together youtube-dl, file renaming/deletion, and mplayer. I'm thinking of opening up the hood of youtube-dl, though, to see how it's done, then rewrite the thing in Perl or Ruby so that it does what I actually want it to do without having to be tied together with other software like that.
If I get to feeling really ambitious, I might do it with OCaml so that I have a binary-compiled executable. If I do that, you can count on it being stuck on some webpage somewhere with a nearly public domain license.
|print substr("Just another Perl hacker", 0, -2);||- apotheon
CopyWrite Chad Perrin