Apr 30, 2017 - There are tons of online sites and Android apps, that let you download videos from the Internet. But how about we do this, with Android terminal. With the following methods, we show you how to download YouTube videos for yourself on Android and PC. Perfect for when you want to watch your videos later or you know you will be without Internet. Download YouTube on Android – known for its video collection of billions of videos uploaded by users, YouTube is indeed the king of video hosting sites. From full movies to caught-on-cam video clips, everything can be found on this site. Jul 17, 2017 Refer our guide to learn how to download videos from popular platforms such as YouTube, Facebook, Twitter, Instagram and many others. V ideo content has taken the Internet by storm.
There are tons of online sites and Android apps, that let you download videos from the Internet. But how about we do this, with Android terminal (No ROOT required). Sounds geeky? Well, let’s see how to do it.
Related: 3 Ways to Loop YouTube Videos on Android and iOS
Advantages
How To Download Videos From Internet Explorer
- No need to leave the YouTube app or any app for that matter
- No need to download any third party app that is filled with ads
- Set it up once and forget forever.
Disadvantages
- Need some tinkering with Android terminal
- You don’t have multiple download options (360p or 480 etc) like you get in other apps
So, how is it going to work?
Well, say, you are watching any video in the YouTube app and you want to download it. So simply tap on the share icon on the top right. Select termux app. This will launch a terminal emulator, and run some commands. And that’s it, your video is downloaded, in the YouTube folder of file manager
This method support around 1250 sites including all the popular video sites – YouTube, Vimeo, Facebook, twitch etc. You can check out the complete list on YouTube-dl supported sites page.
I highly recommend you watch the following video first, in this post, I’ll be explaining the steps and fixing some common errors that you might get while trying the method. So, let’s get started, shall we?
Download Any Videos on the Internet with Android Terminal
Step 1
Head over to Google play Store and download any terminal emulator app. For this instance, let’s go with Termux.
Step 2
Now, since it’s our first-time setup, we’ll have to type in some terminal commands. Don’t worry, all these commands are simple. And don’t require any root access. You can download this file (Google drive) and copy paste them one by one to your terminal.
If you have ever work in the terminal, you might know, it’s always a good deal to update your repository. So, type
apt update && apt upgrade
and then press Y to confirm changes.
(Note: If you get an error apt-get: not found, scroll down the end of the article, I’ll have all solutions there)
Step 3
Next, you need to give termux access to your device’s filesystem, So type in following command and press enter.
Termux-setup-storage
Step 4
Next, we need to install YouTube-dl package, that will do all the magic in the background. But, YouTube-dl needs python to work. So, first, you need to install python.
packages install python
and then press Y to confirm changes.
Step 5
Okay, now we are ready to install YouTube-dl
pip install youtube-dl
Step 6
Now, even if you have YouTube-dl, you still need to tell it, where to save all the downloaded videos. And which resolution to download. So, first let’s create a folder to store your downloaded videos
mkdir /data/data/com.termux/files/home/storage/shared/Youtube
Now, if you go to the root of your internal storage, you should see a folder called YouTube.
Step 7
Now come back to the terminal. We have to tell YouTube-dl — ‘Whenever I’m downloading a YT video, it should have this default name and this resolution’
And to do this, we’ll, create config files and add all the rules in it. So, to create a config file. Type this command.
mkdir -p ~/.config/youtube-dl
Step 8
Now, to add rules to this config file, we need some terminal editor. You just simply can’t write stuff like you normally do. So install nano text editor with the following command
apt-get install nano
Step 9
Okay, now we add rules to the config file. Open it with nano editor with this command.
nano ~/.config/youtube-dl/config
Step 10
And copy-paste the following rules i.e. what is the default download folder, title, and resolution. For this instance, I’m going with 480p, which obviously, you can replace with 360, 720 or 1080p. If you want to download only audio, use 140, more on that at the end of this article.
–no-mtime
-o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s
-f “best[height<=480]”
Now, usually, to save changes we do CTRL + S right. But since, we don’t have any CTRL key on Android. These terminal emulators use vol down key as CTRL key. So, save your changes and exit the app press use the following command.
“Volume-down” + O to save changes and press enter. And then close nano with “Vol-down” + X
Step 11
Okay, now once are back in the editor. You need to do one final thing i.e. linking Youtube-dl terminal command with the share menu of Youtube or (any app for that matters)
Again, we need to create a file and add rules in it. Just like we did in the previous step. So, type this command
mkdir ~/bin
cd ~/bin
nano termux-url-opener
Step 12
So, far we have created a bin folder and in that, we have created a new file called – termux-url-opener. This will open the nano editor, paste the following command in it.
youtube-dl $1
Save with “Volume-down” + O, press Enter, and then close nano with “Vol-down” + X
Now, let’s test it
Open YouTube app (remember it works for any app though, as long as you get share option), click the “Share” link under the video and choose “Termux“. The download will start and once finished. You can find it under the YouTube folder.
Common Problems and their solutions
1. no command ‘apt-get’ found, did u mean: command ‘apt-get’ from package ‘apt’
Chances are you are typing Apt-get instead of apt-get. Most keyboard app capitalizes the first letter. Terminal is case sensitive
2. mkdir: can’t create directory ‘/data/data/com.termux/files/home/storage/shared/Youtube’: No such file or directory
Either you already have a folder with the name YouTube in your internal storage or you have not given storage access to termux properly. Make sure you are not using any screen overlay app like screen recorder or Deskdock etc. If you are, then disable them temporary and rewrite the storage access code i.e. termux-setup-storage
3. What are the codes to download the audio
Thanks to YouTube user – for providing the tip, If you want to download only audio replace “best[height<=480]” with 140 so in the final, you will have -f 140 instead of -f “best[height<=480]. I tried it and it worked fine.
4. How to get pop-up options with different download format like 360, 480, 720p etc, like you get in YouTube downloader app?
We are still working on it. With some good codes, it’s possible. But unfortunately, due to a busy schedule, I’m not able to put time on it. If you guys have an idea, shoot me an email or leave a comment below.
Related: How Much Money do YouTubers make? Answered by YouTubers
Videos resource are so abundant on line that sometimes it's difficult for you to select and download videos via internet. If you want to watch movies on your Android phone, you will have to search it on your PC, select and download movies, transfer them to your Android. It seems a bit complicated, isn't it? Well, Android Transfer will make it easier for you. So why Android Transfer enable you to get better video experience? This pro connects YouTube, which make it possible for you to directly select and download some recommended hot videos from the website. When the downloading ends, transferring these movies to your Android with one click is a piece of cake. Let's start getting wonderful videos on your Android. Firstly freely download the trail version to have a try.
We will provide you with a step-to-step tutorial, which talks about downloading and transferring videos to Android device.
How to download and copy videos to Android
How To Download Videos On Android From Internet Speed
Step 1Connect Your Android to Computer
Run the program on your computer and connect your Android smartphone to the it via USB cable or Wireless network.
Step 2Download Videos Directly from YouTube
In this step, click 'YouTube' on the left column. You can see many on line resources are recommended to you on YouTube website. Directly select those you want to download on your computer.
Step 3Transfer Movies to Your Android
After successfully downloading your movies from YouTube, click 'video' below your device. Continue to click 'Add' and select your downloaded video for importing them to Android.
Note: If your videos format is compatible to Android device, the app will ask if you want to convert them to Android-optimized format, click '
yes'.
A few seconds later, your videos will be transferred successfully.
All the steps are so easy for users to follow that the program is popular among Android users. As a Android fan, why are you still waiting?