Code Monkey home page Code Monkey logo

icecast-server's Introduction

Icecast 2 - README

Build Status

Icecast is a streaming media server which currently supports WebM and Ogg streaming including the Opus, Vorbis and Theora codecs. Also Icecast can handle other streams like MP3/AAC/NSV in legacy mode, but this is not officially supported.

It can be used to create an Internet radio station or a privately running jukebox and many things in between. It is very versatile in that new formats can be added relatively easily and supports open standards for communication and interaction.

Icecast is distributed under the GNU GPL, version 2. A copy of this license is included with this software in the COPYING file.

The name of this software is spelled "Icecast" with a leading capital 'I' but with a lower case 'c'. Any other spelling is incorrect.

Prerequisites

Icecast requires the following packages:

NOTE: Icecast may be compiled without curl, however this will disable Stream Directory server interaction (YP) and URL based authentication.

A note about prerequisite packages

Most distributions have some sort of package management repository for pre-built packages (eg rpm, deb etc). These setups often have a runtime package, which is usually installed for you by default, and enables you to run applications that depend on them. However if you are building Icecast from source then the runtime system is not enough. You will also need a development package named something like libxslt-devel

Build/Install

To build Icecast on a Unix platform, perform the following steps:

Run

./configure
make
make install  # as root

This is the typical procedure if you download the tar file.

If you retrive the code from Git, make sure to clone recursively:

git clone --recursive https://git.xiph.org/icecast-server.git

After that, create the configure script by running: ./autogen.sh. Now you can just follow the steps mentioned above.

A sample config file will be placed in /usr/local/etc (on UNIX, also depends on path PREFIX) or in the current working directory (on Win32) and is called icecast.xml

Documentation for Icecast is available in the doc directory, by viewing doc/index.html in a browser. It's also installed to $PREFIX/share/doc/icecast/. Online documentation can be found on the Icecast Website.

If you have problems with setting up Icecast, please join the Icecast mailing list and then email [email protected]. In case you have patches or want to discuss development issues, please join the Icecast developer mailing list and then email [email protected]. Or come and see us on irc.freenode.net, channel #icecast (please be patient, people are not always at their computers).

icecast-server's People

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

icecast-server's Issues

Not able to clone "Connection timed out" Error

Relay-1:~# git clone --recursive https://git.xiph.org/icecast-server.git
Cloning into 'icecast-server'...
fatal: unable to access 'https://git.xiph.org/icecast-server.git/': Failed to connect to git.xiph.org port 443: Connection timed out

Relay-1:~# git clone --recursive http://git.xiph.org/icecast-server.git
Cloning into 'icecast-server'...
fatal: unable to access 'http://git.xiph.org/icecast-server.git/': Failed to connect to git.xiph.org port 80: Connection timed out

Relay-1:~# git clone http://git.xiph.org/icecast-server.git
Cloning into 'icecast-server'...
fatal: unable to access 'http://git.xiph.org/icecast-server.git/': Failed to connect to git.xiph.org port 80: Connection timed out

Add configurable support to respect the "X-Forwarded-For" header for listener metrics

As the developer of a radio webcast management tool, I have been asked by multiple users to implement support for the main branch of Icecast, as opposed to the current support my application has for a custom compiled copy of Icecast-KH.

One of the largest obstacles to switching back to the main Icecast branch is the fact that there exist a number of radio licensing services that offer to proxy a radio connection through their servers, track the traffic and ensure royalties are paid accordingly. Because the traffic arriving at Icecast's doorstep appears to all be from the same IP, however, it's impossible to distinguish the actual listeners in question or their geographic areas.

Karl Heyes had adopted a somewhat novel solution to this problem: specifying a whitelist of IPs that are allowed to send the X-Forwarded-For header as part of their traffic. If the inbound listener has this header and is being proxied from a whitelisted IP, the internally referenced IP is updated to the forwarded address instead, allowing for proper metrics and tracking. Unfortunately, a limitation of this approach is that every IP that will send the header must be known ahead of time, which is impossible if IPs are dynamically assigned (a-la Docker containers) from a broad pool.

If this feature or some facsimile of it were implemented on the main Icecast branch (alongside the SSL improvements that enable LetsEncrypt, see ticket #20) it would far and away be the key to ensuring that several radio services feel comfortable making the switch back to the main branch.

I'm not sure that this Github Issues section is heavily used by the Icecast dev team, but hopefully the feedback gets into the right hands. Thank you for your time!

Parametrize TLS/SSL Protocol in Icecast config file

We currently have the option of enabling SSL, defining ciphers and certificate files. Would you please add the option to define the protocol.

Example could be:
<SSL_Protocol>SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3</SSL_Protocol>

The current ability to define ciphers is great but some ciphers are backwards compatible. From a security standpoint, it would be great to be able to control the protocols available.

Is there a workaround for me without needing to recompile as I've installed from Xiph repository.

Thank you so much for your time!

Point listeners to different listener URL

So first love all the work @xiph is doing to support internet radio and broadcast. However we have an odd request.
We are wondering if it is possible to instead of showing server listener link on the YP directory, if instead we can put a custom URL listener link that is hosted say on our web server.

Why?
We have icecast servers in AU,US,UK and we have them clustered so they all get the same music etc etc. However the cluster does not send a user to the closest server so we created a script that can do that by looking at the users IP address.

We would almost call this a middleware solution to a small problem, but it's really cool from the part that a service provider can allow broadcasters to know that we are doing the server management and making sure that no listener has a bad experience.

So basically I want to change the published URL listener link to for example https://example.com/ID_of_Station and still publish it to YP directory.

configuring error

When executing ./autogen.sh:

configure.ac:201: the top level
configure.ac:209: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd
m4/with_pkg.m4:34: PKG_WITH_MODULES is expanded from...
m4/with_pkg.m4:64: PKG_HAVE_WITH_MODULES is expanded from...
configure.ac:209: the top level
configure.ac:20: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:14526: error: possibly undefined macro: m4_n
autoreconf: /usr/bin/autoconf failed with exit status: 1

:) fixed, had to install pkg-config package.

HTTPS URL fails after a second or two

I have downloaded Icecast 2.4.4 from http://downloads.xiph.org/releases/icecast/icecast-2.4.4.tar.gz and configured it with SSL:

./autogen.sh 
./configure --with-curl --with-openssl
make

I have obtained a certificate using certbot / letsencypt and everything seems to work. Then about once a week a problem appears with one of the streams over HTTPS where the stream plays for a moment and then stops. This can be solved by restarting the icecast service with sudo systemctl restart icecast.service

There are no errors reported in /var/log/icecast/error.log, although I have only just increased the log level to 4/DEBUG so hopefully something useful might appears here.

The server has plenty of RAM and CPU spare (debian 10 OS).

Here are some possibly relevant section of the config file:

<limits>
    <clients>1000</clients>
    <sources>16</sources>
    <client-timeout>30</client-timeout>
    <header-timeout>15</header-timeout>
    <source-timeout>10</source-timeout>
    <queue-size>2000000</queue-size>
    <burst-on-connect>1</burst-on-connect>
    <burst-size>500000</burst-size>
</limits>
<listen-socket>
    <port>80</port>
    </listen-socket>       
<listen-socket>
    <port>443</port>
    <ssl>1</ssl>
</listen-socket>
<http-headers>
    <header name="Access-Control-Allow-Origin" value="*" />
</http-headers>
<paths>
    <basedir>/usr/local/share/icecast</basedir>
    <logdir>/var/log/icecast2</logdir>
    <webroot>/usr/local/share/icecast/web</webroot>
    <adminroot>/usr/local/share/icecast/admin</adminroot>
    <alias source="/" destination="/status.xsl"/>
    <ssl-certificate>/etc/icecast2/bundle.pem</ssl-certificate>
</paths>
<logging>
    <accesslog>access.log</accesslog>
    <errorlog>error.log</errorlog>
    <playlistlog>playlist.log</playlistlog>
    <loglevel>4</loglevel>
    <logsize>1000000</logsize>
</logging>
<security>
    <chroot>0</chroot>
    <changeowner>
        <user>icecast2</user>
        <group>icecast</group>
    </changeowner>
</security>

status-json.xsl can return invalid JSON at startup

The page may return this code right after starting Icecast:
{"icestats":"server_start":"Sat, 03 Oct 2020 15:45:30 +0200","server_start_iso8601":"2020-10-03T15:45:30+0200","dummy":null}} (notice the double closing })
This is invalid JSON, and as i couldn't find a difference between 2.4.4 (which i'm using) and the latest version of the file in master i strongly assume this bug is present in all recent versions. Please correct me if i'm wrong.

Icecast kicks source

When I open the status-json.xsl Icecast kicks the source at \test.mp3. I try to open the status-json.xsl because i'am making a little local website. Is this my problem? If yes, what did I wrong?

IceCast2 Infos:
server_id Icecast 2.4.2

Silently fails to run on port 443

Hello!

First: Thanks for everything you're doing to breathe some fresh life into icecast! I'm certainly playing along at home now.

After configuring and building 2.5b3 from tar (configured to disable yp, otherwise vanilla), i configured a pretty stock setup, recreating my running 2.4.4 server config. It runs, but it silently fails to run on port 443. In the list of listen ports it appears with instead of family: INET, I get error, and the server does not listen on it, however, all my other ports work just fine including 8443 (tls config is good). I ended up using nginx to rev proxy 443 to 8443 for now, which works.

I'm running it with systemd and the original service unit.

I've probably messed something in my config. Here it is below:

<icecast>
    <location>...</location>
    <admin>...</admin>
    <hostname>...</hostname>

    <limits>
        <clients>100</clients>
        <sources>2</sources>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <source-password></source-password>
        <relay-password>hackme</relay-password>
        <admin-user>manager</admin-user>
        <admin-password></admin-password>
    </authentication>

    <shoutcast-mount>/stream</shoutcast-mount>

    <listen-socket>
        <port>443</port>
        <tls>1</tls>
        <shoutcast-mount>/stream</shoutcast-mount>
    </listen-socket>
    <listen-socket>
        <port>8443</port>
        <tls>1</tls>
    </listen-socket>    
    <listen-socket>
        <port>8000</port>
        <shoutcast-mount>/stream</shoutcast-mount>
    </listen-socket>

    <http-headers>
        <header type="cors" name="Access-Control-Allow-Origin" />
        <header type="cors" name="Access-Control-Allow-Headers" />
        <header type="cors" name="Access-Control-Expose-Headers" />
    </http-headers>

    <paths>
        <basedir>/usr/local/share/icecast</basedir>
        <logdir>/var/log/icecast</logdir>
        <webroot>/usr/local/share/icecast/web</webroot>
        <adminroot>/usr/local/share/icecast/admin</adminroot>
        <reportxmldb>/usr/local/share/icecast/report-db.xml</reportxmldb>
        <pidfile>/var/log/icecast/icecast.pid</pidfile>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>information</loglevel> <!-- "debug", "information", "warning", or "error" -->
        <logsize>10000</logsize>
    </logging>

    <security>
        <chroot>false</chroot>
        <tls-context>
            <tls-key>...</tls-key>
            <tls-certificate>...</tls-certificate>
        </tls-context>

        <prng-seed type="read-write" size="1024">/var/cache/icecast.prng-seed</prng-seed>
        <prng-seed type="profile">linux</prng-seed>
    </security>
</icecast>

Listening issue - Windows 7 Web browsers

Not sure if it's related with this issue #8 but listening to streams broadcasted by Icecast 2.4.2 is taking way too long before starting natively on any Web browsers on Windows 7. Note that audio players/tools such as FFplay and VLC works properly under this OS.

This issue doesn't seem to happen using an Icecast 2.4.0 (KH branch) server.

Thanks!

After working days without problem Icecast 2.4.4 not trying to update relays from master server

this my icecast.xml config:

<icecast>
    <location>Iran</location>
    <admin>[email protected]</admin>
    
    <limits>
        <clients>50000</clients>
        <sources>1000</sources>
        <queue-size>307200</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>600</header-timeout>
        <source-timeout>600</source-timeout>
        <burst-on-connect>1</burst-on-connect>
        <burst-size>196608</burst-size>
    </limits>
    
    <authentication>
        <source-password>removed</source-password>
        <relay-password>removed</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>removed</admin-password>
    </authentication>
    
    <hostname>radio.myts3.ir</hostname>
    
    <listen-socket>
        <port>18000</port>
    </listen-socket>
    
    <http-headers>
        <header name="Access-Control-Allow-Origin" value="*" />
    </http-headers>
    
    <master-server>192.168.100.53</master-server> 
    <master-server-port>8000</master-server-port> 
    <master-update-interval>30</master-update-interval>
    <master-password>removed</master-password>
    <relays-on-demand>0</relays-on-demand>

    
    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/share/icecast</basedir>
        <logdir>/var/log/icecast</logdir>
        <webroot>/usr/share/icecast/web</webroot>
        <adminroot>/usr/share/icecast/admin</adminroot>
        
        <alias source="/" destination="/status-json.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>4</loglevel>
        <logsize>100000</logsize>
    </logging>

    <security>
        <chroot>0</chroot>
    </security>
</icecast>

i have logs too, its 66mB i can't send it here.

Icecast stream not working on Safari

Hello guys,

I hope you're well. I have an issue with my Web radio. Users using Safari can't stream the radio. All is working perfectly with other web browsers.

When i navigate on my icecast URL, player for the mountpoint is missing with Safari.

Do you have any idea ?

Icecast version : 2.4.99.2
OS version : Debian 9

BR,

Ceelo

Config file using url auth causes SIGILL on SIGHUP

Hello icecasters!

Using icecast master cd0a3f9

getting a SIGILL when sending a SIGHUP to reread config file.

Only happens when using url auth:

<mount>                                                                                                                     
    <mount-name>/test</mount-name>                                                                                            
    <authentication type="url">                                                                                               
        <option name="listener_add" value="http://example.com/auth"/>                                                         
    </authentication>                                                                                                         
</mount>   

Server is running on haswell architecture - related: karlheyes/icecast-kh#157

Thread 1 "icecast" received signal SIGHUP, Hangup.
[2017-11-20  23:02:55] INFO sighandler/_sig_hup Caught signal 1, scheduling config re-read...
[2017-11-20  23:02:55] INFO auth_url/auth_get_url_auth URL based authentication setup
[New Thread 0x7fffeebd4700 (LWP 9495)]
[2017-11-20  23:02:55] INFO auth/auth_run_thread Authentication thread started
[2017-11-20  23:02:55] WARN CONFIG/__check_hostname Warning, <hostname> not configured, using default value "localhost". This will cause problems, e.g. this breaks YP directory listings. YP directory listing support will be disabled.
[2017-11-20  23:02:55] WARN CONFIG/_parse_root Warning, <location> not configured, using default value "Earth".
[2017-11-20  23:02:55] WARN CONFIG/_parse_root Warning, <admin> contact not configured, using default value "icemaster@localhost". This breaks YP directory listings. YP directory support will be disabled.
[2017-11-20  23:02:55] INFO auth/auth_run_thread Authentication thread shutting down
[2017-11-20  23:02:55] INFO auth_url/auth_url_clear Doing auth URL cleanup
[2017-11-20  23:02:55] INFO connection/get_tls_certificate No TLS capability on any configured ports
[Thread 0x7ffff7fba700 (LWP 8767) exited]

Thread 5 "icecast" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fffeecd6700 (LWP 8770)]
__GI___pthread_rwlock_unlock (rwlock=rwlock@entry=0x642800 <_locks>) at pthread_rwlock_unlock.c:38
38      pthread_rwlock_unlock.c: No such file or directory.


(gdb) bt
#0  __GI___pthread_rwlock_unlock (rwlock=rwlock@entry=0x642800 <_locks>) at pthread_rwlock_unlock.c:38
#1  0x000000000042ac25 in thread_rwlock_unlock_c (rwlock=rwlock@entry=0x642800 <_locks>, line=line@entry=754, file=file@entry=0x42fe9f "cfgfile.c") at thread.c:568
#2  0x000000000040b66c in config_release_config () at cfgfile.c:754
#3  config_reread_config () at cfgfile.c:701
#4  0x0000000000411025 in _slave_thread (arg=arg@entry=0x0) at slave.c:751
#5  0x000000000042a6cd in _start_routine (arg=0x68d2b0) at thread.c:669
#6  0x00007ffff68546ba in start_thread (arg=0x7fffeecd6700) at pthread_create.c:333
#7  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109


(gdb) thread apply all bt

Thread 7 (Thread 0x7fffeebd4700 (LWP 9495)):
#0  0x00007ffff685dc1d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000042ac86 in thread_sleep (len=len@entry=150000) at thread.c:626
#2  0x000000000042304a in auth_run_thread (arg=arg@entry=0x7fffd800b490) at auth.c:359
#3  0x000000000042a6cd in _start_routine (arg=0x7fffd800bce0) at thread.c:669
#4  0x00007ffff68546ba in start_thread (arg=0x7fffeebd4700) at pthread_create.c:333
#5  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffeec55700 (LWP 8771)):
#0  0x00007ffff685dc1d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000042ac86 in thread_sleep (len=len@entry=150000) at thread.c:626
#2  0x0000000000421183 in event_run_thread (arg=arg@entry=0x0) at event.c:174
#3  0x000000000042a6cd in _start_routine (arg=0x68d2b0) at thread.c:669
#4  0x00007ffff68546ba in start_thread (arg=0x7fffeec55700) at pthread_create.c:333
#5  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffeecd6700 (LWP 8770)):
#0  __GI___pthread_rwlock_unlock (rwlock=rwlock@entry=0x642800 <_locks>) at pthread_rwlock_unlock.c:38
#1  0x000000000042ac25 in thread_rwlock_unlock_c (rwlock=rwlock@entry=0x642800 <_locks>, line=line@entry=754, file=file@entry=0x42fe9f "cfgfile.c") at thread.c:568
#2  0x000000000040b66c in config_release_config () at cfgfile.c:754
#3  config_reread_config () at cfgfile.c:701
#4  0x0000000000411025 in _slave_thread (arg=arg@entry=0x0) at slave.c:751
#5  0x000000000042a6cd in _start_routine (arg=0x68d2b0) at thread.c:669
#6  0x00007ffff68546ba in start_thread (arg=0x7fffeecd6700) at pthread_create.c:333
#7  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7ffff7eb8700 (LWP 8769)):
#0  0x00007ffff685dc1d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000042ac86 in thread_sleep (len=len@entry=200000) at thread.c:626
#2  0x0000000000428afd in yp_update_thread (arg=arg@entry=0x0) at yp.c:732
#3  0x000000000042a6cd in _start_routine (arg=0x68d2b0) at thread.c:669
#4  0x00007ffff68546ba in start_thread (arg=0x7ffff7eb8700) at pthread_create.c:333
#5  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7ffff7f39700 (LWP 8768)):
#0  0x00007ffff685dc1d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000042ac86 in thread_sleep (len=len@entry=300000) at thread.c:626
#2  0x000000000041556e in _stats_thread (arg=arg@entry=0x0) at stats.c:737
#3  0x000000000042a6cd in _start_routine (arg=0x68f160) at thread.c:669
#4  0x00007ffff68546ba in start_thread (arg=0x7ffff7f39700) at pthread_create.c:333
#5  0x00007ffff658a3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7fbc740 (LWP 8763)):
#0  0x00007ffff657e70d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000040c6ee in poll (__timeout=300, __nfds=<optimised out>, __fds=0x7fffffffa450) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  wait_for_serversock (timeout=300) at connection.c:302
#3  _accept_connection (duration=300) at connection.c:371
#4  connection_accept_loop () at connection.c:616
#5  0x000000000040685a in _server_proc () at main.c:356
#6  main (argc=<optimised out>, argv=<optimised out>) at main.c:601


Relay in master-slave mode should use basic auth when streaming mounts from master

server is git master c1b4e75

I have a relay in master-slave mode relaying master mounts which are all url auth protected

The relay grabs the list of mounts from master ok using basic auth from config file relay options <master-username>/<master-password>

It then tries to connect to the master mounts as a listener but it's not using basic auth for this stage so the url auth performed by master fails, as the POST info it sends to <listener_add> url contains blank user and pass fields so no way to auth the request.

Looks like it uses basic auth when using a relay in single-broadcast mode:
https://github.com/xiph/Icecast-Server/blob/master/src/slave.c#L172

but not when using master-slave mode.

Idea: Make playlist in status-json.xsl optional with a parameter

I don't know if it's possible. But for instance in the application I'm making I just need to get the playlist at the start, on the first call to status-json.xsl. All other calls still include it even though I have no use for them. So, even though I don't know if it's possible, maybe for resource saving reasons might be nice to have a parameter like /status-json.xsl?playlist=false which sends the status without the playlist.

Nothing critical, just an idea.

Thanks

status-json.xsl not working

icecast2 -v
Icecast 2.4.4

http://****:8000/status-json.xsl

404 - Could not parse XSLT file

I cannot find a solution anywhere. I stumbled across a site where status-json is mentioned as deprecated.
So how do I get stats?

thanks

stats-json does indeed not exist
image

Invalid submodules

When browsing the repository here on github both submodules "m4" and "src/common" return a 404 page.

Also recursive cloning with git returns an error:

fatal: remote error: upload-pack: not our ref 2c950d5f44435b25fae36586f23ba98328adedfa
Fetched in submodule path 'm4', but it did not contain 2c950d5f44435b25fae36586f23ba98328adedfa. Direct fetching of that commit failed.

Request for suggestions for pure JS HTML5 MSE based player for Icecast streams

Is there a pure Javascript based HTML5 player that can play Icecast streams using Media Source Extensions?

I ask this because the pull request #6 mentions @jucrouzet and @marcelgwerder talking about a JS/HTML5/MSE based player using XHR/Fetch.

I have previously tried to figure out if Google's Shaka player could play Icecast streams, but it seems they cannot, at least based on their current architecture - shaka-project/shaka-player#725.

Thanks.

Feature Request : Support HTTP 2.0

As someone who is a layman user, I have no idea whether this feature request is relevant/applicable for Icecast.

I tried searching for an HTTP 2 feature request/issue, but was unable to find one. In case there is already a tracking issue or Icecast already implements HTTP 2.0 or there is a way to achieve this without changes in Icecast, I apologize for opening this issue.

Thanks.

inconsistencies in status-json.xsl

  • If there isn't any sources, json.icestats.source is not defined
  • If there is one source, it's an object
  • If there is 2+ sources, it's an array of object

That makes it harder to handle that it should be. I suggest always generating a "sources" key as an array of objects (empty if no sources).

Also, I forgot to record it but at one time the generated json wasn't valid. Don't you wan't to use a json lib? It should solve this point easily.

status-json.xsl returning invalid json when song title is not set

Hi

When no description is provided for the currently streamed song, the value will be supplemented with -, and the resulting name value pair will become "title": -. In that case, the value misses quotes, and the result will become an invalid json.

{
  "icestats": {
    "admin": "icemaster@localhost",
    "host": "localhost",
    "location": "Earth",
    "server_id": "Icecast 2.4.4",
    "server_start": "Sun, 10 Jan 2021 21:04:08 +0100",
    "server_start_iso8601": "2021-01-10T21:04:08+0100",
    "source": {
      "audio_info": "channels=2;samplerate=44100;bitrate=128",
      "bitrate": 128,
      "channels": 2,
      "genre": "various",
      "listener_peak": 0,
      "listeners": 0,
      "listenurl": "http://localhost:8000/mpd",
      "samplerate": 44100,
      "server_description": "desc",
      "server_name": "name",
      "server_type": "audio/mpeg",
      "stream_start": "Sun, 10 Jan 2021 21:08:37 +0100",
      "stream_start_iso8601": "2021-01-10T21:08:37+0100",
      "title": -,
      "dummy": null
    }
  }
  }

Invalid XML supplied by Icecast statistics

Icecast version 2.3.3-2ubuntu1.14.04.1 , when reporting statistics via API calls to http://%s:%d/admin/stats.xml, returns this invalid XML:

<icestats><source mount="/radio"><Listeners>1</Listeners><listener><IP>23.2.9.2</IP><UserAgent>Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70 [FBAN/FBIOS;FBAV/46.0.0.54.156;FBBV/18972819;FBDV/iPhone5,3;FBMD/iPhone;FBSN/iPhone OS;FBSV/8.3;FBSS/2; FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5]</UserAgent><Connected>0</Connected><ID>2634887</ID></listener></source></icestats>

Note the unescaped &T; which is an undefined XML entity "T", and causes parsers to explode.

Expected behavior: text inside blocks should be html escaped or enclosed in a CDATA block, if I remember my XML correctly.

Bad HTTP/1.1 support

Actually there are some points about HTTP/1.1 support (method SOURCE):

  1. When Expect: 100-Continue provided Response code should be
    HTTP/1.1 100 Continue or one of error responses.

Currently:

HTTP/1.1 100 Continue

HTTP/1.0 200 OK

Then it accepts stream.

Status 200 OK (2xx) must be sent only when stream ends, stream should be sent after 100 Continue directly.

  1. When Content-Length is not provided Transfer-Encoding should be chunked
    Transfer-Encoding: chunked
    Currently: Icecast server accepts content without right headers and not chunked stream.

HUP signal does not reload cert file

When you send an HUP signal, it looks like Icecast is not reloading its SSL cert file.

Is there an alternate signal (e.g. USR1) that would help?

Thank you

Segmentation Fault in auth.c

There is a seg fault on unlocking the thread on line 189 of auth.c in the function auth_release() under certain circumstances:

  1. Configure a mount point with a fallback that is a relay from another server that is actually running (the stream must have parameter hidden=0 and fallback-override=1)
  2. Start Icecast
  3. Stream to Icecast, and then stop the stream after an arbitrary amount of time
  4. Load the status page in the browser
    At that point, there will be a seg fault as described above. It does not happen when the mount point is hidden for some reason.

Test system is running Debian 9.3. Icecast version 2.4.99.2

ddos attack

Hi.

I have a problem with the icecast. When I activate the service I am having an exesive consumption in the ip queries. It seems like a DDOS attack. How can I mitigate this attack?

Thanks.

Artist, title and album all together

Hello,

sorry if I can't explain this very well but when I'm listening to my Icecast stream in foobar2000, metadata is all in the title section, so I get artist, title and album all together under title.

I'm streaming to the server using ezstream and I tried searching for clues but I just don't know who the fault is and if is there a fix..

Thanks

"listenurl" protocol does not match protocol used to request /status-json.xsl

It's probably because I'm doing something completely stupid, but when I request my /status-json.xsl over https, I see 'http' in the listenurl which I can't seem to change to https instead.

Content of: https://domain.tld:8000/status-json.xsl (actual values replaced)

{
    "icestats": {
        "admin": "[email protected]",
        "host": "domain.tld",
        "location": "location",
        "server_id": "Icecast 2.4.4",
        "server_start": "Mon, 09 Aug 2021 17:00:00 +0200",
        "server_start_iso8601": "2021-08-09T17:00:00+0200",
        "source": {
            "audio_bitrate": 192000,
            "audio_channels": 2,
            "audio_info": "ice-bitrate=192;ice-channels=2;ice-samplerate=44100",
            "audio_samplerate": 44100,
            "genre": "(NULL)",
            "ice-bitrate": 192,
            "ice-channels": 2,
            "ice-samplerate": 44100,
            "listener_peak": 1,
            "listeners": 1,
            "listenurl": "http://domain.tld:8000/stream.ogg",
            "server_description": "Description",
            "server_name": "Server name",
            "server_type": "audio/ogg",
            "server_url": "(NULL)",
            "stream_start": "Mon, 09 Aug 2021 17:01:00 +0200",
            "stream_start_iso8601": "2021-08-09T17:01:00+0200",
            "subtype": "Vorbis",
            "dummy": null
        }
    }
}

This is my configuration file /etc/icecast2/icecast2.xml : (actual values replaced)

<icecast>
    <location>location</location>
    <admin>[email protected]</admin>
    <limits>
        <clients>1000</clients>
        <sources>5</sources>
        <queue-size>262144</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>
        <burst-on-connect>0</burst-on-connect>
        <burst-size>4096</burst-size>
    </limits>

    <authentication>
        <source-password>password</source-password>
        <relay-password>password</relay-password>
        <admin-user>user</admin-user>
        <admin-password>password</admin-password>
    </authentication>

    <hostname>mydomain.tld</hostname>

    <listen-socket>
        <port>8000</port>
        <ssl>1</ssl>
    </listen-socket>

    <listen-socket>
        <port>8443</port>
        <ssl>1</ssl>
    </listen-socket>

    <http-headers>
        <header name="Access-Control-Allow-Origin" value="*" />
    </http-headers>

    <fileserve>1</fileserve>

    <paths>
        <basedir>/usr/share/icecast2</basedir>
        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>
        <pidfile>/usr/share/icecast2/icecast.pid</pidfile>
        <alias source="/" destination="/"/>
        <ssl-certificate>/usr/share/icecast2/letsencrypt-domain-tld-icecast.pem</ssl-certificate>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <playlistlog>playlist.log</playlistlog>
        <loglevel>3</loglevel>
        <logsize>100000</logsize>
        <logarchive>1</logarchive>
    </logging>

    <security>
        <chroot>1</chroot>
        <changeowner>
            <user>icecast2</user>
            <group>icecast2</group>
        </changeowner>
    </security>
</icecast>

is there a way of fixing this by changing something in the configuration, or do I have to parse the json by some external script, fix the replace the protocol itself and then serve the changed version it to my webpage? I would love to just use the content of the json and have it be correct instead

JSON status encoding modification

Below you will find an excerpt from json status response of broadcast server (status-json.xsl). Original title of song is "オンライン博物館 INTERNET 1.0 Log on". Can I modify server files so that the encoding of the metadata is based in utf8 ? I have a problem with songs with greek/ japanese characters.
name","server_type":"audio/mpeg","server_url":"https://www.mixxx.org","stream_start":"Sat, 07 Nov 2020 20:46:58 +0000","stream_start_iso8601":"2020-11-07T20:46:58+0000",**"title":"CYBEREALITY??? - ???????? INTERNET 1.0 Log**

chroot not reloading config

version 2.4.4-4

Using chroot env, a kill -HUP to reload config results in these errors:
[2021-07-28 02:37:14] WARN config I/O
[2021-07-28 02:37:14] WARN config warning :
[2021-07-28 02:37:14] WARN config failed to load external entity "test.xml"
[2021-07-28 02:37:14] EROR CONFIG/config_reread_config Error parsing config, not replacing existing config. Return code: -4
[2021-07-28 03:12:54] EROR CONFIG/config_reread_config Parse error in reading test.

This happens even when the config is not modified. Under non-chroot, reload config works. I tried chown to match chroot, still fails to reread.

no SSL support on Ubuntu 18.04

Hello,

I am trying to run Icecast on my Ubuntu 18.04 with SSL enabled. When I add the official repository to the system and then use apt-get install icecast2, everything will work except that when I will turn the SSL on, I will get "No SSL capability" message, I pre-installed OpenSSL befory icecast installation.

any Idea how to fix this?

I also tried to build by Icecast from the source with the custom path ovf openssl pramater enabled (just put there the default openssl path) and it worked, but this icecast is installed as an app and not as a service, so don't how to reload config without dropping listeners (i need to add relays withour restarting the server as it will server as a proxy).

Thanks for all your time!

New track information via socket

Hi there and thanks for the project!

Can anyone help me to solve my problem, I can't find anything useful on the Internet.

I need to log out all tracks that have been played on the stream. Since I have found only REST API for statistics, I'm asking you is there any solution to receive the updates about new tracks? It can be also useful to display correct track name on the website.

Thanks.

URL authentication not working

I have icecast compiled w/ all the required to support URL auth on mounts.
I create mounts on the fly using liquidsoap and I configured auth in icecast.xml as follow:

<mount type="default">
    <authentication type="url">
        <!-- this url just give you back the proper auth header w/out any check -->
        <option name="listener_add" value="http://foo/listener_added"/>
    </authentication>
</mount>

This should work only on listeners but is actually called for everything but that. EVERY http request is passed to it and prevents also admin to login. This is a raw print of POST data from icecast:

{'ip': u'x.x.x.x', 'mount': u'/assets/css/style.css', 'agent': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'server': u'foo.com', 'client': u'2566', 'user': u'', 'pass': u'', 'action': u'listener_add', 'port': u'8000'}
{'ip': u'x.x.x.x', 'mount': u'/assets/font/FiraSans-Regular.woff', 'agent': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'server': u'foo.com', 'client': u'2567', 'user': u'', 'pass': u'', 'action': u'listener_add', 'port': u'8000'}
{'ip': u'x.x.x.x', 'mount': u'/assets/font/FiraSans-Bold.woff', 'agent': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'server': u'foo.com', 'client': u'2568', 'user': u'', 'pass': u'', 'action': u'listener_add', 'port': u'8000'}
{'ip': u'x.x.x.x', 'mount': u'/assets/font/FiraMono-Regular.woff', 'agent': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'server': u'foo.com', 'client': u'2569', 'user': u'', 'pass': u'', 'action': u'listener_add', 'port': u'8000'}
{'ip': u'x.x.x.x', 'mount': u'/favicon.ico', 'agent': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'server': u'foo.com', 'client': u'2570', 'user': u'', 'pass': u'', 'action': u'listener_add', 'port': u'8000'}

which are clearly not a "listener" request.
In the error log I see:

[2017-11-10  17:41:52] EROR connection/_handle_authed_client Client (role=anonymous, username=source) not allowed to use this request method on /mount_name

for each mount point. Whereas, if I deactivate auth=url I find:

[2017-11-10  17:54:53] INFO auth/auth_add_client adding client 0x1148df0 for authentication on 0x11277a0

meaning the source credentials are ok.
Am I missing anything?

Multi cores for Icecast

Hi,

How can use multi cores for Icecast? Now we see one proc using one core.

Best regards,
Michel

Now Live Meta Data

Does anyone know of any way to show the now live on a wordpress site?

get stream title of secondair stream

hy we have a web radio with multiple streams with our php script we are able to get the stream title of the main radio.

but the other radio's i cant get the radio stream title out of it.

in the php script we are performing a GET request with header Icy-MetaData: 1 and a user agent.

in the url part i place the full url to the radiostream mount point , on the main radio this works perfect secondary i get a empty string.

are there some additional params i need to set ?

Sending fallback files is not rate limited

(Login on the GitLab issue tracker is broken for me currently - "account has been blocked" - so I cannot report issues there at this time. Crosspost this there if you like.)


Currently, fallback files are sent potentially several times faster than the playback bitrate. This causes fallback-override to be very ineffective. Because you are sending the files faster than the client plays it back, its buffer gets fuller and fuller until it reaches its limit of what is potentially several minutes or hours worth of fallback file audio to play. When the client is moved back to the original mountpoint, they have to wait until they've played all of this extra fallback audio before reaching the live stream again which at that point will be very delayed compared to the the incoming stream.

Instead, the fallback files should be rate limited so that it only sends at most its playback bitrate every second. It may well be this bitrate has to be given in the form of a setting, but I feel this is an important issue to fix regardless. I'll be looking to see if there's any workaround in the meantime.

Create a streaming app

Hi there,

I would like to build an audio streaming web app and I am wondering if using iceCast would be the right solution.

I would appreciate if someone could point me to the right direction as I am new to this.

Any slack channels/communities where I could ask questions would be very helpful

Thanks!

Encryption Improvements to equal icecast-kh

Icecast-kh implemented some wonderful improvements to their encryption. Please consider including them with this version...

  1. Their SSL is now autodetecting so you only have to define one listen-socked and NOT define ssl 1. This is big as I don't have to setup 2 separate ports.

  2. They implemented a variable called ssl-private-key which allows me not to have to combine the fullchain with the private key cert into one file. This allows me just to point to LE fullchain.pem and private.pem from within the icecast.xml file. A big deal as this confuses many of people.

  3. Allow certificate changes without requiring reboot of services. icecast-kh apparently has implemented this feature: karlheyes/icecast-kh#162

https://karlheyes.github.io/
8/5/2017
--autodetect SSL connections on incoming sockets. No need for in listen-socket now but is still there for compatability. (THIS IS BIG!!! We no longer need to use different ports for encrypted and unencrypted dramatically reducing complexity)
--add in to allow for combined PEM or for separate SSL key/certificate files. (THIS IS BIG TOO! No longer need a separate process after updating let's encrypt to combine your fullchain and private cert into one pem file for icecast to read it!)
--select https/http URL in autogenerated m3u based on incoming request.

Possible bug with playlist.log

Not sure if it's a bug but I'm posting this anyway. I noticed a lot of frequent duplicates when checking playlist.log.

20/Feb/2018:12:07:37 -0500|/wok3n|1|MtH - 7MLGD
20/Feb/2018:12:11:04 -0500|/wok3n|1|emune - lifted
20/Feb/2018:12:13:05 -0500|/wok3n|1|Gorillaz - On Melancholy Hill
20/Feb/2018:12:16:58 -0500|/wok3n|1|Gorillaz - On Melancholy Hill

20/Feb/2018:12:16:59 -0500|/wok3n|1|nix - you prod. alembic
20/Feb/2018:12:21:15 -0500|/wok3n|1|Orlando Díaz - Ser Sub
20/Feb/2018:12:24:21 -0500|/wok3n|1|Veruca Salt - Victrola
20/Feb/2018:12:26:39 -0500|/wok3n|0|Veruca Salt - Victrola

20/Feb/2018:12:26:40 -0500|/wok3n|0|Apollo Brown - Tao Te Ching
20/Feb/2018:12:28:42 -0500|/wok3n|1|Augustus Pablo - 555 Dub Street
20/Feb/2018:12:31:15 -0500|/wok3n|0|Rites of Spring - For Want Of
20/Feb/2018:12:34:17 -0500|/wok3n|0|kidkanevil - Shunkanido
20/Feb/2018:12:38:45 -0500|/wok3n|0|Animal Collective - Bluish
20/Feb/2018:12:43:58 -0500|/wok3n|0|THiNGYBOBinc - Jet Set Auradio
20/Feb/2018:12:45:57 -0500|/wok3n|0|Quickly, Quickly - Fog
20/Feb/2018:12:49:21 -0500|/wok3n|0|J Dilla - Stepson of the Clapper
20/Feb/2018:12:50:12 -0500|/wok3n|0|J Dilla - Stepson of the Clapper

20/Feb/2018:12:50:13 -0500|/wok3n|0|Gang Starr - Soliloquy Of Chaos
20/Feb/2018:12:53:17 -0500|/wok3n|0|Nujabes - Music Is Mine
20/Feb/2018:12:57:27 -0500|/wok3n|0|Nujabes - Music Is Mine

20/Feb/2018:12:57:27 -0500|/wok3n|0|My Bloody Valentine - Blown a Wish

Using 2.4.99.2

Source client is mpd.

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.