/[gentoo]/xml/htdocs/doc/en/shoutcast-config.xml
Gentoo

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download) (as text)
Sat Apr 16 20:01:02 2005 UTC (13 years, 6 months ago) by swift
Branch: MAIN
Changes since 1.6: +6 -3 lines
File MIME type: application/xml
#89151 - Add emerging of shoutcast-trans-bin

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

  ViewVC Help
Powered by ViewVC 1.1.20