Link to home
Create AccountLog in
Avatar of sargent240
sargent240Flag for United States of America

asked on

darkice configuration

I am trying to get darkice running.  I have had it running in the past with the attached cfg file but I removed the hard drive that was being used and can place it at the present time.  The attached file is the cfg file I saved when the machine was running.  I am trying to run darkice using the attached cfg file and get the following error.  Any ideas?  Thanks.

linux-6yw2:/etc # darkice -c darkice.cfg                                                    
DarkIce 1.1 live audio streamer, http://code.google.com/p/darkice/                             
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/                                       
Copyright (c) 2008-2010, Akos Maroy and Rafael Diniz                                                      
This is free software, and you are welcome to redistribute it                                                                
under the terms of The GNU General Public License version 3 or                                                                
any later version.                                                                                                            
                                                                                                                               
Using config file: darkice.cfg                                                                                                
Using ALSA DSP input device: default                                                                                            
Using POSIX real-time scheduling, priority 4                                                                                    
DarkIce: TcpSocket.cpp:251: connect error [111]
darkice
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Is your icecast server running on your machine (on 127.0.0.1, on port 7000)?

When I had started icecast2, darkice got beyond the TCP error and complained about Lame libraries (which is fine because i hadn't installed them).

(edited to add port, and "Lame library" comment)
Avatar of sargent240

ASKER

Do I need icecast2?  Am I to understand that the darkice configuration file is directing it's output to :

http://krwsfm.com

and not using icecast2?  I guess I don't completely understand how they work.
According to the darkice documentation, the server and port point to an icecast2 server (in your config, it's running on port 7000 on the same machine as darkice).

Looking at "man darkice.cfg", it seems that darkice will take audio from your default sound card, and send it to the icecast2 server (localhost, port 7000).  Audio programs can then connect to the http://127.0.0.1:7000/live.mp3 (using the "mountpoint" setting in your config).  As far as i can tell, the "url" setting is just report by icecast2 when people connect to that stream.

If you are trying to capture output from krwfsm.com, I think you need a different program.
I am trying to stream an audio signal from the sound card.  I have had this working but it was originally setup ten years ago by an employee who is now gone.  The hard drive crashed so I am now trying to figure it out.  Listeners could dial into krwsfm.com, click on the work 'here' and it would stream the audio.  At some point over the past few years I backed up the darkice configuration file but did not backup the icecast2 configuration file.  If I understand you correctly, it appears as my darkice configuration file is correct however I need to setup the icecast2 configuration file.  Is there much to that?
It should (famous last words!) be fairly easy. I just downloaded the icecast2 package (mine was on Ubuntu) and it simply started. I didn't then try to stream, but there was plenty of help on the web when I had a quick look.
Well I have not had any luck getting my streaming going.  Do I need to do anything special with the icecast2 config file or do I use it straight out of the box.  I have not been able to make a lot of sense out of the things I have been seeing on the web so I came to experts exchange.  I'm also not certain my darkice configuration file is correct.  As I mentioned earlier I send a stream to my web site and listeners can then pick up from there.
Again, this is the error I am getting when I run darkice.

linux-6yw2:/home/al # darkice
DarkIce 1.1 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2010, Akos Maroy and Rafael Diniz
This is free software, and you are welcome to redistribute it
under the terms of The GNU General Public License version 3 or
any later version.

Using config file: /etc/darkice.cfg
Using ALSA DSP input device: default
Using POSIX real-time scheduling, priority 4
DarkIce: TcpSocket.cpp:251: connect error [111]
Have you changed the listen port from 8000 to 7000?
In /etc/icecast2/icecast.xml, edit the bit:

    <!-- 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>

(mine's at about line 59) and change 8000 to 7000.

Then restart with
    service icecast2 restart
Also make sure that the password is correct (your darkice.cfg has $argent, but the default one in icecast2.xml is $agent)
BTW, I set my machine up like this, and linked to http://my.ip.ad.dr:7000/live.mp3 and my browser started playing something.  I'm pretty sure it worked but a) there is nothing playing on the sound card, and b) the machine is 250 miles away so I can't hear any output :-)

I think your http://krwsfm.com/ site may need changing - the "Here" link points to http://digitaldevelopment.net/krws/mp3_stream.m3u.  I'm assuming that your darkice and icecast2 are actually running on http://digitaldevelopment.net, in which case the link should end with live.mp3 (not sure where the 'krws' bit fits).

I can check it properly when I get home on Friday.
somon3270 - did you get a chance to check it?  You were correct in your second paragraph when you suggested:

I think your http://krwsfm.com/ site may need changing - the "Here" link points to http://digitaldevelopment.net/krws/mp3_stream.m3u.


The site krwsfm.com should be digitaldevelopment.net.
Sorry, didn't get a chance (I work away from home during the week, so family weekend tasks took over!).

Once you've checked that the ports and passwords are correct, and restarted icecast2 and darkice, if you browse to http://digitaldevelopment.net/live.mp3 do you get any sound?
Well, back at it.  Here is what I have found.  On my web site I, when you click the word "Hear" it goes to executes

http://digitaldevelopment.net/krws/mp3_stream.m3u

in that file the only line is:

http://the ip address of my local computer:7000/live.mp3

Knowing that, would I only use darkice to create the live.mp3 file on my home computer.  Is my web site only being used to point to my local computer and funnelling the the audio without icecast or does icecast still have to be in the mix.  Thanksl
One other thing, when I enter:

http://digitaldevelopment.net/krws/mp3_stream.m3u

in my browser it brings up my audio player with live.mp3 in the play list.  It appears to me now all I need to do is get the stream in to live.mp3 on my local computer.
Looking good!

As far as I know, You still need darkice to read data from the audio card and feed the data directoy to icecast2, and then icecast2 so that you can stream that data from elsewhere on the network.
I guess I found that out after my last post.  It does appear the live.mp3 file must be on the machine that is running darkice and icecast, is that correct?  Am I to understand that who ever is clicking the hear button on the website will get the stream from the live.mp3 file that is being created by darkice and icecast on my machine at my office and all that will be handled by the mp3_stream.m3u file?
ASKER CERTIFIED SOLUTION
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
the mu3 file is on the internet server on our web site.  Darkice and icecast are on the same machine in my office.  That is the way it has been running over the last couple of years, I just lost the hard drive in the machine at my office that had icecast and darkice running.  I am going to try a couple of things and will let you know what I find.  I appreciate your help.
If I understand things right, darkice creates and keeps the live.mp3 file current on the machine that is running darkice, right?
There isn't an actual live.mp3 file that you can see in the filesystem - it's just that icecast2 sends data in mp3 format when you access the live.mp3 URL (via the playlist you mentioned).

You can grab an actual mp3 file from icecast2 by running:

     wget http://127.0.0.1:7000/live.mp3

and leave it running.  Ctrl-C to stop it.  you will then have a live.mp3 file in your current directory containing the data from when you started the "wget" command, up to when you pressed Ctrl-C.