Contents of /xml/htdocs/doc/en/shoutcast-config.xml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.8 - (hide annotations) (download) (as text)
Tue Jun 28 19:17:44 2005 UTC (13 years, 7 months ago) by fox2mike
Branch: MAIN
Changes since 1.7: +46 -41 lines
File MIME type: application/xml
Fixed a gazillion typos, a bit of grammar, CC-BY-SA to 2.5 etc. **No Content Changes**. No thanks to chriswhite coz he asked for the typo-check ;)

1 swift 1.1 <?xml version='1.0' encoding='UTF-8'?>
2 neysx 1.6 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 fox2mike 1.8 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/shoutcast-config.xml,v 1.7 2005/04/16 20:01:02 swift Exp $ -->
4 swift 1.2 <guide link="shoutcast-config.xml">
5 swift 1.1 <title>Streaming Radio With SHOUTcast</title>
7 fox2mike 1.8 <author title="Author">
8 swift 1.1 <mail link="chriswhite@gentoo.org">Chris White</mail>
9     </author>
10 fox2mike 1.8 <author title="Editor">
11     <mail link="fox2mike@gentoo.org">Shyam Mani</mail>
12     </author>
13 swift 1.1
14     <abstract>
15 fox2mike 1.8 This guide will walk through the steps needed to setup a streaming radio server
16     with SHOUTcast Server and SHOUTcast Trans.
17 swift 1.1 </abstract>
19     <!-- The content of this document is licensed under the CC-BY-SA license -->
20 fox2mike 1.8 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21 swift 1.1 <license/>
23 swift 1.7 <version>1.3</version>
24 fox2mike 1.8 <date>2005-06-29</date>
25 swift 1.1
26     <chapter>
27     <title>Setting up SHOUTcast Server</title>
28     <section>
29     <title>Installing the files</title>
30     <body>
32     <p>
33     The SHOUTcast Server can be found in media-sound/SHOUTcast-server-bin. You can
34     install it with the following command:
35     </p>
37     <pre caption="Emerging SHOUTcast">
38     # <i>emerge shoutcast-server-bin</i>
39     </pre>
41     <p>
42     The SHOUTcast Server will now be installed. The next step is configuring your
43     new SHOUTcast Server.
44     </p>
46     </body>
47     </section>
48     <section>
49     <title>Configuring SHOUTcast Server</title>
50     <body>
52     <p>
53     Now that SHOUTcast Server is installed, it must be configured. The
54     configuration file can be found in <path>/etc/shoutcast/sc_serv.conf</path>.
55     Let's begin with the configuration. Make sure you are root, and open the
56     configuration file with your favorite editor. I choose vi for this example.
57     Now I'll bring up the file with vi:
58     </p>
60     <pre caption="Opening the configuration file">
61     # <i>vi /etc/shoutcast/sc_serv.conf</i>
62     </pre>
64     <p>
65     This will bring up the SHOUTcast Server configuration file for viewing.
66     From there you will see the configuration file and the different options
67     that you can set. Let's take a look on how to setup these particular options.
68     </p>
70     </body>
71     </section>
72     <section>
73     <title>Mandatory Options</title>
74     <body>
76     <pre caption="Setting the user limit">
77     <comment>; MaxUser. The maximum number of simultaneous listeners allowed.
78     ; Compute a reasonable value for your available upstream bandwidth (i.e. if
79     ; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
80     ; choose 256kbps/24kbps=10 maximum listeners.) Setting this value higher
81     ; only wastes RAM and screws up your broadcast when more people connect
82     ; than you can support.</comment>
83     MaxUser=10
84     </pre>
86     <p>
87     This is where the maximum number of users is set. As the caption states,
88     it is foolish to setup 100 users on a 256kbs upload (This is what I have set,
89     as my upload is about that). If you're running SHOUTcast Server to serve a
90     LAN, you can probably set this MUCH higher (to the 100 mentioned easily).
91 fox2mike 1.8 Please remember to not abuse whatever bandwith you are using though. Bandwidth
92     comes at quite a high price to ISP's and some will cut your account, fine you
93     high costs to makeup, or both.
94 swift 1.1 </p>
96     <pre caption="Setting the password">
97     <comment>; Password. While SHOUTcast never asks a listener for a password, a
98     ; password is required to broadcast through the server, and to perform
99     ; administration via the web interface to this server. This server should
100     ; consist of only letters and numbers, and is the same server your broadcaster
101     ; will need to enter in the SHOUTcast Source Plug-in for Winamp. THIS VALUE
102     ; CANNOT BE BLANK.</comment>
103     Password=a_hard_to_crack_password
104     </pre>
106     <p>
107     Here is where you setup the password. The password itself is clear text. For
108     security purposes, I STRONGLY recommend that you don't use passwords that are
109     used to access critical system components or other sensitive information.
110     Make this as random as possible, with a combination of letters and numbers.
111     This password will be what SHOUTcast Trans (or any other content provider)
112     will use to connect and provide streaming content.
113     </p>
115     <pre caption="Setting up your listening port">
116     <comment>; PortBase. This is the port number your server will run on. The
117     ; value, and the value + 1 must be available. If you get a fatal error when
118     ; the DNAS is setting up a socket on startup, make sure nothing else on the
119     ; machine is running on the same port (telnet localhost portnumber -- if you
120     ; get connection refused then you're clear to use that port). Ports less than 1024
121 fox2mike 1.8 ; may require root privileges on *nix machines. The default port is 8000.</comment>
122 swift 1.1 PortBase=8000
123     </pre>
125     <p>
126 swift 1.4 This value sets up what port users will connect to on your SHOUTcast Server.
127     The default is 8000, as it is what most mp3 server capable programs
128     will default to (xmms, winamp, etc.). As it states, if you wish to use a
129     port less than 1024, you will need to be root. However, I strongly urge
130     against using any port lower than 1024 for your SHOUTcast Server.
131 swift 1.1 </p>
133     <pre caption="Setting up logging">
134     <comment>; LogFile: file to use for logging. Can be '/dev/null' or 'none'
135     ; or empty to turn off logging. The default is ./sc_serv.log
136     ; on *nix systems or sc_serv_dir\sc_serv.log on win32.
137     ; Note: on win32 systems if no path is specified the location is
138     ; in the same dir as the executable, on *nix systems it is in the
139     ; current directory.</comment>
140     LogFile=/var/log/SHOUTcast.log
141     </pre>
143     <p>
144 swift 1.4 This sets the location of the SHOUTcast server log file. The ebuild
145 swift 1.1 has it set to /dev/null, so you will need to change it in order to get a real
146     log. I have it setup in the basic /var/log location. You can have it log to
147 swift 1.4 wherever you need.
148 swift 1.1 </p>
150     <pre caption="Enabling real time stats">
151     <comment>; RealTime displays a status line that is updated every second
152     ; with the latest information on the current stream (*nix and win32
153     ; console systems only)</comment>
154     RealTime=0
155     </pre>
157     <p>
158 swift 1.4 This displays information on the current song to stdout every second. This
159     is disabled by the ebuild so that the SHOUTcast daemon can run as silently
160     as possible. Set this to 1 if you want these updates each second. However, I
161     recommend you use the status page instead.
162 swift 1.1 </p>
164     <pre caption="Enabling real time logging">
165     <comment>; ScreenLog controls whether logging is printed to the screen or not
166     ; on *nix and win32 console systems. It is useful to disable this when
167     ; running servers in background without their own terminals. Default is 1</comment>
168     ScreenLog=0
169     </pre>
171     <p>
172 fox2mike 1.8 This is disabled by default in the ebuild to make the daemon run as
173 swift 1.4 silently as possible. This will log any events (connects, disconnects, etc)
174     to stdout as they happen in realtime. However, because the log file
175 swift 1.1 does the same thing, I recommend using it instead.
176     </p>
178     <pre caption="Setting the last number of songs displayed">
179     <comment>; ShowLastSongs specifies how many songs to list in the /played.html
180     ; page. The default is 10. Acceptable entries are 1 to 20.</comment>
181     ShowLastSongs=10
182     </pre>
184     <p>
185 swift 1.4 Just as it states, this value will set how many of the most recently played
186 fox2mike 1.8 /played.html will display. If you put more than 20, you should probably
187 swift 1.4 consider more coffee.
188 swift 1.1 </p>
190     <pre caption="Setting up filesystem modification logging">
191     <comment>; TchLog decides whether or not the DNAS logfile should track yp
192     ; directory touches. Adds and removes still appear regardless of
193     ; this setting.
194     ; Default is yes
195     ; TchLog=yes</comment>
196     </pre>
198     <p>
199 swift 1.4 This setting enables or disables logging for directory modifications
200 swift 1.1 by the DNAS (Distributed Network Audio Server), or SHOUTcast for short.
201     Recommended for those who wish to have the most secure logging possible.
202     Basic home/casual users probably don't need this.
203     </p>
205     <pre caption="Enabling http request logging">
206     <comment>; WebLog decides whether or not hits to http:// on this DNAS will
207     ; be logged. Most people leave this off because the DSP plug-in
208     ; uses http:// calls to update titles and get the listener count,
209     ; which takes up a lot of log space eventually. If you want to
210     ; see people making hits on your admin.cgi or index pages, turn
211     ; this back on. Note that this setting does NOT affect XML stats
212     ; counters for hits to http:// pages.
213     ; Default is no.
214     ; WebLog=no</comment>
215     </pre>
217     <p>
218     This specifies whether or not you want to log hits to the http server that
219 fox2mike 1.8 SHOUTcast provides. Once again, recommended for those who wish the most
220 swift 1.1 secure logging possible, but not recommended for home/casual users.
221     </p>
223     <pre caption="Enabling W3C Logging">
224     <comment>; W3CEnable turns on W3C Logging. W3C logs contain httpd-like accounts
225     ; of every track played for every listener, including byte counts those listeners
226     ; took. This data can be parsed with tools like Analog and WebTrends, or given
227     ; to third parties like Arbitron and Measurecast for their reporting systems.
228     ; Default is Yes (enabled).</comment>
229     W3CEnable=Yes
231     <comment>; W3CLog describes the name of the logfile for W3C logging. Default logfile is
232     ; sc_w3c.log, in the same directory wherever the DNAS gets started from.</comment>
233     W3CLog=/dev/null
234     </pre>
236     <p>
237 fox2mike 1.8 The first option enables W3C logging. This type of logging can be easily parsed
238     by the programs listed. This is highly recommended for those who wish to
239 swift 1.1 have the most in depth statistics possible. The second option specifies where
240     to store the W3C log. This is set to /dev/null by the ebuild.
241     </p>
243     </body>
244     </section>
245     <section>
246     <title>Network Configuration</title>
247     <body>
249     <pre caption="Setting the source IP">
250     <comment>; SrcIP, the interface to listen for source connections on (or to make relay
251     ; connections on if relaying). Can and usually will be ANY or
252     ; (Making it will keep other machines from being able to
253     ; broadcast using your SHOUTcast Server )</comment>
254     SrcIP=ANY
255     </pre>
257     <p>
258 swift 1.4 The SrcIP variable sets what IP streaming content is coming from. This can
259 swift 1.1 be another server (relaying), localhost (regular), or any other IP that your
260     interface supports. Setting to localhost prevents any other server from
261 swift 1.4 using your SHOUTcast Server as a broadcast source. The default is ANY
262     and will cause your SHOUTcast Server to source from any IP. Security wise, it
263     is better to set this to something specific.
264 swift 1.1 </p>
266     <pre caption="Setting the destination IP">
267     <comment>; DestIP, IP to listen for clients on (and to contact yp.SHOUTcast.com)
268     ; can and usually will be be ANY. If your machine has multiple IP addresses,
269     ; set this to the one you want it to be accessed by.</comment>
270     DestIP=ANY
271     </pre>
273     <p>
274 swift 1.4 This determines which IP on your interface you will allow users to connect to.
275     This can be localhost (if you're anti-social and wish only to
276 swift 1.5 stream to yourself), a private IP (for instance,, for hosting to
277     a local network), or your external IP (for instance,, for
278     streaming to a WAN, but not a LAN). In most cases, you can reach your own
279     stream by using instead of what is listed here. ANY lets your
280     SHOUTcast Server bind to all IP addresses on all avaliable interfaces.
281 swift 1.1 </p>
283     <pre caption="Setting proxy/yp.SHOUTcast.com port">
284     <comment>; Yport, port to connect to yp.SHOUTcast.com on. For people behind caching
285     ; webproxies, change this to the alternate port (666 is what it might be,
286     ; check www.SHOUTcast.com if you have problems). Otherwise, leave this at 80.
287     ; We're actively working on re-opening port 666, but as of release the only
288     ; working port is port 80.</comment>
289     Yport=80
290     </pre>
292     <p>
293     This has 2 functions. First is the port to connect to yp.SHOUTcast.com with.
294     yp.SHOUTcast.com is nullsoft's page for public servers so users know where to
295     listen in on. Users can search for your station from this page. The
296     secondary use is for web proxies. Set this to the port you use for proxy
297     connects, and set DestIP to your proxy for streaming.
298     </p>
300     <pre caption="Setting up reverse DNS">
301     <comment>; NameLookups. Specify 1 to perform reverse DNS on connections.
302     ; This option may increase the time it takes to connect to your
303     ; server if your DNS server is slow. Default is 0 (off).</comment>
304     NameLookups=0
305     </pre>
307     <p>
308 fox2mike 1.8 This option specifies whether or not you want to perform reverse DNS lookups
309     on clients. This would take an IP address and try to find out the corresponding
310     hostname. Use this for logging purposes to create a more detailed report.
311 swift 1.1 </p>
313     <pre caption="Setting up relaying">
314     <comment>; RelayPort and RelayServer specify that you want to be a relay server.
315     ; Relay servers act as clients to another server, and rebroadcast.
316     ; Set RelayPort to 0, RelayServer to empty, or just leave these commented
317     ; out to disable relay mode.
318     ; RelayPort=8000
319     ; RelayServer=</comment>
320     </pre>
322     <p>
323 fox2mike 1.8 This specifies that you are acting as a relay server. Relay servers are
324 swift 1.1 often used to take a low bandwith connection that can only stream to one
325 swift 1.4 client, and use its own higher bandwith to serve to more clients. RelayPort
326     specifies the port and IP address of the SHOUTcast Server you wish to
327 fox2mike 1.8 relay for. Comment this out if you don't plan on using your server as a relay.
328 swift 1.1 </p>
330     </body>
331     </section>
332     <section>
333     <title>Server Configuration</title>
334     <body>
336     <pre caption="Setting the admin password">
337     <comment>; AdminPassword. This password (if specified) changes the
338     ; behavior of Password to be a broadcast-only password, and
339     ; limits HTTP administration tasks to the password specified
340     ; here. The broadcaster, with the password above, can still
341     ; log in and view connected users, but only the AdminPassword
342     ; will grant the right to kick, ban, and specify reserve hosts.
343     ; The default is undefined (Password allows control for both
344     ; source and admin)
345     ; AdminPassword=adminpass</comment>
346     </pre>
348     <p>
349 fox2mike 1.8 Setting this will create a broadcaster and administrator. The broadcaster can
350     log in with Password, and view connections. However, should the person want
351     to kick/ban/administer the server, they must have the Admin password. This
352     option creates more specific roles for your server. This is recommended for
353 swift 1.1 instances where the system administrator is not the same person as the
354     broadcaster.
355     </p>
357     <pre caption="Setting up auto user disconnect">
358     <comment>; AutoDumpUsers controls whether listeners are disconnected if the source
359     ; stream disconnects. The default is 0.</comment>
360     AutoDumpUsers=0
361     </pre>
363     <p>
364     This specifies whether or not users are kicked out if the stream disconnects
365     for any reason. This is set to 0, so that clients will either timeout
366     themselves, or keep trying to buffer a stream. Use this if you expect
367     short interruptions at any time.
368     </p>
370     <pre caption="Setting up the source timeout">
371     <comment>; AutoDumpSourceTime specifies how long, in seconds, the source stream is
372     ; allowed to be idle before the server disconnects it. 0 will let the source
373     ; stream idle indefinately before disconnecting. The default is 30.</comment>
374     AutoDumpSourceTime=30
375     </pre>
377     <p>
378     This specifies when the SHOUTcast Server should give up waiting for a source
379 fox2mike 1.8 (mainly a relay server) to stream content from. Anywhere from 30 to 60 should be
380     a reasonable value for this.
381 swift 1.1 </p>
383     <pre caption="Setting up the content directory">
384     <comment>; ContentDir specifies the directory location on disk of where to stream
385 fox2mike 1.8 ; on-demand content from. Subdirectories are supported as of DNAS 1.8.2.
386 swift 1.1 ; Default is ./content/, meaning a directory named content in the same directory
387     ; as where sc_serv was invoked from.</comment>
388     ContentDir=/opt/SHOUTcast/content/
389     </pre>
391     <p>
392 fox2mike 1.8 The ContentDir specifies where to put on demand content. For example, if you
393 swift 1.1 wish to stream an announcement to employees, you could use this for that
394 fox2mike 1.8 purpose. The SHOUTcast Server ebuild sets this to
395     <path>/opt/SHOUTcast/content</path> for you. To use this, put an mp3 in the
396 swift 1.1 content directory, then point your browser to
397 fox2mike 1.8 <c>http://example.com:[port]/content/mp3name.pls</c>. SHOUTcast Server will
398     automatically create a streaming media compatible playlist for the mp3, and
399     stream it on demand. Use this as an alternative to SHOUTcast Trans for
400 swift 1.1 streaming media source.
401     </p>
403     <pre caption="Setting up an intro file">
404     <comment>; IntroFile can specify a mp3 file that will be streamed to listeners right
405     ; when they connect before they hear the live stream.
406     ; Note that the intro file MUST be the same samplerate/channels as the
407     ; live stream in order for this to work properly. Although bitrate CAN
408     ; vary, you can use '%d' to specify the bitrate in the filename
409     ; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps).
410     ; The default is no IntroFile
411     ; IntroFile=c:\intro%d.mp3</comment>
412     </pre>
414     <p>
415 swift 1.4 This allows you to configure an intro file. Everytime users connect, they'll
416 swift 1.1 hear this file played. As it states, the stream bitrate and the intro song
417     bitrate must match, or else things will break. You can, however, put
418     something such as intro128.mp3 and intro64.mp3, and it will play intro128.mp3
419 fox2mike 1.8 to users connecting to a 128kbps stream, and intro64 for users connecting at 64kbps.
420 swift 1.1 </p>
422     <pre caption="Setting up a back file">
423     <comment>; BackupFile can specify a mp3 file that will be streamed to listeners over
424     ; and over again when the source stream disconnects. AutoDumpUsers must be
425     ; 0 to use this feature. When the source stream reconnects, the listeners
426     ; are rejoined into the live broadcast.
427     ; Note that the backup file MUST be the same samplerate/channels as the
428     ; live stream in order for this to work properly. Although bitrate CAN
429     ; vary, you can use '%d' to specify the bitrate in the filename
430     ; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps).
431     ; The default is no BackupFile
432     ; BackupFile=C:\intro%d.mp3</comment>
433     </pre>
435     <p>
436     This is the same as above, but will be played when the stream source ends,
437     instead of when users disconnect. This will only work if AutoDumpUsers is set
438     to 0.
439     </p>
441     <pre caption="Setting up a title format">
442     <comment>; TitleFormat specifies a format string for what title is sent to the listener.
443     ; For example, a string of 'Justin Radio' forces the title 'Justin Radio' even
444     ; when the source changes the title. You can use up to one '%s' in the string
445     ; which lets you contain the title from the source. For example, if your
446     ; TitleFormat is 'Justin Radio: %s', and the source plug-in's title is
447     ; 'Billy plays the blues', then the net title is
448     ; 'Justin Radio: Billy plays the blues'. Note: only works on non-relay servers.
449     ; The default is no format string.</comment>
450     TitleFormat=Chris Gentoo Beats: %s
451     </pre>
453     <p>
454     This sets up a non-variable title for your Shoutcast server. Use this if your
455     source stream differs from your SHOUTcast Server's name. This will NOT work
456 swift 1.4 with relay servers.
457 swift 1.1 </p>
459     <pre caption="Setting up a URL format">
460     <comment>; URLFormat specifies a format string for what url is sent to the listener.
461     ; Behaves like TitleFormat (see above).
462     ; The default is no format string.
463     ; URLFormat=http://www.server.com/redirect.cgi?url=%s</comment>
464     </pre>
466     <p>
467 swift 1.4 This is the same as TitleFormat except that the URL listed above is used
468     instead of the source stream's URL.
469 swift 1.1 </p>
471     <pre caption="Setting up the public status of a source stream">
472     <comment>; PublicServer can be always, never, or default (the default, heh)
473     ; Any setting other than default will override the public status
474     ; of the source plug-in or of a SHOUTcast Server that is being relayed.</comment>
475     PublicServer=default
476     </pre>
478     <p>
479 swift 1.4 This specifies whether or not you want to be listed as a public server even if
480 swift 1.1 your relay server/source plugin is listed as such.
481     </p>
483     <pre caption="Allowing relaying">
484     <comment>; AllowRelay determines whether or not other SHOUTcast Servers will be
485     ; permitted to relay this server. The default is Yes.</comment>
486     AllowRelay=Yes
487     </pre>
489     <p>
490 fox2mike 1.8 AllowRelay determines if other servers are allowed to relay your content.
491 swift 1.4 If you don't think you'll ever relay at all, set this to No.
492 swift 1.1 </p>
494     <pre caption="Allowing relays to publically display the source">
495     <comment>; AllowPublicRelay, when set to No, will tell any relaying servers not
496     ; to list the server in the SHOUTcast directory (non-public), provided
497     ; the relaying server's Public flag is set to default. The default is
498     ; Yes.</comment>
499     AllowPublicRelay=Yes
500     </pre>
502     <p>
503 swift 1.4 AllowPublicRelay specifies whether or not you wish to be listed in the
504 fox2mike 1.8 SHOUTcastpublic directory if the server you're relaying to is already listed.
505 swift 1.4 Note that PublicServer can override this setting.
506 swift 1.1 </p>
508     <pre caption="Setting MetaInterval">
509     <comment>; MetaInterval specifies how often, in bytes, metadata sent.
510     ; You should really leave this at the default of 32768, but the option is
511     ; provided anyway.</comment>
512     MetaInterval=32768
513     </pre>
515     <p>
516     Just leave this as is.
517     </p>
519     </body>
520     </section>
521     <section>
522     <title>Access Configuration</title>
523     <body>
525     <pre caption="Setting the max listner time">
526     <comment>; ListenerTimer is a value in minutes of maximum permitted time for
527     ; a connected listener. If someone is connected for longer than this
528     ; amount of time, in minutes, they are disconnected. When undefined,
529     ; there is no limit defined. Default is undefined.
530     ; ListenerTimer=600</comment>
531     </pre>
533     <p>
534     I'm not to sure why you'd need this one. Basically, if a user is on for too
535     many minutes, disconnect them. Only thing I can think of is to kick idlers
536     off, or people you think should be doing other things than listening to your
537     stream. Value is measured in minutes.
538     </p>
540     <pre caption="Setting up the ban file">
541     <comment>; BanFile is the text file sc_serv reads and writes to/from
542     ; for the list of clients prohibited to connect to this
543     ; server. It's automatically generated via the web
544     ; interface.
545     ; BanFile=sc_serv.ban</comment>
546     </pre>
548     <p>
549     This is the filename for the list of clients that are banned from your server.
550     The default is sc_serv.ban, but you can use whatever name you so desire with
551     this setting.
552     </p>
554     <pre caption="Setting the Rip list">
555     <comment>; RipFile is the text file sc_serv reads and writes to/from
556     ; for the list of client IPs which are *ALWAYS* permitted
557     ; to connect to this server (useful for relay servers).
558     ; This file is automatically generated via the web
559     ; interface. Note that if your server is FULL, and someone
560     ; from a Reserved IP connects, the DNAS will force the person
561     ; listening for the longest time off to make room for the new
562     ; connection.
563     ; RipFile=sc_serv.rip</comment>
564     </pre>
566     <p>
567     As grim as it sounds, Rip actually stands for "Reserved IP". Use this for
568     your friends or other people you consider more important than random users.
569     If you are currently streaming to the max number of users possible, and one
570     of your rip members tries to get on, it will kick the longest listening person
571     from the server to get them on.
572     </p>
574     <pre caption="Setup if Rip only users can access your server">
575     <comment>; RipOnly, when set to Yes, will only allow IP addresses listed in the Reserved
576     ; IP list to connect and relay. All other connections for listening will be denied.
577     ; This is really only useful for servers whose sole purpose is to provide the
578     ; primary feed to all public relays. Setting this value to Yes also forces the
579     ; server into Private mode, since listing this server in the directory would
580     ; be pointless. Default is No.
581     ; RipOnly=No</comment>
582     </pre>
584     <p>
585     This allows for only Rip members to connect to your SHOUTcast Server. You can
586     either use this for private radio streams, or to make it so that only certain
587     relays will be able to access your stream.
588     </p>
590     </body>
591     </section>
592     <section>
593     <title>Mass Configuration</title>
594     <body>
596     <pre caption="Setting Unique variables">
597     <comment>; Unique: assigns a variable name for use in any config item which points to a
598     ; file. Useful for servers running lots of SHOUTcast Servers that have similar
599     ; configuration parameters, excepting logfile names, banfile names, etc. Any
600     ; parameter that takes a pathname can include the character $, which will
601     ; substitute $ for the variable assigned here. Keep in mind that the unique
602     ; variable can only be used after it is defined, so don't try to use a unique
603     ; variable substitution in a path before you define it. For example, you
604     ; could set:
605     ; Unique=my_server
606     ; and then define Log=/usr/local/SHOUTcast/$.log in an included configuration
607     ; file. Default is Unique=$, so that by default any file with $ in the name
608     ; won't substitute anything at all.</comment>
609     </pre>
611     <p>
612     Basically, if you're running lots of SHOUTcast Servers, it would be a dire
613     pain to change all the log/ban/etc. files to something unique for every
614     configuration. Instead, you can set Unique to something, and $ will be
615     replaced with whatever Unique is set to. For example, if one file had
616     Unique=Jazz and another had Unique=Rock, then Log=/var/log/$.log would
617     produce /var/log/Jazz.log on one config file and /var/log/Rock.log on another
618 fox2mike 1.8 config file. Much easier when dealing with multiple SHOUTcast Servers on
619 swift 1.1 similiar configurations.
620     </p>
622     <pre caption="Setting up common configure variables">
623     <comment>; Include: instructs the sc_serv to read from the named configuration file,
624     ; *at the point of insertion of the Include statement*, and process as though
625     ; the included file was part of itself. Note that all configuration parameters
626     ; in the DNAS config file are processed first to last, so if an item is defined
627     ; twice in a configuration, the last item to process will be the one that takes
628     ; effect. For this reason, it's usually a good idea to use the Includes first
629     ; in a config file.
630     ; example:
631     ; Include=/usr/local/SHOUTcast/common.conf
632     ; Default is not applicable.</comment>
633     </pre>
635     <p>
636     If you're running multiple SHOUTcast Servers and wish to utilize similar
637     configuration variables without setting them all for each configuration
638     file, you can set this to point to a file that contains settings that are
639     similiar between multiple configurations.
640     </p>
642     </body>
643     </section>
644     <section>
645     <title>Optimization Configuration</title>
646     <body>
648     <pre caption="Setup number of CPU's utilized">
649     <comment>; CpuCount is used to explicitly limit the DNAS to dominating a finite
650     ; amount of processors in multiprocessor systems. By default,
651     ; SHOUTcast creates one thread for every processor it detects in the
652     ; host system, and assigns listeners equally across all the threads.
653     ; In the event SHOUTcast doesn't correctly determine the number of
654     ; CPUs in your host, or if you for whatever reason want to force
655     ; the DNAS to not use other processors, you can say so here.
656     ; Default behavior is to use as many processors as the DNAS detects on
657     ; your system.
658     ; CpuCount=1</comment>
659     </pre>
661     <p>
662     On multiple CPU systems, use this setting to force the SHOUTcast Server to
663     utilize CpuCount # of processors. The default to assign one thread to each
664     processor, and have listeners across all the threads. If you set this lower
665     than your total processor count, this will leave processors free to do other
666     things.
667     </p>
669     <pre caption="Setup data submission gap">
670     <comment>; Sleep defines the granularity of the client threads for sending data.
671     ; DNAS 1.7.0, per client thread, will send up to 1,024 bytes of data
672     ; per socket (or less depending on the window available), and then
673     ; sleep for the provided duration before repeating the whole process.
674     ; Note that making this value smaller will vastly increase CPU usage on
675     ; your machine. Increasing reduces CPU, but increasing this value too far
676     ; will cause skips. The value which seems most optimal for 128kbps
677     ; streaming is 833 (833 microseconds per client poll) on our test labs.
678     ; We wouldn't recommend setting it any lower than 100, or any higher than
679     ; 1,024. If you have a slower machine, set this number lower to fix
680     ; skips.
681     ; Default value is 833.
682     ; Sleep=833</comment>
683     </pre>
685     <p>
686     The SHOUTcast Server will use the sleep value in determining the gap between
687     sending data. The higher the value, the longer the gap, the lower the value,
688     the shorter the gap and the more CPU usage SHOUTcast Server will take up. On
689     slower systems, as it states, you might want to lower this so that the
690     SHOUTcast Servers sends data more and more frequently to users. Best to leave
691     as is.
692     </p>
694     <pre caption="Setup XML output">
695     <comment>; CleanXML strips some whitespace and linefeeds from XML output which
696     ; confuses some (poorly written) XML parsers. If you get XML rendering errors,
697     ; try turning this on. Default is No (off).
698     ; CleanXML=No</comment>
699     </pre>
701     <p>
702     Probably don't need to worry about this setting to much unless you use custom
703     XML parsers to create custom statistics for you server. If the XML parser
704     cannot handle whitespace and linefeeds in XML, set this to Yes, and all should
705     work.
706     </p>
708     </body>
709     </section>
710     <section>
711     <title>Configuration Conclusion</title>
712     <body>
714     <p>
715     Your SHOUTcast Server should now be configured. For businesses that are using
716 fox2mike 1.8 SHOUTcast, I recommend turning on WC3 logging, as it can be easily parsed, and
717     used for creating custom statistics. You should also enable the
718     AdministratorPassword. You might also wish to enable some of the mass
719 swift 1.1 configuration options if you're creating multiple SHOUTcast Servers.
720     </p>
722     <p>
723     With the configuration setup, we'll now work on getting SHOUTcast up and
724     running. We'll start with simple on demand streaming for a simple startup,
725     then work on SHOUTcast Trans later (as it is somewhat more involved).
726     </p>
728     </body>
729     </section>
730     </chapter>
732     <chapter>
733     <title>Getting started with SHOUTcast Server</title>
734     <section>
735     <title>Setting up on demand streaming</title>
736     <body>
738     <p>
739     On demand streaming, as shown in the configuration chapter, automatically sets
740     up on demand playlists for mp3 files in the content directory. The Shoutcast
741     server ebuild has a directory setup in /opt/SHOUTcast/content for all your on
742     demand mp3's. Let's get started by creating a simple on demand streaming mp3.
743     </p>
745     <p>
746     First we'll need to get an mp3 from somewhere and put it in the content
747     directory. We'll take this sample.mp3 file from an /Mp3 directory I have
748     created.
749     </p>
751     <pre caption="Copying an mp3 to the content directory">
752     # <i>cp sample.mp3 /opt/SHOUTcast/content/</i>
753     # <i>cd /opt/SHOUTcast/content/</i>
754     # <i>ls</i>
755     sample.mp3
756     </pre>
758     <p>
759     Ok, so the file is copied over now. Now we'll need to startup our SHOUTcast
760     Server so the file can be accessed.
761     </p>
763     <pre caption="Starting up the Shoutcast Server">
764     # <i>/etc/init.d/shoutcast start</i>
765     * Starting Shoutcast Server...
766     *******************************************************************************
767     ** SHOUTcast Distributed Network Audio Server
768     ** Copyright (C) 1998-2004 Nullsoft, Inc. All Rights Reserved.
769     ** Use "sc_serv filename.ini" to specify an ini file.
770     *******************************************************************************
771     [ ok ]
772     </pre>
774     <p>
775     The little banner is there to make sure that nothing dies right away (ie. so
776     you know your server actually started). Your SHOUTcast Server is now started!
777     Because of the nature of on demand content, you will ONLY be able to access it
778     from a browser. MPlayer/XMMS/anything won't be able to stream it as is. I
779     use kmplayer in order to access the stream directly from my browser. You can
780     see the result on the next image.
781     </p>
783     <figure caption="On Demand Content" short="OnDemandContent" link="/images/docs/shoutcast-OnDemandContent.jpg" />
785     <p>
786     Some people have XMMS setup to handle their audio mime types, so your browser
787     may spawn XMMS up in order to play the resulting streaming content. Now that
788     you are able to work with on demand content, we'll now work on using SHOUTcast
789     Trans to create a true streaming radio server.
790     </p>
792     </body>
793     </section>
794     </chapter>
796     <chapter>
797     <title>Setting up SHOUTcast Trans</title>
798     <section>
799     <title>SHOUTcast Trans introduction</title>
800     <body>
802     <p>
803     SHOUTcast Trans stands for SHOUTcast Trans(coder), as it is able to Transcode
804     mp3's to lower or higher bitrates. SHOUTcast Trans works by streaming mp3's
805     from a playlist specified in the configuration file. We'll begin to setup the
806     configuration for SHOUTcast Trans, so that we can have a real to goodness
807     streaming radio station. We'll begin by opening the configuration file for
808     SHOUTcast Trans, which just so happens to be located in
809     /etc/shoutcast/sc_trans.conf.
810     </p>
812     <pre caption="Opening the SHOUTcast Trans configuration file">
813 swift 1.7 <comment>(First install SHOUTcast Trans)</comment>
814     # <i>emerge shoutcast-trans-bin</i>
815     <comment>(Next open the SHOUTcast Trans configuration file)</comment>
816 swift 1.1 # <i>vi /etc/shoutcast/sc_trans.conf</i>
817     </pre>
819     <p>
820     Now that we have the SHOUTcast Trans configuration file open, we'll begin to
821     setup the streaming source.
822     </p>
824     </body>
825     </section>
826     <section>
827     <title>Configuring SHOUTcast Trans</title>
828     <body>
830     <pre caption="Setting up the playlist">
831     <comment>; PlaylistFile (required EVEN IF RELAYING) - playlist file (to create, use
832     ; find /path/to/mp3/directory -type f -name "*.mp3" &gt; playlist_filename.lst</comment>
833     PlaylistFile=/opt/SHOUTcast/playlists/playlist.lst
834     </pre>
836     <p>
837     This setting tells SHOUTcast where to find its streaming media content from.
838 swift 1.4 This setting requires an existing file, so let's go ahead and create a
839 swift 1.1 playlist. I'll create one real quick from my /Mp3 directory referred to
840     earlier.
841     </p>
843     <pre caption="Creating the playlist">
844     # <i>find /Mp3 -type f -name "*.mp3" &gt; /opt/SHOUTcast/playlists/playlist.lst</i>
845     </pre>
847     <p>
848     Now that the playlist is setup, we point the configuration file to it, and
849     SHOUTcast Trans will now know what files to stream.
850     </p>
852     <pre caption="Setting the server IP and port">
853     <comment>; Serverip/ServerPort are the target server to send to</comment>
854     Serverip=
855     ServerPort=8000
856     </pre>
858     <p>
859 swift 1.4 This setting decides where to send the streaming content. In this guide,
860 swift 1.1 it will be the SHOUTcast Server's IP and port that you setup previously
861     (DestIP and PortBase).
862     </p>
864     <pre caption="Setting the SHOUTcast Server password">
865     <comment>; Password is the password on the sc_serv you're sending to.</comment>
866     Password=password_you_setup_in_sc_serv.conf
867     </pre>
869     <p>
870     The is the same password that you setup in the SHOUTcast Server configuration.
871     </p>
873     <pre caption="Setting up your stream information">
874     <comment>; StreamTitle/URL/Genre define the data that appears on the directory and in the
875     ; stream info.</comment>
876     StreamTitle=Chris Gentoo Beats
877     StreamURL=http://www.gentoo.org
878     Genre=JPOP Electronica And More!
879     </pre>
881     <p>
882     This sets up the title of your stream (ie. Radio One), the url (ie.
883     http://www.radio-one.com), and the Genre (ie. Electronica Trance Tribal).
884     </p>
886     <pre caption="Setting up your logfile">
887     <comment>; Logfile optionally denotes a text file to log sc_Trans to. a kill -HUP
888     ; will force a close and re-open of this file (but will also cease logging to
889     ; the console)</comment>
890     LogFile=/var/log/sc_Trans.log
891     </pre>
893     <p>
894     This will point to the log file for SHOUTcast Trans. All your logging goes
895     here.
896     </p>
898     <pre caption="Setting up shuffling">
899     <comment>; Shuffle the playlist</comment>
900     Shuffle=1
901     </pre>
903     <p>
904     Decide on whether or not you want your playlist to play random songs from your
905     list each time. Most will set this to 1. If you're going to be accepting
906     song requests, set this to 0 and I'll explain how to do that later on.
907     </p>
909     <pre caption="Setting up the stream">
910     <comment>; Bitrate/SampleRate/Channels recommended values:
911     ; 8kbps 8000/11025/1
912     ; 16kbps 16000/11025/1
913     ; 24kbps 24000/22050/1
914     ; 32kbps 32000/22050/1
915     ; 64kbps mono 64000/44100/1
916     ; 64kbps stereo 64000/22050/2
917     ; 96kbps stereo 96000/44100/2
918     ; 128kbps stere0 128000/44100/2</comment>
919     Bitrate=128000
920     SampleRate=44100
921     Channels=2
922     <comment>; Quality is from 1-10. 1 is best, 10 is fastest.</comment>
923     Quality=1
924     </pre>
926     <p>
927     Bitrate sets up the bitrate for your stream. This can be from 8000 (8kbps) to
928     128000 (128kbps). SampleRate sets the sampling rate of the stream. This can
929     be anything from 11025 (11025khz) to 44100 (44100khz). Channels sets how
930     many channels your stream will brodcast. This can be anything from 1 (mono)
931     to 2 (stereo). Quality sets the stream quality. This is somewhat still
932     controlled by the Bitrate/SampleRate/Channels. This is where you deal with
933     how compressed the stream is. 1 gives you best quality, 10 gives you the best
934     speed. Keep your connection in mind when you set these values! Use the guide
935     given in order to figure out what your mp3's should be streamed at.
936     </p>
938     <pre caption="Setting up crossfading">
939     <comment>; Mode=0 for none, 1 for 100/100->100/0, 2 for 0/100->100/0</comment>
940     CrossfadeMode=1
941     <comment>; Length is ms.</comment>
942     CrossfadeLength=8000
943     </pre>
945     <p>
946     This sets up song crossfading. Setting this to 0 will disable crossfading.
947     If you set it to 1, Song 1 will fade out and Song 2 will fade in. If you set
948     it to 2, Song 1 will fade in and Song 2 will fade out. The length is how long
949     in ms the crossfade occurs.
950     </p>
952     <pre caption="Enabling ID3 usage">
953     UseID3=1
954     </pre>
956     <p>
957     This decides whether or not you wish to use the ID3 tag for information about
958     the mp3.
959     </p>
961     <pre caption="Setting up public status">
962     <comment>; Public determines whether or not this station will show up in the directory</comment>
963     Public=0
964     </pre>
966     <p>
967     This sets up whether or not streams should be publically listed when relaying to
968     a server. Remember PublicServer in sc_serv.conf can over-ride this!
969     </p>
971     <pre caption="Setting up user interaction">
972     <comment>; Put stuff here for user interaction (AOL IM, ICQ, IRC)</comment>
973     AIM=AIMHandle
974     ICQ=
975     IRC=SHOUTcast
976     </pre>
978     <p>
979     This sets up the information on how to reach you (the dj). You can setup AIM
980     or ICQ channels for song requests/anything. You can setup your own IRC channel
981     as well, so that you can interact with multiple users at once.
982     </p>
984     </body>
985     </section>
986     <section>
987     <title>SHOUTcast Trans Setup Conclusion</title>
988     <body>
990     <p>
991     Your SHOUTcast Trans is now ready to stream to your SHOUTcast Server! We'll
992     now get started on streaming your mp3's.
993     </p>
995     </body>
996     </section>
997     </chapter>
999     <chapter>
1000     <title>Getting Started With SHOUTcast Trans</title>
1001     <section>
1002     <title>Starting up SHOUTcast Trans</title>
1003     <body>
1005     <p>
1006     As I most often use SHOUTcast Trans with SHOUTcast Server, I tend to startup
1007     SHOUTcast Trans, which in turns starts up SHOUTcast for you (much easier). So
1008     we'll go ahead and get SHOUTcast Trans started.
1009     </p>
1011     <pre caption="Starting up Shoutcast Trans and Shoutcast Server">
1012     # <i>/etc/init.d/shoutcast_trans start</i>
1013     * Starting Shoutcast Server...
1014     *******************************************************************************
1015     ** SHOUTcast Distributed Network Audio Server
1016     ** Copyright (C) 1998-2004 Nullsoft, Inc. All Rights Reserved.
1017     ** Use "sc_serv filename.ini" to specify an ini file.
1018     *******************************************************************************
1019     [ ok ]
1020     * Starting Shoutcast Trans... [ ok ]
1021     </pre>
1023     </body>
1024     </section>
1025     <section>
1026     <title>Listening to the SHOUTcast Trans stream</title>
1027     <body>
1029     <p>
1030     Now that SHOUTcast Trans is started, we'll start listening to the stream. I
1031     use MPlayer in this example to play the stream.
1032     </p>
1034     <pre caption="Listening to your stream">
1035     # <i>mplayer -cache 1024</i>
1036     ...
1037     Playing
1038     Connecting to server[]:8000 ...
1039     Name : Chris Gentoo Beats
1040     Genre : JPOP Electronica And More!
1041     Website: http://www.gentoo.org
1042     Public : no
1043     Bitrate: 128kbit/s
1044     Cache size set to 1024 KBytes
1045     Connected to server:
1046     Cache fill: 9.38% (98304 bytes) Audio file detected.
1047     ==========================================================================
1048     Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
1049     MP3lib: init layer2 and 3 finished, tables done
1050     mpg123: Can't rewind stream by 156 bits!
1051     AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128.0 kbit)
1052     Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
1053     ==========================================================================
1054     Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
1055     AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
1056     AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
1057     AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
1058     Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
1059     Video: no video
1060     Starting playback...
1061     </pre>
1063     <p>
1064     This was somewhat clipped. The -cache variable was put in to over-ride my
1065     somewhat larger buffering settings. And viola! You're now listening to
1066     streaming media! In the next chapter, we'll show you how to do a little
1067     bit more with your SHOUTcast Server.
1068     </p>
1070     </body>
1071     </section>
1072     </chapter>
1074     <chapter>
1075     <title>Advanced SHOUTcast Usage</title>
1076     <section>
1077     <title>Business Usage</title>
1078     <body>
1080     <p>
1081     Businesses can use SHOUTcast in a number of ways:
1082     </p>
1084     <ol>
1085     <li>
1086 fox2mike 1.8 Use on demand content streaming to make more interesting daily
1087     announcements.
1088 swift 1.1 </li>
1089     <li>
1090     Have streaming public announcements avaliable as they happen, let your
1091     clients know what's going on, on the spot! Then archive them as on
1092     demand content streaming for future reference.
1093     </li>
1094     <li>
1095     Do interviews as streaming media and archive them as on demand content
1096     streaming.
1097     </li>
1098     </ol>
1100     <p>
1101     There are more possibilities on how to utilize SHOUTcast Server for businesses.
1102     Use live streaming media instead of boring old text!
1103     </p>
1105     </body>
1106     </section>
1107     <section>
1108     <title>DJ-ing with SHOUTcast</title>
1109     <body>
1111     <p>
1112     SHOUTcast Server is one of the most popular servers for both new and vetran
1113     DJ's alike. For those just starting, there are a few ways to increase the
1114     user experience of your SHOUTcast Server. Having an intro song is very key.
1115     It gives the users an idea of what your station is all about. Be sure to
1116     include this! Post your server on yp.SHOUTcast.com (described in the
1117     SHOUTcast Server configuration section) so that everyone knows where you
1118     are. One of the most unique things is to be able to take requests. To set
1119     up requesting, first turn Shuffle off in sc_Trans.conf. Have about, I'd say,
1120     10 or so songs ready to get you started. Then start requesting song requests
1121     in the middle. When someone requests a song, simple add it to the end of your
1122     playlist, and then you can use this script here to control what SHOUTcast
1123     Trans does with your playlist:
1124     </p>
1126     <pre caption="djcontrol">
1127     <comment>#!/bin/bash</comment>
1129     case "$1" in
1130     "reload")
1131     kill -s USR1 `cat /var/run/SHOUTcast_Trans.pid`
1132     ;;
1133     "next")
1134     kill -s WINCH `cat /var/run/SHOUTcast_Trans.pid`
1135     ;;
1136     *)
1137     echo "Invalid command"
1138     ;;
1139     esac
1140     </pre>
1142     <p>
1143     When you've addded the song to the playlist, you need to tell SHOUTcast Trans
1144     that your playlist has changed with the new request entry.
1145     </p>
1147     <pre caption="Reloading the playlist">
1148     # <i>djcontrol reload</i>
1149     </pre>
1151     <p>
1152     You should now let the users know after what song the requests will start. Or
1153     if you want, you can keep skipping with:
1154     </p>
1156     <pre caption="Skipping through the playlist">
1157     # <i>djcontrol reload</i>
1158     </pre>
1160     <p>
1161     Be careful not to skip too much, as there is no previous control. Once you
1162     hit their song, the requesting begins. I'd get about 5 or so requests before
1163     you start requesting. This way you don't run all the way back to the
1164     beginning. If you start to lack in requests and expect that your request
1165     hour is over with, then simply copy your next session's playlist over the
1166     requests playlist and reload the playlist. Once the current song is over,
1167     it will go back to the new playlist.
1168     </p>
1170     </body>
1171     </section>
1172     <section>
1173     <title>Conclusion</title>
1174     <body>
1176     <p>
1177     That ends it for the SHOUTcast Server and SHOUTcast Trans tutorial. I hope
1178 fox2mike 1.8 you benefitted from the information here and please email me any comments or
1179 swift 1.1 suggestions for this page! Enjoy your new streaming SHOUTcast Server!
1180     </p>
1182     </body>
1183     </section>
1184     </chapter>
1185     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20