Jump to content

Has anyone tried Balena Sound for multiple zones?


yaksplat

Recommended Posts

yaksplat

I've seen it touted elsewhere as a Sonos replacement.  If it can run side by side with Emby on a Raspberry Pi, this may be the whole home audio solution that I've been looking for.  I have to do some digging through their doc, but it looks promising.

Based on what I've read, you can do 10 zones with Balena sound.  It can take audio via bluetooth and airplay and cast it to other RPis, but I don't know about another source on the RPi, being emby.

Getting started - Home (balenalabs.io)

Link to comment
Share on other sites

  • 1 year later...
TopSideControl

Sorry to bump such an old thread @yaksplat but did you get anywhere with this? Just started looking at this myself. I've a pi4 and would like to be able to stream from YTMusic, Spotify, and Emby. Spotify seems to have loads of support, going to load up the Pi and test over the week. 

Link to comment
Share on other sites

  • 4 weeks later...
yaksplat

@TopSideControlSorry, I've been meanign to get back to this, but i've be full bore into a house addition and remodel.  I should try to get back to this as I'm going to be setting up whole house audio.  I was really hoping that multicast would be implemented in Emby before now...

Link to comment
Share on other sites

  • 6 months later...
them8os235

Not sure how 'literal' this image is [found on the Balena sound site], but if the only source of music and control of the eco-system from a phone or tablet is to first connect to a RPi via Bluetooth rather than a HD with Gbytes to Tbytes of music, that's a major strike against it and a show stopper for me.  I'm sure it's just the trick for people who only stream, using the sources it supports.  But that's completely the opposite for me.

 

sound[1].png

Edited by them8os235
added text
Link to comment
Share on other sites

  • 3 weeks later...
them8os235

As the friend I'm setting Emby up for is an Apple user and has an Apple Music account, I looked into this.  I think the long story short is ... one cannot install balenaSound alongside Emby server or theater.  But rather one has to build a balenaOS / Hub / Cloud/ Fleet ecosystem to run balenaSound.  Then the question becomes can Emby Server / Theater be installed and run as a container within that environment.

TL;DR

I asked Bard: 

Is a requirement of running balenaSound that it be run on balenaOS, which implies runs as a container image, as well as carries the dependency of balena Cloud and a Fleet configuration? Or is it possible to install balenaSound on a standard Rasperry Pi OS or DietPi instance?

Answer: 

Yes, it is a requirement of running balenaSound that it be run on balenaOS. This is because balenaSound is a container image that is designed to be deployed on balenaOS. balenaOS is a lightweight operating system that is optimized for running containerized applications.

It is not possible to install balenaSound on a standard Rasperry Pi OS or DietPi instance. This is because balenaSound requires certain features of balenaOS, such as the ability to run containerized applications and the ability to connect to the balenaCloud dashboard.

If you want to run balenaSound, you will need to install balenaOS on your Raspberry Pi. You can do this using the balenaEtcher tool. Once you have installed balenaOS, you can deploy the balenaSound container image to your device using the balenaCLI tool.

Here are the steps to install balenaSound on your Raspberry Pi:

  1. Install balenaOS on your Raspberry Pi using balenaEtcher.
  2. Install the balenaCLI tool on your computer.
  3. Create a balenaCloud account and log in to the dashboard.
  4. Create a new fleet and add your Raspberry Pi to the fleet.
  5. Deploy the balenaSound container image to your device using the balenaCLI tool.

Once the balenaSound container image has been deployed to your device, you will be able to stream music to your device using AirPlay or Spotify Connect.

...snip...

Link to comment
Share on other sites

them8os235

As i know less than zero regarding containers / docker... Regarding my "Then the question becomes...", Bard says the answer is Yes.

Quote

Do you know if Emby Theater and/or Server can be installed and run as a container in the particular kind of container environment used by balenaOS?

Bard Answers:

Quote

Yes, both Emby Theater and Emby Server can be installed and run as containers in balenaOS.

balenaOS is a lightweight operating system that is optimized for running containerized applications. It uses Docker to run containers, which is the same containerization technology used by Emby Theater and Emby Server.

To install Emby Theater or Emby Server as a container in balenaOS, you can use the following steps:

  1. Create a new balenaCloud account and log in to the dashboard.
  2. Create a new fleet and add your Raspberry Pi to the fleet.
  3. Deploy the Emby Theater or Emby Server container image to your device using the balenaCLI tool.

Once the Emby Theater or Emby Server container image has been deployed to your device, you will be able to access Emby Theater or Emby Server at http://localhost:8096 in your web browser.

Here is an example of how to deploy the Emby Theater container image to your device using the balenaCLI tool:

balena deploy emby-theater:latest

This command will deploy the latest version of the Emby Theater container image to your device.

Here is an example of how to deploy the Emby Server container image to your device using the balenaCLI tool:

balena deploy emby-server:latest

This command will deploy the latest version of the Emby Server container image to your device.

Once the Emby Theater or Emby Server container image has been deployed to your device, you can start using Emby Theater or Emby Server to stream movies, TV shows, music, and photos to your devices.

Here are some of the benefits of running Emby Theater or Emby Server as a container in balenaOS:

  • It is easy to install and configure.
  • It is reliable and secure.
  • It is portable and can be deployed on any device that runs balenaOS.
  • It is scalable and can be deployed on multiple devices to create a distributed streaming system.

If you are looking for a way to run Emby Theater or Emby Server on your Raspberry Pi, I recommend running it as a container in balenaOS.

 

 

Edited by them8os235
typos, again
Link to comment
Share on other sites

  • 1 month later...
them8os235
On 1/19/2022 at 2:43 PM, yaksplat said:

I've seen it touted elsewhere as a Sonos replacement.  If it can run side by side with Emby on a Raspberry Pi, this may be the whole home audio solution that I've been looking for.  I have to do some digging through their doc, but it looks promising.

Based on what I've read, you can do 10 zones with Balena sound.  It can take audio via bluetooth and airplay and cast it to other RPis, but I don't know about another source on the RPi, being emby.

Getting started - Home (balenalabs.io)

@yaksplat, @LukeOkay, so I did a deep dive into the balenaOS + balenaCloud + balenaSound ecosystem and implemented this with two Raspberry Pi 4 based audio nodes.  It is basically a nicely implemented turn-key managed cloud implementation of Snapcast [https://github.com/badaix/snapcast] with plugin services to accept streaming input from Bluetooth, Airplay and Spotify.  It's pretty decent.  And the synchronized audio is very well sync'ed; but as noted that's a function of Snapcast, not the balena org. 

But one has to be willing to go hard into the balena ecosystem.  It's free up to 10 devices per account (for who knows how long that may be).  Then seriously expensive after that; definitely intended for large income producing managed cloud device implementations [balena calls that a Fleet] to warrant that cost.  Where balenaSound is a nice little 'side' project they created to both bring exposure of balena to the likes of us, and give something back to the open source community for free (as noted up to a point; tho 10 devices is a pretty decent give for free.).

Given that Snapcast can take its audio input from PulseAudio or ALSA loopback [https://github.com/badaix/snapcast/blob/develop/doc/player_setup.md], I imagine it would be entirely possible to ssh in and install Snapcast client + server to an Emby Theater device installation and reconfigure the PulseAudio (or ALSA?) sub-system to recast the music playback output of that Emby Theater devices to a) itself and b) other devices, all running Snapcast client, to have synchronized multi-room audio sourced from an Emby Theater device. 

I wish I knew more about PulseAudio and Snapcast.  I'd give that a try.  OTOH, the URLs I linked-to above do give pretty good direction.  Maybe if I have time one day.  

Edited by them8os235
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

That's interesting. Thanks for sharing your experience.

Link to comment
Share on other sites

  • 2 weeks later...
them8os235

@yaksplat& @Luke I have an interesting thing to share in regards to the original post, that being the interoperability of balenaSound and Emby. Note the mention of UPnP as a plug-in / sound source here in their architecture block diagram:

image.thumb.png.46dcdce4ee5aed973df57b119fea016a.png

 

UPnP supported in balenaSound is experimental / WIP, which I was able to confirm first hand once I refactored my two balenaSound audio-devices.  But it did work, somewhat.  I WAS able to use the emby web client (can't cast to UPnP from emby theater) to cast to the UPnP client on my balena-sound master device, which in-turn was routed to the audio-block, which in-turn was routed to the muti-room server, which then used snapcast to playback synchronized music on all my device nodes.  Again, with Emby as the Music Source!  😎

It is not installed by default.  One can't use their nice "One Click" installation. Rather one has to use the advanced (legacy) installation approach thru a balena-cli environment in a Linux shell to deploy their balena-sound project after adding the UPnP config block to the docker yaml file. 

The problems I found were:

1. The multicast server docker container kept restarting causing music play to drop out for a few seconds, until it didn't.  Couldn't tell what was behind that or why it was inconsistent.

2. The Emby "Now Playing" only showed the playback position bar, sans any position info, and a play button which was ineffective.  But the whole page was 'dead', with no feedback.  And on the balenaSound side if you inspect the logs you'll find mention of a gmrender error that it could not determine the music source duration.  Implying the worst case that if one were to start emby playback to upnp of your whole huge music library, I don't know how one could stop it.  lol  I don't know if this is a balena side issue or emby side one  But I strongly suspect it is a balena side one as if I use the emby web client's UPnP to Play to my Marantz receiver, I get a well rendered emby now playing page as well as the same on the Marantz side.  With full music playback control.

3.  Fidelity seemed to be lacking.  It sounded crunchy / jittery / not smooth.  Implying to me it wasn't bit-perfect, the bitstream was being 'stepped on', and streaming & re-streaming was lossy.

But... the folks a balena keep evolving the balena-sound project.  I do see bugs getting fixed.  So keep your eye on this space.  ;)  I'll post an update here if I see things evolve positively in the realm of UPnP support, and emby's casting to it.

p.s. Even better than that would be an official emby client as a music source in that block diagram.  ;)  Someone is working on a RoonBridge integration.  And another one I forget. Would be ideal if UPnP didn't need to be used and there was a direct integration of emby to balena-sound.  Surprised too, there isn't a Chromecast sound source; that would have worked.

 

Edited by them8os235
  • Thanks 1
Link to comment
Share on other sites

them8os235
On 1/19/2022 at 2:43 PM, yaksplat said:

I've seen it touted elsewhere as a Sonos replacement.  If it can run side by side with Emby on a Raspberry Pi, this may be the whole home audio solution that I've been looking for.  I have to do some digging through their doc, but it looks promising.

Based on what I've read, you can do 10 zones with Balena sound.  It can take audio via bluetooth and airplay and cast it to other RPis, but I don't know about another source on the RPi, being emby.

@yaksplatFrom my never ending chronicles of "overlooking the forest for the trees..." and diving headlong into the most complicated way of doing something [grin], there is a very simple albeit imperfect integration available right now between your Emby music library and a balenaSound Fleet that I've been ignoring, to give you a synchronized whole house music playback of your Emby Server based library.  And that is simply to connect via Bluetooth from your [ iPhone | iPad | Android based Phone or Tablet | whatever you may have ] running the Emby Theater mobile app, to any one of the balenaSound devices that are part of a whole-house balena Fleet.  That will give you your bridge from the Emby world to the Balena world. 

Caveats being:

1. Bluetooth resamples / steps-on the music quality (affecting the high frequencies the most), doing so more the further the two connected devices are from each other, therefore the weaker the Bluetooth connection. 

2. Bluetooth connection distances are far less than a Wi-Fi connection distance.  So whatever device is being used as the Emby Theater sound source can't stray too far from the Raspberry Pi balenaSound device you're connected to.  You can however disconnect from one balenaSound device and reconnect to another one in another part of the house and continue the whole house music playback synchronization, if you're relocating your physical presence.

3. Snapcast, which is at the heart of balenaSound's synchronized multi-room playback, has a built-in 2 second delay.  Then, if you were to cast say AirPlay to a device I've found that adds on a little more delay.  However I've observed when I use bluetooth that adds on more like 1 or 2 or [much] more seconds between every action in Emby Theater before being reflected in the playback.  So, via Bluetooth, you need to be patient after starting/pausing/stopping/changing a song/album/playlist within Emby theater before you can expect music playback to be affected in the way commanded, on the order of many seconds (I just paused music playback and I estimated it took 7~ish seconds!).  However, once playback is started rest assured there is no delay to gapless playback between songs.

Anyway.  There ya go!  :D  Should you wish to have synchronized whole house audio via Raspberry Pi devices, and use your Emby Library as the music source, Bluetooth is an entirely valid way to achieve that; with the caveats noted above. I'm doing it this very second. And it works far better than the UPnP approach I detailed in my last post. 

Edited by them8os235
Link to comment
Share on other sites

them8os235

I have one more very pleasant surprise [to me] to share... I'm not an iPhone/iPad user, rather Android.  So I came to this realization a bit later than I would have otherwise.

I've taken ownership of my wife's very old iPhone, for a few reasons I won't bother with here. What I've learned however in my recent exercise of venturing into the Apple & balena tech ecosystems is ... any music that the iPhone [and iPad I assume] is playing can be re-directed using AirPlay via the Mission Control panel you can load via the swipe-up action from the bottom of the device.  So even though the iOS Emby App may not natively support AirPlay within its built-in "Play on" cast function it has in its UI, the iOS natively supports redirecting any audio the mobile device is playing to another device on the local network that has an AirPlay listener.

So what does this mean?  It means that one can use Emby Server as their music library, play it on an iPhone or iPad using the Emby App, and redirect what is playing using the iOS's Mission Control "Now Playing" widget using its integrated AirPlay redirector to your balenaSound Fleet over Wi-Fi, instead of Bluetooth with its downsides cited above.  And thereby have higher quality synchronized whole-house music playing thru multiple Raspberry Pis (or other SBCs) sourced from your Emby music library. That's a "good enough" bridge between the Emby world and balena world that I feel I have a solid enough "whole house" sound system solution for my friends to be thrilled with (over a single Volumio player that I setup there originally),

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...