mirror of
https://github.com/notwa/rc
synced 2024-11-05 05:59:04 -08:00
change dirs and pass vars for streaming
This commit is contained in:
parent
d78726b195
commit
2444ffdf45
1 changed files with 5 additions and 1 deletions
|
@ -51,6 +51,7 @@ watchstream1() {
|
|||
}
|
||||
|
||||
watchstream2() {
|
||||
pushd ~/play
|
||||
local url="$1"
|
||||
shift
|
||||
_mpv_flags
|
||||
|
@ -63,6 +64,7 @@ watchstream2() {
|
|||
livestreamer "$url" "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
||||
"$REPLY {filename}"
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
alias watchstream=watchstream1
|
||||
|
@ -80,6 +82,7 @@ hitbox() {
|
|||
}
|
||||
|
||||
yt() {
|
||||
pushd ~/play
|
||||
local vid="$1"
|
||||
# can't be bothered to use substrings since they differ across bash/zsh
|
||||
if [[ "$(head -c4 <<< "$vid")" != "http" ]]; then
|
||||
|
@ -87,7 +90,8 @@ yt() {
|
|||
fi
|
||||
mpv --af=lavfi="[$_M_PROCESS]" \
|
||||
--audio-samplerate=44100 --audio-format=s16 \
|
||||
--ytdl-format=22,best "$vid"
|
||||
--ytdl-format=22,best "$@" "$vid"
|
||||
popd
|
||||
}
|
||||
|
||||
_nn=
|
||||
|
|
Loading…
Reference in a new issue