Code Monkey home page Code Monkey logo

Comments (6)

badaix avatar badaix commented on May 16, 2024

Hi,

it's roughly described in the configuration part of the Readme:

Different streams can by configured with a list of -s options, e.g.:
SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac -s file:///home/user/Musik/Some%20wave%20file.wav?name=File"

You can configure e.g. three different pipe streams:
SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo1?name=Name1 -s pipe:///tmp/snapfifo2?name=Name2 -s pipe:///tmp/snapfifo3?name=Girl%203"

This will create three different zones. You need the Android client to assign a client to a zone. You now can run three different mopidy instances, each feeding the audio into a different pipe.

from snapcast.

proffalken avatar proffalken commented on May 16, 2024

Thanks for such a quick response!

Just to confirm, I can configure the server to stream multiple feeds at the same time, however it's the Android client that designates the "zones" that these streams relate to, not the server or client config?

Does that mean that I have to have the android client running at all times, or do the clients "remember" which zones they are in?

Thanks again,

Matt

P.S. When I get this working, I'll do a full write-up :)

from snapcast.

badaix avatar badaix commented on May 16, 2024

Actually the server does the "routing". He knows about all connected clients and streams and which client should receive what stream.
When a client is connected the first time, it will be assigned to the first stream. The server stores the configuration in one of these files: /var/lib/snapcast/server.json or $HOME/.config/snapcast/server.json
The configuration (assignment of client to stream) can be changed using the Android client (see screenshot in the readme) via the JSON-RPC interface (see also #53).

from snapcast.

proffalken avatar proffalken commented on May 16, 2024

Got it working!

I'll do a full write up and release the Ansible roles in the next few days.

The trick is to configure multiple instances of mopidy (harder than it sounds, the init-scripts really aren't designed to do this!) and then cycle over the mopidy instances configuring the various streams.

The snapclients then all show up in the mobile app and you can allocate them to rooms.

The only issue I have is that all of my nodes are called "raspberrypi" at the moment, so if there's a way to set the client name and the stream it should be attached to without the App, that would be great! (I'm assuming I can post some JSON-RPC to the server to do this on client startup, I just can't work out the syntax to do it at the moment!)

from snapcast.

badaix avatar badaix commented on May 16, 2024

Renaming can be done in the app. Just press the three dots on the right of a client, choose "details" and click on "name" to change it.
This should also by possible with python-snapcast (Issue #29).

from snapcast.

proffalken avatar proffalken commented on May 16, 2024

Brilliant, thank you.

I'll close this now. :)

from snapcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.