[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?


My XML config:

        <admin>geoff at braille.uwo.ca</admin>







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;


        conn.ip = "";
        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);
                        } else {

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


        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