tiny-pilot / ansible-role-ustreamer

Ansible role for µStreamer streaming service
MIT License
9 stars 13 forks source link

Run uStreamer via a launcher #89

Closed mtlynch closed 1 year ago

mtlynch commented 1 year ago

This changes the uStreamer installation so that the uStreamer systemd service runs a uStreamer launcher script rather than running uStreamer directly.

The launcher script, at runtime, reads a set of configuration files, translates those configuration files to uStreamer's command-line flags, and launches uStreamer with those flags.

In the previous implementation of this role, clients needed to re-run Ansible in order to change any of uStreamer's settings (e.g., frame rate, quality) because Ansible was responsible for generating the command-line string to launch uStreamer.

In this implementation, clients can change uStreamer's settings without using Ansible. Clients can simply change settings in the uStreamer launcher's config files and restart the uStreamer service. When the service restarts, the uStreamer launcher will pick up the new configuration.

This reduces the time to change video settings by 91%.

See a rough proof of concept in TinyPilot Pro: https://github.com/tiny-pilot/tinypilot-pro/pull/701

Implementation notes

Benefits

If we switch TinyPilot over to using this role (which should be pretty straightforward), we get a slew of benefits:

Drawbacks

Review on CodeApprove

mtlynch commented 1 year ago
Automated comment from CodeApprove ➜

⏳ @jdeanwallace please review this Pull Request