Moode Forum

Full Version: Using Audio_Output -> pipe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

 I am trying to set up an audio_output which uses the pipe option of mpd. 
audio_output {
        type            "pipe"
        name            "my pipe"
        command         "/home/pi/fft.py"
        format          "44100:16:1"
}

Moode => 6.5.2
mpd/mpc 0.21.11

I know that mpd can do this as I have done this on Icecast on Raspberry pi, and editing /etc/mpd.conf.

I have tried a modified mpd_oled.conf https://github.com/antiprism/mpd_oled, and might of worked, as when I do a mpc output,
Output 1 (ALSA default) is enabled
Output 2 (ALSA crossfeed) is disabled
Output 3 (ALSA parametric eq) is disabled
Output 4 (ALSA graphic eq) is disabled
Output 5 (ALSA polarity inversion) is disabled
Output 6 (ALSA bluetooth) is disabled
Output 7 (HTTP stream) is disabled
Output 8 (my pipe) is disabled

it shows in the list but disabled and also I am not  getting an error in the mpd log.  I should be getting an error as I am using the serial port on the pi, and at present I have not placed the mpd user into the dialout group.

What do I need to do to get moode to get this to work.
Hi Ephesian

Moode disables all but one MPD audio output. If you want your output to remain enabled then you could edit Moode to do this, following the mpd_oled installation instructions and using the patch changes as a model

See:
https://github.com/antiprism/mpd_oled/bl...l-mpd_oled
https://github.com/antiprism/mpd_oled/bl...fifo.patch

Adrian.
(07-10-2020, 01:30 PM)adrii Wrote: [ -> ]Hi Ephesian

Moode disables all but one MPD audio output. If you want your output to remain enabled then you could edit Moode to do this, following the mpd_oled installation instructions and using the patch changes as a model

See:
https://github.com/antiprism/mpd_oled/bl...l-mpd_oled
https://github.com/antiprism/mpd_oled/bl...fifo.patch

Adrian.

Hi Adrian

Thanks for your replay. I have already tried as per my post.  Have you a description of what your code actually does, as I only use one channel and I wonder if the line in the patch file => $data .= "#allowed_formats \"48000:16:2\"\n"; is causing the problem whereas I have "44100:16:1" specified.

Thanks

Graham
Hi Graham

The format line is just context for the patch (i.e. it is in the Moode source) and is writing a line which is commented out, and so should be fine.

If you apply the mpd_oled iinstallation database changes and the patch you should then be able to locate "mpd_oled_FIFO" in /var/www/command/worker.php and change it to your audio output name ("my pipe", but chack you can use spaces in a name). Then put your audio output section in the file /usr/local/etc/mpd_oled_fifo.conf and trigger an mpd.conf regeneration.

All the patch does is inserts the extra config into mpd.conf when it is regenerated and stops Moode from disabling a named output.

Adrian.
Hi,

I try to do the same, create a pipe output together with my current output.
URL's do not work anymore.

Or is there now a simplker way to have both the configured output and/or a pipe output?
Hi Sterke-Jerke

Moode can now be configured in the UI to provide a copy of the audio as an ALSA stream (go to Configure / Audio / ALSA Options, set ALSA Loopback to ON and click on SET).Could you use this instead of a FIFO?

Adrian.

P.S. If you are using Moode 6 the patch method that creates a FIFO is at

   https://github.com/antiprism/mpd_oled/bl...um-display