我已经设置了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挂载点。谢谢
发布于 2015-02-21 17:21:51
我也遇到了同样的问题,似乎是因为在mpd.conf中设置了bitrate "128"。当我使用quality "5.0"时,我能够让挂载点显示出来。
我也尝试了bitrate "320",但它也不起作用,不过我也能用quality "10.0"看到挂载。从这个角度看,似乎只有质量设置有效。
我不完全确定,但我相信这源于Vorbis的编码方式。似乎编码器接受-q {quality}形式的质量标志,其中{quality}是0.0到10.0之间的任意值(包括派系值)。
资料来源:
发布于 2018-01-19 19:08:49
使用相同的设置连接到icecast没有任何问题,唯一不同的是bind_to_address。如果我没记错的话,这是用来连接mpd客户端的,而不是流服务器。它不属于audio_output。另外,MPD日志里有什么东西吗?
https://stackoverflow.com/questions/26025521
复制相似问题