This release is a pre-release and may not be stable for production use.
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 preferssox(play), then triesmpg123,paplay, oraplayon Linux, andafplayon 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
- ovos-media: the media service this plugin's
opm.media.audioentry point serves. - ovos-plugin-manager: defines the
MediaBackend/AudioPlayerBackendand legacyAudioBackendbase classes this plugin implements. - ovos-media-plugin-mpv, ovos-media-plugin-vlc, ovos-media-plugin-mplayer, and ovos-media-plugin-ffplay: sibling audio-playback plugins for one specific player, instead of the generic CLI command this plugin wraps.
License
Apache-2.0, see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_media_plugin_cli-0.0.3a1.tar.gz.
File metadata
- Download URL: ovos_media_plugin_cli-0.0.3a1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671a3d8b9fde3d01407613ed77e9e0d41377efe57791abae5b82716334815963
|
|
| MD5 |
8f4c73b75542c4f2a85555567f75f65d
|
|
| BLAKE2b-256 |
71dbf166fc764c254cbe088e1c347793486c709f3f6766a98412547cb8c18cf7
|
File details
Details for the file ovos_media_plugin_cli-0.0.3a1-py3-none-any.whl.
File metadata
- Download URL: ovos_media_plugin_cli-0.0.3a1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6313a806a375f4e2c1989b263a2a58dfda804f678a845f4a28dce5aaff56669b
|
|
| MD5 |
1af966e8ff31f7c07a92b6558eda4e47
|
|
| BLAKE2b-256 |
e22cb4212aa6eb541e67021e2dcfc4afdee9747b8e6e57a1c983b133fac9e787
|