Scroll to navigation

MPRIS-CTL(1) General Commands Manual MPRIS-CTL(1)

NAME

mpris-ctl - MPRIS media-player control utility

SYNOPSIS

mpris-ctl [OPTIONS...] [COMMAND]

DESCRIPTION

mpris-ctl is a control utility for any media-player that conforms to the MPRIS D-Bus Interface Specification[1]

OPTIONS

--player active | inactive | <name ...>

Specifies which player(s) the command should be addressed to. The valid values are:

active

all players that are currently in Playing state.
inactive
all players that are currently in a Stopped or Paused state.
<name ...>
specific player names, separated by spaces.

To consider all players both active and inactive you must pass the the option twice, once for each state: --player active --player inactive

COMMANDS

play

Begin playing.

pp

Toggle play or pause.

shuffle [on|off]

Change shuffle mode to on or off.

If both arguments are absent, the mode is toggled.

repeat [--track|--playlist][on|off]

Change the loop status to on or off.

If the both arguments are absent the mode is toggled.

The --track/--playlist flag controls if the repeat mode should be for the current track or for the whole playlist.

pause

Pause the player.

stop

Stop the player.

next

Change to the next track playlist.

prev

Change to the previous track in the playlist.

seek [-][time][unit]

Seek forwards in the track for given time. The time value can be a floating point number as understood by the current locale.

The unit can be one of: s: seconds (default), ms: milliseconds, m: minutes

A negative value seeks backwards.

The default is 5 seconds.

status

Get the playback status. Equivalent to the info %play_status action.

list

Get the name of the running player(s). Equivalent to the info %player_name action.

info [format string]

Print information about the current track. format string can include any of the following FORMAT SPECIFIERS.

FORMAT SPECIFIERS

%player_name

prints the name of the media-player.

%track_name

prints the track name.

%track_number

prints the track number.

%track_length

prints the track length in seconds.

%artist_name

prints the artist name.

%album_name

prints the album name.

%album_artist

prints the album artist.

%art_url

prints the URL of the cover art image.

%play_status

prints the playback status.

%shuffle

prints the shuffle mode.

%volume

prints the volume level.

%loop_status

prints the loop status.

%position

prints the position, in seconds, in the current track.

%bitrate

prints the track bit-rate.

%comment

prints the track comment.

%full

prints all available information.

EXAMPLE

mpris-ctl info %full

Player name:	Spotify
Play status:	Playing
Track:		Song 2
Artist:		Blur
Album:		Blur: The Best Of
Album Artist:	Blur
Art URL:		https://open.spotify.com/image/7731a6d23ed9f82ea94e89b248450eb00f044a1b
Track:		2
Length:		121.88s
Volume:		0.00
Loop status:	None
Shuffle:		false
Position:		0.00s
Bitrate:		0
Comment:

NOTES

1. MPRIS D-Bus Interface Specification

2025-02-23