Select 'audio output' from interface

Hello,

Currently, I’ve installed Mopidy on a RaspberryPI and created a stream with Icecast2, and is working great.

Now I can control the Mopidy through Android application but the audio output is set only to the stream (Icecast).

Is there any possibility to choose from the interface which audio output to use? Because when I’m not home I want to play the sound on my Android device, and when I’m home to stream it through Icecast… or both (on my phone and Icecast same time). Is something like ‘Cast to my devices’ in Spotify.

Do you have any ideas how can I setup something like this? Is even possible?

Thank you!

I’m not sure I follow how you are planning to play the audio on your Android device without using something like icecast.

Regardless, in general you cannot (currently) dynamically change outputs. But you can set it up to output to multiple things at the same time. The following example (which I have borrowed from here) is an example of outputting to both icecast and your local autoaudiosink device (e.g. alsa/pulse) at the same time.

output = tee name=t ! queue ! audioresample ! autoaudiosink t. ! queue  ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme
1 Like

Thanks! This is very helpful.