Hola amigos,

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

    1. 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.

      For e.g.,
      youtube-dl -F https://
      youtube-dl -f https://


Leave a Reply to Jackson Isaac Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s