Skip to main content
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_media_plugin_ffplay-0.0.3a4.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_media_plugin_ffplay-0.0.3a4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file ovos_media_plugin_ffplay-0.0.3a4.tar.gz.

File metadata

File hashes

Hashes for ovos_media_plugin_ffplay-0.0.3a4.tar.gz
Algorithm Hash digest
SHA256 30369346851c6144219fbcf43f281a8b33ba56a3ff0968710d15340716ac0e92
MD5 f4812497c7a514bfedf5cc8eb1d57ce7
BLAKE2b-256 4c13696cbfbbbb02106c497ff70cae13bb204ebab163c0d9d5440848727a9e9a

See more details on using hashes here.

File details

Details for the file ovos_media_plugin_ffplay-0.0.3a4-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_media_plugin_ffplay-0.0.3a4-py3-none-any.whl
Algorithm Hash digest
SHA256 50638b2d1dda40a4ff4fb783292e066eb0d5957a12e0bf3f7f70cc1484745862
MD5 fed753eaaf351772007a885cfa550710
BLAKE2b-256 d092332bf32c6e2e045d89b437f72de1aae8b45a6f52c0de11a1005eae899dad

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3a4 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page