However, if you just use the one IPC socket (/tmp/socket), whenever a new instance of mpv is launched, the old instance gets disconnected. To solve th

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2025-07-28 17:30:24

However, if you just use the one IPC socket (/tmp/socket), whenever a new instance of mpv is launched, the old instance gets disconnected.

To solve this, the mpv wrapper script creates a unique IPC socket for each mpv instance launched at /tmp/mpvsockets using their launch time.

mpv-active-sockets removes any inactive (leftover socket files from instances which have been quit) mpv sockets, and lists active mpv sockets

mpv-communicate is a basic socat wrapper to send commands to the IPC server. (sends all additional arguments to the socket described by the first argument)

mpv-get-property interpolates the second argument into the get_property command syntax, but is practically no different from mpv-communicate

mpv-currently-playing fetches information about the currently playing mpv instance(s). If there are multiple sockets, prints multiple lines, with one for each socket.

By default that will print the full path of the file that's currently playing, but you can provide the --socket flag to print the sockets instead.

Leave a Comment
Related Posts