Add README explaining use

This commit is contained in:
Media
2025-06-30 21:35:29 -05:00
parent 20677f0749
commit 11b8db2b21
+99
View File
@@ -0,0 +1,99 @@
# 🎵 ZonePlayer
**ZonePlayer** is a modular audio playback system designed to run on Linux using JACK for audio routing and MQTT for remote control. It enables playback of different music playlists to multiple audio zones with precise routing.
---
## ✨ Features
- 🎚️ Independent playlist playback per zone
- 🔀 Shuffled MP3 playback using `python-mpv`
- 🔊 JACK audio output with per-zone JACK ports
- 🛰️ MQTT-based control for dynamic routing and volume changes
- 📁 YAML-configurable playlists and zone definitions
- 🧵 Multi-threaded player support for simultaneous playback
- ⚙️ Systemd service chain integration (optional)
---
## 📁 Folder Structure
ZonePlayer/
├── config.yaml # Defines zones, sources, routing
├── jack_mp3_player.py # Persistent mpv-based playlist player
├── router.py # MQTT listener and JACK routing manager
├── zone.py # GStreamer-based zone stream manager
---
## 🧪 How It Works
Each audio **source** (e.g. "praise", "worship") is a playlist powered by a persistent `mpv` instance. Audio is routed via JACK to zone-specific outputs (e.g. "sanctuary", "office").
Routing and fading are controlled dynamically via MQTT using a `router.py` client that listens for commands such as:
*```json
{
"zone": "sanctuary",
"source": "worship",
}
---
## ⚙️ Configuration
Edit config.yaml to define:
🎶 Playlist sources
🏠 Audio zones
🎧 JACK port names
🌐 MQTT topics and broker
Example:
zones:
sanctuary:
jack_input: "sanctuary"
sources:
praise:
path: "/home/media/Music/praise"
---
## 🚀 Running the System
Run each component independently or via systemd:
bash
Copy
Edit
python3 jack_mp3_player.py praise
python3 router.py
python3 zone.py sanctuary
Or use start_all.py or systemd .service units targeting a zoneplayer.target.
---
## 💡 Notes
1. Requires JACK to be running and properly configured
2. MQTT broker must be online and reachable
3. MP3 playlists must be pre-populated in the Music/ folder
---
## 🪦 Legacy
This project began as a lightweight, headless music playback solution for multi-room audio at River of Glory Church. Though it has evolved beyond its original intent, its flexible design makes it suitable for any JACK-enabled environment.
---
## Future Impovements
1. Make everything apart of the config file, like MQTT connection data, path directories.
---
## Production Date:
Sunday, June 29th, 2025