Pre-release
This release is a pre-release and may not be stable for production use.
ovos-media-plugin-ffplay
This plugin adds ffplay as an audio backend for ovos-audio and ovos-media. It plays media through the ffplay command from FFmpeg.
Install
pip install ovos-media-plugin-ffplay
Configuration
Edit your mycroft.conf file to expose the ffplay backend.
{
"Audio": {
"backends": {
"ffplay": {
"type": "ovos_ffplay",
"active": true
}
}
}
}
Python usage
The FFPlayAudioPlayer class gives direct access to ffplay.
import time
from ovos_media_plugin_ffplay.ffplay import FFPlayAudioPlayer
# Example usage: playing an MP3 file from a URL
url = "https://github.com/OpenVoiceOS/ovos-skill-easter-eggs/raw/refs/heads/dev/sounds/sing/drnimpo-robots.mp3"
# Create player instance
player = FFPlayAudioPlayer()
# Play media
player.play(url, volume=100)
print(f"Playback time: {player.playback_time} ms")
time.sleep(5)
print(f"Playback time: {player.playback_time} ms")
# Pause media
player.pause()
time.sleep(2)
print(f"Playback time: {player.playback_time} ms")
# Resume media
player.resume()
time.sleep(1)
player.set_track_position(65)
print(f"Playback time: {player.playback_time} ms")
print(f"Volume: {player.volume}")
time.sleep(3)
player.set_volume(30)
print(f"Volume: {player.volume}")
time.sleep(6)
player.set_volume(70)
print(f"Volume: {player.volume}")
player.wait_for_end_of_playback()
Related projects
- OpenVoiceOS/ovos-audio: the audio service that loads this plugin
- OpenVoiceOS/ovos-media: the media service that loads this plugin
Metadata
Release files for ovos-media-plugin-ffplay 0.0.4a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ovos_media_plugin_ffplay-0.0.4a1.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_media_plugin_ffplay-0.0.4a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / ovos_media_plugin_ffplay-0.0.4a1.tar.gz
| Download URL | ovos_media_plugin_ffplay-0.0.4a1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cc7511faf9a9ba9dff2186e3d9dbaedab6c6d9939ce4fe86de1c7ead22ed895
|
|
BLAKE2b-256 checksum How to use checksums |
e739e6409af3aa0dbffabab0c9c0d77f87dba030ba3d40741fc5e14b5278554f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ovos_media_plugin_ffplay-0.0.4a1-py3-none-any.whl
| Download URL | ovos_media_plugin_ffplay-0.0.4a1-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
608d18c03282edd401fd23181447dcb6df96d9adc1767b45da3a29b80cd7f0cd
|
|
BLAKE2b-256 checksum How to use checksums |
bbd54a48e7802e2bb580342dcc1feff104b066698d3d7c040cb92509701d253e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|