May 9, 2009

Download videos from youtube using clive

Clive is an open source tool that enables us to download the videos from sites such as youtube. No additional fancy plugins or browser extensions are needed. This is a really nice command line tool for downloading the videos. Executing apt-get using the command sudo apt-get install clive downloads the older python module. The tarball provided by sourceforge contains the newer perl based program.

Once clive is installed downloading the videos is as simple as viewing the videos on youtube. Once you are on the web-page on youtube that has the desired video.
1. Just open a terminal.
2. Change to the folder where the video is to be download.
3. Execute clive with the URL present in the web-browser

For example, the if the URL to view the video is http://www.youtube.com/watch?v=NAQY2TPhoIM, then execute the command clive with the URL as an argument.

ashwin@garuda:~/Videos/Lectures/LinearAlgebra$ clive http://www.youtube.com/watch?v=NAQY2TPhoIM


The response (of the older python based program) is

clive/0.4.3 (linux2; python/2.5.2; urlgrabber/3.1.0)
[log:on] [play:off] [encode:off] [throttle:off] [exists:skip]
status: 20KB 100% (1 of 1) [http://www.youtube.com/watch?v=NAQY2TPhoIM...]
status: checking file length... 94.323MB
queue: 1 (total: 94.323MB), failed: 0, skipped: 0.
write: /home/ashwin/Videos/Lectures/LinearAlgebra/Lec6MIT1806LinearAlgebraSpring2005.flv
transfer: 0.391MB

Depending on the bandwidth speed the video shall be downloaded in the desired folder. One shortcoming of this program is that if the download is interrupted then rerunning the program shall result in the downloading the whole file.

2 comments:

Anonymous said...

Tks for sharing.

But i prefer to use Wondershare Youtube Downloader,it can download youtube video,but also convert the video to all popular formats:mp4,wmv,wma,mpg,mp3 etc.

http://www.download-streaming-video.com/youtube-downloader/#137

Ashwin Rao said...

I was able to figure out a front end (GUI) for clive, called abby. Abby also supports a tool called cclive which I believe is is clive written in c

Details of using Abby are available at the following blog post:
Abby and CClive.