| View previous topic :: View next topic |
| Author |
Message |
engywuck
Joined: 20 Jan 2010 Posts: 3
|
Posted: Wed Jan 20, 2010 4:28 pm Post subject: Change source sender without breaking stream to listeners |
|
|
Hi!
We are a smallish webradio that sends an AAC stream only some hours a day and then with different moderators connecting from different (private) computers to the "distributing" server.
Until recently we used shoutcast, but now I'm in charge of the software and decided to use icecast 2.3.2 from debian stable (5.0.3).
In shoutcast we "gave over" the stream from moderator A to B by A disconnecting and B connecting to the stream maximum a few seconds later while the stream played out of its buffer.
If we try to do the same in icecast the users get disconnected *immediately* when A disconnetcs (no buffer "plays out"), so they have to reconnect to listen to B -- a situation that is inacceptable.
How can we "give the stream over" without disconnecting our users?
My .xml (interesting parts):
| Code: |
<icecast>
<limits>
<clients>100</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>20</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>
<authentication>
[skipped]
</authentication>
<hostname>example.org</hostname>
<listen-socket>
<port>4800</port>
</listen-socket>
<mount>
<mount-name>/our-radio</mount-name>
<username>source</username>
<password>hackme</password>
<charset>utf8</charset>
<max-listeners>40</max-listeners>
<!-- <dump-file>/tmp/dump-example1.ogg</dump-file> -->
<burst-size>65536</burst-size>
<hidden>0</hidden>
<no-yp>1</no-yp>
<stream-URL>http://example.org</stream-URL>
</mount>
<fileserve>1</fileserve>
<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast2</basedir>
<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<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="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<playlistlog>playlist.log</playlistlog> <!-- evtl rausnehmen -->
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- <logarchive>1</logarchive> -->
</logging>
<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner>
-->
</security>
</icecast>
|
Please help, they threaten me to use shoutcast again
(Help that consists of "RTFM" is appreciated, if it's followed by a filename and line number/chapter of the manual I should have read ) |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Jan 20, 2010 7:44 pm Post subject: |
|
|
The section relating to fallback-mount and fallback-override is the area you are interested in. You can specify a file in webroot or another stream but they should be the same format as the originating stream, or else some players will get confused and disconnect.
karl. |
|
| Back to top |
|
 |
engywuck
Joined: 20 Jan 2010 Posts: 3
|
Posted: Thu Jan 21, 2010 5:11 am Post subject: |
|
|
there's no way to say "don't disconnect listeners when source drops for a moment/changes?
ok, then I have to go in the depths of fallback mountpoints sometime today. Is there some example somewhere? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jan 21, 2010 5:16 am Post subject: |
|
|
you will find that those "depths" are not actually that deep
karl. |
|
| Back to top |
|
 |
engywuck
Joined: 20 Jan 2010 Posts: 3
|
Posted: Thu Jan 21, 2010 5:24 pm Post subject: |
|
|
really?
I now tried with a test-mount:
| Code: |
<mount>
<mount-name>/my-test</mount-name>
<username>source</username>
<password>hackme</password>
<fallback-mount>/usr/share/icecast2/web/testmoep.mp3</fallback-mount>
<fallback-override>1</fallback-override>
<charset>utf8</charset>
<max-listeners>10</max-listeners>
<burst-size>65536</burst-size>
<hidden>0</hidden>
<no-yp>1</no-yp>
<stream-URL>http://www.example.org</stream-URL>
</mount>
<fileserve>1</fileserve>
<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast2</basedir>
<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
|
in /usr/share/icecast2/web/ there are the files:
-rw-r--r-- 1 root root 48K 2010-01-21 17:41 testmoep.aac
-rw-r--r-- 1 root root 54K 2010-01-21 17:51 testmoep.mp3
according to http://www.icecast.org/docs/icecast-2.3.1/icecast2_config_file.html the fallback-file has to be located in webroot. I tested given only the filename, giving ./filename and full path.
I also tested aacv2 and mp3pro.
The files used for fallback were recoded with the sourcing program (SAM) and are both played back by mplayer.
Result: doesnt work, still disconnects me when listening with foobar
errorlog says:
| Code: |
[2010-01-21 17:58:23] INFO connection/_handle_source_request Source logging in at mountpoint "/my-test"
[2010-01-21 17:58:23] INFO source/source_main listener count on /my-test now 0
[2010-01-21 17:58:32] INFO source/source_main listener count on /my-test now 1
[2010-01-21 17:58:35] INFO source/get_next_buffer End of Stream /my-test
[2010-01-21 17:58:35] INFO source/source_shutdown Source "/my-test" exiting
[2010-01-21 17:58:54] INFO fserve/fserve_client_create checking for file /index.html (/usr/share/icecast2/web/index.html)
[2010-01-21 17:58:54] WARN fserve/fserve_client_create req for file "/usr/share/icecast2/web/index.html" No such file or directory |
edith says:
AAARRRGHHH
Now tried with a simple /testmoep.mp3 (instead of ./) and it works - somewhat. Great. Really great. if it's "relative to webroot" why doesnt "./testmoep.mp3" or even without path work. grml.
anyhow, it now works - just not in the format we send in
If I try the aac variant I get
Decoding failure at 1:40.635 (Unsupported format or corrupted file):
"http://www.example.org:8400/my-test"
in foobar whenever the stream switches to fallback and back. Yes, it's the same samplerate, encoder, etc.
does it need a special aac version, not "just" a ripped stream? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jan 21, 2010 6:29 pm Post subject: |
|
|
I guess you meant
<fallback-mount>/testmoep.mp3</fallback-mount>
mountpoints begin with /
karl. |
|
| Back to top |
|
 |
dunkelfuerst
Joined: 17 Jan 2010 Posts: 2
|
|
| Back to top |
|
 |
|