fix
This commit is contained in:
parent
f794691f88
commit
715d1e9aae
2 changed files with 28 additions and 8 deletions
|
@ -1,21 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
read -p "Wie ist die URL? : " url
|
||||
read -p "Soll ein Video heruntergeladen werden oder Audio? [audio/video/opus] : " format
|
||||
read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad
|
||||
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST] : " format
|
||||
|
||||
if [ "$format" == "opus" ]
|
||||
then
|
||||
format=251
|
||||
format="-f 251"
|
||||
elif [ "$format" == "audio" ]
|
||||
then
|
||||
format=140
|
||||
else
|
||||
#video
|
||||
format=43
|
||||
format="-f 140"
|
||||
elif [ "$format" == "video" ]
|
||||
then
|
||||
format="-f 43"
|
||||
fi
|
||||
|
||||
mkdir -p $pfad
|
||||
|
||||
cd $pfad
|
||||
youtube-dl -i -f $format $url
|
||||
youtube-dl -i $format $url
|
||||
|
|
20
youtube.sh
20
youtube.sh
|
@ -1 +1,19 @@
|
|||
youtube-dl -q -f 43 -o- $url | mplayer -cache 8192 -
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
read -p "Wie ist die URL? : " url
|
||||
read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST] : " format
|
||||
|
||||
if [ "$format" == "opus" ]
|
||||
then
|
||||
format="-f 251"
|
||||
elif [ "$format" == "audio" ]
|
||||
then
|
||||
format="-f 140"
|
||||
elif [ "$format" == "video" ]
|
||||
then
|
||||
format="-f 43"
|
||||
fi
|
||||
|
||||
youtube-dl -q $format -o- $url | mplayer -cache 8192 -
|
||||
|
|
Loading…
Reference in a new issue