ovos-media-plugin-cli

July 31, 2026 ยท View on GitHub

Generic command-line playback plugin for ovos-media, and for the legacy ovos-audio service.

The plugin plays a track by running a command-line media player as a subprocess. Point it at any player command, or let it auto-detect the best available one for your platform.

  • Explicit command: set command (for example "mpv --no-terminal", "cvlc --play-and-exit", "ffplay -nodisp -autoexit"). The plugin appends the track URI as the final argument.
  • Auto-detect (default): when you do not set a command, the plugin picks the best available player for your platform through shutil.which. It prefers sox (play), then tries mpg123, paplay, or aplay on Linux, and afplay on macOS.

Pause and resume use process signals (SIGSTOP/SIGCONT). Stop terminates the child process.

Install

pip install ovos-media-plugin-cli

Install sox too. It gives the widest format and URL coverage when the plugin auto-detects a player.

Configuration

New ovos-media:

{
  "media": {
    "preferred_audio_services": ["mplayer", "vlc", "cli"],
    "audio_players": {
      "cli": {
        "module": "ovos-media-audio-plugin-cli",
        "aliases": ["Command line", "CLI Player"],
        "active": true,
        "command": "mpv --no-terminal"
      }
    }
  }
}

Omit command to auto-detect. Legacy ovos-audio:

{
  "Audio": {
    "backends": {
      "cli": { "type": "cli", "active": true, "command": "mpv --no-terminal" }
    }
  }
}

Keys

KeyTypeDefaultDescription
command (alias play_cmd)strauto-detectCLI player command. The plugin appends the URI as the last argument.
activebooltrueEnable or disable this backend instance.

Entry points

GroupNameObject
opm.media.audioovos-media-audio-plugin-cliovos_media_plugin_cli:CLIAudioService
mycroft.plugin.audioserviceovos_cliovos_media_plugin_cli.audio

License

Apache-2.0, see LICENSE.