I thought my son might want, or even need, to use this at some point during his time in college. Never fear, the instructions will work even for those of you that are not my progeny. When I was using Linux I used the youtube-dl CLI application to download YouTube videos, and it also works on macOS.
First you need to install the Homebrew package manager:
- Type CMD+Spacebar to bring up Spotlight Search, type terminal, and then return to open Apple's default terminal application. Actually, it will probably suggest terminal.app by the time you get to "ter" at which point you can hit enter. Alternatively, you can open Applications > Utilities > Terminal.app from the Finder. I personally recommend macOS users start learning keyboard shortcuts. They make life much easier, especially if you are using a laptop.
- Type (or paste to avoid typos) the following command at the prompt and hit return:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"(you may have to addsudobefore the command and enter your password when prompted). - After it is done doing its thing (you will know when you see the prompt again i.e.
mymacbookpro:~ stevejobs$typebrew install youtube-dland wait a few seconds for it to finish downloading and installing. - To download a YouTube video (or a video from one of the many other sites listed on the project's website) simply open the terminal app and type
youtube-dl [URL]where [URL] is the URL of the video in question. Again, pasting the URL might be a good idea. For instance, to download the 1940 Cary Grant classic His Girl Friday (public domain of course) you would typeyoutube-dl https://www.youtube.com/watch?v=-kpXX501COc
The video will be downloaded and saved to your home folder not your Downloads folder. If your home folder is not in the sidebar of Finder you can either put it there by opening Finder | Preferences and ticking the appropriate box (see image), or from the menu click Go | Home, or simply type SHIFT+CMD+H. For those interested, there are a lot of options you can pass to youtube-dl. You can see a list of options by typing youtube-dl --help.
A lot of videos will be downloaded in .mp4 format, but your may run into .avi, .webm, and other formats. For playing videos not purchased or rented from Apple I highly recommend VLC media player. Hopefully someone finds this helpful. Son, quit reading my blog and get back to studying...or playing vidya games...whichever.