Shout2rtp Server, version 1.32 Warren Toomey, wkt@tuhs.org GPL license This program accepts a Shoutcast input stream, either as an audiocast on port 8000, or an icycast on port 8001, and converts it to an RTP multicast on IP address 225.2.1.5 port 4420, with a title multicast on port 4422. Installation ------------ Just do make to make the binary. Install this binary somewhere. You may want to edit the Makefile to use -O2 instead of -g on the compile line to optimise the binary. Configuration ------------- Copy the shout2rtprc config file to /etc/shout2rtprc, and edit it to suit your setup. The configuration file consists of a number of lines. Lines beginning with a hash (#) are comment lines. Other lines should have the format word = value. The only valid lines are: title = sentence, default no value URL = http://something.or.other, default no value password = word, default no value rtpaddr = Numeric IP address, default no value shoutaddr = Numeric IP address, default no value deadairdir = Unix directory name, default no value multicastaddr = Numeric IP address, default 225.2.1.5 deadairdelay = Integer value, default 60 daemon = 0 or 1, default 0 multicastport = Integer value, default 4420 ttl = Integer value, default 1 shoutprotocol = audiocast or icycast, default audiocast If set, the title and the URL are a description of the RTP stream and the URL of a website which is the `home' of the stream. If set, the rtpaddr is the IP address of the interface on which your RTP stream will be transmitted. Set this if you have multiple interfaces and want the stream to be transmitted on a particular one. The shout2rtp server will listen for an old-style audiocast stream on port 8000 if shoutprotocol is set to audiocast. If it is set to icycast, then the server will listen for an icycast stream on port 8001. If set, the shoutaddr is the IP address to which the incoming Shoutcast stream will connect. You probably don't need shoutaddr unless you have multiple network interfaces. The actual stream will be transmitted to the multicastaddr on the UDP port multicastport. You should set these unless the defaults are what you want. Packets are marked with a ttl hopcount. Unless you know what you are doing, leave the ttl set to 1. If you have any dead air files you want played when there is no Shoutcast stream, then make a new directory, put the .mp3 files in this directory, and set up the deadairdir in the config file. Remember to set appropriate permissions on the directory and the files in the directory so that shout2rtp can read them. If daemon = 1, then the program will close all connection to the terminal and run as a daemon in the background. You will usually want daemon = 1 in the config file. I use daemon = 0 when I am debugging the program. Shout2rtp writes to the LOCAL5 facility in the syslog, so if you want to capture this, then create a suitable log file and alter /etc/syslog.conf to send LOCAL5 stuff to this file, e.g # echo -n > /var/log/shoutlog # Add this line to syslog.conf local5.* /var/log/shoutlog # Then kill -1 the syslog pid Running ------- Either manually, or via a boot time startup script, run shout2rtp with no arguments. If you are able to, run the program with real-time privileges, e.g with rtprio(1) on FreeBSD (there must be a way with Linux). This ensures that the process will get higher priorities than other processes, and you won't get jittery output. If you have any comments or suggestions, email Warren Toomey at wkt@tuhs.org. This whole thing is a glorified hack, so feel free to adapt it to your requirements, instead of e-mailing me with a wish list 8-)