我也设置了 icecast 2 服务器和 mpd。
两者都单独工作正常,但 icecast 没有在安装列表中显示 mpd。
这是我的 mpd.conf
# See: /usr/share/doc/mpd/mpdconf.example
user "ayush"
pid_file "~/.mpd/mpd.pid"
db_file "~/.mpd/mpd.db"
state_file "~/.mpd/mpdstate"
log_file "~/.mpd/mpd.log"
playlist_directory "~/.mpd/playlists"
music_directory "~/Music"
audio_output {
type "shout"
encoding "ogg"
name "stream"
host "localhost"
port "8000"
mount "/mpd.ogg"
bind_to_address "127.0.0.1"
# This is the source password in icecast.xml
password "pass"
# Set either quality or bit rate
# quality "5.0"
bitrate "128"
format "44100:16:2"
# Optional Parameters
user "source"
# description "here is my long description"
# genre "jazz"
} # end of audio_output
# Need this so that mpd still works if icecast is not running
audio_output {
type "alsa"
name "fake out"
driver "null"
}
这也是我的 netstat 的输出
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 315/sshd
tcp 0 0 0.0.0.0:17500 0.0.0.0:* LISTEN 651/dropbox
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 8006/icecast
tcp 0 0 0.0.0.0:16001 0.0.0.0:* LISTEN 1211/pulseaudio
tcp 0 0 0.0.0.0:57253 0.0.0.0:* LISTEN 1211/pulseaudio
tcp 0 0 0.0.0.0:60421 0.0.0.0:* LISTEN 1211/pulseaudio
tcp 0 0 0.0.0.0:4713 0.0.0.0:* LISTEN 1211/pulseaudio
tcp6 0 0 :::22 :::* LISTEN 315/sshd
tcp6 0 0 :::16001 :::* LISTEN 1211/pulseaudio
tcp6 0 0 :::36418 :::* LISTEN 1211/pulseaudio
tcp6 0 0 :::32899 :::* LISTEN 1211/pulseaudio
tcp6 0 0 :::6600 :::* LISTEN 8046/mpd
tcp6 0 0 :::4713 :::* LISTEN 1211/pulseaudio
我的猜测是因为 mpd 没有在 ipv4 上监听 icecast 无法看到挂载点。
但我也不明白为什么它不听;当我明确使用 bind_to_address 选项时,不听 ipv4。
有人可以告诉我如何让 icecast 看到 mpd 挂载点。谢谢