2017-07-08 14:30:31 +02:00
|
|
|
#!/system/xbin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2017-05-31 13:12:29 +02:00
|
|
|
read -p "Wie ist die URL? : " url
|
|
|
|
read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
|
2017-07-08 14:30:31 +02:00
|
|
|
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST/60k] : " format
|
2017-05-31 13:12:29 +02:00
|
|
|
|
|
|
|
if [ "$format" == "opus" ]
|
|
|
|
then
|
2017-06-23 20:01:57 +02:00
|
|
|
format="-f 251"
|
2017-05-31 13:12:29 +02:00
|
|
|
elif [ "$format" == "audio" ]
|
|
|
|
then
|
2017-06-23 20:01:57 +02:00
|
|
|
format="-f 140"
|
|
|
|
elif [ "$format" == "video" ]
|
|
|
|
then
|
|
|
|
format="-f 43"
|
2017-07-08 14:30:31 +02:00
|
|
|
elif [ "$format" == "60k" ]
|
|
|
|
then
|
|
|
|
format="-f 303+251"
|
2017-05-31 13:12:29 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $pfad
|
2017-06-23 20:01:57 +02:00
|
|
|
|
2017-05-31 13:12:29 +02:00
|
|
|
cd $pfad
|
2017-07-08 14:30:31 +02:00
|
|
|
pwd
|
|
|
|
/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/bin/youtube-dl --ffmpeg-location /data/data/com.termux/files/usr/bin/ffmpeg -i --socket-timeout 10000 $format $url
|
2017-05-31 13:12:29 +02:00
|
|
|
|
|
|
|
# ROOT_SHELL="$PREFIX/bin/bash"
|
|
|
|
|
|
|
|
# ROOT_HOME=$HOME/.suroot
|
|
|
|
|
|
|
|
# mkdir -p .suroot
|
|
|
|
|
|
|
|
# su --preserve-environment -c "LD_LIBRARY_PATH=$PREFIX/lib HOME=$ROOT_HOME $ROOT_SHELL"
|
|
|
|
|
|
|
|
# cd /storage/emulated/0/
|
|
|
|
|
|
|
|
# /system/xbin/bash ./youtube-dl-android.sh
|