How to save YouTube downloaded video to phone gallery I have downloaded a youtube video in my youtube app and I want to save this video to my phone gallery. What steps should I have to follow to do this?
I'm using Termux and youtube-dl python script. Here you have steps to install required software.


Install Termux https://play.google.com/store/apps/details?id=com.termux
Run Termux and paste following commands:


apt update

apt install python

pip install youtube-dl

Now you can download movies from YT

youtube-dl &lt;link to YouTube movie&gt;

But this is not comfortable way. Here are more steps to make it more user friendly.


Create dir in home:


mkdir ~/bin


Create file with your favorite editor. My is vim so I used it


vim ~/bin/termux-url-opener


Paste following content:


youtube-dl $1

and save file.


Make file executable:


chmod 700 ~/bin/termux-url-opener


Make Termux internal storage accessible.


termux-setup-storage

Accept access for Termux to internal storage


Create config file for youtube-dl:


mkdir -p ~/.config/youtube-dl

vim ~/.config/youtube-dl/config


Paste following config:


-o /data/data/com.termux/files/home/storage/movies/%(uploader)s-%(title)s.%(ext)s

Now if you want to save movie from YT simply open YouTube app, find movie, tap Share and choose Termux.



Movie will be saved in Movies directory in internal storage.