final-fix

This commit is contained in:
simono41 2018-03-24 03:33:14 +01:00
parent 1b1aad6433
commit b1c063bcc6

View file

@ -6,7 +6,7 @@ if [ "$1" == "--help" ] || [[ -z "$1" ]]
then then
echo "bitte alles kleinschreiben" echo "bitte alles kleinschreiben"
echo "bash ./youtube-dl.sh SUCHE/NOSUCHE URL/SUCHE FORMAT OUTPUT" echo "bash ./youtube-dl.sh SUCHE/NOSUCHE URL/SUCHE FORMAT OUTPUT"
echo "Formate: [opus/m4a/video/hd/fullhd/4k]" echo "Formate: [VERYLOW/LOW/MEDIUM/HIGH]"
exit 0 exit 0
fi fi
@ -22,36 +22,34 @@ else
fi fi
if [ -z ${output} ]; then if [ -z ${output} ]; then
output="hdmi" output="local"
fi
if [ "$format" == "verylow" ]
then
format="-f 17"
elif [ "$format" == "low" ]
then
format="-f 36"
elif [ "$format" == "medium" ]
then
format="-f 18"
#elif [ "$format" == "high" ]
else
#then
format="-f 22"
fi fi
#read -p "Wie ist die URL? : " url #read -p "Wie ist die URL? : " url
#read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad #read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
#read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/m4a/video/hd/fullhd/4k] : " format #read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/m4a/video/hd/fullhd/4k] : " format
if [ "$format" == "opus" ]
then
format="-f 251"
elif [ "$format" == "m4a" ]
then
format="-f 140"
elif [ "$format" == "video" ]
then
format="-f 43"
elif [ "$format" == "hd" ]
then
format="-f 247+251"
elif [ "$format" == "fullhd" ]
then
format="-f 303+251"
elif [ "$format" == "4k" ]
then
format="-f 315+251"
fi
if [ "$suche" == "suche" ] if [ "$suche" == "suche" ]
then then
omxplayer -p -o ${output} `youtube-dl -g "ytsearch:$url" -q --force-ipv4 $format` #omxplayer -p -o ${output} `youtube-dl -g "ytsearch:$url" -q --force-ipv4 $format`
/usr/bin/omxplayer.bin -I -s -o ${output} --vol -800 --aspect-mode letterbox --no-osd `youtube-dl -g "ytsearch:$url" -q --force-ipv4 ${format}`
else else
omxplayer -p -o ${output} `youtube-dl -g $url -q --force-ipv4 $format` #omxplayer -p -o ${output} `youtube-dl -g $url -q --force-ipv4 $format`
/usr/bin/omxplayer.bin -I -s -o ${output} --vol -800 --aspect-mode letterbox --no-osd `youtube-dl -g $url -q --force-ipv4 ${format}`
fi fi