[icecast] how to modify ices source?

Brendan Cully brendan at icecast.org
Wed Aug 1 19:28:09 UTC 2001



On Wednesday, 01 August 2001 at 15:12, Robin P. Blanchard wrote:
> 
> > > Ices will reload the playlist file if it changes on disk. So if the
> > > file changes every track, everything will be fine. Alternatively you
> > > could write your MP3 to a FIFO, which ices could pipe to your icecast
> > > server.
> > 
> > that looks like an interesting alternative, tho i have no clue how to do
> > that, and particularly in the context of otto (which, BTW is brilliant!)
> > any examples?

assuming otto can execute an arbitrary shell command whenever the
track plays (I assume it can call whatever mp3 decoder you want), you
can
a) have a script that does something like
echo $1 > /path/to/playlist.txt
Then ices will reload the playlist file (size: one entry) at the end
of the track.

b) do
mkfifo ices.fifo
echo ices.fifo > playlist.txt
run ices,
and have otto do
cat $1 > ices.fifo
instead of calling its mp3 decoder.

> You're right in that it sounds like a great solution/alternative...
> But the problem is that the playlist would need to modified
> after each song. And how do we know when the song is finished?

???
Modify it whenever you want. At the end of the track, ices will reload
the playlist. You don't have to have things synchronised at all,
except that you should modify the playlist before the next track
starts. Alternatively use the (quite powerful) playlist engine.

> ices knows when this happens, thus it would be fairly simple to 
> have ices exit (rather than infintely loop) after it plays.
> 
> Hence I am asking for advice on how to patch the ices client
> to exit after playing instead of looping, regardless of whether
> it is 'advisable' or not.

If you want something broken and stupid, the original patch you posted
will probably work ok. Change 'while (1) {' to just '{'.

Being young and naive, I am still surprised when people are willing to
work twice as hard to do things the wrong way, just because they heard
about that way first.

-Brendan

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