mirror of
https://github.com/notwa/rc
synced 2024-06-26 09:07:12 -07:00
prefer yt-dlp
over youtube-dl
and work around throttling
This commit is contained in:
parent
fe7dff6403
commit
716d74ade2
|
@ -282,7 +282,7 @@ function {
|
||||||
for x in ack cd cp ebuild gcc gist grep ln man mkdir mv rm
|
for x in ack cd cp ebuild gcc gist grep ln man mkdir mv rm
|
||||||
alias $x="nocorrect ${aliases[$x][@]:-$x}"
|
alias $x="nocorrect ${aliases[$x][@]:-$x}"
|
||||||
for x in ai arith curl fc find ftp hex history let locate \
|
for x in ai arith curl fc find ftp hex history let locate \
|
||||||
rsync scp sftp tw twitch wget youtube-dl yt ytg
|
rsync scp sftp tw twitch wget yt-dlp yt ytg
|
||||||
alias $x="noglob ${aliases[$x][@]:-$x}"
|
alias $x="noglob ${aliases[$x][@]:-$x}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,16 +75,12 @@ mpv_watch() { ### @-
|
||||||
# checking for redundant flags might itself be redundant, but i want to be sure.
|
# checking for redundant flags might itself be redundant, but i want to be sure.
|
||||||
local seen=0
|
local seen=0
|
||||||
for a; do [ "$a" = "${a#--ytdl-format=}" ] || seen=1; done
|
for a; do [ "$a" = "${a#--ytdl-format=}" ] || seen=1; done
|
||||||
if [ $seen -eq 0 ]; then
|
|
||||||
mpv \
|
mpv \
|
||||||
--af=lavfi="[$_M_PROCESS]" \
|
--af=lavfi="[$_M_PROCESS]" \
|
||||||
--ytdl-format='[width<=1280]/best' \
|
--ytdl-format=best \
|
||||||
|
--ytdl-raw-options-append=compat-options=all \
|
||||||
"$@" -- "$url"
|
"$@" -- "$url"
|
||||||
else
|
|
||||||
mpv \
|
|
||||||
--af=lavfi="[$_M_PROCESS]" \
|
|
||||||
"$@" -- "$url"
|
|
||||||
fi
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +118,8 @@ ytg() { ### @-
|
||||||
### watch a youtube video. like `yt`, but with a preference for different formats.
|
### watch a youtube video. like `yt`, but with a preference for different formats.
|
||||||
argc -ge 1 "$0" "$@" || return
|
argc -ge 1 "$0" "$@" || return
|
||||||
local vid="$1"; shift
|
local vid="$1"; shift
|
||||||
yt "$vid" --ytdl-format=22/95/300/best "$@"
|
# --ytdl-format=22/95/300/best
|
||||||
|
yt "$vid" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
ytll() { ### @-
|
ytll() { ### @-
|
||||||
|
@ -148,6 +145,7 @@ ai() { # @-
|
||||||
asmr() { # @-
|
asmr() { # @-
|
||||||
# for your aural pleasure.
|
# for your aural pleasure.
|
||||||
argc -ge 1 "$0" "$@" || return
|
argc -ge 1 "$0" "$@" || return
|
||||||
|
# --ytdl-format=251/300/best
|
||||||
_M_PROCESS="acompressor=threshold=0.001:ratio=1.33:attack=900:release=6000:makeup=6:knee=8:mix=0.9,alimiter" \
|
_M_PROCESS="acompressor=threshold=0.001:ratio=1.33:attack=900:release=6000:makeup=6:knee=8:mix=0.9,alimiter" \
|
||||||
yt "$@" --volume=90 --ytdl-format=251/300/best
|
yt "$@" --volume=90
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user