First off, let's install youtube-dl
on a fresh Raspbian install. You might be tempted to use a simple apt-get
: don't. It will make it harder to get the latest updates for the software down the road. Instead:
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
youtube-dl -U
youtube-dl
will tell you you have an up-to-date version installed! Now we're ready to download some videos.
Go to the URL of the video you want to download and, in terminal, type youtube-dl [URL]
. Videos will download to the directory where you are located in two files - one for best video, one for best audio - before mixing both into an .mkv
file.
There are more things you can do to make your life with youtube-dl
even better:
youtube-dl --restrict-filename [URL]
youtube-dl --download-archive archive.txt [PlaylistURL]
youtube-dl -f 'bestaudio' --restrict-filename [URL]
That's it! Enjoy the YouTube goodness, all local.