Friday, November 28, 2008

Rip Youtube the CLI way

There are many applications for extracting and downloading videos from youtube and other video hosts like web-based KeepVid or addons like VideoDownloader, and many others. There's also a very good technique of saving any streaming video by buffering it till 100%, navigate to the Cache folder and simply copy the video file (which is /tmp in case of linux).

But recently I got a python based CLI tool youtube-dl, which is a nifty yet a powerful must have tool. You can get it from your default repositories or for youtube-dl under Windows XP. Get it :

$ sudo yum install youtube-dl

  • Simply download :
    $ youtube-dl

  • Specify filename

    Manually specify :
    $ youtube-dl -o output.flv
    Use the original video title :
    $ youtube-dl -t
    Have a literal title :
    $ youtube-dl -l

  • Download videos which requires your youtube account privileges and confirmation :
    $ youtube-dl -u username -p password

    Or read account details from .netrc file :
    $ youtube-dl -n
    Append this line to ~/.netrc file :
    machine youtube login username password password

  • Simply print video URL instead of downloading :
    $ youtube-dl -g
    Or grab the Title :
    $ youtube-dl -2

  • Download in silent mode (like wget) :
    $ youtube-dl -q &

  • Get Help :
    $ youtube-dl -h

Know more at the Official Page.


hELLraIser..(iNcOgniTiOn) said...

nice..i know u had cribbd abt me gettin youtube i know y.. :)

Jadu Kumar Saikia said...

Anant, nice info mate.


MAYUR said...

प्रिया मित्र,
भोपाल में एक ब्लॉगर मीट करने का विचार है ,जिसमे हम ब्लोगिंग से जुड़े कई विषयों पर बात कर सकते हैं । इस ब्लॉगर मीट में अपनी उपस्तिथि दर्ज कराने और एजेंडा बनाने में मदद करने हेतु यहाँ क्लिक कर रजिस्टर कर सकते हैं । हमें उम्मीद है की हम अपने ब्लोगों के लिए कुछ न कुछ ले के ही जायेंगे

धन्यवाद ,

Anupum Pant said...

another gr8/simple method is adding a pwn jst before youtube in the URL :)