Updated March 12, 2020
Youtube-dl is a useful command-line tool that can be used for downloading videos from all sorts of websites. It’s a very useful tool, and runs on Linux, MacOS, or Windows.
Here’s what it does:
Here’s how to download it:
Here’s the GitHub project page:
While youtube-dl works great on PC, you can actually install it and use it on Android as well. Here’s how to do it.
Install Termux from the Google Play store:
Termux is a nice little terminal emulator for Android that allows you to do many of the things you could normally do in Linux. Here are some of the tools available within Termux:
See the GitHub page for the full list:
Open Termux and type the following command to install Python:
pkg install python -y
Run the following command to install youtube-dl:
pip install --upgrade youtube-dl
Run the following command to download a video:
Open a file browser on your Android device and look for a folder called “Termux”; it should contain the video you just downloaded, and you can play it right on your device. If you don’t see this folder, move on to the “Advanced” section.
You can also list the videos you’ve downloaded by running the list command in Termux:
If you want to be able to choose the folder of your internal storage into which the videos are downloaded, do the following.
Give Termux Access Permissions
All I’m going to do is summarize the instructions from the Termux website:
Type the following command:
A popup will ask for permission to access your internal storage; press Allow.
Now, you can first navigate to something like the downloads folder before initiating the download:
Next, run the download command:
Now, the file will be in the Downloads folder in any file explorer app, such as Google’s “Files by Google” app that you can download here:
That’s it. It’s pretty simple to get up and running. And if you want, you can even Rsync your videos to another machine to watch them there!