commit 1d7ca00
hovercats
·
2025-02-09 11:28:21 +0000 UTC
parent 0ef91a7
ytdl: use yt-dlps builtin filter to select format and size. | force webm, because mp4 seems to default to av1, which I cant play
1 files changed,
+1,
-3
M
rc/ytdl
M
rc/ytdl
+1,
-3
1@@ -16,6 +16,4 @@ if (~ $#* 0){
2 if (~ $1 -n) proxy='' && url=$2
3 if not url=$1
4
5-val=`{yt-dlp -F $url | grep '1080p' | tail -n 1 | awk '{print $1}'}
6-if (~ $#val 0) val=bestvideo
7-exec yt-dlp -P $DLDIR -f $val+bestaudio $url$proxy
8+exec yt-dlp -P $DLDIR -f 'bestvideo[ext=webm][height<=1080]+bestaudio' $url$proxy