From cc50e7625600a2adbf53ddac5db0fc224c763d52 Mon Sep 17 00:00:00 2001 From: simono41 Date: Tue, 12 May 2020 08:47:03 +0200 Subject: [PATCH] fix --- youtube-dl.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/youtube-dl.sh b/youtube-dl.sh index ea4b683..e30bc2e 100755 --- a/youtube-dl.sh +++ b/youtube-dl.sh @@ -14,13 +14,17 @@ format="$2" if [ "$format" == "opus" ] then - format="-f 251 -x --audio-quality 0 --audio-format opus" + format="--audio-format opus" + audio="-x" + quality="--audio-quality 0" elif [ "$format" == "m4a" ] then - format="-f 140 -x --audio-quality 0 --audio-format m4a" + format="--audio-format m4a" + audio="-x" elif [ "$format" == "mp4" ] then - format="-f 140 -x --audio-quality 0 --audio-format mp4" + format="--audio-format mp4" + audio="-x" elif [ "$format" == "video" ] then format="-f 43" @@ -35,4 +39,4 @@ then format="-f 315+251" fi -youtube-dl -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames $format $url +youtube-dl -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames $format $audio $quality $url