Using youtube-dl we can easily download Youtube videos or just the audio.

1. Install youtube-dl

Go to the Github repo and scroll down until you see Installation

Windows users simply click “download a .exe file”

Add the youtube-dl.exe to your PATH or simply run the commands from where it’s located install youtube-dl

2. Download the video from the command line/terminal

First grab the Youtube URL

youtube url

youtube-dl followed with the url to download the full video

$ youtube-dl youtubeurlhere

youtube cmd


3. Or custom download it

You can view the different format options to download a smaller file or only audio

using the -F option will output different formats. Select one using the -f followed by the format code

$ youtube-dl -F youtubeurlhere

format youtube

once you find a format you want simply

$ youtube-dl -f formatcode youtubeurlhere

new format