Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/data/data/com.termux/files/usr/bin/bash
- echo "For audio only press 1"
- echo "For video 360p press 2"
- echo "For video 480p press 3"
- echo "For video 720p(MHD) press 4"
- echo "For video 1080p(HD) press 5"
- echo "For video 1440p(QHD)press 6"
- echo "For video 2160p(4K) press 7"
- echo "For video format press 8"
- command='-no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -i -f'
- read option
- if [ "$option" -eq "1" ]
- then
- echo "$command 140 --embed-thumbnail" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "2" ]
- then
- echo "$command \"best[height<=360][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "3" ]
- then
- echo "$command \"best[height<=480][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "4" ]
- then
- echo "$command \"best[height<=720][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "5" ]
- then
- echo "$command \"best[height<=1080][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "6" ]
- then
- echo "$command \"best[height<=1440][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "7" ]
- then
- echo "$command \"best[height<=2160][ext=mp4]\"" > ~/.config/youtube-dl/config
- youtube-dl $1
- elif [ "$option" -eq "8" ]
- then
- echo "available video formats \n"
- echo "$command -F" > ~/.config/youtube-dl/config
- youtube-dl $1
- echo "Enter video format \n"
- read num
- echo "$command $num" > ~/.config/youtube-dl/config
- youtube-dl $1
- fi
Add Comment
Please, Sign In to add comment