In this post I am going to show you how you can download youtube videos easily through Terminal.App
First of all you need to set up HomeBrew, follow the steps mentioned here: Setting up HomeBrew on Mac OS X
Then install youtube-dl package by running the following command in your Terminal.App
brew install youtube-dl
If not Brew, then you can even install it using MacPorts. To setup MacPorts, follow the steps mentioned here: [How To]: Installing MacPorts on Mac OS X and run the following command:
sudo port install youtube-dl
Note: The above mentioned Package managers will install the dependencies that is required for smooth functioning of youtube-dl and opening/converting downloaded videos. Hence, I recommend using a package manager like MacPorts or Brew as they will take care of installing supporting packages and upgrading the packages will be easier in future too.
Now you can download youtube videos by running the following command in your Terminal.App :
youtube-dl 'link to youtube video'
P.S: I used to download videos using youtube downloaders and in-browser extensions like video download helper, but recently I was unable to download some videos (Official vevo music videos in particular)
So I decided to give youtube-dl a try, and Voila it worked perfectly well and downloaded the videos in HD by default.
youtube-dl uses python script to download the videos and videos downloads with maximum bandwidth. 🙂
Further details can be found at youtube-dl on Github
Let the Windows be open, and feel the Freedom.
10 thoughts on “Download Youtube videos on Mac OS X through Terminal.App”
awesome and helpful
I mostly use online websites to download youtube video. But Thanks to you for this.
thanks bro !
I use youtube-dl wiith linux mint 17. now I can use my old iMac G5 to do the job. thx a lot!
how to extract the best video quality from the link?
you can pass -F argument to youtube-dl to list all the available formats.
The output will be something like this:
17 3gp 176×144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320×214 small , mp4v.20.3, mp4a.40.2
18 mp4 540×360 medium , avc1.42001E, mp4a.40.2@ 96k
43 webm 640×360 medium , vp8.0, vorbis@128k
22 mp4 1080×720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
From here you can see format code 22 is marked best so you can download the video by running the youtube-dl command with ‘-f 22’ as arguments next time.
youtube-dl -F https://
youtube-dl -f https://
you solve my problem on my iMAC dude!!! Thank you very much….you’re a Genius!!!!
Thanks 🙂 Happy to help
Where are the Videos after download on Mac?
It will be downloaded in the directory that you are currently when running the command in the terminal. By default a new terminal should load in your Home directory ‘/Users/’