[+] Add Flac option

This commit is contained in:
user1 2022-07-06 18:59:56 +02:00
parent f318fac487
commit 089ff24f7d

View file

@ -13,7 +13,7 @@ url="$1"
format="$2"
[[ -z "${url}" ]] && read -p "URL: " url
[[ -z "${format}" ]] && read -p "Format [opus/m4a/video/hd/fullhd/4k]: " format
[[ -z "${format}" ]] && read -p "Format [opus/flac/m4a/video/hd/fullhd/4k]: " format
if [ "$format" == "opus" ]
then
@ -21,6 +21,11 @@ then
audio="-x"
quality="--audio-quality 0"
elif [ "$format" == "m4a" ]
then
format="--audio-format flac"
audio="-x"
quality="--audio-quality 0"
elif [ "$format" == "m4a" ]
then
format="--audio-format m4a"
audio="-x"
@ -42,4 +47,4 @@ then
format="-f 315+251"
fi
yt-dlp -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames --embed-thumbnail $format $audio $quality $url
yt-dlp -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames --embed-thumbnail --embed-metadata $format $audio $quality $url