Hi,
I want to use mopidy with two audio outputs: 1. local and 2. streaming
In the docs at https://docs.mopidy.com/en/latest/audio/, such a pipe is given. However, if I use it, I lose multi channel audio output.
I’m on a raspberry pi with raspbian (no musicbox) and use “omxhdmiaudiosink”
5.1 audio:
[audio]
output = omxhdmiaudiosink
also 5.1 audio
[audio]
output = tee name=t ! queue ! audioresample ! omxhdmiaudiosink
no 5.1:
[audio]
output = tee name=t ! queue ! audioresample ! omxhdmiaudiosink t. ! queue ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme
Why is that?
Best,
Henning
I am no Gstreamer expert (hello, @adamcik!) but I would guess this is because Gstreamer tries to find a common set of caps (bitrate, format, channels etc) that satisfies both outputs of the tee and the sound2send branch is restricting things. If you run Mopidy with Gstreamer logging in the various cases you can probably see for yourself exactly what is going on.
I don’t know if each branch of a tee can have different caps but since you can force particular caps (by specifying Gstreamer capsfilters in the pipeline), it would make sense that they could. I’m really guessing here and I have no experience of doing this but maybe you can get somewhere further.
You can use gst-inspect to see what capabilities a particular element provides. lamemp3enc wants two channels so I think my initial guess was right. Maybe try specifying 6 channels at the queue and sticking an audioconvert element in the shout2 branch to convert from your 6 channels down to 2.
What are you playing that’s giving you 5.1 audio?