How to download YouTube videos

As a professor, I frequently use YouTube videos (and other streaming videos) in my courses. For a variety of reasons, I do not want to stream the video during a given class session. For example, if I am teaching a session virtually on Zoom, I do not want to simultaneously download and upload the video. Additionally, if I am teaching a course in China, I may not have access to YouTube. Finally, YouTube videos sometimes disappear, are blocked, or have advertisements that I don’t want to play in class.

For all of these reasons, I almost always download YouTube videos before class sessions and play them through my local machine. I never stream them directly from YouTube.

While there are a range of semi-functional browser plug-ins for downloading YouTube videos, I have never been satisfied with them. Instead, I use a command line tool — youtube-dl–for pulling videos from YouTube. It is an outstanding piece of (free) software that will enable you to quickly pull down videos to include in your classes.

The best way to install youtube-dl, if you’re on a Mac, is to use Homebrew. After doing so, you can run the following command in your shell (replacing {url} with the website address of the video you want to download:


youtube-dl "{url}"

For example, the following command would pull down an *amazing* video about recurrence analysis 🙂


youtube-dl "https://www.youtube.com/watch?v=wKOd45GLY9Y"

There are so many other options for this software. I think this is a particularly useful guide to using youtube-dl.