How to: Tips and Tricks

Download YouTube videos with youtube-dl

YouTube logoyoutube-dl is a small command-line program to download videos from YouTube.com. It requires the Python interpreter, version 2.x (x being at least 4), and it's not platform specific. It should work in your Unix box, in Windows or in Mac OS X.

Install & using

1. install youtube-dl

sudo apt-get update && sudo apt-get install youtube-dl

2. use this command to download files from YouTube

youtube-dl -o [name of output file] [YouTube URL]

3. To view all options youtube-dl, paste this in command line

man youtube-dl

To quit from manual press q key

Examples

1. Download classic flv type and save it as file.flv

youtube-dl -o file.flv "http://www.youtube.com/watch?v=Y54ABqSOScQ"

2. Download Full HD mp4 file and save it as file.mp4

youtube-dl -o file.mp4 -f 37 "http://www.youtube.com/watch?v=Y54ABqSOScQ"

This table from Wikipedia may be useful

Comparison of YouTube media types

Comparison of YouTube media types (Wikipedia)

youtube-dl: http://bitbucket.org/rg3/youtube-dl/wiki/Home

  • Ramprasad N

    Thank you for the “Download YouTube videos with youtube-dl” post

  • Luis

    An explanation about the installation for other platforms is needed and it is not clear whether the downloaded file is higher quality or if it is converted.

  • enjoy

    @Luis all that information are in the post.. You’re able to choose video format you want.. flv or mp4 720px or 1080p.. look at the table and examples ;)

  • Rasvi

    Man thanks its very helpfull only thing i want is pause option but anyways its amazing to download by terminal !! thnx

  • navin

    where will the output file be stored on the harddisk

  • enjoy

    files are stored in your working directory. But you can choose where will be the file stored eg:
    youtube-dl -o /new/store/directory/video.mp4 http://youtube.com/

  • shay

    It would be very useful to me if you could write down the procedure of download bytes-ranges via youtube-dl

  • Hjoaco Mg

    Excellent!

  • Pingback: download film terbaru gratis()

  • Pingback: download film terbaru sub indo()

  • Pingback: Free Classified Ads, for your future self()