[+] 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" format="$2"
[[ -z "${url}" ]] && read -p "URL: " url [[ -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" ] if [ "$format" == "opus" ]
then then
@ -21,6 +21,11 @@ then
audio="-x" audio="-x"
quality="--audio-quality 0" quality="--audio-quality 0"
elif [ "$format" == "m4a" ] elif [ "$format" == "m4a" ]
then
format="--audio-format flac"
audio="-x"
quality="--audio-quality 0"
elif [ "$format" == "m4a" ]
then then
format="--audio-format m4a" format="--audio-format m4a"
audio="-x" audio="-x"
@ -42,4 +47,4 @@ then
format="-f 315+251" format="-f 315+251"
fi 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