Download YouTube videos with youtube-dl
youtube-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
youtube-dl: http://bitbucket.org/rg3/youtube-dl/wiki/Home
Ramprasad N
12 Jul, 2012
Thank you for the “Download YouTube videos with youtube-dl” post
Luis
25 Sep, 2012
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
25 Sep, 2012
@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
7 Jan, 2013
Man thanks its very helpfull only thing i want is pause option but anyways its amazing to download by terminal !! thnx
navin
22 Feb, 2013
where will the output file be stored on the harddisk
enjoy
22 Feb, 2013
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
1 Jul, 2013
It would be very useful to me if you could write down the procedure of download bytes-ranges via youtube-dl
Hjoaco Mg
30 Nov, 2014
Excellent!
Tito Suwandi
26 Dec, 2016
thank you :)
http://www.anditii.web.id
Scott Bailey
21 Feb, 2017
Thank you for these instructions, really helpful!! I always use acethinker video downloader to save YouTube videos, It is a free cloud based software to download videos without install any software in your device, even works for 1080p youtube videos.