![download_cassette.jpg](https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmQEzxQ1WNXv3CNCxgXmfKFRC5XNH3hmcKstAswCpR8ZYp/download_cassette.jpg)
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 addsudo
before 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-dl
and 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
.
![Screen Shot 2018-09-22 at 10.28.15 AM.png](https://images.hive.blog/768x0/https://cdn.steemitimages.com/DQmZ1dLEDnjzHuEzmuqDMq4WQQmSBEzyTkf3bZsSNd7NQUN/Screen%20Shot%202018-09-22%20at%2010.28.15%20AM.png)
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.
misspelled labeled...damn
Ok, I cannot get the video I used as an example to play its audio. The .webm file I downloaded played fine. Thus far I have not found a way to make it work. I tried
brew install ffmpeg
to no avail. Crap.I haven't run into this issue with
youtube-dl
. But I also don't think I've encountered any.webm
from youtube. Did you pass--recode-video
?I did not try that. Frankly, I suspect it was an unfortunate edge case. I downloaded a few others to test and they all worked. I downloaded several using Linux and all of them worked. I still believe it it is a solid tool, and dead easy.
Yeah, I think YouTube still has some old codex formats that they have yet to update.
It is so solid that it often works well with non-YouTube urls. I grabbed a few Facebook videos with it. And I think it even works with sites that aren’t officially supported if they do standard embeds.
Congratulations @arrowj! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP