add bestaudio option
This commit is contained in:
parent
3bb7af4758
commit
4b8c6d16b0
1 changed files with 6 additions and 2 deletions
|
@ -5,7 +5,7 @@ set -ex
|
|||
if [ "$1" == "--help" ]
|
||||
then
|
||||
echo "bash ./youtube-dl.sh URL FORMAT"
|
||||
echo "Formate: [opus/m4a/video/hd/fullhd/4k]"
|
||||
echo "Formate: [opus/m4a/video/hd/fullhd/4k/bestaudio]"
|
||||
echo "Extra: (Zusätzliche Parameter)"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -15,7 +15,7 @@ format="$2"
|
|||
extra="$3"
|
||||
|
||||
[[ -z "${url}" ]] && read -p "URL: " url
|
||||
[[ -z "${format}" ]] && read -p "Format [opus/flac/m4a/mp4/video/hd/fullhd/4k]: " format
|
||||
[[ -z "${format}" ]] && read -p "Format [opus/flac/m4a/mp4/video/hd/fullhd/4k/bestaudio]: " format
|
||||
echo "Wenn man für alle Playlisten Unterordner anlegen will: [-o %(playlist_title)s/%(title)s.%(ext)s/--cookies cookies.txt/--cookies-from-browser firefox] (Praktisch für Downloads ganzer Kanäle"
|
||||
[[ -z "${extra}" ]] && read -p "Sind noch zusätzliche Parameter gewünscht?: " extra
|
||||
|
||||
|
@ -57,6 +57,10 @@ then
|
|||
elif [ "$format" == "4k" ]
|
||||
then
|
||||
format="-S "res:2160" -f "bv+ba/b""
|
||||
elif [ "$format" == "bestaudio" ]
|
||||
then
|
||||
# Lädt das beste Audioformat OHNE Umwandlung (z.B. Opus/WebM oder AAC/M4A)
|
||||
format="-f bestaudio"
|
||||
fi
|
||||
|
||||
yt-dlp -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames --embed-thumbnail --embed-metadata --match-filter "!was_live" ${format} ${audio} ${quality} -v ${url} ${extra}
|
||||
|
|
Loading…
Add table
Reference in a new issue