youtube-dl installation and simple usage [Debian based Distros] 08-05-2014, 03:54 PM
#1
Downloading youtube videos via terminal
Hello [username], this will be a simple tutorial about how to install youtube-dl and simply use it.The youtube-dl package provides you a terminal Youtube Downloader, and the best part of it is that the speed is the maximum DL speed you can achieve.All the code is tested on Debian 7.6!
Requirements : python (>= 2.7), python-pkg-resources
START
Check if python-pkg-resources is installed.
The python (>= 2.7) requirement would probably be satisfied in a modern distro.So we check of the the second one.
Code:
aptitude search python-pkg-resourcesIf its not installed
Spoiler:
Code:
aptitude install python-pkg-resourcesInstall youtube-dl.
Go here choose the mirror you prefer and download the youtube-dl_2014.07.15-1_all.deb package.
Then install it.
Code:
dpkg -i youtube-dl_2014.07.15-1_all.debNow you are ready to download.
Simplest way to do it is use to use the script and pass it the youtube video url paste as an argument.
Code:
youtube-dl <paste youtube video url>For whole playlist downloading you should add a "http://www.youtube.com/playlist?list=" prefix and then copy and paste the list="..." part from the playlist url.
Spoiler: For Example
Code:
youtube-dl http://www.youtube.com/playlist?list=PLTlJK3kwZIbQQmXSnDpiVtrhpiyl7b53TFinding out formats(resolutions) available for download
You can find out the available resolutions to download the video on.
Code:
youtube-dl -F <paste youtube video url>This will show you all about formats available for the video nicely documented.
Download Example with specified format
Spoiler: Click to view example
For example to download the Iron Man 3 official trailer on 1280x720 resolution you will go like this:
Find out what the number of the format is from the format column of -F parameter.
Code:
youtube-dl -F https://www.youtube.com/watch?v=2CzoSeClcw0And then of course use the number to pick the resolution you want.
Code:
youtube-dl -f 22 https://www.youtube.com/watch?v=2CzoSeClcw0NOTE : Take care avoid the music only, and video only resolutions.Except if its about a song or you want a muted video. orly
Take a look on man page...its awesome documented.
For more advanced stuff you can always check out the manual.
Code:
man youtube-dlEND
At last i should mention that you must either specify a folder with parameter usage or cd to the path you would like to download the files.
You can also find recommended packages for that package here.I hope this helped out, I personally like this tool and believe its
something very handy for everyday terminal users.As always I hope the english wasn't extremely hard to read.
Thanks for reading this!
Sincerely,
L0ad1ng.
(This post was last modified: 08-12-2014, 11:58 AM by krozz.)
MASTERING OTHERS IS STRENGTH, MASTERING YOURSELF IS TRUE POWER.
![[Image: qJweLN6.jpg]](http://i.imgur.com/qJweLN6.jpg)
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)