Command line Youtube Video Downloading

Youtube-dlyoutube-dl_logo

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.3+, and it is not platform specific. It should work on your Unix box, on Windows or on Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

Install In Ubuntu

1. install youtube-dl

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

Install In CentOS, Fedora

$ su -c 'yum -y 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, Type this in command in Terminal

$ man youtube-dl

To quit from manual press q key

Examples

1. Download classic webm type and save it as video.webm

$ youtube-dl https://www.youtube.com/watch?v=sqjFKwvrWTw

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

$ youtube-dl -ci -o video.flv "https://www.youtube.com/watch?v=sqjFKwvrWTw"

2. Download  mp4 file and save it as video.mp4

$ youtube-dl -ci -o video.mp4 -f 18 "https://www.youtube.com/watch?v=sqjFKwvrWTw"
Note : The -ci option will allow user to resume the download after discontinuation and continue on download errors. 
The Format Information

The Format Information


Commands and Options

1 List all available formats for the video

$ youtube-dl -F "https://www.youtube.com/watch?v=sqjFKwvrWTw"

2 For Help

$ youtube-dl --help

3 Download classic webm type with default title and save it as video.webm

$ youtube-dl -cit "https://www.youtube.com/watch?v=sqjFKwvrWTw"

4 Update Youtube-dl

$ youtube-dl -U

5 thoughts on “Command line Youtube Video Downloading

  1. Thanks for useful information. The command is so simple to use when we get used to commands.
    Presently, I would like to read a review of Fedora 19 in comparison with Ubuntu which is shrinking and squeezing like windows. I shall look forward. Thanks in anticipation.

    • Thanks and nice info about Fedora 19 I am waiting for stable version of fedora 19 i use fedora in my laptop

      • Ubuntu is becoming quite PIA. I have downloaded Fedora 18 and may start using it in a while. Shall look forward to read day to day problems in fedora. BTW, anaconda is not as good as Ubuntu installer.

  2. I agree with you Mr. Sandeep You are right about installer i really don’t like new installer of fedora But other then that i am very comfortable with fedora

    • mnoufalc says:

      I think new fedora installer is much easier than before. We just locate the free space, it creates the swap, root n boot and everything itself in recommended proportions.
      But my problem is something different. My notebook gets more heated when I run Linux. It kills battery. I have been using Ubuntu for a long time. Now switched to fedora. But no improvement. My system run on ATI Radeon graphics. Any solutions ?

Leave a comment