PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : mpd als source für icecast



iggy
06.02.06, 22:29
hallo!

ich möchte in meinem heimnetzwerk einen musik-server laufen lassen. icecast habe ich soweit zum laufen bekommen. mpd kann aber leider nicht connecten. ich weiß aber ehrlich gesagt nicht genau, ob meine configs ok sind. es gibt leider zu wenig dokus dafür. ich wäre über jede hilfe dankbar.
ich starte icecast als user mit: icecast -b -c /etc/icecast.xml

hier meine configs:

icecast.xml

<icecast>
<limits>
<clients>100</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>lala</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>lala</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>lala</admin-password>
</authentication>

<!-- Uncomment this if you want directory listings -->
<!--
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
</directory>
-->

<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>localhost</hostname>

<!-- You can use these two if you only want a single listener -->
<!--<port>8000</port> -->
<!--<bind-address>127.0.0.1</bind-address>-->

<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
</listen-socket>
<!--
<listen-socket>
<port>8001</port>
</listen-socket>
-->

<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<!--<master-password>hackme</master-password>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->

<!--
<relay>
<server>127.0.0.1</server>
<port>8001</port>
<mount>/home/iggy/programs/icecast/mpd.ogg</mount>
<local-mount>/different.ogg</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
-->

<!-- Only define a <mount> section if you want to use advanced options,
like alternative usernames or passwords
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>

<mount>
<mount-name>/auth_example.ogg</mount-name>
<authentication type="url">
<option name="mount_add" value="http://myauthserver.net/notify_mount.php"/>
<option name="mount_remove" value="http://myauthserver.net/notify_mount.php"/>
<option name="listener_add" value="http://myauthserver.net/notify_listener.php"/>
<option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
</authentication>
</mount>

-->

<fileserve>1</fileserve>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/home/iggy/programs/icecast/logs</logdir>
<webroot>/usr/share/icecast/web</webroot>
<adminroot>/usr/share/icecast/admin</adminroot>
<!-- <pidfile>/usr/share/icecast/icecast.pid</pidfile> -->

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->
<!--
<alias source="/foo" dest="/bar"/>
-->
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>iggy</user>
<group>users</group>
</changeowner>
-->
</security>
</icecast>


mpd:

# MPD CONFIG FILE
# For a full description of all config parameters,
# Check the mpd man page, "man mpd".

##################### REQUIRED ###########################
port "6600"
music_directory "/home/iggy/media/music/"
playlist_directory "/home/iggy/.mpd/playlists"
log_file "/home/iggy/.mpd/mpd.log"
error_file "/home/iggy/.mpd/mpd.error"
################################################## ########

################################################## ########
# EVERYTHING ELSE IS OPTIONAL
################################################## ########

################# FILESYSTEM SETTINGS ####################
#
# If the names of files or directories are
# not correctly displayed then set the
# following to the filesystem coding.
#
# Usually this is either:
# ISO-8859-1 or UTF-8
#
# After changing the filesystem_charset
# you will need to recreate the db:
# mpd --create-db
#
#filesystem_charset "ISO-8859-1"
#
################################################## ########

#################### OPTIONAL FILES ######################
#
# Location of DB file
#
#db_file "~/.mpd/mpd.db"
#
# The state file (if set) will be a file
# for storing all current information
# (playlist, playing/paused, etc...) from
# the last MPD session. This will be used
# to recreate your last MPD session after
# restart.
#
state_file "/home/iggy/.mpd/mpdstate"
#
################################################## ########


################### VOLUME MIXER #########################
#
# Examples:
# ALSA Mixer
#mixer_type "alsa"
#mixer_device "default"
#mixer_control "PCM"
#
# OSS Mixer
#mixer_type "oss"
#mixer_device "/dev/mixer"
#mixer_control "PCM"
#
# Software Mixer
#mixer_type "software"
#
################################################## ########


################## AUDIO OUTPUT ##########################
#
# OSS Audio Output
#ao_driver "oss"
#ao_driver_options "dsp=/dev/dsp"
#
# ALSA Audio Output
#ao_driver "alsa09"
#ao_driver_options "dev=hw:0,0"
#
# Set this if you have problems
# playing audio files.
# This will resample your music so
# that it comes out at the set rate.
#
#audio_output_format "44100:16:2"
#
# You should not need mess with
# this value unless you know
# what you're doing.
#
#audio_write_size "1024"
#
################################################## ########

################# REPLAYGAIN #############################
#
# Use Replay Gain (album or title)
# http://www.replaygain.org
#
#replaygain "album"
#
# Sets the pre-amp used for files that have replaygain
# info. Valid values are between -15 to 15 (in dB).
#
#replaygain_preamp "0"
#
################################################## ########


################ OUTPUT BUFFER SETTINGS ##################
#
# You should not need to mess with this
# unless you know what you're doing.
#
#audio_buffer_size "2048"
#
# This means exactly what it says, it will
# buffer your file up to the percentage of
# the buffer before it begins playing.
#
#buffer_before_play "25%"
#
################################################## ########


################### HTTP PROXY ###########################
#
# http_proxy_host "proxy.isp.com"
# http_proxy_port "8080"
# http_proxy_user "user"
# http_proxy_password "password"
#
################################################## ########


################# SECURITY SETTINGS ######################
#
# It is encouraged to run MPD as
# non-superuser. If you start mpd as root
# (for example, in an init script), set
# this value, then mpd will drop root priveleges
# and runs as the user specified.
#
user "iggy"
#
# Set this value if you only have one
# address you want to allow connection to.
#
#bind_to_address "localhost"
#
# If you want to setup MPD to use
# passwords set them here
#
#password "password1@read,add,control,admin"
#password "password2@read"
#
# Specify permissions used by default when no password is
# given by for a connection/client.
#
#default_permissions "read,add,control,admin"
#
##########################################


################ MISCELLANEOUS OPTIONS ###################
#
# This setting exists as precaution against attacks.
#
#max_playlist_length "16384"
#
# Valid options are "default", "secure" or "verbose".
#log_level "default"
#
#connection_timeout "60"
#
# This should be fine for 2-3 people using clients
# at the same time.
#
#max_connections "5"
#
# No need to change these unless you know better.
#
#max_command_list_size "2048"
#max_output_buffer_size "2048"
#
# This will make playlists compatible with normal music
# players.
#
#save_absolute_paths_in_playlists "no"
#
################################################## ########

################# SHOUT STREAMING ########################
#
# Set this to allow mpd to stream its output to icecast2
# (i.e. mpd is a icecast2 source)
#
audio_output {
type "shout"
name "iggys radio"
host "localhost"
port "8000"
mount "/mpd.ogg"
password "lala"
# quality "5.0"
bitrate "128"
format "44100:16:1"

# Optional Paramters
user "source"
# description "here's my long description"
# genre "jazz"
} # end of audio_output
################################################## ########

danke
mfg iggy

thechef
07.02.06, 00:53
kannst du anderswie drauf verbinden?

zB. mit ices2 auf den icecast-server?

wieso hast du in der mpd.conf son komischen mountpoint?
Der hat nichts mit dem filesystem zu tun, bei mir ist das einfach stream.ogg (--> http://host:8000/stream.ogg), aber ka ob deiner trotzdem gültig ist.
ansonsten seh ich nix falsches an der mpd.conf

wie bricht mpd denn die verbindung ab? Oder hörst du einfach nichts?
sonst guck mit 'netstat -an --program | grep 8000' o.ä.

iggy
07.02.06, 16:58
hab den mountpoint jetzt verändert. desweiteren hab ich mpd auch mal mit --enable-shout kompiliert. geht genauso nicht. noch irgendwas, was ich übersehen habe oder so?