Using youtube-dl on Android

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.

Useful Links

Here’s what it does:

Here’s how to download it:

Here’s the GitHub project page:

Android Installation

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.

youtube-dl on Android
youtube-dl on Android!

Install Termux

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:

  • SSH
  • Rsync
  • Vim
  • CURL

See the GitHub page for the full list:

Install Python

Open Termux and type the following command to install Python:

pkg install python -y

Install youtube-dl

Run the following command to install youtube-dl:

pip install --upgrade youtube-dl

Download Video

Simple Instructions

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.

This is the default Files app on a Google Pixel where you can see a shortcut to the Termux storage.

You can also list the videos you’ve downloaded by running the list command in Termux:


Advanced Instructions

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:

cd ~/storage/downloads

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:

Google's Files app showing Internal Storage slash Downloads


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!

4 thoughts on “Using youtube-dl on Android

  1. youtube den video indirdim ve “Termux” adlı bir klasör hem tel hemde sd arattım yok oyle bir kloser ls -al komutu ile video goruyorum dosya yoneticisi ile dosya adı aratma yaptıgımda yok gorunen dosya yok gibi saatlerde tek tek baktım yok ne inen video nede termux klasoru yok….
    uzantısı farklı bir dosyanın icine mi koyuyor yoksa ??

    1. I’ve updated the post to solve the problem of finding your files after downloading them. See the “Advanced Instructions” section.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s