870How to download Videos from Youtube

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

Installation

brew install youtube-dl

Downloading a Video

youtube-dl 'https://www.youtube.com/watch?v=1234'

The link needs to be in inverted commas:

OK: youtube-dl 'https://www.youtube.com/watch?v=1234'
NG: youtube-dl https://www.youtube.com/watch?v=1234

Downloading a Playlist

youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' playlist_url

How to select video quality from youtube-dl?

youtube-dl -F playlist_url
[youtube] Setting language
[youtube] playlist_url: Downloading webpage
[youtube] playlist_url: Downloading video info webpage
[youtube] playlist_url: Extracting video information
[info] Available formats for playlist_url:
format code extension resolution  note 
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     
22          mp4       1280x720    (best)

Select download quality youtube-dl -f 22 playlist_url