What is Youtube-dl ?
Youtube-dl from youtube-dl.org website is a widely known open-source command line tool that allows users to download videos from various websites, including YouTube.com. It’s a popular alternative to paid video downloaders and online tools, and it’s considered to be better in terms of functionality.
Despite the availability of YouTube GUI clients for Windows, there are no such resources for macOS ( Only macOS terminal tool ). So, in this article, we’ll take a deep dive into how to install youtube-dl command line tool on a Mac.

How to Install YouTube-dl on Mac
Follow our Step-by-Step Guide below to Install Youtube-dl on Mac.
- Installing Homebrew
To begin the installation process, you will need Wget to be installed in order to download and install YouTube-dl. To do this, you must first install Homebrew on your Mac. To install Homebrew, follow these steps:
- Open the terminal on your Mac by pressing cmd + space and typing in “terminal.”
- Copy and paste the following command into the terminal and press enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" If you get this error Error: The Ruby Homebrew installer is now disabled and has been rewritten in Bash. Use the following code instead /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Now press Enter key to start installation when you see the following window.

- Give password of your mac when asked for it. This whole process will take at least 10 minutes.
Now note that Xcode command line tool will also be installed as you will get the following message.
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
This is normal and you can proceed with the installation as this is needed for the youtube-dl tool to work properly.
- Install Wget
Once Homebrew is installed, you can move forward with installing Wget command. Type in the following command to enable OpenSSL for TLS support and install wget. The first line will install openssl and the second line will install the wget.
brew install wget --with-libressl install youtube dl- install Wget
- Installing Youtube-dl
With Wget installed, we can now use it to download and install the Youtube-dl package. Type in the following command and press enter. This will download the package and start installing it on your mac.
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl install youtube dl- install youtube dl
- Fixing Youtube-dl Permissions
You have installed Youtube-dl but it won’t work yet. If you type youtube-dl in your terminal, you’ll get a permission error. To resolve this, you need to give the right permissions to youtube-dl files on your mac. Type in the following command and press enter to fix the permissions issue.
sudo chmod a+rx /usr/local/bin/youtube-dl install youtube dl- change permission
- Downloading Videos using youtube-dl
Now you can download YouTube videos from youtube.com or videos from Youtube-dl-supported sites like vimeo by simply typing the command youtube-dl [your-video-link-todownload].
For example, to download a video from YouTube, you can use the following command:
youtube-dl https://youtu.be/testvideourl
- Location of Downloaded Videos
The downloaded youtube video is saved in your home folder on your Mac. To access the home folder, go to Finder > Go > Home or press the keyboard shortcut CMD + Shift + H.
How to use FFmpeg to Download 1080p Videos
By default, the tool will only download the second-highest resolution. To get the highest quality video, you may need to install FFmpeg. Without FFmpeg, you’ll likely get 720p, which is the second-highest resolution. To install FFmpeg on your mac, type in the following command in terminal window and hit enter
install youtube-dl ffmpeg
Conclusion
Now you have successfully used Youtube-dl tool to download videos on your mac with terminal window. Although not many people know about it, this command line tool works exactly as advertised.
For more information on downloading different resolution videos or changing the download location, check out youtube-dl command line parameters on Github here.
Also don’t forget to leave your valuable comments below.

Gowtham V, the founder of howtodoninja.com is an experienced tech writer and a cybersecurity enthusiast with a passion for exploring the latest technological advancements. He has 10 years of experience in writing comprehensive how to guides, tutorials, and reviews on software, hardware, and internet services. With an interest in computer security, he strives to educate users by writing content on how to use technology, and how to also protect their smart devices and personal data from cyber threats. He currently uses a Windows computer, and a Macbook Pro, and tests hundreds of Android phones for writing his reviews and guides.