Skip to content

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ovos-media-plugin-cli

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

Key Type Default Description
command (alias play_cmd) str auto-detect CLI player command. The plugin appends the URI as the last argument.
active bool true Enable or disable this backend instance.

Entry points

Group Name Object
opm.media.audio ovos-media-audio-plugin-cli ovos_media_plugin_cli:CLIAudioService
mycroft.plugin.audioservice ovos_cli ovos_media_plugin_cli.audio

Related projects

License

Apache-2.0, see LICENSE.

About

Generic CLI-command playback plugin for ovos-media (and the legacy ovos-audio service)

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages