mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:39:03 -08:00
more stream crap
This commit is contained in:
parent
4edd550f9c
commit
2e338c2747
1 changed files with 22 additions and 9 deletions
|
@ -25,41 +25,52 @@ getladspa crap_level
|
|||
_M_LEVEL="$REPLY"
|
||||
|
||||
_nn="$(uname -n | tr A-Z a-z)"
|
||||
|
||||
if [[ "$_nn" == "spectre" ]]; then
|
||||
_M_PROCESS="--af=lavfi=[$_M_STEREO,$_M_KILL,alimiter=level_out=0.7071]"
|
||||
_M_PROCESS="$_M_KILL,alimiter=level_out=0.7071"
|
||||
fi
|
||||
if [[ "$_nn" == "banshee" ]]; then
|
||||
_M_PROCESS="--af=lavfi=[$_M_STEREO,$_M_LEVEL,$_M_SPEAKERS,alimiter=level_in=0.5]"
|
||||
_M_PROCESS="$_M_LEVEL,$_M_SPEAKERS,alimiter=level_in=0.5"
|
||||
fi
|
||||
MPV_STREAM_FLAGS+=" $_M_PROCESS"
|
||||
_nn=
|
||||
|
||||
watchstream() {
|
||||
_mpv_flags() {
|
||||
REPLY="$MPV_STREAM_FLAGS --af=lavfi=[$_M_PROCESS]"
|
||||
}
|
||||
|
||||
watchstream1() {
|
||||
local url="$1"
|
||||
shift
|
||||
_mpv_flags
|
||||
if [ -n "$ZSH_VERSION" ]; then
|
||||
# zsh syntax
|
||||
mpv $=MPV_STREAM_FLAGS "$url"
|
||||
mpv $=REPLY "$url"
|
||||
else
|
||||
# bash syntax
|
||||
mpv $MPV_STREAM_FLAGS "$url"
|
||||
mpv $=REPLY "$url"
|
||||
fi
|
||||
}
|
||||
|
||||
watchstream2() {
|
||||
local url="$1"
|
||||
shift
|
||||
_mpv_flags
|
||||
if [ -n "$ZSH_VERSION" ]; then
|
||||
# zsh syntax
|
||||
livestreamer "$url" "$@" -p mpv $=LIVESTREAMER_FLAGS -a \
|
||||
"$MPV_STREAM_FLAGS {filename}"
|
||||
"$REPLY {filename}"
|
||||
else
|
||||
# bash syntax
|
||||
livestreamer "$url" "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
||||
"$MPV_STREAM_FLAGS {filename}"
|
||||
"$REPLY {filename}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$_nn" == "banshee" ]]; then
|
||||
alias watchstream=watchstream2
|
||||
else
|
||||
alias watchstream=watchstream1
|
||||
fi
|
||||
|
||||
twitch() {
|
||||
local user="$1"
|
||||
shift
|
||||
|
@ -71,3 +82,5 @@ hitbox() {
|
|||
shift
|
||||
watchstream "http://hitbox.tv/$user" "$@"
|
||||
}
|
||||
|
||||
_nn=
|
||||
|
|
Loading…
Reference in a new issue