I have a confession to make. I’m a sucker for gadget reviews on YouTube. I can’t even remember the last time I actually looked at a normal review site for a gadget review.
Apart from reviews of the latest gadgets, YouTube is also a great place to watch, well, almost anything that moves!
The only thing that I don’t like is that I have to keep going back online to view videos. Also, I can’t email YouTube videos to my friends who have had YouTube blocked in their offices to save bandwidth or for other reasons.
I’ve seen software for Windows which let the user save videos from YouTube for offline viewing, but since I’m a staunch Linux supporter, I really wanted something similar for Linux and went searching for a YouTube video downloader online.
And I found the perfect utility for the job called youtube-dl. This is a command line utility so you’ll have to be familiar with the Linux command line to use it.
This isn’t that tough and if you’ve been using Linux for any length of time, you probably know how to fire up Terminal, gnome-terminal, konsole or any other Terminal application that you have for your flavour of Linux.
Downloading a video using youtube-dl couldn’t be easier. To download a video you just have to give the URL of the video to the youtube-dl script and then let it do its job. For example, to download the video with the url http://www.youtube.com/watch?v=B2FpDDEVWtk&feature=channel, I just need to use the command:
youtube-dl http://www.youtube.com/watch?v=B2FpDDEVWtk&feature=channel

As you can see, the script figures out the actual video path by itself and then starts saving it to the local hard disk. When it has the complete video downloaded, it informs the user and tells you the name that is has saved it under.
The youtube-dl command also supports a couple of parameters which let you do things like saving the video file with the title of the video as the filename, or giving a completely different filename to the downloaded video.
Options:
-h, --help print this help text and exit
-v, --version print program version and exit
-u USERNAME, --username=USERNAME
account username
-p PASSWORD, --password=PASSWORD
account password
-o FILE, --output=FILE
output video file name
-q, --quiet activates quiet mode
-s, --simulate do not download video
-t, --title use title in file name
-l, --literal use literal title in file name
-n, --netrc use .netrc authentication data
-g, --get-url print final video URL only
-2, --title-too used with -g, print title too
-f FORMAT, --format=FORMAT
append &fmt=FORMAT to the URL
-b, --best-quality alias for -f 18
If you’re trying to download a video which requires you to enter a username and password on YouTube, you can enter that using the --u USERNAME and --p PASSWORD parameters as can be seen in the help menu above.
I’d love to hear about other tools that you guys use to download videos from online sites for offline viewing. Let us know about your favourite tools for the purpose in the comments.
Tags: Linux, mplayer, view videos offline, vlc, youtube







Pingback: HowtoMatrix » Download YouTube Videos For Offline Viewing On Linux
Pingback: Mobile Media Converter: A Cross-platform No-Brainer Media Converter – Make Tech Easier