DOKK / manpages / debian 10 / playerctl / playerctl.1.en
PLAYERCTL(1) User Commands PLAYERCTL(1)

playerctl - utility to control media players via MPRIS

playerctl is a command line utility to control MPRIS-enabled media players. In addition to offering play/pause/stop control, playerctl also offers previous/next track support, the ability to seek backward/forward in a track, and volume control. playerctl also supports displaying metadata (e.g. artist/title/album) for the current track, and showing the status of the player.

Players that can be controlled using playerctl include audacious, cmus, mopidy, mpd, quod libet, rhythmbox, vlc and xmms2. However, any player that implements the MPRIS interface specification should be able to be controlled using playerctl.

The name or comma-separated list of the players to control (default: first available player)
The name or comma-separated list of the players to ignore
A format string for printing properties and metadata
Block and output the updated query when it changes
List the names of running players that can be controlled
Apply command to all available players
Print this help, then exit
Print version number, then exit

Get the current status of the player
Command the player to play
Command the player to pause
Command the player to toggle between play/pause
Command the player to stop
Command the player to skip to the next track
Command the player to skip to the previous track
Print the position of the current track in seconds. With OFFSET specified, seek to OFFSET seconds from the start of the current track. With the optional [+|-] appended, seek forward/backward OFFSET seconds from the current position.
Print the player's volume scaled from 0.0 (0%) to 1.0 (100%). With LEVEL specified, set the player's volume to LEVEL. With the optional [+|-] appended, increase/decrease the player's volume by LEVEL.
Print available metadata information for the current track. When KEY is specified, print the value of KEY.
Open the given URI in the player. The URI may be the name of a file or an external URL.
Print the shuffle status of the player. With the shuffle status specified, set shuffle to either On or Off.
Print the loop status of the player. With the loop status specified, set the loop status to either None to not loop, Track to loop the current track, or Playlist to loop the current playlist.

A format string can be given with the --format argument to print properties and metadata in a particular format. Variable names between curly braces in the form of {{ VARIABLE }} will be expanded to their values. The available variables are the names of the commands that print properties or any of the metadata keys that can be viewed with the metadata command. The name of the player is also available with the playerName variable.

Several helper functions are available in the template language to transform expanded values which can be called in the form {{ HELPER(VARIABLE) }}. The available helper functions are:

Convert the value to lowercase
Convert the value to uppercase
When called on a duration such as position or mpris:length, convert the duration to hh:mm:ss form

playerctl metadata --format '{{playerName}}: {{lc(status)}} {{duration(position)}}|{{duration(mpris:length)}}'

October 2018 playerctl 2.0.1