Howto Download videos from youtube in Ubuntu

Posted on July 30th, 2008 by Jason

youtube-dl is a small command-line program to download videos from YouTube.com.

Install youtube-dl in Ubuntu

sudo aptitude install youtube-dl

This will complete the installation.

Using youtube-dl

Usage instructions are easy. Use youtube-dl followed by a video URL or identifier.

youtube-dl Example

youtube-dl “http://www.youtube.com/watch?v=foobar”

The video will be saved to the file foobar.flv in that example. As YouTube.com videos are in Flash Video format, their extension should be flv.Check this simple guide to convert .flv files to .mpg

More usage tips

You can change the file name of the video using the -o option, like in

youtube-dl -o vid.flv “http://www.youtube.com/watch?v=foobar”.

Some videos require an account to be downloaded, mostly because they’re flagged as mature content. You can pass the program a username and password for a YouTube.com account with the -u and -p options, like

youtube-dl -u myusername -p mypassword “http://www.youtube.com/watch?v=foobar”.

The account data can also be read from the user .netrc file by indicating the -n or –netrc option. The machine name is youtube in that case.

The simulate mode (activated with -s or –simulate) can be used to just get the real video URL and use it with a download manager if you prefer that option.

The quiet mode (activated with -q or –quiet) can be used to supress all output messages. This allows, in systems featuring /dev/stdout and other similar special files, outputting the video data to standard output in order to pipe it to another program without interferences.

The program can be told to simply print the final video URL to standard output using the -g or –get-url option.

source: ubuntugeek

Tags: , , , , , , ,

Related posts

2 Responses to “Howto Download videos from youtube in Ubuntu”

  1. Hammad on 31 Jul 2008 at 5:21 am #

    excellent tip m8 worked like a charm… thanks

  2. Flush DNS Cache from your linux, Mac or Windows box « Pubdomains - Domain Registration * Web Hosting * SSL Certificates on 08 Aug 2008 at 4:55 am #

    [...] Howto Download videos from youtube in Ubuntu By Jason … Howto Convert PDF files to HTML files (0); Howto clear/Flush DNS Cache in Ubuntu (0); How to Play Half-Life 2 on Ubuntu (1); How to install Ubuntu Linux from USB Stick (0); How to Install and setup Eclipse with Sun’s Java (1) … PCTips Box – http://www.pctipsbox.com [...]

Leave a Reply