Solved

darkice configuration

Posted on 2014-03-05
21
1,245 Views
Last Modified: 2014-06-04
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
0
Comment
Question by:sargent240
  • 11
  • 10
21 Comments
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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)
0
 

Author Comment

by:sargent240
Comment Utility
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.
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
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?
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
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]
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
Have you changed the listen port from 8000 to 7000?
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
Also make sure that the password is correct (your darkice.cfg has $argent, but the default one in icecast2.xml is $agent)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
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.
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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?
0
 

Author Comment

by:sargent240
Comment Utility
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
0
 

Author Comment

by:sargent240
Comment Utility
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.
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
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?
0
 
LVL 19

Accepted Solution

by:
simon3270 earned 500 total points
Comment Utility
You need to run darkice on the machine with the audio card. You should be able to run icecast2 on another machine, as long as the darkice configuration points to that machine. Then the .m3u file is best on the same machine as icecast2.
0
 

Author Comment

by:sargent240
Comment Utility
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.
0
 

Author Comment

by:sargent240
Comment Utility
If I understand things right, darkice creates and keeps the live.mp3 file current on the machine that is running darkice, right?
0
 
LVL 19

Expert Comment

by:simon3270
Comment Utility
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.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now