They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
mysoomro
Score: 26
votes: 32
Format: Article

 How to Download Youtube Video


 

In this tutorial I'll show you how to download youtube videos using youtube-dl

 


 

First you have to install youtube-dl with this command

 

sudo apt-get install youtube-dl

and give in your password

 


 

To download a video

1- Go to youtube and search the video you want to download

2- Copy the Video URL from the browser's navigation(address) bar (As shown in the image)

3- Open up terminal and type in

 

youtube-dl {video URL}

~ Don't forget to replace '{video URL}' with the URL you copied from the browser's navigation(address) bar:
 
and your video will start downloading
 
~ But this will download video in some format that you don't want or it might be too heavy
 
For downloading video in format of your choice type in following
 

youtube-dl -F  {video URL}

~ Don't forget to replace '{video URL}' with the URL you copied from the browser's navigation(address) bar; as shown in the image below:

 

4-  If you choose to download video in format of your choice. you have one last step to follow: that is choosing the format of your choice.

When you type in the command for downloading video with format or your choice it'll give you list of different options, showing the formats and resolutions of that video.

choose the code of one you like and type in following:

 

youtube-dl -f  {format code} {video URL}

~ Don't forget to replace '{formate code}' with code of your choice and '{video URL}' with the URL you copied from the browser's navigation(address) bar; as shown in the image below:
 
 
 
In the example shown in the image above. I've chosen video in flv format with resolution [240*400] and its code is '5' as you can see in the image.

Easy...  Isn't it?? smiley
All the best!! yes

Tags: youtube, terminal, youtube-dl, video download,
Created: 4 years ago.
Last edited: 4 years ago.
Reviewed: 4 years ago.
Read 0 times.

Comments
6 months ago

pravlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package youtube-d1

as I'm a beginner I don't know what is this happening
 
10 months ago

twolf
Deb distribution package for youtube-dl is often outdated (it is currently and that version doesn't work anymore).
In the FAQ "How do I update youtube-dl?" reported in the url below it is suggested to manually install the program so you can then easily keep it updated:

https://github.com/rg3/youtube-dl/blob/master/README.md#faq

I did it and fixed my problem.
 
11 months ago

gamers4177
can it pause download? if yes, how to continue download again?  
11 months ago

cotechinho
Thanks!  
1 year ago

chico34
thanks  
1 year ago

eldadxl
Great stuff!
How do I change the destination folder other than downloads folder?
 
2 years ago

abinashdash17
can i print the download link to a file?
 
2 years ago

RicardoMazeto
You can do it without have to install nothing.

1 - Go to youtube mobile version.
2 - press f12 (open the developer tools).
3 - ctrl+shift+c and hover the play button (to inspect the element).
4 - click the play button (inspect).
5 - click the play button again, this time to get the link.
6 - the link to your video is at the element at the developer tools panel.

just copy the link and paste at your player or download manager.
 
2 years ago

Glasairman
so far, so good, the https-file was load to the /home/[username] folder from YouTube Germany.

Can I change the target folder to download to my own Video folder?
 
3 years ago

mysoomro
@bkjaya1952 you are right! There are many other ways do download youtube videos too. You'll also find video download helper in chromium and google chrome.
And when Linux buffers the video it actually saves the video somewhere in its program files. You just have to copy it somewhere else in the hard drive. But it's a bit hard to find it in the program files.
 
3 years ago

bikrgran
I have just done this, using the -f 18 for MP4. As far as I can tell, it downloaded fine. I just can't FIND it! Where did it download it TO? Thanks for the tutorial. I took a chance on your -f codes being correct, as nothing came as a list. I'm using Mint 16 and Konsole (bash).  
3 years ago

UmerButt
It does not work for youtube anymore because Youtube doesn't allow to download videos from their site anymore :(  
3 years ago

teXew
Very easy and very fun to do trough terminal,thanks!  
3 years ago

ericvictor66
Great! Works fine and very easy! Thank you for this!  
3 years ago

alle83
Didn't work selecting the format, said "HTTP Error 404 not found"; when I didn't put the -F command, it worked. Wonder why?  
4 years ago

efthialex
@mysoomro Nice tutorial!

@Tonya Thanks for the tip!
 
4 years ago

linux_boy
Very helpful way to download youtube vids. Thanks for this very nice tutorial. :)  
4 years ago

sunewbie
Minitube does not work with all videos.

@Tonya and @mysoomro , thanks for tutorial and tips :)
 
4 years ago

mysoomro
@dalcde: haven't tried minitube yet. Just saw reviews for it. Many say it doesn't work on Linuxmint 13. Have you tried it on Maya?  
4 years ago

dalcde
Minitube is better.  
4 years ago

Tonya
@mysoomro:
Yes, sure, to download videos via terminal is a safe and proper way.
Thank you once again!
 
4 years ago

mysoomro
@Tonya:
Thanks Tonya! Your method is pretty simple and easy. I used a similar way, which was a website; www.keepvid.com. But last time I tried it, it wasn't working. So I searched this new method. And there was no tutorial for this on community site so I added one. :)
 
4 years ago

Tonya
Yes, nice and easy! Thank you for this tutorial!
It can be made as well without a terminal:
1) to type in the video URL "ss" before youtube... (for example, www.ssyoutube.com/watch?v=hJHkTxf72oM) and click Enter
2) to choose format you like and click Enter again
3) that's all - the video is in your Downloads folder.
 

Other tutorials from mysoomro