# altdesktop/playerctl

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/altdesktop-playerctl).**

2,851 stars · 95 forks · C · lgpl-3.0

## Links

- GitHub: https://github.com/altdesktop/playerctl
- awesome-repositories: https://awesome-repositories.com/repository/altdesktop-playerctl.md

## Topics

`audacious` `c` `cli` `cmus` `mediaplayer` `mopidy` `mpd` `mpris` `rhythmbox` `vlc`

## Description

Playerctl is a command-line utility and library for controlling media players that adhere to the MPRIS specification. It communicates with media players over D-Bus, allowing users to issue playback commands, retrieve track metadata, and monitor playback status in real time.

The tool supports targeting a specific player by name, controlling all active players simultaneously, or following the most recently active one. It provides an event-driven subscription model for receiving real-time updates on track changes and playback state without polling, and includes a Python library for scripting integration.

Playerctl offers comprehensive playback control including play, pause, stop, next, previous, seek, and volume commands, along with the ability to toggle shuffle and repeat modes. It also enables continuous output of metadata and status changes for use in desktop status bars and scripts.

## Tags

### Data & Databases

- [D-Bus Signal Subscriptions](https://awesome-repositories.com/f/data-databases/event-driven-subscription-systems/d-bus-signal-subscriptions.md) — Uses D-Bus signal listeners to receive real-time updates on track changes, playback state, and metadata without polling.

### Development Tools & Productivity

- [Media Playback Controllers](https://awesome-repositories.com/f/development-tools-productivity/command-line-interface-controllers/media-playback-controllers.md) — Sends play, pause, stop, next, and previous commands to MPRIS-compatible media players over D-Bus. ([source](https://github.com/altdesktop/playerctl/tree/master/doc/reference))
- [Media Metadata Retrievers](https://awesome-repositories.com/f/development-tools-productivity/integration-metadata-retrievers/media-metadata-retrievers.md) — Prints the current track's artist, title, album, and other metadata for display in status bars or scripts. ([source](https://cdn.jsdelivr.net/gh/altdesktop/playerctl@master/README.md))
- [Python Bindings](https://awesome-repositories.com/f/development-tools-productivity/automation-scripting-engines/media-player-scripting-engines/python-bindings.md) — Automating media player control and event monitoring through scripting languages like Python.
- [Scripting Libraries](https://awesome-repositories.com/f/development-tools-productivity/command-line-interface-controllers/media-playback-controllers/scripting-libraries.md) — Provides an introspectable library to subscribe to player events and control playback from Python and other languages. ([source](https://cdn.jsdelivr.net/gh/altdesktop/playerctl@master/README.md))
- [Seek and Volume Commands](https://awesome-repositories.com/f/development-tools-productivity/command-line-interface-controllers/media-playback-controllers/seek-and-volume-commands.md) — Sends play, pause, stop, next, previous, seek, and volume commands to any MPRIS-compatible media player. ([source](https://cdn.jsdelivr.net/gh/altdesktop/playerctl@master/README.md))

### Graphics & Multimedia

- [Seek Controls](https://awesome-repositories.com/f/graphics-multimedia/media-playback-controls/seek-controls.md) — Moves the playback position forward or backward by a specified time offset within the current track. ([source](https://github.com/altdesktop/playerctl/tree/master/doc/reference))
- [Player Discovery](https://awesome-repositories.com/f/graphics-multimedia/media-players/player-discovery.md) — Enumerates all media players currently registered on the D-Bus session bus for targeting. ([source](https://github.com/altdesktop/playerctl/tree/master/doc/reference))
- [Player Selection Strategies](https://awesome-repositories.com/f/graphics-multimedia/media-players/player-selection-strategies.md) — Targets a specific media player by name, controls all players simultaneously, or follows the most recently active one. ([source](https://cdn.jsdelivr.net/gh/altdesktop/playerctl@master/README.md))
- [Multi-Player Management](https://awesome-repositories.com/f/graphics-multimedia/media-players/multi-engine-players/multi-player-management.md) — Managing multiple active media players simultaneously, targeting specific players or controlling all at once.
- [Multi-Player Targeting](https://awesome-repositories.com/f/graphics-multimedia/media-players/multi-engine-players/multi-player-targeting.md) — Supports addressing a single player by name, all players simultaneously, or the most recently active player via D-Bus name matching.
- [Playback Sequence Modes](https://awesome-repositories.com/f/graphics-multimedia/playback-sequence-modes.md) — Toggles shuffle or repeat modes on a media player to alter playback order. ([source](https://github.com/altdesktop/playerctl/tree/master/doc/reference))

### Networking & Communication

- [MPRIS Protocol Implementations](https://awesome-repositories.com/f/networking-communication/network-protocol-implementations/protocol-specifications/mpris-protocol-implementations.md) — Implements the MPRIS specification to issue standardised playback commands and read metadata from any compatible media player.

### Programming Languages & Runtimes

- [Continuous Output Streams](https://awesome-repositories.com/f/programming-languages-runtimes/async-i-o-runtimes/blocking-i-o-offloading/continuous-output-streams.md) — Blocks on D-Bus event streams to continuously output metadata or status changes for use in scripts and status bars.

### Software Engineering & Architecture

- [D-Bus Desktop Services](https://awesome-repositories.com/f/software-engineering-architecture/message-bus-systems/d-bus-desktop-services.md) — Communicates with media players by sending and receiving structured messages over the D-Bus inter-process communication bus.
- [Python Bindings](https://awesome-repositories.com/f/software-engineering-architecture/library-interfaces/python-bindings.md) — Exposes a Python library with bindings to subscribe to player events and control playback programmatically.

### System Administration & Monitoring

- [Playback Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/playback-monitoring.md) — Following real-time playback changes, outputting track metadata and status updates as they occur.

### User Interface & Experience

- [Desktop Environment Status Bar Integrations](https://awesome-repositories.com/f/user-interface-experience/status-bars/desktop-environment-status-bar-integrations.md) — Displaying current track metadata and playback status in desktop status bars, panels, or scripts.
