| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Mon Aug 14, 2006 1:26 pm Post subject: Ices 2 streaming from ALSA device = no sound |
|
|
I'd like to get Icecast working to send my sound output to the web, so that I can just broadcast whatever I'm playing on Amarok. I've gotten pretty much everything working, and I believe this is the last bug, but it's given me and a few others quite large headaches. Right now, here is my standing:
Working Icecast installation, serves up the ogg file, which can be played in a music player on another computer.
Amarok, using following settings:
xine engine
alsa output plugin
alsa device: "plug:surround51:0"
Ices config file (ices-stream.xml):
| Code: |
<?xml version="1.0"?>
<ices>
<!-- run in background -->
<background>1</background>
<!-- where logs, etc go. -->
<logpath>/var/log/icecast</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>Chuck Norris' Music</name>
<genre>Ass-kicking</genre>
<description>Music to which Chuck Norris habitually kicks ass.</description>
<url>edited out, fools</url>
</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>alsa</module>
<param name="rate">44100</param>
<param name="channels">2</param>
<param name="device">plug:surround51:0</param>
<param name="periods">2</param>
<param name="buffer-time">1000</param>
<param name="metadata">1</param>
<param name="metadatafilename">/home/leif/.ices/metadata</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>edited out, fools</port>
<password>edited out, fools</password>
<mount>/music.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>
<quality>4</quality> <!-- bps. e.g. 64000 for 64 kbps -->
<samplerate>44100</samplerate>
<channels>2</channels>
</encode>
</instance>
</stream>
</ices>
|
The part that bugs me is the
| Code: |
| <input><param name="device"> |
section. It seems as though it should work right there, and Ices in fact starts, but the ogg file, when opened on another computer, produces no sound whatsoever. I've also tried such things as
| Code: |
plughw:0,0
plug:0,0
hw:0,0
plughw:0,1 |
and so on, and so far, nothing works. Some exit with an error about not being able to open connector (actually, darkice gave me those nice error messages, I think Ices just fails silently), and a select few run perfectly, create music.ogg wonderfully, and produce no output. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Aug 14, 2006 8:14 pm Post subject: |
|
|
I could be wrong but I think plug:surround51 is for 5.1 playback. A quick search on google may indicate that the name you want for stereo capture in ices is plug:front
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Aug 14, 2006 8:20 pm Post subject: |
|
|
Well, Amarok is already using plug:surround51 just fine. I may have not made it clear that Amarok and Icecast are doing their jobs plenty well; it's the music.ogg that Ices creates that has no sound. Nevertheless I will try plug:front (although I think I already may have).
That didn't work. Ices didn't even start that time. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Aug 14, 2006 10:11 pm Post subject: |
|
|
The problem as you have described it is that ices is only capturing silence from alsa, so it's not an icecast issue. If silence is all that you get out then the question is what alsa settings do you need. You need to make sure that audio can be captured by ices, that involves configuring the mixer and picking the device. If arecord doesn't work then ices won't work either.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Aug 14, 2006 11:21 pm Post subject: |
|
|
| Can you help me figure that out, or point me to where I would need to go? If not that, at least what config files are you thinking I have to change? ALSA works fine other than this. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Aug 15, 2006 12:15 am Post subject: |
|
|
Don't bother with ices initially, just use arecord ("-f cd" at least) and play back the wav file for testing it. Search for alsa material that talks about what you want, maybe ask the alsa people for the specifics. Until you get audio out of the alsa system, ices won't be able to encode/stream it.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Tue Aug 15, 2006 4:31 am Post subject: |
|
|
The thing is, I'm a bit too new to understand exactly what you want ALSA to be doing (and what arecord is or should do, or how to use it, although man arecord should tell me more than you ideally). How am I not getting sound out of ALSA if Amarok is using it and I can hear things out of my speakers?
Okay, scratch that, I did arecord and got no sound, so I think I might understand the problem you're talking about. Even so, can you try to clarify (especially how I'm getting sound output in my room right now--that still puzzles me) what you mean? |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Nov 12, 2006 5:36 pm Post subject: |
|
|
I had this same problem with darkice and ALSA. I fixed it by setting the input in darkice to plughw:0,0, unmuting the PCM and Analog Mix inputs, and raising the volume on those to inputs to about 90%. YMMV but if you still are having this problem. Then I think doing something similar will solve the issue. I tested to see if it was properly set by running
| Code: |
| arecord -Dplughw:0 -d12 -f cd test.wav |
to record 12 seconds of sound and then I stopped whatever music I was playing and played back the file. I repeated this until it produced sound on playback. HTH |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|