|
12 years ago 27 |
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
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}
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}
When I downloaded a video using 18 as the format code, there was a portion of the URL appended to the file name. Made the file unplayable - no audio and a black window. I cleaned up the file name and the video works fine.
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
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.
can it pause download? if yes, how to continue download again?
Thanks!
thanks
Great stuff!
How do I change the destination folder other than downloads folder?
can i print the download link to a file?
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.
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?
@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.
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).
It does not work for youtube anymore because Youtube doesn't allow to download videos from their site anymore :(
Very easy and very fun to do trough terminal,thanks!
Great! Works fine and very easy! Thank you for this!
Didn't work selecting the format, said "HTTP Error 404 not found"; when I didn't put the -F command, it worked. Wonder why?
Very helpful way to download youtube vids. Thanks for this very nice tutorial. :)
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.