Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Garbled Live Stream *asla*

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Tue Dec 09, 2008 7:06 pm    Post subject: Garbled Live Stream *asla* Reply with quote

I am trying to set-up a live stream. I't appears to be aetup most of the way but the playback is all garbled. words are missing and such so you can't make out a word anyone is saying. After a bit it quits anyway. I'd say after about 30 secs/. Is this a hardware issue or something with my settings? I don't see anything in the ices-alsa.xml that is configured wrong. Take a look and see if something is wrong.

ices-alsa.xml
Code:
<?xml version="1.0"?>
<ices>

    <!-- run in background  -->
    <background>0</background>
    <!-- where logs go. -->
    <logpath>/var/log/ices</logpath>
    <logfile>ices.log</logfile>
    <!-- size in kilobytes -->
    <logsize>2048</logsize>
    <!-- 1=error, 2=warn, 3=infoa ,4=debug -->
    <loglevel>4</loglevel>
    <!-- logfile is ignored if this is set to 1 -->
    <consolelog>0</consolelog>

    <!-- optional filename to write process id to -->
    <!-- <pidfile>/home/ices/ices.pid</pidfile> -->

    <stream>
        <!-- metadata used for stream listing -->
        <metadata>
            <name>Covenent Of Grace Ministry and Fellowship</name>
            <genre>Religous</genre>
            <description>CGMF Live Broadcast</description>
            <url>taken out</url>
        </metadata>

        <!--    Input module.

            This example uses the 'oss' module. It takes input from the
            OSS audio device (e.g. line-in), and processes it for live
            encoding.  -->
        <input>
            <module>alsa</module>
            <param name="rate">44100</param>
            <param name="channels">2</param>
            <param name="device">hw:0,0</param>
            <!-- Read metadata (from stdin by default, or -->
            <!-- filename defined below (if the latter, only on SIGUSR1) -->
            <param name="metadata">1</param>
            <param name="metadatafilename">test</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 a single instance doing live encoding at
            low bitrate.  -->

        <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>taken out</password>
            <mount>/cgmf_live.ogg</mount>
            <yp>1</yp>   <!-- allow stream to be advertised on YP, default 0 -->

            <!--    Live encoding/reencoding:

                channels and samplerate currently MUST match the channels
                and samplerate given in the parameters to the oss input
                module above or the remsaple/downmix section below.  -->

            <encode> 
                <quality>5</quality>
                <samplerate>24000</samplerate>
                <channels>2</channels>
            </encode>

            <!-- stereo->mono downmixing, enabled by setting this to 1 -->
            <downmix>1</downmix>

            <!-- resampling.
           
                Set to the frequency (in Hz) you wish to resample to, -->
             
            <resample>
                <in-rate>44100</in-rate>
                <out-rate>22050</out-rate>
            </resample>
        </instance>

    </stream>
</ices>


icecast.xml
Code:

<icecast>
    <limits>
        <clients>100</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>taken out</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>taken out</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>taken out</admin-user>
        <admin-password>taken out</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>localhost</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>127.0.0.1</server>
        <port>8001</port>
        <mount>/example.ogg</mount>
        <local-mount>/different.ogg</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>hackmemore</password>

        <max-listeners>1</max-listeners>
        <dump-file>/tmp/dump-example1.ogg</dump-file>
        <burst-size>65536</burst-size>
        <fallback-mount>/example2.ogg</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>

haven't checked the logs just yet. I know I should have but now but i'm a busy man. Wink THanks for your help

cheers
snares
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Dec 09, 2008 7:34 pm    Post subject: Reply with quote

your ices xml settings don't make sense. you capture at 44.1khz stereo. you have enabled downmix and resampling to 22khz and then told the encoder to encode assuming 24khz stereo.

try not using downmix and resampling and encode at 44.1khz stereo instead.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Thu Dec 11, 2008 4:20 am    Post subject: Reply with quote

If you haven't already guessed i'm a n00b at this icecast stuff. Thanks for the help I'll try that tomorrow and see what happens.
Back to top
View user's profile Send private message
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Thu Dec 11, 2008 7:05 am    Post subject: Reply with quote

I tried it but it didn't work. It did sound a little better though. So perhaps your on to something. Not sure if I shutoff resampling. I switched it so it now reads:
Code:
<resample>0</resample>

do just to repost it my ices-alas.xml reads as follows:
Code:

<?xml version="1.0"?>
<ices>

    <!-- run in background  -->
    <background>0</background>
    <!-- where logs go. -->
    <logpath>/var/log/ices</logpath>
    <logfile>ices.log</logfile>
    <!-- size in kilobytes -->
    <logsize>2048</logsize>
    <!-- 1=error, 2=warn, 3=infoa ,4=debug -->
    <loglevel>4</loglevel>
    <!-- logfile is ignored if this is set to 1 -->
    <consolelog>0</consolelog>

    <!-- optional filename to write process id to -->
    <!-- <pidfile>/home/ices/ices.pid</pidfile> -->

    <stream>
        <!-- metadata used for stream listing -->
        <metadata>
            <name>Covenent Of Grace Ministry and Fellowship</name>
            <genre>Religous</genre>
            <description>CGMF Live Broadcast</description>
            <url>taken out</url>
        </metadata>

        <!--    Input module.

            This example uses the 'oss' module. It takes input from the
            OSS audio device (e.g. line-in), and processes it for live
            encoding.  -->
        <input>
            <module>alsa</module>
            <param name="rate">44100</param>
            <param name="channels">2</param>
            <param name="device">hw:0,0</param>
            <!-- Read metadata (from stdin by default, or -->
            <!-- filename defined below (if the latter, only on SIGUSR1) -->
            <param name="metadata">1</param>
            <param name="metadatafilename">test</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 a single instance doing live encoding at
            low bitrate.  -->

        <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>taken out</password>
            <mount>/cgmf_live.ogg</mount>
            <yp>1</yp>   <!-- allow stream to be advertised on YP, default 0 -->

            <!--    Live encoding/reencoding:

                channels and samplerate currently MUST match the channels
                and samplerate given in the parameters to the oss input
                module above or the remsaple/downmix section below.  -->

            <encode>
                <quality>0</quality>
                <samplerate>44100</samplerate>
                <channels>2</channels>
            </encode>

            <!-- stereo->mono downmixing, enabled by setting this to 1 -->
            <downmix>0</downmix>

            <!-- resampling.
           
                Set to the frequency (in Hz) you wish to resample to, -->
             
            <resample>0</resample>
        </instance>

    </stream>
</ices>


I looked over my longs and didn't really find much of anything. One thing that might be helpful is in the ices log file it reads a warning:
Code:

WARN metadata/metadata_thread_signal Failed to open file "test" for metadata update: No such file or directory

shortly after that it sends a shutdown signal. Could this be causing the problem? What would I change metadata too? Or perhaps take it out?
Thank you again for your help.

cheers
snares
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Dec 11, 2008 2:05 pm    Post subject: Reply with quote

I'm not sure where you have seen that way of writing the resample tag, it is not valid for ices2, you either have it properly specified (if you really are resampling) or you don't specify it at all. A general rule is don't specify something if it has no use.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Thu Dec 11, 2008 4:28 pm    Post subject: Reply with quote

Okay I got the streaming working one problem though...lets see if I can describe this....it continues playing the stream but then starts the stream over after about 10 seconds while still playing the original stream. It will then open a new stream every 10 secs or so. Eventually it starts screeching and become inaudible. any ideas?

Cheers
Snares
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Dec 11, 2008 6:52 pm    Post subject: Reply with quote

it sounds like you are playing the audio on the same device you are capturing audio from, so you are getting a overlay of old captured data being re-captured.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Thu Dec 11, 2008 9:28 pm    Post subject: Reply with quote

I am playing this in another computer. But how would I fix this. I have a second card installed. The one for the capturing is the OnBoard sound and the add-on is a Sound Blaster. (Not sure which) I dont think I've mentioned i'm using Ubuntu Server 8.04 . I did a quick google search and for somehting talking about making a virtual soundcard. is that what I need to do or is the problem much simpler than that?

cheers
snares
Back to top
View user's profile Send private message
snaresV64



Joined: 09 Dec 2008
Posts: 10

PostPosted: Fri Dec 12, 2008 12:42 am    Post subject: Reply with quote

I came back to working on it a little more to figureout whats going on and I had an epiphany! What I was here was the speakers playing back my recording or the speakers. Ferstandy? The speakers I was listening to was listening to are near the mic but since there is a delay due to the encoding it comes lates the mic picked up and re-recorded it an played back making the problem I heard. I sticked the settings to go on two seprate cards I think. Whatever it's working. If it ain't broke dont fix it right?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
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