1

I want to play a live stream (for example http://204.45.41.148/) with icecast2 server. I have successfully installed icecast2 and ices2.

I want my users to connect to my server for listening this channel instead of playing it from original originator radio, like mapping to my local host instead of connection to remote end. So far I could not find any thing to make this work.

How can I run a live stream as local radio?

Flyk
  • 1,480
  • 3
  • 18
  • 24

1 Answers1

1

In Icecast parlance this is called a per mount relay and is a built in feature.

As this was trivial, I quickly made you a working config snippet, that you just need to insert into your icecast.xml config:

<relay>
  <server>204.45.41.148</server>
  <port>80</port>
  <mount>/</mount>
  <local-mount>/desi-radio.mp3</local-mount>
  <on-demand>1</on-demand>
  <relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

For details as to how this works:
Icecast docs on relaying
Icecast docs on config file options, relaying section

Please note how I set this to on-demand, this means that the stream will only be pulled from the original server if there are local listeners.
This is generally a very nice feature to reduce bandwidth use on tight network connections as you only have one stream coming from the internet, while many users can locally connect to:

   http://YOURLANIP:8000/desi-radio.mp3
TBR
  • 274