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
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_ffplay-0.0.3a4.tar.gz.
File metadata
- Download URL: ovos_media_plugin_ffplay-0.0.3a4.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30369346851c6144219fbcf43f281a8b33ba56a3ff0968710d15340716ac0e92
|
|
| MD5 |
f4812497c7a514bfedf5cc8eb1d57ce7
|
|
| BLAKE2b-256 |
4c13696cbfbbbb02106c497ff70cae13bb204ebab163c0d9d5440848727a9e9a
|
File details
Details for the file ovos_media_plugin_ffplay-0.0.3a4-py3-none-any.whl.
File metadata
- Download URL: ovos_media_plugin_ffplay-0.0.3a4-py3-none-any.whl
- Upload date:
- Size: 11.5 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 |
50638b2d1dda40a4ff4fb783292e066eb0d5957a12e0bf3f7f70cc1484745862
|
|
| MD5 |
fed753eaaf351772007a885cfa550710
|
|
| BLAKE2b-256 |
d092332bf32c6e2e045d89b437f72de1aae8b45a6f52c0de11a1005eae899dad
|