Ubuntu Geek

Ubuntu Linux Tips,Howtos&Tutorials|Edgy,Feisty,Gutsy,Hardy,Intrepid

  • RSS Feed

    subscribe to the ubuntu Geek RSS feed


  • Sponsor



  • Categories

  • Meta

  • Sponsor

  • Archives

  • Support Ubuntugeek

    Amount $:
    Website(Optional):


  • Favourite Sites

Youtube-dl - Download videos from youtube in Ubuntu

Posted by admin on July 25th, 2008 Email This Post Email This Post

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.

Share/Save/Bookmark

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Related Articles

8 Responses to “Youtube-dl - Download videos from youtube in Ubuntu”

  1. Henrique Maia Says:

    An even simpler way (just using the browser):

    http://catchvideo.net/

    and you can even choose the format beforehand.

  2. mal Says:

    An even more simpler way (just using the browser): ;)

    just type or copy in the brwoser location bar:

    javascript:window.location.href = ‘http://youtube.com/get_video?video_id=’ + swfArgs['video_id'] + ‘&t=’ + swfArgs['t'];

    http://zmarn.zm.ohost.de/open-flv-unplug/Youtube/

  3. mal Says:

    ok that was a bit wrong :D

    javascript:window.location.href = ‘http://youtube.com/get_video?video_id=’ + swfArgs['video_id'] + ‘&t=’ + swfArgs['t'];

  4. Erik Says:

    Its just as easy to keep an older versiion of opera on the PC and once the movie is finished caching just copy it out of your opera cache folder. Default: hidden in the home directory.
    ;o)

  5. mal Says:

    hm i forgot that wordpress likes to screw this things up:
    hope it works this time ^^

    javascript:window.location.href = 'http://youtube.com/get_video?video_id=' + swfArgs['video_id'] + ‘&t=’ + swfArgs['t'];

  6. Murtadh Says:

    thanks but what about “pytube”?! it’s easier and GUI-based application, and no codes are needed to be used by the user :)

  7. Shaun lee Says:

    And then there is also this DownloadHelper extension for Firefox 3.0 users that can handle almost any kind of videos…

  8. udey Says:

    Keepvid is the best !

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>