After reading the documents of icecast, I have two questions:
1) I'm not sure the icecast server can buffer audio streams, if It does can, How about using relaying?
2) If i have many dynamic relay servers to proxy, How to config the config file? I mean I have to change the config file dynamicly, since i have not sean that icecast supports the regular expression such as /realtime(\d+) to match all the realtime stations.
Icecast does buffer streams. When a client connects, the buffer data is flushed as fast as Icecast can loop around and send data.
Icecast can also relay existing streams. From the documentation:
<relay>
<server>192.168.1.11</server>
<port>8001</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
Now, as for doing this on-the-fly, as far as I know there is no way to do this in Icecast.