Navegació: Què enllaça aquí | Pàgines Filles | |
---|---|
Web: | www.icecast.org |
Desenvolupadors: | Xiph.org Foundation |
Tipus: | streaming media server |
Sistema operatiu: | Unix-like i Microsoft Windows |
Creadors: |
Icecast és un projecte per a media streaming mantingut per la fundació Xiph.org. Pot ser utilitzar per a la creació d'una estació de radio simple per Internet o per a ús privat entre d'altres. És una eina molt versàtil que permet donar suport per als nous formats de forma relativaments senzilla i suporta els estàndards oberts.
Actualment (--acacha 05:23, 3 des 2011 (UTC)) el servidor Icecast suporta streams Ogg Vorbis, MP3, Ogg Speex, Ogg FLAC, Ogg Theora i AAC.
La gestió del servidor és fa a través d'una aplicació web. Icecast és a més una eina multiplataforma i Open Source que està disponible per a Linux i Windows.
El servidor Icecast té una funcionalitat similar al programa propietari SHOUTcast de Nullsoft i es compatible amb aquest.
Icecast només és el servidor encarregat de fer l'streaming. A més necessitareu eines de suport com ices les quals s'encarregaran de proveir (fant de font - source - de dades) l'audio al servidor.
L'arquitectura del servidor d'streaming icecast és la següent
Veureu com hi ha tres parts:
$ sudo apt-get install icecast2
$ dpkg -L icecast2 /. /usr /usr/bin /usr/bin/icecast2 /usr/share /usr/share/doc /usr/share/doc/icecast2 /usr/share/doc/icecast2/NEWS.gz /usr/share/doc/icecast2/icecast_minimal.xml.dist /usr/share/doc/icecast2/icecast_shoutcast_compat.xml.dist /usr/share/doc/icecast2/icecast_urlauth.xml.dist /usr/share/doc/icecast2/index.html /usr/share/doc/icecast2/icecast2_admin.html /usr/share/doc/icecast2/icecast2_basicsetup.html /usr/share/doc/icecast2/icecast2_config_file.html /usr/share/doc/icecast2/icecast2_faq.html /usr/share/doc/icecast2/icecast2_glossary.html /usr/share/doc/icecast2/icecast2_introduction.html /usr/share/doc/icecast2/icecast2_relay.html /usr/share/doc/icecast2/icecast2_stats.html /usr/share/doc/icecast2/icecast2_win32.html /usr/share/doc/icecast2/icecast2_yp.html /usr/share/doc/icecast2/icecast2_listenerauth.html /usr/share/doc/icecast2/icecast2_changes.html /usr/share/doc/icecast2/listener_auth1.jpg /usr/share/doc/icecast2/listener_auth2.jpg /usr/share/doc/icecast2/listener_auth3.jpg /usr/share/doc/icecast2/masterslave.png /usr/share/doc/icecast2/relay.png /usr/share/doc/icecast2/README /usr/share/doc/icecast2/AUTHORS /usr/share/doc/icecast2/ChangeLog.gz /usr/share/doc/icecast2/TODO /usr/share/doc/icecast2/changelog.gz /usr/share/doc/icecast2/buildinfo.gz /usr/share/doc/icecast2/README.Debian /usr/share/doc/icecast2/copyright /usr/share/doc/icecast2/NEWS.Debian.gz /usr/share/doc/icecast2/icecast.xml.dist.gz /usr/share/doc/icecast2/changelog.Debian.gz /usr/share/icecast2 /usr/share/icecast2/web /usr/share/icecast2/web/corner_bottomleft.jpg /usr/share/icecast2/web/corner_bottomright.jpg /usr/share/icecast2/web/corner_topleft.jpg /usr/share/icecast2/web/corner_topright.jpg /usr/share/icecast2/web/icecast.png /usr/share/icecast2/web/key.gif /usr/share/icecast2/web/tunein.png /usr/share/icecast2/web/key.png /usr/share/icecast2/admin /usr/share/doc-base /usr/share/doc-base/icecast2 /usr/share/man /usr/share/man/man1 /usr/share/man/man1/icecast2.1.gz /etc /etc/icecast2 /etc/icecast2/icecast.xml /etc/icecast2/web /etc/icecast2/web/status.xsl /etc/icecast2/web/status2.xsl /etc/icecast2/web/style.css /etc/icecast2/web/auth.xsl /etc/icecast2/web/server_version.xsl /etc/icecast2/admin /etc/icecast2/admin/listclients.xsl /etc/icecast2/admin/listmounts.xsl /etc/icecast2/admin/moveclients.xsl /etc/icecast2/admin/response.xsl /etc/icecast2/admin/stats.xsl /etc/icecast2/admin/manageauth.xsl /etc/icecast2/admin/updatemetadata.xsl /etc/icecast2/admin/xspf.xsl /etc/default /etc/default/icecast2 /etc/init.d /etc/init.d/icecast2 /etc/logrotate.d /etc/logrotate.d/icecast2 /var /var/log /var/log/icecast2 /usr/share/icecast2/web/status.xsl /usr/share/icecast2/web/status2.xsl /usr/share/icecast2/web/style.css /usr/share/icecast2/web/auth.xsl /usr/share/icecast2/web/server_version.xsl /usr/share/icecast2/admin/listclients.xsl /usr/share/icecast2/admin/listmounts.xsl /usr/share/icecast2/admin/moveclients.xsl /usr/share/icecast2/admin/response.xsl /usr/share/icecast2/admin/stats.xsl /usr/share/icecast2/admin/manageauth.xsl /usr/share/icecast2/admin/updatemetadata.xsl /usr/share/icecast2/admin/xspf.xsl
Segons:
$ dpkg -l icecast2 ... ii icecast2 2.3.2-5ubuntu1 Ogg Vorbis and MP3 streaming media server
Icecast és un servidor d'streaming per a Ogg Vorbis i MP3
En aquest fitxer podem sobrescriure algunes de les variables principals de configuració del servidor.
$ cat /etc/default/icecast2 # Defaults for icecast2 initscript # sourced by /etc/init.d/icecast2 # installed at /etc/default/icecast2 by the maintainer scripts # # This is a POSIX shell fragment # # Full path to the server configuration file CONFIGFILE="/etc/icecast2/icecast.xml" # Name or ID of the user and group the daemon should run under USERID=icecast2 GROUPID=icecast # Edit /etc/icecast2/icecast.xml and change at least the passwords. # Change this to true when done to enable the init.d script ENABLE=false
Bàsicament aquest fitxer indica que el fitxer de configuració principal és:
/etc/icecast2/icecast.xml
I que el servidor (executable: /usr/bin/icecast2 ) utilitzarà el usuari i grup:
USERID=icecast2 GROUPID=icecast
Finalment cal canviar:
ENABLE=true
Per tal de poder activar el servidor icecast amb:
$ sudo /etc/init.d/icecast2 start
El fitxer principal de configuració de icecast és: /etc/icecast2/icecast.xml. És tracta d'un fitxer en format XML.
Per poder editar/veure el fitxer us calen permisos de superusuari (el fitxer conté paraules de pas):
$ sudo geany /etc/icecast2/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>hackme</source-password> <!-- Relays log in username 'relay' --> <relay-password>hackme</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication> <!-- 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> --> <!-- 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> --> <!-- 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 may have multiple <listener> elements --> <listen-socket> <port>8000</port> <!-- <bind-address>127.0.0.1</bind-address> --> <!-- <shoutcast-mount>/stream</shoutcast-mount> --> </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>/example.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> <paths> <!-- basedir is only used if chroot is enabled --> <basedir>/usr/share/icecast2</basedir> <!-- Note that if <chroot> is turned on below, these paths must both be relative to the new root, not the original root --> <logdir>/var/log/icecast2</logdir> <webroot>/usr/share/icecast2/web</webroot> <adminroot>/usr/share/icecast2/admin</adminroot> <!-- <pidfile>/usr/share/icecast2/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>3</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>nobody</user> <group>nogroup</group> </changeowner> --> </security> </icecast>
Heu de modificar el fitxer /etc/icecast2/icecast.xml:
$ sudo joe /etc/icecast2/icecast.xml
I modificar la secció:
<authentication> <!-- Sources log in with username 'source' --> <source-password>hackme</source-password> <!-- Relays log in username 'relay' --> <relay-password>hackme</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>
Hi ha dos usuaris:
Hi ha 4 tipus:
<param name='program'></param> ...
Per indicar el mòdul es modifica la secció:
<module>...</module>
Per exemple la playlist és:
<module>playlist</module>
L'opció playlist és la més senzilla i podeu trobar un exemple pas a pas a aquesta wiki. En resum el que es fa es posar:
<param name='file'>PATH/playlist.txt</param>
El fitxer ha d'estar en format ASCII text plain contenen els camins absoluts de cada fitxer ogg, un fitxer per línia.
<module>stdinpcm</module> <param name='rate'>44100</param> <param name='channels'>2</param> ...
<module>oss</module> <param name='device'>/dev/dsp</param> <-- Specify which device to use. /dev/dsp is a good choice for OSS sound cards <param name='rate'>44100</param> <param name='channels'>2</param> <param name='metadata'>1</param> <-- If set to 1, you can update metadata on the fly. <param name='metadatafilename'>metadata_info</param> ...
TODO
Check the Ogg Vorbis comment field and header specification for tips on what to put here. If, for example, you were running an Internet radio station 24/7 encoded live, you could use this feature to update listeners about the current programme name, etc.
This is the name of the file to check for updated metadata
By default ices will read metadata from the standard input
(updating when it receives a blank line), but by setting the next parameter you can have it read from a designated file upon receipt of a USR1 signal. Metadata should contain 'name=value' pairs on separate lines. For example:
TITLE=Faster Than Snakes With A Ball And A Chain ARTIST=Cardiacs ALBUM=Greatest Hits CONTACT=http://www.cardiacs.com/
Si s'envia al servidor ice un senyal HUP signal, aleshores es mou cap a la següent cançó.
Random:
<param name='random'>1</param>
Repetir la llista:
<param name='once'>0</param>
Amb 0 és repeteix la llista infinitament.
Hi ha 4 tipus:
<param name='program'></param>
<module>stdinpcm</module> <param name='rate'>44100</param> <param name='channels'>2</param> ...
<module>oss</module> <param name='device'>/dev/dsp</param> <-- Specify which device to use. /dev/dsp is a good choice for OSS sound cards <param name='rate'>44100</param> <param name='channels'>2</param> <param name='metadata'>1</param> <-- If set to 1, you can update metadata on the fly. <param name='metadatafilename'>metadata_info</param> ...
TODO
Check the Ogg Vorbis comment field and header specification for tips on what to put here. If, for example, you were running an Internet radio station 24/7 encoded live, you could use this feature to update listeners about the current programme name, etc.
This is the name of the file to check for updated metadata
By default ices will read metadata from the standard input
(updating when it receives a blank line), but by setting the next parameter you can have it read from a designated file upon receipt of a USR1 signal. Metadata should contain 'name=value' pairs on separate lines. For example:
TITLE=Faster Than Snakes With A Ball And A Chain ARTIST=Cardiacs ALBUM=Greatest Hits CONTACT=http://www.cardiacs.com/
Random:
<param name='random'>1</param>
Repetir la llista:
<param name='once'>0</param>
Amb 0 és repeteix la llista infinitament.
Fitxer init script System V que permet controlar la execució del servidor icecast. Per iniciar el servidor
$ sudo /etc/init.d/icecast2 start icecast2 daemon disabled - read /etc/default/icecast2.
Si us surt el missatge/Error esmentat aleshores heu de canviar la variable ENABLE del /etc/default/icecast2 fitxer a:
ENABLE=true
I ara ja podeu activar el servidor:
$ sudo /etc/init.d/icecast2 start Starting icecast2: Starting icecast2 Detaching from the console icecast2.
$ file /usr/bin/icecast2 /usr/bin/icecast2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
El port per defecte de icecast és el port 8000. Aquest port no està especificat com port de icecast al fitxer /etc/services
Podeu comprovar que el port està en funcionament amb:
$ nmap localhost -p 8000 Starting Nmap 5.21 ( http://nmap.org ) at 2011-12-03 06:10 CET Nmap scan report for localhost (127.0.0.1) ... PORT STATE SERVICE 8000/tcp open http-alt
Un cop iniciat el servidor podeu accedir a l'aplicació web posant al navegador web:
http://localhost:8000
Per poder entrar a l'administrador cal utilitzar la paraula de pas que heu indicat al fitxer:
$ sudo cat /etc/icecast2/icecast.xml ... <authentication> <source-password>hackme</source-password> <relay-password>hackme</relay-password>
<admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>
Per defecte com podeu veure la paraula de pas és hackme i hi ha dos usuaris hackme i admin.
El menú d'administració té les següents parts:
Anem a veure com podem crear un servidor d'streaming d'audio amb Icecast2 utilitzant Ices2. Ices2 és un programa que envia dades d'àudio a un servidor Icecast per tal que aquest distribueixi l'audio entre els clients connectats al servidor. Ices2 tan pot llegir l'àudio provinent del disc dur (fitxers Ogg Vorbis) o agafar l'àudio desde una targeta de so i codificar-lo on the fly.
El primer que cal fer és instal·lar icecast2 i configurar l'autenticació
$ sudo apt-get install icecast2 $ sudo geany /etc/icecast2/icecast.xml
<authentication> <!-- Sources log in with username 'source' --> <source-password>hackme</source-password> <!-- Relays log in username 'relay' --> <relay-password>hackme</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>
Després instal·leu Ices2:
$ sudo apt-get install ices2
Ara cal crear les carpetes:
$ sudo mkdir /var/log/ices $ sudo mkdir /etc/ices2 $ sudo mkdir /etc/ices2/music
On
El paquet Ices2 bé amb tres exemples de fitxers de configuració:
/usr/share/doc/ices2/examples/ices-alsa.xml /usr/share/doc/ices2/examples/ices-oss.xml /usr/share/doc/ices2/examples/ices-playlist.xml
Els dos primers són per tal d'agafar l'àudio d'una targeta de so (utilitzant alsa o oss). L'últim és el que utilitzarem ja que ens permetrà emetre una llista de cançons
$ sudo cp /usr/share/doc/ices2/examples/ices-playlist.xml /etc/ices2
Ara editem el fitxer /etc/ices2/ices-playlist.xml i canviem
<background>0</background> --> <background>1</background> : Executa ices2 en segon terme
Ara canviem la secció
<metadata>...</metadata>
A la secció:
<input>...</input>
Poseu la llista de cançons que voleu reproduir:
<input> <module>playlist</module> <param name="type">basic</param> <param name="file">/etc/ices2/playlist.txt</param> <!-- random play --> <param name="random">0</param> <!-- if the playlist get updated that start at the beginning --> <param name="restart-after-reread">0</param> <!-- if set to 1 , plays once through, then exits. --> <param name="once">0</param> </input>
I finalment connectem ices2 amb el servidor icecast posant la paraula de pas de l'usuari source (la heu indicat al fitxer /etc/icecast2/icecast.xml )
No us oblideu de copiar els fitxers d'audio a la carpeta
/etc/ices2/music
Recordeu que l'àudio ha de ser en format ogg. Per posar algun exemple podeu obtenir música infantil amb llicència d'ús lliure a la web:
http://www.musiquetes.cat/
Us podeu descarregar les cançons amb:
$ cd /etc/ices2/music $ wget http://acacha.org/~sergi/musiquetes.tar.gz $ tar xvzf musiquetes.tar.gz
Ara heu de generar la playlist. A l'exemple la llista de cançons la hem posat al fitxer /etc/ices2/playlist.txt. Si teniu una carpeta amb els fitxers d'àudio ogg podeu crear aquest fitxer automàticament amb l'ordre find:
$ sudo bash -c "find /etc/ices2/music/ -name *.ogg > /etc/ices2/playlist.txt"
En el meu cas el fitxer conté
$ cat /etc/ices2/playlist.txt /etc/ices2/music/33.ogg /etc/ices2/music/32.ogg /etc/ices2/music/36.ogg /etc/ices2/music/24.ogg /etc/ices2/music/37.ogg /etc/ices2/music/41.ogg /etc/ices2/music/40.ogg /etc/ices2/music/39.ogg /etc/ices2/music/43.ogg /etc/ices2/music/38.ogg /etc/ices2/music/44.ogg /etc/ices2/music/35.ogg /etc/ices2/music/42.ogg /etc/ices2/music/34.ogg /etc/ices2/music/23.ogg
Un cop tot estigui configurat correctament executeu:
$ sudo ices2 /etc/ices2/ices-playlist.xml
Ara ja podeu anar al servidor d'streaming. Aneu a la web:
http://localhost:8000/
I us apareixerà:
Feu clic a l'enllaç m3u per tal de poder escoltar l'streaming d'audio.
Per tal que el servidor icecast arranqui per defecte a l'inici utilitzant ices2 cal modificar el init script del servidor icecast:
$ joe /etc/init.d/icecast2
I el deixem de la següent manera:
#! /bin/sh # # icecast2 # # Written by Miquel van Smoorenburg <[email protected]>. # Modified for Debian # by Ian Murdock <[email protected]>. # # Further modified by Keegan Quinn <[email protected]> # for use with Icecast 2 # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/icecast2 NAME=icecast2 DESC=icecast2 ICES=/usr/bin/ices2 ICES_CONFIGFILE=/etc/ices2/ices-playlist.xml test -x $DAEMON || exit 0 # Defaults CONFIGFILE="/etc/icecast2/icecast.xml" CONFIGDEFAULTFILE="/etc/default/icecast2" USERID=icecast2 GROUPID=icecast ENABLE="false" # Reads config file (will override defaults above) [ -r "$CONFIGDEFAULTFILE" ] && . $CONFIGDEFAULTFILE if [ "$ENABLE" != "true" ]; then echo "$NAME daemon disabled - read $CONFIGDEFAULTFILE." exit 0 fi set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \ --exec $DAEMON -- -b -c $CONFIGFILE sleep 3 start-stop-daemon --start --quiet --exec $ICES $ICES_CONFIGFILE echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --oknodo --quiet --exec $ICES start-stop-daemon --stop --oknodo --quiet --exec $DAEMON echo "$NAME." ;; reload|force-reload) echo "Reloading $DESC configuration files." start-stop-daemon --stop --oknodo --quiet --exec $ICES start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON sleep 3 start-stop-daemon --start --quiet --exec $ICES $ICES_CONFIGFILE ;; restart) echo -n "Restarting $DESC: " start-stop-daemon --stop --oknodo --quiet --exec $ICES start-stop-daemon --stop --oknodo --quiet --exec $DAEMON sleep 3 start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \ --exec $DAEMON -- -b -c $CONFIGFILE sleep 3 start-stop-daemon --start --quiet --exec $ICES $ICES_CONFIGFILE echo "$NAME." ;; *) echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0
Ara podeu executar:
$ sudo /etc/init.d/icecast2 restart
Per instal·lar aquesta aplicació:
$ sudo apt-get install ices2
Els fitxers instal·lats són
$ dpkg -L ices2 /. /usr /usr/bin /usr/bin/ices2 /usr/share /usr/share/doc /usr/share/doc/ices2 /usr/share/doc/ices2/buildinfo.gz /usr/share/doc/ices2/ices.init.example /usr/share/doc/ices2/README /usr/share/doc/ices2/TODO /usr/share/doc/ices2/AUTHORS /usr/share/doc/ices2/README.Debian /usr/share/doc/ices2/copyright /usr/share/doc/ices2/examples /usr/share/doc/ices2/examples/ices-alsa.xml /usr/share/doc/ices2/examples/ices-oss.xml /usr/share/doc/ices2/examples/ices-playlist.xml /usr/share/doc/ices2/html /usr/share/doc/ices2/html/ices-oss.xml /usr/share/doc/ices2/html/ices-alsa.xml /usr/share/doc/ices2/html/ices-playlist.xml /usr/share/doc/ices2/html/basic.html /usr/share/doc/ices2/html/config.html /usr/share/doc/ices2/html/faq.html /usr/share/doc/ices2/html/index.html /usr/share/doc/ices2/html/inputs.html /usr/share/doc/ices2/html/intro.html /usr/share/doc/ices2/html/style.css /usr/share/doc/ices2/changelog.Debian.gz /usr/share/doc-base /usr/share/doc-base/ices2 /usr/share/man /usr/share/man/man1 /usr/share/man/man1/ices2.1.gz
Podeu consultar el manual amb:
$ man ices2
$ cat /etc/ices2/ices-playlist.xml
<?xml version="1.0"?> <ices> <!-- run in background --> <background>0</background> <!-- where logs, etc go. --> <logpath>/var/log/ices</logpath> <logfile>ices.log</logfile> <!-- 1=error,2=warn,3=info,4=debug --> <loglevel>4</loglevel> <!-- set this to 1 to log to the console instead of to the file above --> <consolelog>0</consolelog> <!-- optional filename to write process id to --> <!-- <pidfile>/home/ices/ices.pid</pidfile> --> <stream> <!-- metadata used for stream listing (not currently used) --> <metadata> <name>Example stream name</name> <genre>Example genre</genre> <description>A short description of your stream</description> </metadata> <!-- input module The module used here is the playlist module - it has 'submodules' for different types of playlist. There are two currently implemented, 'basic', which is a simple file-based playlist, and 'script' which invokes a command to returns a filename to start playing. --> <input> <module>playlist</module> <param name="type">basic</param> <param name="file">playlist.txt</param> <!-- random play --> <param name="random">0</param> <!-- if the playlist get updated that start at the beginning --> <param name="restart-after-reread">0</param> <!-- if set to 1 , plays once through, then exits. --> <param name="once">0</param> </input> <!-- Stream instance You may have one or more instances here. This allows you to send the same input data to one or more servers (or to different mountpoints on the same server). Each of them can have different parameters. This is primarily useful for a) relaying to multiple independent servers, and b) encoding/reencoding to multiple bitrates. If one instance fails (for example, the associated server goes down, etc), the others will continue to function correctly. This example defines two instances as two mountpoints on the same server. --> <instance> <!-- Server details: You define hostname and port for the server here, along with the source password and mountpoint. --> <hostname>localhost</hostname> <port>8000</port> <password>hackme</password> <mount>/example1.ogg</mount> <!-- Reconnect parameters: When something goes wrong (e.g. the server crashes, or the network drops) and ices disconnects from the server, these control how often it tries to reconnect, and how many times it tries to reconnect. Delay is in seconds. If you set reconnectattempts to -1, it will continue indefinately. Suggest setting reconnectdelay to a large value if you do this. --> <reconnectdelay>2</reconnectdelay> <reconnectattempts>5</reconnectattempts> <!-- maxqueuelength: This describes how long the internal data queues may be. This basically lets you control how much data gets buffered before ices decides it can't send to the server fast enough, and either shuts down or flushes the queue (dropping the data) and continues. For advanced users only. --> <maxqueuelength>80</maxqueuelength> <!-- Live encoding/reencoding: Currrently, the parameters given here for encoding MUST match the input data for channels and sample rate. That restriction will be relaxed in the future. --> <encode> <nominal-bitrate>64000</nominal-bitrate> <!-- bps. e.g. 64000 for 64 kbps --> <samplerate>44100</samplerate> <channels>2</channels> </encode> </instance> </stream> </ices>
Sembla ser que la versió 1 de ices suporta mp3 en comptes de ogg.