xiph / icecast-libshout Goto Github PK
View Code? Open in Web Editor NEWIcecast project live streaming library (Mirror) - Please report bugs at https://gitlab.xiph.org/xiph/icecast-libshout/issues
License: Other
Icecast project live streaming library (Mirror) - Please report bugs at https://gitlab.xiph.org/xiph/icecast-libshout/issues
License: Other
Hello everyone
I'm windows user, how can i compile libshout for windows in order to stream with my application?
Thanks Advance
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:
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.
how do i build it with?
i have visual studio code and everything i have msys2 so please tell me how to build this
libshout contains calls to deprecated functions in openssl 1.1.0 and fails to build correctly. Any chance of that getting updated?
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:
Hello.
Wow for that great project.
Opus codec is used to play local opus-files and url-opus-files in a GitHub project.
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
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.
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?
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
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.
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.
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!
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.
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/
Icecast-libshout/src/Makefile.am
Line 25 in 0623736
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.