Download YouTube Video

Kevin FOO
2 min readAug 13, 2021

--

How to install

macOS

To install run the below command. That is provided if you have Homebrew installed in your mac in the first place. If not, go to https://brew.sh/ and follow the instructions there to install it. Should be just a simple one liner copy and paste.

brew install youtube-dl

To update youtube-dl, use the below command

brew upgrade youtube-dl

Ubuntu

To install using Python3

sudo apt update
sudo apt install python3-pip
pip3 install youtube-dl

To update youtube-dl if it is outdated

pip3 install -U youtube-dl

To install using snap

sudo apt update
sudo snap install youtube-dl

To update youtube-dl if it is outdated

sudo snap refresh youtube-dl

Do NOT use apt install to install youtube-dl. It is usually outdated and unable to download the YouTube video.

Windows

You will need Chocolatey to install youtube-dl. To install Chocolatey visit https://chocolatey.org/install . Remember to run your PowerShell in Administrator mode.

To install youtube-dl, run

choco install youtube-dl

To update, run

choco upgrade youtube-dl

How to download vide

Copy the URL of the YouTube video.

YouTube video with the most watch

Run the below command to download the YouTube video

youtube-dl <YouTube_video_URL>

How to download audio only

youtube-dl -f m4a <YouTube_video_URL>

< Back to all the stories I had written

--

--

Kevin FOO
Kevin FOO

Written by Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.

Responses (1)