Radio with IceCast2
I carried out an experiment of radio with icecast 2 on mac os and iOS.
First, set up a server of Icecast 2. Reference: http://www.icecast.org/download/
In debian, run as root:
apt-get update; apt-get install icecast2; # If you install it for the first time, you may need to give three passwords, and the host. # Remember them! # * host of the radio server # * password of source # * password of relay # * password of admin # Now, you installed it. The config file is this, if you need to modify. nano /etc/icecast2/icecast.xml
Second, use Audio Hijack to be the stream source. Create a new session with Internet Radio template.
The above is sample. Click on the Boardcast block, configure in the Setup tab with the Icecast 2 server information. Use the source account, determine the mountpoint. Server Address is the host set when you install the server.
Third, open the host (default listening on 8000, you may transfer to 80 with Nginx), use account of admin, you may fetch audio entrance in m3u, xspf format or so.
Fourth, on iOS, use VLC to play the m3u address. Hear the voice on stream!
If you want to use this m3u address on a web page, just use the audio tag.
<audio controls> <source src="[m3u address]" type="audio/mpegURL" /> </audio>
If you use iOS with 12.0+, you may download a free app to broadcast through Icecast 2 server.