4

I am using Music Player Daemon (mpd) with ncmpcpp on OS X. ncmpcpp has a feature, the music visualizer, that draws a realtime wave/spectrum of the music you are currently playing.

In order to use this you have to enable the fifo output in mpd.

Well, it works but while this is on the audio is terrible: It crackles and sometimes even freezes. It’s like if mpd is skipping some frame.

The mpd settings for the fifo are:

audio_output {
  type   "fifo"
  name   "FIFO"
  path   "/tmp/mpd.fifo"
  format "44100:16:2"
}

And ncmpcpp has set:

visualizer_in_stereo = "yes"
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_output_name = "fifo"
visualizer_sync_interval = "0"
visualizer_look = "||"
visualizer_color = "blue"
visualizer_type = "spectrum"

Is there some wrong setting to change or I have found a bug?

Giacomo1968
  • 58,727
Rnhmjoj
  • 878

2 Answers2

2

I filed a bug report on the mpd bug tracker. The issue is related to the OS X audio output plugin which is unmaintained. So the only way to keep both regular audio output and FIFO is to stream to another player.

You can output through http or another fifo and stream the audio to vlc for instance. In the case of http add to your config:

audio_output {
  type "httpd"
  name "http stream"
  encoder "vorbis"
  port "8000"
  quality "2"
  format "44100:16:2"
}

then set this alias: alias cvlc='/Applications/VLC.app/Contents/MacOS/VLC --intf=rc'

and run cvlc http://localhost:8000

In case you want to use two FIFOs just duplicate the current settings and start vlc with:

cvlc --demux=rawaud --rawaud-channels 2 --rawaud-samplerate 44100 /tmp/mpd-vlc.fifo

The downsides I have noticed are that you won't be able to change output volume with mpd anymore and there is a relatively small lag.

Rnhmjoj
  • 878
1

I notice you have visualizer_sync_interval = "0" in your config, which is almost certainly the problem. First try setting it to "30", as is recommended in the ncmpcpp docs--if that doesn't work, try out several different values for that parameter.