Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Idea: Multi-room co-existance
#8
The way I solved multi-room was to write a Python script that can monitor MPD playback in the background and then stream a URL for the playing file to a selected Chromecast or cast group. 

It works well and allows me to use a single RPI with moOde wired to an amp with the option of alternatively streaming audio to any of my Chromecasts, Google Homes, cast-enabled products or cast groups on demand. 

All the playback is performed directly by the cast-enabled device streaming the original MP3/flac file from the RPI. The cast device(s) respond to playback, track and volume changes made via moOde/Volumio directly or via your favourite MPD client. That all happens because the script is monitoring MPD status every second and auto-casting changes in track, seek position and volume etc. I'm actively working on it this script the past few weeks to improve it and fix bugs as I encounter them.

There is a little sync magic required when the cast takes place so ideally, the objective would be to have casting disabled when listening locally and when casting, do not use local audio output. Local playback is happening but when you start a track playing, the script then casts the file URL to the cast device, pauses local playback (via MPD) until it can detect the cast device streaming and then resumes local playback with occasional syncing between the two to keep MPD ~1 second behind the Chromecast. So local playback will be interrupted as this syncing is performed. That whole trick is being done to leverage Moode as the playlist mechanism. 

The install is easy on moOde. See below..
https://github.com/dresdner353/mpd2chrom.../README.md

Also a shot of the "web control panel" attached here. You access this from IP:8090/cast and can instantly activate the casting to a desired cast device or group or disable it. Once you have casting activated, you can do all playback selection via your preferred UI be that Moode or an MPD client. But for ease of access, I also added a quick playlist and track selection from the web page with abilities to pause/play etc.


Attached Files Thumbnail(s)
   


Messages In This Thread
Multi-room co-existance - by AlleyCat - 04-01-2020, 04:27 PM
RE: Multi-room co-existance - by Tim Curtis - 04-01-2020, 04:52 PM
RE: Multi-room co-existance - by efung - 02-22-2021, 07:24 AM
RE: Multi-room co-existance - by Tim Curtis - 02-22-2021, 12:48 PM
RE: Multi-room co-existance - by efung - 02-22-2021, 05:59 PM
RE: Multi-room co-existance - by tekdru - 11-04-2020, 01:21 AM
RE: Multi-room co-existance - by Tim Curtis - 11-04-2020, 03:45 AM
RE: Multi-room co-existance - by tekdru - 11-04-2020, 04:09 AM
RE: Multi-room co-existance - by TheOldPresbyope - 11-04-2020, 01:19 PM
RE: Multi-room co-existance - by Tim Curtis - 11-17-2020, 12:45 AM
RE: Multi-room co-existance - by dresdner353 - 11-18-2020, 11:50 PM
RE: Multi-room co-existance - by LDerJim - 02-22-2021, 01:06 AM
RE: Multi-room co-existance - by TookaFace - 02-22-2021, 07:52 AM
RE: Multi-room co-existance - by Tim Curtis - 02-22-2021, 12:48 PM
RE: Multi-room co-existance - by Tim Curtis - 02-22-2021, 06:32 PM
RE: Multi-room co-existance - by efung - 02-22-2021, 07:15 PM
RE: Multi-room co-existance - by Tim Curtis - 02-23-2021, 04:26 AM

Forum Jump: