Shoutcast Server
I configured my Shoutcast Server I was searching a lot for different configuration settings and so on and had to swap to different sites to find all the info I wanted and needed.
So I decided to collect the settings/configuration also on my site so that it’s easier to find.
Mandatory Options
; MaxUser. The maximum number of simultaneous listeners allowed. ; Compute a reasonable value for your available upstream bandwidth (i.e. if ; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would ; choose 256kbps/24kbps=10 maximum listeners.) Setting this value higher ; only wastes RAM and screws up your broadcast when more people connect ; than you can support. MaxUser=10 ; Password. While SHOUTcast never asks a listener for a password, a ; password is required to transport audio stream to the server, and to perform ; administration via the web interface to this server. This password should ; consist of only letters and numbers, and it's the same password that your ; broadcaster will need to enter in the SHOUTcast Source Plug-in for Winamp. ; THIS VALUE CANNOT BE BLANK. Password=a_hard_to_crack_password ; PortBase. This is the port number your server will run on. The ; value, and the value + 1 must be available. If you get a fatal error when ; the DNAS is setting up a socket on startup, make sure nothing else on the ; machine is running on the same port (telnet localhost port number -- if you ; get connection refused then you're clear to use that port). Ports less than 1024 ; may require root privileges on *nix machines. The default port is 8000. ; I use my shoutcast server directly on port 443 as example - so I never have an issue with ; connecting to it on networks that blocks special ports. PortBase=443 ; LogFile: file to use for logging. Can be '/dev/null' or 'none' ; or empty to turn off logging. The default is ./sc_serv.log ; on *nix systems or sc_serv_dir\sc_serv.log on win32. ; Note: on win32 systems if no path is specified the location is ; in the same directory as the executable, on *nix systems it is in the ; current directory. LogFile=/shoutcast/logs/SHOUTcast.log ; RealTime displays a status line that is updated every second ; with the latest information on the current stream (*nix and win32 ; console systems only) RealTime=0 ; ScreenLog controls whether logging is printed to the screen or not ; on *nix and win32 console systems. It is useful to disable this when ; running servers in background without their own terminals. Default is 1 ScreenLog=0 ; ShowLastSongs specifies how many songs to list in the /played.html ; page. The default is 10. Acceptable entries are 1 to 20. ; I put this always on the max :P ShowLastSongs=20 ; TchLog decides whether or not the DNAS log file should track yp ; directory touches. Adds and removes still appear regardless of ; this setting. ; Default is yes ; Recommended for those who wish to have the most secure logging possible. ; Basic home/casual users probably don't need this. ; TchLog=yes ; WebLog decides whether or not hits to http:// on this DNAS will ; be logged. Most people leave this off because the DSP plug-in ; uses http:// calls to update titles and get the listener count, ; which takes up a lot of log space eventually. If you want to ; see people making hits on your admin.cgi or index pages, turn ; this back on. Note that this setting does NOT affect XML stats ; counters for hits to http:// pages. ; Default is no. ; Once again, recommended for those who wish the most secure logging possible, ; but not recommended for home/casual users. ; WebLog=no ; W3CEnable turns on W3C Logging. W3C logs contain httpd-like accounts ; of every track played for every listener, including byte counts those listeners ; took. This data can be parsed with tools like Analog and WebTrends, or given ; to third parties like Arbitron and Measurecast for their reporting systems. ; Default is Yes (enabled). W3CEnable=Yes ; W3CLog describes the name of the log file for W3C logging. Default log file is ; sc_w3c.log, in the same directory wherever the DNAS gets started from. W3CLog=/dev/null ; The first option enables W3C logging. ; This type of logging can be easily parsed by the programs listed. ; This is highly recommended for those who wish to have the most in depth statistics possible. ; The second option specifies where to store the W3C log. ; This is set to /dev/null by the ebuild.
Network configuration
; SrcIP, the interface to listen for source connections on (or to make relay ; connections on if relaying). Can and usually will be ANY or 127.0.0.1 ; (Making it 127.0.0.1 will keep other machines from being able to ; broadcast using your SHOUTcast Server ) SrcIP=ANY ; DestIP, IP to listen for clients on (and to contact yp.SHOUTcast.com) ; can and usually will be be ANY. If your machine has multiple IP addresses, ; set this to the one you want it to be accessed by. DestIP=ANY ; you can set both to your domain or, if you use multiple domains like I ; set it to your machine IP ; Yport, port to connect to yp.SHOUTcast.com on. For people behind caching ; web proxies, change this to the alternate port (666 is what it might be, ; check www.SHOUTcast.com if you have problems). Otherwise, leave this at 80. ; We're actively working on re-opening port 666, but as of release the only ; working port is port 80. Yport=80 ; NameLookups. Specify 1 to perform reverse DNS on connections. ; This option may increase the time it takes to connect to your ; server if your DNS server is slow. Default is 0 (off). NameLookups=0 ; RelayPort and RelayServer specify that you want to be a relay server. ; Relay servers act as clients to another server, and rebroadcast. ; Set RelayPort to 0, RelayServer to empty, or just leave these commented ; out to disable relay mode. ; This specifies that you are acting as a relay server. ; Relay servers are often used to take a low bandwidth connection ; that can only stream to one client, ; and use its own higher bandwidth to serve to more clients. ; RelayPort specifies the port and IP address of the SHOUTcast Server ; you wish to relay for ; RelayPort=8000 ; RelayServer=192.168.101.5
Server Configuration
; AdminPassword. This password (if specified) changes the ; behavior of Password to be a broadcast-only password, and ; limits HTTP administration tasks to the password specified ; here. The broadcaster, with the password above, can still ; log in and view connected users, but only the AdminPassword ; will grant the right to kick, ban, and specify reserve hosts. ; The default is undefined (Password allows control for both ; source and admin) ; AdminPassword=adminpass ; AutoDumpUsers controls whether listeners are disconnected if the source ; stream disconnects. The default is 0. ; This is set to 0, so that clients will either timeout themselves, ; or keep trying to buffer a stream. AutoDumpUsers=0 ; AutoDumpSourceTime specifies how long, in seconds, the source stream is ; allowed to be idle before the server disconnects it. 0 will let the source ; stream idle indefinitely before disconnecting. The default is 30. AutoDumpSourceTime=30 ; ContentDir specifies the directory location on disk of where to stream ; on-demand content from. Subdirectories are supported as of DNAS 1.8.2. ; Default is ./content/, meaning a directory named content in the same directory ; as where sc_serv was invoked from. ContentDir=/opt/SHOUTcast/content/ ; To use this, put an mp3 in the content directory, then point your browser to ; http://example.com:[port]/content/mp3name.pls . ; SHOUTcast Server will automatically create a streaming media compatible play list ; for the mp3, and stream it on demand. ; Use this as an alternative to SHOUTcast Trans for streaming media source. ; IntroFile can specify a mp3 file that will be streamed to listeners right ; when they connect before they hear the live stream. ; Note that the intro file MUST be the same sample rate/channels as the ; live stream in order for this to work properly. Although bit rate CAN ; vary, you can use '%d' to specify the bit rate in the filename ; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps). ; The default is no IntroFile ; IntroFile=c:\intro%d.mp3 ; BackupFile can specify a mp3 file that will be streamed to listeners over ; and over again when the source stream disconnects. AutoDumpUsers must be ; 0 to use this feature. When the source stream reconnects, the listeners ; are rejoined into the live broadcast. ; Note that the backup file MUST be the same sample rate/channels as the ; live stream in order for this to work properly. Although bit rate CAN ; vary, you can use '%d' to specify the bit rate in the filename ; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps). ; The default is no BackupFile ; BackupFile=C:\intro%d.mp3 ; TitleFormat specifies a format string for what title is sent to the listener. ; For example, a string of 'Justin Radio' forces the title 'Justin Radio' even ; when the source changes the title. You can use up to one '%s' in the string ; which lets you contain the title from the source. For example, if your ; TitleFormat is 'Justin Radio: %s', and the source plug-in's title is ; 'Billy plays the blues', then the net title is ; 'Justin Radio: Billy plays the blues'. Note: only works on non-relay servers. ; The default is no format string. TitleFormat=Chris Gentoo Beats: %s ; URLFormat specifies a format string for what URL is sent to the listener. ; Behaves like TitleFormat (see above). ; The default is no format string. ; URLFormat=http://www.server.com/redirect.cgi?url=%s ; PublicServer can be always, never, or default (the default, heh) ; Any setting other than default will override the public status ; of the source plug-in or of a SHOUTcast Server that is being relayed. PublicServer=default ; AllowRelay determines whether or not other SHOUTcast Servers will be ; permitted to relay this server. The default is Yes. AllowRelay=Yes ; AllowPublicRelay, when set to No, will tell any relaying servers not ; to list the server in the SHOUTcast directory (non-public), provided ; the relaying server's Public flag is set to default. The default is ; Yes. AllowPublicRelay=Yes ; MetaInterval specifies how often, in bytes, meta data sent. ; You should really leave this at the default of 32768, but the option is ; provided anyway. MetaInterval=32768
Access configuration
; ListenerTimer is a value in minutes of maximum permitted time for ; a connected listener. If someone is connected for longer than this ; amount of time, in minutes, they are disconnected. When undefined, ; there is no limit defined. Default is undefined. ; ListenerTimer=600 ; BanFile is the text file sc_serv reads and writes to/from ; for the list of clients prohibited to connect to this ; server. It's automatically generated via the web ; interface. ; BanFile=sc_serv.ban ; RipFile is the text file sc_serv reads and writes to/from ; for the list of client IP addresses which are *ALWAYS* permitted ; to connect to this server (useful for relay servers). ; This file is automatically generated via the web ; interface. Note that if your server is FULL, and someone ; from a Reserved IP connects, the DNAS will force the person ; listening for the longest time off to make room for the new ; connection. ; RipFile=sc_serv.rip ; RipOnly, when set to Yes, will only allow IP addresses listed in the Reserved ; IP list to connect and relay. All other connections for listening will be denied. ; This is really only useful for servers whose sole purpose is to provide the ; primary feed to all public relays. Setting this value to Yes also forces the ; server into Private mode, since listing this server in the directory would ; be pointless. Default is No. ; RipOnly=No
Mass configuration
; Unique: assigns a variable name for use in any configuration item which points to a ; file. Useful for servers running lots of SHOUTcast Servers that have similar ; configuration parameters, excepting log file names, ban file names, etc. Any ; parameter that takes a pathname can include the character $, which will ; substitute $ for the variable assigned here. Keep in mind that the unique ; variable can only be used after it is defined, so don't try to use a unique ; variable substitution in a path before you define it. For example, you ; could set: ; Unique=my_server ; and then define Log=/usr/local/SHOUTcast/$.log in an included configuration ; file. Default is Unique=$, so that by default any file with $ in the name ; won't substitute anything at all. ; Include: instructs the sc_serv to read from the named configuration file, ; *at the point of insertion of the Include statement*, and process as though ; the included file was part of itself. Note that all configuration parameters ; in the DNAS configuration file are processed first to last, so if an item is defined ; twice in a configuration, the last item to process will be the one that takes ; effect. For this reason, it's usually a good idea to use the Includes first ; in a configuration file. ; example: ; Include=/usr/local/SHOUTcast/common.conf ; Default is not applicable.
Optimization configuration
; CpuCount is used to explicitly limit the DNAS to dominating a finite ; amount of processors in multiprocessor systems. By default, ; SHOUTcast creates one thread for every processor it detects in the ; host system, and assigns listeners equally across all the threads. ; In the event SHOUTcast doesn't correctly determine the number of ; CPUs in your host, or if you for whatever reason want to force ; the DNAS to not use other processors, you can say so here. ; Default behavior is to use as many processors as the DNAS detects on ; your system. ; CpuCount=1 ; Sleep defines the granularity of the client threads for sending data. ; DNAS 1.7.0, per client thread, will send up to 1,024 bytes of data ; per socket (or less depending on the window available), and then ; sleep for the provided duration before repeating the whole process. ; Note that making this value smaller will vastly increase CPU usage on ; your machine. Increasing reduces CPU, but increasing this value too far ; will cause skips. The value which seems most optimal for 128kbps ; streaming is 833 (833 microseconds per client poll) on our test labs. ; We wouldn't recommend setting it any lower than 100, or any higher than ; 1,024. If you have a slower machine, set this number lower to fix ; skips. ; Default value is 833. ; Sleep=833 ; CleanXML strips some whitespace and line feeds from XML output which ; confuses some (poorly written) XML parsers. If you get XML rendering errors, ; try turning this on. Default is No (off). ; CleanXML=No
Shoutcast Trans
SHOUTcast Trans stands for SHOUTcast Trans(coder), as it is able to transcode mp3’s to lower or higher bit rates. SHOUTcast Trans works by streaming mp3’s from a play list specified in the configuration file. You should put this configuration in it’s sepearated file shoutcast/sc_trans.conf as example.
; PlaylistFile (required EVEN IF RELAYING) - play list file (to create, use ; find /path/to/mp3/directory -type f -name "*.mp3" > playlist_filename.lst PlaylistFile=/shoutcast/playlists/playlist.lst ; Serverip/ServerPort are the target server to send to Serverip=127.0.0.1 ServerPort=8765 ; Password is the password on the sc_serv you're sending to. Password=password you also have in sc_serv.conf ; StreamTitle/URL/Genre define the data that appears on the directory and in the ; stream info. StreamTitle=ISeeT Radio StreamURL=https://iseet.fans Genre=All around the world ; Logfile optionally denotes a text file to log sc_Trans to. a kill -HUP ; will force a close and re-open of this file (but will also cease logging to ; the console) LogFile=/shoutcast/logs/sc_Trans.log ; Shuffle the play list Shuffle=1 ; Bitrate/SampleRate/Channels recommended values: ; 8kbps 8000/11025/1 ; 16kbps 16000/11025/1 ; 24kbps 24000/22050/1 ; 32kbps 32000/22050/1 ; 64kbps mono 64000/44100/1 ; 64kbps stereo 64000/22050/2 ; 96kbps stereo 96000/44100/2 ; 128kbps stereo 128000/44100/2 Bitrate=128000 SampleRate=44100 Channels=2 ; Quality is from 1-10. 1 is best, 10 is fastest. Quality=1 ; Mode=0 for none, 1 for 100/100->100/0, 2 for 0/100->100/0 CrossfadeMode=1 ; Length is ms. CrossfadeLength=6000 UseID3=1 ; Public determines whether or not this station will show up in the directory Public=0 ; Put stuff here for user interaction (AOL IM, ICQ, IRC) AIM= ICQ= IRC= ; You see ICQ - so very very old as ICQ is now death
Pay attention that shoutcast trans is started seperately with as example this command:
/etc/init.d/shoutcast_trans start
The command depends on your system!
I as example don’t use a start/stop script but I simply launch it at startup with a task manager.
If you as example gentoo, you can install shoutcast with emerge and than you have the init scripts.