An mpc-like control interface for mpv

Hello mpv lovers, I 've just discovered this program or script if you which that controls mpv by the command line just like mpc does with mpd.
mpvc will control mpv as soon as you edit your .config/mpv/mpv.conf file by adding:


And for those who want to fit in your polybar here is a dirty script:


if [[ $(pidof mpv) ]]; then
	METADATA=$(echo '{ "command": ["get_property", "media-title"] }' | socat - /tmp/mpvsocket | awk -F '"' '{print $4}')
	echo "$METADATA"

Now if you use youtube-viewer, modify the mpv player arguments by changing at line 84:

   arg => "--really-quiet --title=*TITLE* --no-ytdl",


    arg => "--really-quiet --media-title=*TITLE* --no-ytdl",

Now polybar module:

type = custom/script
exec = your script path
tail = true
label = %output%
label-maxlen = 70
label-padding = 1
label-foreground = ${colors.yellow2}
format = <label>
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-padding = 1

Hope you’ll like it. :wink:


Thx for sharing @archus . Appreciated, might be useful to members of the forum

Yet another good discovery.