[icecast] Adventures with icecast2

Geoff Shang gshang at uq.net.au
Wed Jun 6 08:05:58 UTC 2001



Hi all:

OK, this is one of those "why doesn't it work" type questions.  I'm
basically stumped.  All the server info in the xml file and example.c seem
to match, but it's coming back with an error 3 which is no login (as far
as I can understand).  There's nothing in the icecast2 logs to show that
an attempt has been made.

hmmm. It just occured to me that perhaps it's linking in the wrong version
of libshout.  I'm no C programmer so I don't know how to tell.  My
makefile looks like this:

all: example

example: example.c
        $(CC) -o example example.c -L../src -lshout -L../../log -logg -lvorbis

The question being, is it getting libshout from ../src or from /usr/lib?

Assuming that's all correct, the only thing I can think of is that either
my config and example.c do not agree, and/or one contains some sort of
syntax error.  I include both below.

A couple of other questions.  I know there was some discussion as to the
correct syntax for using the example program.  Is it indeed `cat foo.ogg
|./example` as posted on i.cantcode.com, or is this no longer correct?
Also, I'm guessing that the mount has to be in the form "/foo.ogg" in
order to work.  Is this correct?

Thanks,
Geoff.

My XML config:

<icecast>
        <location>Linux-speakup.org</location>
        <admin>geoff at braille.uwo.ca</admin>

        <limits>
                <clients>50</clients>
                <sources>2</sources>
                <threadpool>5</threadpool>
                <client-timeout>15</client-timeout>
        </limits>

        <source-password>audio</source-password>

        <directory>
                <touch-freq>5</touch-freq>
                <server>
                        <host>yp.icecast.org</host>
                        <touch-freq>15</touch-freq>
                </server>
        </directory>

        <hostname>bumpy.braille.uwo.ca</hostname>
        <port>9000</port>
        <!--<bind-address>129.100.109.31</bind-address>-->

        <paths>
                <basedir>/usr/friends/geoff/ice2</basedir>
                <logdir>/usr/friends/geoff/ice2</logdir>
        </paths>

        <logging>
                <accesslog>access.log</accesslog>
                <errorlog>error.log</errorlog>
        </logging>
</icecast>

and here's example.c:

#include <stdio.h>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <shout/shout.h>

int main()
{
        shout_conn_t conn;
        char buff[4096];
        long read, ret, total;

        shout_init_connection(&conn);

        conn.ip = "129.100.109.31";
        conn.port = 9000;
        conn.password = "audio";
        conn.mount = "/test.ogg";

        if (shout_connect(&conn)) {
                printf("Connected to server...\n");
                total = 0;
                while (1) {
                        read = fread(buff, 1, 4096, stdin);
                        total = total + read;

                        if (read > 0) {
                                ret = shout_send_data(&conn, buff, read);
                                if (!ret) {
                                        printf("DEBUG: Send error: %i...\n", conn.error);
                                        break;
                                }
                        } else {
                                break;
                        }

                        shout_sleep(&conn);
                }
        } else {
                printf("Couldn't connect...%i\n", conn.error);
        }

        shout_disconnect(&conn);

        return 0;
}
~

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list