A remote for Unified Remote to control mpv over IPC.
Benefits of IPC:
-
Keyboard-layout agnostic
Keystrokes are interpreted and converted by the operating system, so only standard qwerty might work as expected. This remote does not use keystrokes, but crafted messages to communicate and control mpv.
-
Key-binding agnostic
Configuring mpv to use non-default key bindings might make other remotes unusable or behave strangely. This remote doesn't use key bindings.
-
Window-focus agnostic
Keystrokes require mpv to be the focused window by the operating system. In case it loses focus, the keystrokes will be sent to the wrong program, and other remotes will stop working. This remote can communicate with mpv even if mpv is hidden or minimized, by using the file system.
Drawbacks of IPC:
-
IPC must be configured
The IPC is not enabled by default in mpv. See usage below.
-
No support for Microsoft Windows
Although mpv supports named pipes under Windows, this remote has currently no support for using them. Add an issue or pull request for it.
-
Controlling multiple instances of mpv is a hassle
It is possible to start multiple mpv instances, but changing which instance the remote communicates with is a bit of a hassle, albeit doable.
-
Install Unified Remote.
-
Clone this repository to the directory containing the remotes.
-
Start or restart the Unified Remote server.
-
Configure mpv to enable the IPC server.
This can be done by either specifying
--input-ipc-server=/tmp/mpv-socket
to the command line when startingmpv
, or by adding it to mpv's configuration file to have it on by default. -
Open the remote on your other device. It should try to connect automatically when started, and when trying to send a command.