mpvc
mpvc copied to clipboard
Weird terminal glitch
https://youtu.be/-RLFYJibT6k So this is happening to me (xst - bash) and my friend (alacritty - mksh[?]). When you start the mpvc, looks like it make a glitch that begin to hidden/blend/mix(?) some words in a level that even make the terminal stop working of receivecommands.
Im using VoidLinux. And thanks for the program!
How bizarre. I haven't run mpvc myself for a long time, but I should be jumping back on the linux bandwagon in a couple of weeks again. I'll take a look then.
In the meantime if possible use sh -x
to trace through the program when you run it and see if it stops unexpectedly, other issues, etc, I suspect it's probably the ipc interface to mpv causing this.
@necronoise Can you try using --no-terminal instead of --really-quiet at: https://github.com/lwilletts/mpvc/blob/998604e339479ea4d37c6568af627030b2a1c69c/mpvc#L256
@necronoise Can you try using --no-terminal instead of --really-quiet at:
Line 256 in 998604e exec mpv --really-quiet --idle=once --input-ipc-server="${SOCKET}" \
I tried but still the same.
I think I have been experiencing this myself, although to a lesser degree than shown in the video. mpvc keeps the input grabbed and only ^C returns control back to me. Basically, the script isn't ending properly at a certain point, just need to find it.
I've also noticed this.
Although not a complete fix, I've observed that at some point tty echo is disabled. So the easy fix was saving/restoring tty settings that at least mitigates the issue, although, it should be desirable to find what/why tty echo is being turned off.
Below is the change I did to avoid being left with tty echo disabled: https://github.com/gmt4/mpvc/commit/f34d0880bc24a770e03ca58330059ffbfb7d8c8c
I solved this problem by modifying this line https://github.com/lwilletts/mpvc/blob/52b56dd5e9beab0c625151255575364c02c89f1b/mpvc#L393 to this:
$MPVOPTIONS "$filename" > /dev/null 2>&1 &
I've been bitten by this too when using mpvc.
The issue is that mpv
defaults to --input-terminal Flag (default: yes)
(check mpv --list-options
). This means that when mpv is started with this option enabled, manages the terminal tty to react to the keyboard keys to pause/play/seek etc.
Once this is disabled, mpv stops managing the terminal tty, and the issue does not happen.
This can be easily done by setting MPVOPTIONS
as in https://github.com/gmt4/mpvc/commit/8a61c2ef288e64cae3689f7549a9d68cd625513a:
HTH
diff --git a/mpvc b/mpvc
index 137220f..e70634d 100755
--- a/mpvc
+++ b/mpvc
@@ -6,7 +6,7 @@
SOCKETCOMMAND=""
SOCKET=${MPVC_SOCKET:-/tmp/mpvsocket}
-MPVOPTIONS="--no-audio-display"
+MPVOPTIONS="--no-audio-display --no-input-terminal"
@lwilletts @edn9 @crshrprt
Should be solved then with the merge.