10-29-2020, 07:51 PM
(This post was last modified: 11-08-2020, 03:08 PM by dresdner353.
Edit Reason: aded multi-room reference
)
Hi Folks,
a couple of years back I wrote a little hack script for Volumio that could be used to stream the current playing file to a selected Chromecast device or group.
The idea was to be able to play music from the Pi through to any Chromecast device or device group within the house. It actually works quite well.
Anyway, I hacked the script around a bit last night as one does during lockdown and came up with a variation of the script that will now work with moOde. Both players use mpd and have similarish internal APIs. So the rework was not too complicated.
The script is written in Python and designed to run in the background. It monitors the current MPD playing state and file on moOde and then ensures that a URL for this file is sent to the configured Chromecast.
It then plays synchronisation smarts between the two ensuring that the local moOde playback is about 1-2 seconds behind the Chromecast allowing moOde to operate as the playlist and direct the switch to the next track etc.
You have a lot of control.. pause, play, skip and seek, volume and mute on moOde will all be passed to the Chromecast. A simple web server URL makes it easy to select the desired chromecast device, device group or disable the casting.
So to me it really is a great way to free up the limitations of having the setup play audio in one place. Also given Chromecasts support multi-room streaming, all that just works out of the box and you can play the music simultaneously all over the house.
Full instructions below if you want to try this out if only to under the concept that the script is using.
https://github.com/dresdner353/mpd2chrom.../README.md
a couple of years back I wrote a little hack script for Volumio that could be used to stream the current playing file to a selected Chromecast device or group.
The idea was to be able to play music from the Pi through to any Chromecast device or device group within the house. It actually works quite well.
Anyway, I hacked the script around a bit last night as one does during lockdown and came up with a variation of the script that will now work with moOde. Both players use mpd and have similarish internal APIs. So the rework was not too complicated.
The script is written in Python and designed to run in the background. It monitors the current MPD playing state and file on moOde and then ensures that a URL for this file is sent to the configured Chromecast.
It then plays synchronisation smarts between the two ensuring that the local moOde playback is about 1-2 seconds behind the Chromecast allowing moOde to operate as the playlist and direct the switch to the next track etc.
You have a lot of control.. pause, play, skip and seek, volume and mute on moOde will all be passed to the Chromecast. A simple web server URL makes it easy to select the desired chromecast device, device group or disable the casting.
So to me it really is a great way to free up the limitations of having the setup play audio in one place. Also given Chromecasts support multi-room streaming, all that just works out of the box and you can play the music simultaneously all over the house.
Full instructions below if you want to try this out if only to under the concept that the script is using.
https://github.com/dresdner353/mpd2chrom.../README.md