ffplay plugin for ovos
Project description
ovos-media-plugin-ffplay
ffplay plugin for ovos-audio and ovos-media
Install
pip install ovos-media-plugin-ffplay
Configuration
edit your mycroft.conf with any ffplay players you want to expose
{
"Audio": {
"backends": {
"ffplay": {
"type": "ovos_ffplay",
"active": true
}
}
}
}
Python usage
direct access to ffplay is provided via FFPlayAudioPlayer
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()
Project details
Release history Release notifications | RSS feed
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.3a3.tar.gz.
File metadata
- Download URL: ovos_media_plugin_ffplay-0.0.3a3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e12a1f375b961461383af6048b37ec015eb929441b12cce331f71c467d5eb3a4
|
|
| MD5 |
c33b066f473cb3c1506251f9bb5a1a13
|
|
| BLAKE2b-256 |
593e84bc70ed83ca9793027ac9f1252ad8d1549aff4dde075ff5fab60b9e3cb3
|
File details
Details for the file ovos_media_plugin_ffplay-0.0.3a3-py3-none-any.whl.
File metadata
- Download URL: ovos_media_plugin_ffplay-0.0.3a3-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7d4e1c4120750edbd086330f1be7656ea13040628613a66c3d60f6ba53ad4f4
|
|
| MD5 |
76ee4e6c14f1ce16f066cc881e50a0c7
|
|
| BLAKE2b-256 |
efc10709d3704c1299bdae3757e81eb8461076b042401bef9f2b66a478bb6a28
|