Code Monkey home page Code Monkey logo

icecast-libshout's People

Contributors

chouquette avatar dm8tbr avatar epirat avatar jbkempf avatar joerg-krause avatar karlheyes avatar mlrsmithold avatar ph3-der-loewe avatar phschafft avatar tangent128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icecast-libshout's Issues

Built for windows

Hello everyone
I'm windows user, how can i compile libshout for windows in order to stream with my application?
Thanks Advance

URL-encoding of mountpoints …

I'm not sure if this is the right place to ask this. If there's a better place pls just point me there and excuse the inconvenience.

I just ran into an problem because libshout recently (for a debian-inspired meaning of "recently") started to URL-encode the mountpoint.

We're using mountpoints with a query string. On the server HTTP requests now changed:

SOURCE /m1?prio=3     HTTP/1.0  "ices/0.4 libshout/2.3.1"
SOURCE /m1%3fprio%3d3 HTTP/1.0  "ices/0.4 libshout/2.4.4"

This seems wrong. Was there any reason why that got changed?

Update: Started digging through the code here. I think I found the relevant part … and it seems, question marks should not get URL-encoded in 2.4.4 any more:

https://gitlab.xiph.org/xiph/icecast-libshout/-/blob/6c02a67d2326f81cfc2c5567615de19b646b4edd/src/proto_http.c#L104

I tried to pinpoint the exact version of the error but I had a really hard time because I would keep getting undefined reference to SSLeay_add_all_algorithms errors which only get fixed by v2.4.3. So all I can say is: v2.3.1 does not URL-escape mountpoint in the SOURCE connection, v2.4.3 does.

libshout with OpenSSL 1.1.0

libshout contains calls to deprecated functions in openssl 1.1.0 and fails to build correctly. Any chance of that getting updated?

OGG-FLAC support

Are there plans to include OGG-FLAC support for this library?

I have a work-in-progress fork in https://github.com/ziplantil/Icecast-libshout (compare) (under branch flac), but there are a couple of issues with it, which is why I chose to not do a PR just yet:

  • it modifies the m4 files, which are submoduled on this repo. The only change needed after cloning is moving flac.m4 under the m4 folder.
  • FLAC manages to encode long periods of silence into basically nothing, which seems to cause Icecast to raise a source timeout and cause a socket error (this might also be a programming error in the custom broadcasting program, though)
  • I'm not sure if the code breaks any guidelines that have been set out for this project specifically.

libshout and opus files.

Hello.

Wow for that great project.

Opus codec is used to play local opus-files and url-opus-files in a GitHub project.

https://github.com/fredvs/uos

All the C headers where translated in Pascal fpc code.
It works great.

Now I want to do audio-web-streaming.
It seems to me that Icecast+libshout would be the perfect choice.

I have translated the c header shout.h into Pascal fpc header, it works.
https://github.com/fredvs/uos/blob/master/src/uos_shout.pas
(By the way you are welcome to add it in your headers-addon).

Now the question:

What are the steps to use libshout ?
In a loop, a buffer of pcm is filled.
Could that buffer be used by libshout or must it be encoded into Opus-format ?
With what method must that buffer be assigned ?

All example code is highly welcome (in each language).

Many thanks.

Fre;D

Use-after-free bug after reopening connection

Since libshout 2.4.2, the library crashes due to a use-after-free and double-free bug if an application reopens the connection using shout_open() after a previous connection with the same shout_t had been closed by shout_close().
See MusicPlayerDaemon/MPD#622 for details and valgrind logs.
The crash bug was introduced by commit 3110fe3

Rant (off-topic but I have to tell it somewhere): bisecting your git repository was a desaster. Most commits (inside the merge dd98a9f) didn't even compile, and I had to apply manual changes to the source code in each bisect step to make it build. Your git history is a mess.

Error Connecting to shoutcast server

Hi,

Iam trying to connect to a SHOUTcast server but I got this message from my codes

Error connecting: No error

I connect using
1 - address
2 - port
3 - password

and this is the code i use which is in the Example, but I added reading an mp3 file and try to stream it

shout_t *shout;
    unsigned char buff[4096];
    long read, ret, total;

    FILE *f = fopen("D:/a.mp3", "rb");
    if (f)
    {
        int n = fread(buff, 4096, 1, f);
        std::cout << "READ DONE: " << n << std::endl;
    }
    else
    {
        // error opening file
    }

    shout_init();

    if (!(shout = shout_new())) {
        printf("Could not allocate shout_t\n");
        return 1;
    }

    if (shout_set_host(shout, "radio.co") != SHOUTERR_SUCCESS) {
        printf("Error setting hostname: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_protocol(shout, SHOUT_PROTOCOL_HTTP) != SHOUTERR_SUCCESS) {
        printf("Error setting protocol: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_port(shout, 1944) != SHOUTERR_SUCCESS) {
        printf("Error setting port: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_password(shout, "*******") != SHOUTERR_SUCCESS) {
        printf("Error setting password: %s\n", shout_get_error(shout));
        return 1;
    }
    if (shout_set_mount(shout, "/example.ogg") != SHOUTERR_SUCCESS) {
        printf("Error setting mount: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_user(shout, "source") != SHOUTERR_SUCCESS) {
        printf("Error setting user: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_format(shout, SHOUT_FORMAT_MP3) != SHOUTERR_SUCCESS) {
        printf("Error setting user: %s\n", shout_get_error(shout));
        return 1;
    }

    if (shout_set_nonblocking(shout, 1) != SHOUTERR_SUCCESS) {
      printf("Error setting non-blocking mode: %s\n", shout_get_error(shout));
      return 1;
    }

    ret = shout_open(shout);
    if (ret == SHOUTERR_SUCCESS)
      ret = SHOUTERR_CONNECTED;

    if (ret == SHOUTERR_BUSY)
      printf("Connection pending...\n");

    while (ret == SHOUTERR_BUSY) {
      usleep(10000);
      ret = shout_get_connected(shout);
    }

    if (ret == SHOUTERR_CONNECTED) {
        printf("Connected to server...\n");
        total = 0;
        while (1) {
            read = fread(buff, 1, sizeof(buff), stdin);
            total = total + read;

            if (read > 0) {
                ret = shout_send(shout, buff, read);
                if (ret != SHOUTERR_SUCCESS) {
                    printf("DEBUG: Send error: %s\n", shout_get_error(shout));
                    break;
                }
            } else {
                break;
            }
            if (shout_queuelen(shout) > 0)
                printf("DEBUG: queue length: %d\n",
                                        (int)shout_queuelen(shout));

            shout_sync(shout);
        }
    } else {
       // the Error is coming from this part.
        printf("Error connecting: %s\n", shout_get_error(shout));
    }

    shout_close(shout);

    shout_shutdown();
    puts("SHUTDOWN");

    return 0;

Full Reply from the console:

READ DONE: 1
Connection pending...
Error connecting: No error
SHUTDOWN

so what I did wrong or I missed something?

provide tarballs for users

Hello

currently the tarball is a copy of the git repo. Would it be possible that a tarball could be released with 'make dist', or better (for the devs) with 'make distcheck' ? If so, a tarball compressed with xz would also provide a smaller tarball.

thank you

Can not compile it via autogen.sh

Running this command after downloading the latest release of libshout 2.4.3:

"sh autogen.sh"

Without the quotes, leads to:

checking for autoconf...
checking for automake 1.6 or later... automake
checking for aclocal 1.6 or later... aclocal
checking for libtool... libtoolize
Generating configuration files for libshout, please wait....
aclocal -I /System/Shared/aclocal/ -I m4
/usr/share/aclocal/libxosd.m4:9: warning: underquoted definition of AM_PATH_LIBXOSD
/usr/share/aclocal/libxosd.m4:9: run info Automake 'Extending aclocal'
/usr/share/aclocal/libxosd.m4:9: or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoheader
libtoolize --automake
automake --add-missing
configure.ac:235: error: required file 'src/common/net/Makefile.in' not found
configure.ac:235: error: required file 'src/common/timing/Makefile.in' not found
configure.ac:235: error: required file 'src/common/thread/Makefile.in' not found
configure.ac:235: error: required file 'src/common/avl/Makefile.in' not found
configure.ac:235: error: required file 'src/common/httpp/Makefile.in' not found
src/Makefile.am:22: error: required directory src/common/avl does not exist
src/Makefile.am:22: error: required directory src/common/net does not exist
src/Makefile.am:22: error: required directory src/common/timing does not exist
src/Makefile.am:22: error: required directory src/common/httpp does not exist
src/Makefile.am:6: error: required directory src/common/thread does not exist

Hmm. Perhaps we could use meson or cmake as build system? Other autoconf
based projects work fine on my linux system here but libshout fails tragically.

A "configure" file is created but running this then leads to:

checking for gettimeofday... yes
checking for ftime... yes
checking for strcasestr... yes
checking for library containing nanosleep... none required
./configure: line 12944: XIPH_NET: command not found
./configure: line 12956: syntax error near unexpected token newline' ./configure: line 12956: ACX_PTHREAD('

No idea why that fails but it may be best to abandon the shell macro
hell that autoconf imposes onto mankind.

a potential bug of NPD

Hi, I found a potential null pointer dereference bug in the project source code of libshout, and I have shown the execution sequence of the program that may generate the bug on the graph below. The red text illustrates the steps that generate the bug, the red arrows represent the control flow,the file path can be seen in the blue framed section.
image
Although the code shown is for version 2.4.3 but is still exist in current version

would you can help to check if this bug is true?thank you for your effort and patience!

libshout hangs

Hi,

I updated libshout to latest version 2.4.2 but after few days I downgraded back to 2.4.1 because it causes Ezstream to hangs few times a day. Maybe it is some compatibility problem.

libshout-1:2.4.2-1 breaks live broadcasting Mixxx 2.2.1

Hey, libshout version 1:2.4.2-1 seems to break the Mixxx broadcasting. I can't connect to the server at all.

When I downgrade to libshout-1:2.4.1-4 the broadcast works again.

I'm using Manjaro stable, this uses the 1:2.4.2-1 version.

I'm not sure if this is a problem on the Mixxx side, or on the libshout side. Hence I posted this bug also on the Mixxx Launchpad. https://bugs.launchpad.net/mixxx/+bug/1833225

UPDATE: I also tested version 2.4.3 from git. This version is also broken. https://aur.archlinux.org/packages/libshout-git/

shout_set_metadata() for SHOUTcast

I've noticed that in shout_set_metadata(), the value of self->tls_mode remains SHOUT_TLS_AUTO even after connected to SHOUTcast server and always causes unsuccessful return. To (flat) icecast server, it is turned SHOUT_TLS_DISABLED and works fine.
FYI. Cheers.

TLS connection not closing

When I TLS-connect a source client (libshout 2.4.3) to an Icecast 2.4.4 server, the connection works as expected and I'm able to upload an audio stream. However, when I close that connection (shout_close) and kill the client, the newly-created Icecast mount point persists on the Icecast status page, even after the client has been killed. I have to use Icecast's admin interface to manually remove that mount point. This is not the case for non-TLS connections; the mount point goes away when the client does.

I'm not sure if the problem is with libshout or with icecast. With a TLS client, is there more that needs to be done to fully close a TLS connection, other than call shout_close? Thanks for your time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.