Downloading YouTube Videos with OpenBSD or Similar

From time to time, it is nice to be able to download a YouTube video for offline viewing. There are commercial tools to do this but I always tend to avoid those. Last week I discovered the tool I have wanted for years. I'm probably the last one to know about this but here it is.

The tool is called youtube-dl and simply takes the YouTube URL and downloads the best quality available. It is hard to beat that. I have now downloaded a variety of BSD videos that I want to watch at my convenience or while traveling. (The bsdconferences YouTube Channel is a great place to start.) There are, of course, many other command line options that I have yet to explore.

Fortunately, youtube-dl is available in OpenBSD Ports as well as MacPorts and Homebrew

If you have issues downloading videos, enclose the video URL inside quotes. This seems to be more necessary with some operating systems (probably due to different shells) than others. I had no trouble with the ksh(1) shell in OpenBSD but tcsh(1) in FreeBSD was problematic without quotes.