mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:49: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"
|
_M_LEVEL="$REPLY"
|
||||||
|
|
||||||
_nn="$(uname -n | tr A-Z a-z)"
|
_nn="$(uname -n | tr A-Z a-z)"
|
||||||
|
|
||||||
if [[ "$_nn" == "spectre" ]]; then
|
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
|
fi
|
||||||
if [[ "$_nn" == "banshee" ]]; then
|
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
|
fi
|
||||||
MPV_STREAM_FLAGS+=" $_M_PROCESS"
|
|
||||||
_nn=
|
|
||||||
|
|
||||||
watchstream() {
|
_mpv_flags() {
|
||||||
|
REPLY="$MPV_STREAM_FLAGS --af=lavfi=[$_M_PROCESS]"
|
||||||
|
}
|
||||||
|
|
||||||
|
watchstream1() {
|
||||||
local url="$1"
|
local url="$1"
|
||||||
shift
|
shift
|
||||||
|
_mpv_flags
|
||||||
if [ -n "$ZSH_VERSION" ]; then
|
if [ -n "$ZSH_VERSION" ]; then
|
||||||
# zsh syntax
|
# zsh syntax
|
||||||
mpv $=MPV_STREAM_FLAGS "$url"
|
mpv $=REPLY "$url"
|
||||||
else
|
else
|
||||||
# bash syntax
|
# bash syntax
|
||||||
mpv $MPV_STREAM_FLAGS "$url"
|
mpv $=REPLY "$url"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
watchstream2() {
|
watchstream2() {
|
||||||
local url="$1"
|
local url="$1"
|
||||||
shift
|
shift
|
||||||
|
_mpv_flags
|
||||||
if [ -n "$ZSH_VERSION" ]; then
|
if [ -n "$ZSH_VERSION" ]; then
|
||||||
# zsh syntax
|
# zsh syntax
|
||||||
livestreamer "$url" "$@" -p mpv $=LIVESTREAMER_FLAGS -a \
|
livestreamer "$url" "$@" -p mpv $=LIVESTREAMER_FLAGS -a \
|
||||||
"$MPV_STREAM_FLAGS {filename}"
|
"$REPLY {filename}"
|
||||||
else
|
else
|
||||||
# bash syntax
|
# bash syntax
|
||||||
livestreamer "$url" "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
livestreamer "$url" "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
||||||
"$MPV_STREAM_FLAGS {filename}"
|
"$REPLY {filename}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ "$_nn" == "banshee" ]]; then
|
||||||
|
alias watchstream=watchstream2
|
||||||
|
else
|
||||||
|
alias watchstream=watchstream1
|
||||||
|
fi
|
||||||
|
|
||||||
twitch() {
|
twitch() {
|
||||||
local user="$1"
|
local user="$1"
|
||||||
shift
|
shift
|
||||||
|
@ -71,3 +82,5 @@ hitbox() {
|
||||||
shift
|
shift
|
||||||
watchstream "http://hitbox.tv/$user" "$@"
|
watchstream "http://hitbox.tv/$user" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_nn=
|
||||||
|
|
Loading…
Reference in a new issue