youtube dl

Install youtube-dl

  1. Command + Space
  2. Type in the search bar “Terminal”
  3. Open Terminal
  4. Type ‘brew install youtube-dl’

brew install youtube-dl

Homebrew will install everything required it may ask you to upgrade some packets which and say something like

run `brew upgrade youtube-dl`.

When you open up the terminal you start in the user home directory, to move to a better location like the download folder type.

cd Downloads

If you typed ‘ls’ this will list everything in the directory in terminal


To clear the screen type ‘clear’


To download a video you the below command, the video url has to be inside single comma on mac or you will get an error output.

youtube-dl 'videourl'

To find the best video output i.e mp4 type

youtube-dl -F ‘videourl’ and it will show a list like this.

 Downloads % youtube-dl -F '<figure class="redactor-component" data-redactor-type="video" tabindex="-1" contenteditable="false"><iframe width="500" height="281" src="//" frameborder="0" allowfullscreen=""></iframe></figure>'
[youtube] 4NOM-kLfDR8: Downloading webpage
[youtube] 4NOM-kLfDR8: Downloading video info webpage
[info] Available formats for 4NOM-kLfDR8:
format code  extension  resolution note
249          webm       audio only tiny   52k , opus @ 50k (48000Hz), 724.64KiB
250          webm       audio only tiny   64k , opus @ 70k (48000Hz), 893.10KiB
251          webm       audio only tiny  111k , opus @160k (48000Hz), 1.56MiB
140          m4a        audio only tiny  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.21MiB
160          mp4        188x144    144p   51k , avc1.4d400b, 24fps, video only, 499.29KiB
278          webm       188x144    144p   71k , webm container, vp9, 24fps, video only, 992.67KiB
133          mp4        314x240    240p   92k , avc1.4d400d, 24fps, video only, 871.78KiB
242          webm       314x240    240p  128k , vp9, 24fps, video only, 1.24MiB
134          mp4        470x360    360p  227k , avc1.4d4015, 24fps, video only, 2.09MiB
243          webm       470x360    360p  239k , vp9, 24fps, video only, 2.24MiB
18           mp4        470x360    360p  361k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 6.15MiB (best)

You want to get the last one (best) 18 mp4

So the new command will be

youtube-dl -f 18 'videourl'

Done this will download the best quality video and audio

Was this helpful?

Leave a Comment