To remotely control mpv(for example, from another terminal session), you can also start it using the option
--input-ipc-server=/tmp/mpvsocket
and control it by invoking commands as follows:
echo '{ "command": ["set_property", "pause", true] }' | socat - /tmp/mpvsocket
See details man mpvfor (a lot).
edit: see also mpv --list-properties
edit2: The easiest way I discovered to “pause” pause / play is
{"command": ["cycle", "pause"]}
source
share