Created
August 7, 2019 22:44
-
-
Save i3p9/12896ee624b281d6140f52fce7fbfd85 to your computer and use it in GitHub Desktop.
Setup Youtube-dl env on Termux Android (Downloads via Share sheet on youtube app)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo $'\n' | |
echo '===Step 1 of 3: Asking for Storage Permission===' | |
sleep 2; | |
termux-setup-storage | |
sleep 2; | |
echo '===Step 1 of 3 Completed===' | |
sleep 1; | |
echo '===Step 2 of 3: Updating/Installing dependencies===' | |
echo '===Updating and installing python, curl, ffmpeg. atomicparsley and youtub-dl===' | |
echo '===This might take a while, depending on your internet connection...===' | |
sleep 3; | |
pkg up -y | |
pkg install python -y | |
pkg install ffmpeg -y | |
pkg install atomicparsley -y | |
pip install youtube-dl | |
echo $'\n' | |
sleep 1; | |
echo '===Step 2 Completed===' | |
echo '===Step 3 of 3: Creating YoutubeDL folder and linking it to Share Sheet===' | |
echo $'.\n.\n.\n' | |
mkdir /data/data/com.termux/files/home/storage/shared/Youtube | |
mkdir -p ~/.config/youtube-dl | |
cd ~/.config/youtube-dl | |
echo $'--no-mtime \n-o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s \n-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4" \n--embed-thumbnail \n--add-metadata' >config | |
mkdir ~/bin | |
cd ~/bin | |
echo $'youtube-dl $1' >termux-url-opener | |
echo '===All DONE.===' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment