darkice + icecast2 + alsa

Alejandro Valdes Jimenez avaldes en utalca.cl
Mar Ago 29 18:32:10 CLT 2006


Estimados.

Estoy probando esta configuración, pero he tenido algunos problemas. En
particular, no llega audio a los clientes que escuchan la radio, pese a
que se pueden conectar.

En un PC tengo corriendo Icecast2 y en otro tengo darkice, ademas de
utilizar xmms para enviar la musica. Utilizo ALSA.

Compile darkice para soportar ALSA y MP3 (lame)

Esta es la salida al ejecutar darkice:

----
Using config file: darkice.cfg
29-Aug-2006 18:26:25 Using ALSA DSP input device: plughw:0,0
29-Aug-2006 18:26:25 encoding
29-Aug-2006 18:26:25 scheduler high priority 99
29-Aug-2006 18:26:25 Using POSIX real-time scheduling, priority 98
29-Aug-2006 18:26:25 BufferedSink, new peak: 8
29-Aug-2006 18:26:25 BufferedSink, remaining: 61432
29-Aug-2006 18:26:25 BufferedSink, new peak: 9
29-Aug-2006 18:26:25 BufferedSink, remaining: 61431
29-Aug-2006 18:26:25 BufferedSink, new peak: 15
29-Aug-2006 18:26:25 BufferedSink, remaining: 61425
29-Aug-2006 18:26:25 BufferedSink, new peak: 22
29-Aug-2006 18:26:25 BufferedSink, remaining: 61418
29-Aug-2006 18:26:25 BufferedSink, new peak: 61
29-Aug-2006 18:26:25 BufferedSink, remaining: 61379
29-Aug-2006 18:26:26 set lame mode 1
29-Aug-2006 18:26:26 set lame channels 2
29-Aug-2006 18:26:26 set lame in sample rate 11025
29-Aug-2006 18:26:26 set lame out sample rate 11025
29-Aug-2006 18:26:26 set lame abr bitrate 3
29-Aug-2006 18:26:26 set lame abr mean bitrate 96
29-Aug-2006 18:26:26 set lame lowpass frequency 0
29-Aug-2006 18:26:26 set lame highpass frequency 0
29-Aug-2006 18:26:26 set lame psycho acoustic model 1
29-Aug-2006 18:26:26 set lame error protection 1
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Using polyphase lowpass filter, transition band:  5379 Hz -  5512 Hz
29-Aug-2006 18:26:26 MultiThreadedConnector :: tranfer, bytes 0
29-Aug-2006 18:26:26 MultiThreadedConnector :: ThreadData ::
threadFunction, was (thread, priority, type):  0x80a2e08 98 SCHED_FIFO
29-Aug-2006 18:26:26 MultiThreadedConnector :: ThreadData ::
threadFunction, now is (thread, priority, type):  0x80a2e08 1 SCHED_FIFO
29-Aug-2006 18:26:26 BufferedSink, new peak: 579
29-Aug-2006 18:26:26 BufferedSink, remaining: 60861
-----


si ejecuto lsof para ver archivos abiertos, obtengo:

---
mixer_app  7398  alejandro   38u      CHR      116,0
4338 /dev/snd/controlC0
xmms      18539  alejandro  mem       CHR     116,16
4322 /dev/snd/pcmC0D0p
xmms      18539  alejandro    8u      CHR      116,0
4338 /dev/snd/controlC0
xmms      18539  alejandro   11u      CHR     116,16
4322 /dev/snd/pcmC0D0p
darkice   18554       root  mem       CHR     116,24
4326 /dev/snd/pcmC0D0c
darkice   18554       root    5u      CHR     116,24
4326 /dev/snd/pcmC0D0c
-----

el archivo de configuracion de darkice es:

----
# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
#duration        = 60       # duration of encoding, in seconds. 0 means
forever
duration        = 0         # duration of encoding, in seconds. 0 means
forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
# device          = /dev/dsp  # OSS DSP soundcard device for the audio
input
device          = plughw:0,0      # ALSA soundcard device for the audio
input
sampleRate      = 11025       # sample rate in Hz. try 11025, 22050 or
44100
bitsPerSample   = 16          # bits per sample. try 16
channel         = 2           # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to an IceCast2 server
# there may be up to 8 of these sections, named [icecast2-0] ...
[icecast2-7]
# these can be mixed with [icecast-x] and [shoutcast-x] sections
[icecast2-0]
bitrateMode     = abr       # average bit rate
#format          = vorbis   # format of the stream: ogg vorbis
format          = mp3       # format of the stream: mp3
bitrate         = 96        # bitrate of the stream sent to the server
server          = miserver.cl
                            # host name of the server
port            = puerto      # port of the IceCast2 server, usually
8000
password        = clave   # source password to the IceCast2 server
mountPoint      = fm        # mount point of this stream on the IceCast2
server
name            = Radio prueba
                            # name of the stream
description     = mi radio
                            # description of the stream
url             = http://miserver.cl:
                            # URL related to the stream
genre           = Clasica   # genre of the stream
public          = yes       # advertise this stream?
-------


Alguna sugerencia?

Gracias de antemano.

NOTA: Probé anteriormene con winamp + shoutcast y funciona sin
problemas.




-- 
Alejandro Valdés Jiménez.
Plataforma
DTI - Dirección de Tecnologías de Información
Universidad de Talca.
Talca - Chile.
Teléfono: (56) (71) 200408



Más información sobre la lista de distribución Linux