LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-19-2008, 09:54 PM   #1
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Rep: Reputation: 16
Need help with Icecast or Icecast2 setup


Hello all

I have a T-Mobile G1 cellphone. More like handheld computer. This thing is the nit of shiz. Anyway, there's a program on it that will receive Shoutcast feeds.


I have been searching around, and I've found a ton of people who say they use Icecast, several right here in LQ, and most say it's pretty straightforward to set up.

I'm sorry, I must be an idiot. I certainly feel like one.

I've been trying various options with my Debian Etch-provided Icecast, and I find the documentation lacking for this particular program. Maybe it makes some assumptions that the users magically know what each config option is and how each will be used.


I'm no newbie, and I'm no guru. I just need a good document to walk me through.

All that I've seen that actually says how to set up the system doesn't tell me how the stream gets from my MP3 files to my G1 through the network, and that's what I am looking for.

I realize I need a server (Icecast2) and I need a source (IceS2 in my case, or possibly XMMS with an Ices plugin). I *THINK* I've got Icecast2 serving, but it's quite clearly not configured right. I'm not sure if my xmms is feeding through to Icecast or not, and I can't get IceS2 to read the XML file (it's clearly not the same format as the Icecast one, because it refuses to read that one even with perms set a+rw on it). I've also been unsuccessful at finding a valid IceS2 config (googling "ices2 config.xml" was almost zero help).



Now, for all of you that are *successfully* hosting with IceCast and any source, would you mind kindly posting your how-I-did-its? Preferably, including config files would help -- I just need a very basic one to learn with.


What I want to do is serve my music collection to my internal LAN. I'm on 192.168.10.0/24, but I'd like to maintain the option of streaming to the world (I can config the router for port forwarding etc. just fine) as well, but as long as I can get it while I'm on my own network I'll be relatively satisfied.



FWIW, I already found http://en.flossmanuals.net/Icecast/CreatingAccounts and its related links, but it was of minimal help. It's a prime example of what I've found all over the net... It says how to set up the server, but that's it. No joy on setting up a SOURCE. I guess that's what I need most, IDK.

Oh, and a quick edit: I just nmapped my system and found the ports I'm using (let's call them 8000 and 8001 like in defaults) are indeed open for business.


ANY help at all?


Much appreciated!

CJ Chitwood





Edit - 2: I just found http://www.howtoforge.com/linux_webr...icecast2_ices2 and I'm hoping it will help but I will check back here in case it doesn't... I have to give up for tonight though... got an important test tomorrow morning at work and it's my only chance for promotion until they offer it again -- the last time was 2 years ago and I wasn't eligible so I need to get some sleep so I'm on top of my game. Thanks again for any help...

Last edited by CJ Chitwood; 11-19-2008 at 10:06 PM.
 
Old 11-20-2008, 08:39 AM   #2
headrift
Member
 
Registered: Sep 2005
Distribution: Gentoo, Sabayon, Puppy, Arch
Posts: 165

Rep: Reputation: 29
Okay, I've got an Icecast, so I'll take a stab at fielding this one.

You seem to already know that the basic flow goes something like this:

music files -> source -> server -> network -> client

...this is good. Means I can skip the really basic stuff.

I'd start by opening http://localhost:8000 and making sure the server is running. It should be pretty obvious if it is or not. If not, that's a problem for another post... let me know if I need to go there.

The relationship between the source and the server is what you're at right now. I'll leave source selection up to you, but guessing that you've got mp3s, I'd go with ices0, since ices2 is for ogg files.

Basically how this works is that you define a mount point on the server for the source (there should be an example in the xml config file), point the source at the server's mount point (again, look for examples in config files), put in the correct passwords, and there you go. The final URL will look something like http://hostname:8000/mountpoint.mp3 or similar.

If it seems like I'm being useless it's probably because I am... all I can really do is guess at your setup without your config files. If you could post those it would help a lot.
 
Old 11-20-2008, 12:36 PM   #3
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by headrift View Post
Okay, I've got an Icecast, so I'll take a stab at fielding this one.

You seem to already know that the basic flow goes something like this:

music files -> source -> server -> network -> client

...this is good. Means I can skip the really basic stuff.

I'd start by opening http://localhost:8000 and making sure the server is running. It should be pretty obvious if it is or not. If not, that's a problem for another post... let me know if I need to go there.

The relationship between the source and the server is what you're at right now. I'll leave source selection up to you, but guessing that you've got mp3s, I'd go with ices0, since ices2 is for ogg files.

Basically how this works is that you define a mount point on the server for the source (there should be an example in the xml config file), point the source at the server's mount point (again, look for examples in config files), put in the correct passwords, and there you go. The final URL will look something like http://hostname:8000/mountpoint.mp3 or similar.

If it seems like I'm being useless it's probably because I am... all I can really do is guess at your setup without your config files. If you could post those it would help a lot.
I shall try to post those when I get home.

I think I understand most of it. I believe what's confusing me then is mount points. How are they made? I assume the source "writes" to the "file" at the mount point and the server "reads" from this "file" to send it across the network... Is this correct?

Either way, I guess it's obvious I need to have the source and the server match WRT the mount points.

The server is working, I can browse to it, but I never get the "shortcut" or "link" to "listen" like the docs I've seen suggest, and when I look at server status, the number of connections just steadily increases constantly... no listeners connect.

I'll double check some stuff and if still at a loss I'll post my configs sometime tonight if I get the chance (probably after 7 PM EST).

Cheers,

CJ
 
Old 11-20-2008, 12:49 PM   #4
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
Thinking a little more... if Ices2 only supports Ogg, that may well be my problem. I realize filename makes little difference...


I have something that confused me earlier but I don't have an easy way to access it right now to properly express my question, so tonight I'll try to remember what it was and post when I can see my configs and docs and everything else. It has to do with mount points versus output/input files and such.


So simple, I'm sure, and once I understand it properly I'll probably feel like an idiot but it just eludes me right now...
 
Old 11-20-2008, 07:06 PM   #5
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
Sorry I'm late. I forgot earlier today that we were having company tonight.

As promised, my configs. Mind you, I've altered them from original and I am posting now before I do any more modding to them so that I can try a few more steps on my own, but here's what I have as of 2008-Nov-20 8:00 PM EST (Nov-21 0100 UTC)

/etc/icecast2/icecast.xml
Code:
<icecast>
    <limits>
        <clients>2</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>thisbethepass</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>thisbethepass</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>admin</admin-user>
        <admin-password>thisbethepass</admin-password>
    </authentication>

    <!-- 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>my.host.dot.my.domain</hostname>

    <!-- You can use these two if you only want a single listener -->
    <!--<port>8000</port>-->
    <!--<bind-address>127.0.0.1</bind-address>-->

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
    </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>my.host.dot.my.domain</server>
        <port>8001</port>
        <mount>/i-radio</mount>
        <local-mount>/tunes.mp3</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>thisbethepass</password>

        <max-listeners>2</max-listeners>
<!--
	<dump-file>/tmp/dump-example1.ogg</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/tunes.mp3</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>

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

    <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>4</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>

/etc/ices2/ices-playlist.xml
Code:
<?xml version="1.0"?>
<ices>
    <!-- run in background -->
    <background>1</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">1</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>thisbethepass</password>
            <mount>/tunes.mp3</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>
Of course, that's not the password I'll actually be using, nor the port I'll actually be using, nor my real URL (this is intended to be private, but I'm going on security by obscurity because I don't want to worry about complexing things up with authentications yet and I want to try accessing it from the world).

I've got a few Oggs floatin' about here somewhere, so let me try using one of them instead and see if I can get anywhere...


Still welcoming any input. thanks!

Last edited by CJ Chitwood; 11-20-2008 at 07:11 PM.
 
Old 11-20-2008, 07:28 PM   #6
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
Okay, I see already my mount names were different...



AH HAH!!!!!




Got OGGs playing! Now to flap about with getting MP3 to work with ices0... if I can get ices0 for Debian Etch...



Thank you though!



For posterity, future hasslers of this, etc., I will post some of what I've learned once I'm sure it all works 100% as expected....
 
Old 11-20-2008, 07:30 PM   #7
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,031

Rep: Reputation: 160Reputation: 160
I've been streaming for years, using winamp, shoutcast, xmms, icecast, gnump3, etc.

Currently, I use mpd >> icecast.

As per your original post, if you wish to stream *all* your music, and not just oggs, then xmms >> icecast would work. I use mpd because it uses less resources than xmms (which could prolly be debated, providing that you have xmms running without gui, etc.), but the point is moot.

I don't have a whole lot of time at the moment to go through your icecast & ices configs, but bear with me. I'll keep my eye on this thread and see if I can chip in as you progress....

You may also want to check out gnump3 as an all-in-one streaming solution....

I'll check back with you later.

cheers,
 
Old 11-20-2008, 07:59 PM   #8
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
Well, lemme ask this... as far as streaming goes, the reason I'm focusing on Icecast is that my new cellphone (T-mobile G1) has a program called "Nagare" that will let me receive -- on the phone -- Shoutcast streams, and of course, Icecast is Shoutcast compatible. Now, is there anything special about Shoutcast "format" or is it simply MP3 sent across the network? Will MPD send a Shoutcast stream?

Either way, I have it working with Oggs. If absolutely nothing else, I can transcode from mp3 to ogg with marginal loss of quality (and I mean, let's face it, web streaming will NOT be the same quality as listening to the whole file anyway, so no big deal here...). Prob is, that's pretty time consuming and annoying, to say nothing of spacehogging. What I plan to do now is figure out how to get it to do MP3, whether by running xmms with an output plugin or by installing ices0, and go from there...


As far as XMMS goes, when I run it with the casting plugin, it basically just replaces Ices as a source, right?
 
Old 11-20-2008, 09:38 PM   #9
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
SOLVED!

Purpose: Streaming from MP3 to T-Mobile G1 / HTC Dream / Google Phone (among others such as regular laptops etc) in Shoutcast compatible media.


Packages required: (On server) ices0, icecast2, plus all dependencies. I personally have installed quite a few packages I now will not be using, and unfortunately do not know an easy way to make a list of what's actually required. However, ices0 and icecast2 are the main ones I'm using. Anything they require, you'll need. Also, as ices0 is only available as source for Debian etch amd64, you may want checkinstall as well. It REALLY helps with installing compiled apps as now they show up in synaptic etc. and can be removed easily if necessary. If compiling ices0 from source, you'll also need libspeex-dev and libshout3-dev along with typical dev tools.


Setup: Must run icecast2 BEFORE ices0 from what I've read. They can be set as services, but that's more than I need right now and I'll tackle it later. My configs are as follows (replace obvious things like hostname to match your system)...

/etc/local/etc/ices.conf.dist can be copied to any directory and edited to suit your needs. For me, there is an /etc/ices2 directory that I was using for OGG streaming and I just used that. From what I'm seeing, ices0 automatically searches the present working directory for ices.conf and if available uses it. (see man (1) ices)

I'm not sure where the unmodified original icecast2 xml config file is, so feel free to edit mine.


My working icecast.xml (with commented sections removed for clarity):
Code:
<icecast>
    <limits>
        <clients>5</clients>
        <sources>5</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-on-connect>1</burst-on-connect>
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <source-password>make-your-own-password</source-password>
        <relay-password>make-your-own-password</relay-password>

        <admin-user>admin</admin-user>
        <admin-password>make-your-own-password</admin-password>
    </authentication>



    <!-- The next several lines will eventually build the URL to be
         used.  The format is as follows:
         
         http://{hostname}:{port}{mount-name}

         hence, if your hostname is chunky.monkey.com and you 
         serve on port 8000 with a mount of "/tunes.mp3" then
         the browser/listening device will use the url

         http://chunky.monkey.com:8000/tunes.mp3

         Note here that the hostname contains NEITHER the http://
         NOR the forward slash on the end.  The http:// is 
         automatic and the forward slash is on the BEGINNING of 
         the mount-name.
-->

    <!-- hostname can be the FQDN, "localhost", "127.0.0.1",
         "192.168.x.y", whatever.  If you can ping it and get
         a response, then it is what goes here. -->
    <hostname>myserver.mydomain.tld</hostname>

    <listen-socket>
        <port>8000</port>
    </listen-socket>
    
    <!--optional...-->
    <listen-socket>
        <port>8001</port>
    </listen-socket>
    

    <mount>

        <mount-name>/tunes.mp3</mount-name>

        <username>source</username>
        <password>make-your-own-password</password>

        <max-listeners>5</max-listeners>

        <hidden>1</hidden>
        <no-yp>1</no-yp>
    </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>

        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
      	<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
      	<logsize>10000</logsize> <!-- Max size of a logfile -->
    </logging>

    <security>
        <chroot>0</chroot>
    </security>
</icecast>
My ices.conf:
Code:
<?xml version="1.0"?>
<ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices">
  <Playlist>
    <File>playlist.txt</File>
    <Randomize>1</Randomize>
    <!-- One of builtin, perl, or python. -->
    <Type>builtin</Type>
    <Module>ices</Module>

    <!-- number of seconds of crossfade if enabled -->
    <!--
    <Crossfade>5</Crossfade>  
    -->
  </Playlist>

  <Execution>
    <!-- Set this to 1 if you want ices to launch in the background as a
         daemon -->
    <Background>0</Background>
    <Verbose>0</Verbose>
    <!-- This directory specifies where ices should put the logfile, 
         cue file and pid file (if daemonizing). Don't use /tmp if 
         you have l33t h4x0rz on your server. -->
    <BaseDirectory>/tmp</BaseDirectory>
  </Execution>

  <Stream>
    <Server>
      <!-- Should match details found in icecast.xml -->
      <Hostname>myserver.mydomain.tld</Hostname>
      <Port>8000</Port>
      <Password>make-your-own-password</Password>
      <!-- Header protocol to use when communicating with the server.
           Shoutcast servers need "icy", icecast 1.x needs 
           "xaudiocast", and icecast 2.x needs "http". -->
      <Protocol>http</Protocol>
    </Server>

    <Mountpoint>/tunes.mp3</Mountpoint>

    <!-- The following is data fed in the stream similar to 
         digital radio data displayed on newer car radio 
         readouts (displayed on directories and the like) -->
      <!-- The name of your stream, not the name of the song! -->
      <Name>Default stream</Name>
      <!-- Genre of your stream, be it rock or pop or whatever -->
      <Genre>Default genre</Genre>
      <!-- Longer description of your stream -->
      <Description>Default description</Description>
      <!-- URL to a page describing your stream -->
      <URL>http://localhost/</URL>
      <!-- 0 if you don't want the icecast server to publish your 
           stream on the yp server, 1 if you do -->
      <Public>0</Public>

      <!-- Stream bitrate, used to specify bitrate if reencoding,
           otherwise just used for display on YP and on the server.
           Try to keep it accurate -->
      <Bitrate>128</Bitrate>


    <!-- If this is set to 1, and ices is compiled with liblame 
         support, ices will reencode the stream on the fly to the 
         stream bitrate. -->
    <Reencode>0</Reencode>
    <Channels>2</Channels>
  </Stream>
</ices:Configuration>


Remember that I've stripped [most] comments [and added a very few of my own]. These are posted as quick-start configs. Google for more info, but these worked for me. Very simple, one stream, all the files in the playlist (which, btw, has no format other than one complete filename per line... no "file1=" bits nor any other code. Just filenames, 1 per line.).




Now, start icecast2. For me (note my present working directories!):
Code:
[Dorian][pts/2]
[cj][/etc/icecast2]$ icecast2 -c ./icecast.xml

And then start ices:
Code:
[Dorian][pts/5]
[cj][/etc/ices2]$ ices

Open stream in a separate device. URL to use with MY configs is:

http://myserver.mydomain.tld:8000/tunes.mp3

Of course, my setup uses a REAL servername, a different port number, and different passwords, but these technically should work as is.


Now I just have to figure out why there's a brief pause/skip/silence every few seconds...

Last edited by CJ Chitwood; 11-20-2008 at 09:45 PM.
 
Old 11-22-2008, 08:11 AM   #10
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Jacksonville, FL
Distribution: Mint. Regrettably.
Posts: 127

Original Poster
Rep: Reputation: 16
ADDENDUM:


Most of my MP3s are 192 kbps and above. In anything less, there's this high-pitched warbly garbly echo-y noise in it (very upper part of the audible spectrum). I don't hear it in 192+. But, when listening to the music across a shoutcast stream, I don't notice the noise as much (it's there if I listen for it) because I'm accustomed to hearing it on something like a cellphone or internet stream (I use my Google/HTC/T-Mobile G1 for this connected via WiFi so I have my tunes anywhere in the house)(of course I could just put my entire MP3 collection on the G1, but this is cooler on the geek points). Now, sending 192+ kilobits per second across a slow cellphone EDGE network connection (no T-Mo 3G for Jacksonville, FL in the foreseeable future) really, REALLY makes it choppy, laggy, and completely unlistenable.

To resolve this, you need to be able to re-encode the mp3s from their original bitrate to something more network friendly, like 128 kbit (at MOST for a high-speed connection) or 96 kbit. Sometimes even lower is necessary. Ices0 out of the tarball does not support MP3 reencode, but a little googling has shown me how to get it done.

In addition to ices0, you'll need the devel versions of these encoders. For Debian, you need package liblame-dev for mp3 reencode. I also installed libvorbis-dev, libfaac-dev, libflac-dev, libflac++-dev, and libfaad-dev, along with their non-dev versions, for support of MP4, Vorbis, FLAC etc., but I'm not sure what all I can do with them now (I put them there for experimentation later).

Then, go back to the source, and when you run ./configure, add --with-lame to the mix. In fact, at the end of the configure, it prints to screen what it has:

Code:
Features:
  XML     : yes
  Python  : no
  Perl    : no
  LAME    : yes
  Vorbis  : yes
  MP4     : no
  FLAC    : yes
so if you want one of these, the command is ./configure --with-{feature-in-lowercase} e.g. "./configure --with-mp4 --with-flac --with-lame".


I hope this helps somebody.
 
  


Reply

Tags
audio, cast, config, icecast, icecast2, mp3, ogg, server, setup, streaming


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Run Your Own Webradio Station With Icecast2 And Ices2 LXer Syndicated Linux News 0 02-18-2007 03:16 PM
Icecast2 radio setup RestInPieces Linux - Software 0 07-01-2006 11:46 AM
Icecast 2 grayram Linux - Newbie 12 11-27-2004 12:54 AM
ICECAST setup info for debian woody rmanocha Linux - Software 2 01-05-2004 01:58 AM
Streaming live audio from line-in (Icecast2 Trouble) sonnik Linux - General 0 09-09-2003 08:45 AM


All times are GMT -5. The time now is 03:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration