Home » Linux

How to download YouTube videos using Linux Terminal?

16 August 2015 Written by: No Comment

Using youtube-dl

1. Open the Linux Terminal. [Press ctrl+alt+t]
2. Install youtube-dl
sudo apt-get install youtube-dl
3. Copy the link of YouTube video and use this command to download.
youtube-dl “Youtube-Video-URL”
Example: youtube-dl https://www.youtube.com/watch?v=dsf_z4urc4s

That’s it YouTube video will download to your present working directory.

youtube-dl supports to many websites. You can use this tool to download video from many websites.
List of supported websites: https://rg3.github.io/youtube-dl/supportedsites.html

Read documentation for more options: https://github.com/rg3/youtube-dl/blob/master/README.md#readme

There are lots of options available like download only audio from video file, download video in different supported format, download subtitles of video, bulk download etc. many more.

Get details by using this command
youtube-dl Help Command
youtube-dl -h

Download video with particular format and resolution.
You can get all available formats for particular video. You can also select your prefered resolution of the video.
youtube-dl -F YouTube-Video-Link-URL

Example:
youtube-dl -F https://www.youtube.com/watch?v=dsf_z4urc4s

Download YouTube Video
Use format code to download video with your preferred format.
I am downloading this YouTube video with .flv format with 400×240 resolution.

Example: youtube-dl -f 5 https://www.youtube.com/watch?v=dsf_z4urc4s

Using cclive – lightweight video extraction tool

It is used to download videos from YouTube or other websites.
1. Open the Linux Terminal. [Press ctrl+alt+t]
2. Install cclive
sudo apt-get install cclive
3. Copy the link of YouTube video and use this command to download.
cclive “Youtube-Video-URL”
Ex: cclive https://www.youtube.com/watch?v=dsf_z4urc4s

That’s it YouTube video will download to your present working directory.

Other options
Download the best available format of the media.
cclive -f best “YouTube-Video-URL”

More Details: http://manpages.ubuntu.com/manpages/lucid/man1/cclive.1.html

Leave your response!

Please add your comment below. Here is the trackback Link and subscribe to these comments Comment RSS Link.

Be nice. Keep this blog clean. Please dont spam.

We support Gravatar. To get your own gravatar, please register at Gravatar.