mpvd

usage: mpvd
or mpvc action [arguments...]

mpvd is a simple script for daemonization of mpv togther with a controller, mpvc. It works by creating a fifo that mpv then uses for command input.

Installation

Edit config.mk to match your local setup (mpvd is installed into the /usr/local namespace by default), then simply enter the following command to install (if necessary as root):

make install 

Example usage of mpvd

Start the daemon

mpvd & 

Send commands

# append file to playlist 
mpvc append mixtape.ogg 
 
# load file to playlist (overwrites current playlist) 
mpvc load better-mixtape.ogg 
 
# goto next track 
mpvc next 
 
# goto previous track 
mpvc prev 
 
# seek 23 seconds backwards 
mpvc seek -23 
 
# toggle play/pause 
mpvc toggle 
 
# lower sound 10 units (or append an ’a’ for lowering alsa sound 5%) 
mpvc lower; mpvc alower 
 
# raise sound 10 units (or append an ’a’ for raising alsa sound 5%) 
mpvc raise; mpvc araise 
 
# toggle mute (or append an ’a’ for toggeling alsa mute) 
mpvc mute; mpvc amute 
 
# set youtube-dl format 
mpvc ytdl-format best 

get source here.