File: faq.html

package info (click to toggle)
libapache-mod-mp3 0.39-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 436 kB
  • ctags: 432
  • sloc: ansic: 3,135; perl: 521; sh: 176; makefile: 50
file content (517 lines) | stat: -rw-r--r-- 30,914 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<HTML>
<HEAD>
<TITLE>mod_mp3 - FAQ for the Apache mod_mp3 streaming module</TITLE>
<LINK REV="made" HREF="mailto:bhcompile@daffy.perf.redhat.com">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>mod_mp3 - FAQ for the Apache mod_mp3 streaming module</H1>

<A NAME="__index__"></A>
<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#name">NAME</A></LI>
	<LI><A HREF="#so what is mod_mp3">So what is mod_mp3?</A></LI>
	<LI><A HREF="#where do i get it from">Where do I get it from?</A></LI>
	<LI><A HREF="#what sort of license does it have">What sort of license does it have?</A></LI>
	<LI><A HREF="#how can i make suggestions for it">How can I make suggestions for it?</A></LI>
	<LI><A HREF="#how can i report a bug">How can I report a bug?</A></LI>
	<LI><A HREF="#how do i install it">How do I install it?</A></LI>
	<LI><A HREF="#how do i use it">How do I use it?</A></LI>
	<LI><A HREF="#so what are the directives">So what are the directives?</A></LI>
	<LI><A HREF="#xmms is just sitting here doing nothing.">XMMS is just sitting here doing nothing.</A></LI>
	<LI><A HREF="#what protocols are being supported">What protocols are being supported?</A></LI>
	<LI><A HREF="#can i write an interface for it">Can I write an interface for it?</A></LI>
	<LI><A HREF="#what are the different flags i can give op ">What are the different flags I can give op ?</A></LI>
	<LI><A HREF="#will this work with apple's osx">Will this work with Apple's OSX?</A></LI>
	<LI><A HREF="#so what is up with apple's itunes">So what is up with Apple's Itunes?</A></LI>
	<LI><A HREF="#so what are streams">So what are streams?</A></LI>
	<LI><A HREF="#will this work with ssl">Will this work with SSL?</A></LI>
	<LI><A HREF="#my build is dieing with apxs=255">My build is dieing with apxs=255?</A></LI>
	<LI><A HREF="#so what about vorbis support">So what about Vorbis support?</A></LI>
	<LI><A HREF="#i am getting a sync error from the client, what does that mean">I am getting a sync error from the client, what does that mean?</A></LI>
	<LI><A HREF="#apache is loading very slowly.">Apache is loading very slowly.</A></LI>
	<LI><A HREF="#what is this rss thing, and where can i find a perl/php class to handle it">What is this RSS thing, and where can I find a perl/php class to handle it?</A></LI>
	<LI><A HREF="#what does all the info in the logs mean ">What does all the info in the logs mean ?</A></LI>
	<LI><A HREF="#do i have to use a virtual host for this">Do I have to use a virtual host for this?</A></LI>
	<LI><A HREF="#what is a dispatch">What is a dispatch?</A></LI>
	<LI><A HREF="#how do i use the mysql dispatch">How do I use the MySQL dispatch?</A></LI>
	<LI><A HREF="#how do i use the postgres dispatch">How do I use the Postgres dispatch?</A></LI>
	<LI><A HREF="#how do i use the playlist dispatch">How do I use the Playlist dispatch?</A></LI>
	<LI><A HREF="#i am trying to use the mysql dispatch, but apache won't load">I am trying to use the MySQL dispatch, but Apache won't load</A></LI>
	<LI><A HREF="#i just want to have apache stream files while mixing them with other files, can i do this">I just want to have Apache stream files while mixing them with other files, can I do this?</A></LI>
	<LI><A HREF="#what are tokens">What are tokens?</A></LI>
	<LI><A HREF="#i am using the mysql dispatch but no data is being loaded, what is up">I am using the MySQL dispatch but no data is being loaded, what is up?</A></LI>
	<LI><A HREF="#so you say you are having bandwidth problems">So you say you are having bandwidth problems?</A></LI>
	<LI><A HREF="#will this work on any flavor of windows how portable is it">Will this work on any flavor of windows? How portable is it?</A></LI>
	<LI><A HREF="#where can i find a directory server that is mod_mp3 aware">Where can I find a directory server that is mod_mp3 aware?</A></LI>
	<LI><A HREF="#so what is the future">So what is the future?</A></LI>
	<LI><A HREF="#appendix a. mp3 httpd.conf examples">Appendix A. MP3 httpd.conf Examples</A></LI>
	<UL>

		<LI><A HREF="#simple">Simple</A></LI>
		<LI><A HREF="#ogg">Ogg</A></LI>
		<LI><A HREF="#advanced">Advanced</A></LI>
		<LI><A HREF="#mysql support">MySQL Support</A></LI>
	</UL>

</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="name">NAME</A></H1>
<P>mod_mp3 - FAQ for the Apache mod_mp3 streaming module</P>
<P>
<HR>
<H1><A NAME="so what is mod_mp3">So what is mod_mp3?</A></H1>
<P>This turns apache into your basic RIAA hating, but every college student loving mp3 streaming server. It can do a number of things. It can play from a list of files, either straight through or randomly. It can be used as a handler if you just have mp3s or ogg files on your server and you want to stream them with the corret headers. It can also be used to cache mp3's into memory and have the server operate entirely from memory. Enjoy, groove, mp3s not included.</P>
<P>
<HR>
<H1><A NAME="where do i get it from">Where do I get it from?</A></H1>
<P>You can get it from either <A HREF="http://software.tangent.org/download/">http://software.tangent.org/download/</A> via the web or <A HREF="ftp://www.tangent.org/pub/apache/">ftp://www.tangent.org/pub/apache/</A> via ftp.</P>
<P>
<HR>
<H1><A NAME="what sort of license does it have">What sort of license does it have?</A></H1>
<P>You are pretty much free to use it as you please. Check out the License file with the distribution for more details.  (Its very BSD like)</P>
<P>
<HR>
<H1><A NAME="how can i make suggestions for it">How can I make suggestions for it?</A></H1>
<P>Send email to <A HREF="mailto:brian@tangent.org">brian@tangent.org</A></P>
<P>
<HR>
<H1><A NAME="how can i report a bug">How can I report a bug?</A></H1>
<P>You are better off going to <A HREF="http://media.tangent.org/submit.pl.">http://media.tangent.org/submit.pl.</A> Just submit a bug. This works best right now.</P>
<P>
<HR>
<H1><A NAME="how do i install it">How do I install it?</A></H1>
<PRE>
 Read the INSTALL file that comes along with the module.</PRE>
<P>
<HR>
<H1><A NAME="how do i use it">How do I use it?</A></H1>
<PRE>
        Listen 8000
        &lt;VirtualHost www.example.com:8000&gt;
                ServerName www.exampe.com
                MP3Engine On
                MP3CastName &quot;Brian's Tunes&quot;
                MP3Genre &quot;Much, nutty&quot;
                MP3 /export/mp3
                MP3 /tmp/madonna.mp3
                MP3 /tmp/cows.mp3
                MP3Random On
                #Increase this if your connections are timing out
                Timeout 1200
                ErrorLog /usr/local/apache/logs/music_error_log
        &lt;/VirtualHost&amp;gt</PRE>
<P>Make sure you also enable Listen for port 80 if you are also running a regular webserver. Also, keep in mind that while I set mine up with VirtualHosts, you could just as easily use Directory, or Location directives. You could run as many streams out of a single host as you want.</P>
<P>
<HR>
<H1><A NAME="so what are the directives">So what are the directives?</A></H1>
<DL>
<DT><STRONG><A NAME="item_MP3">MP3</A></STRONG><BR>
<DD>
Either a filename or directory filled with mp3s (it recurses into subdirectories)
<P></P>
<DT><STRONG><A NAME="item_MP3Engine">MP3Engine</A></STRONG><BR>
<DD>
Turn on the streaming mp3 server.
<P></P>
<DT><STRONG><A NAME="item_MP3CastName">MP3CastName</A></STRONG><BR>
<DD>
Name of your server
<P></P>
<DT><STRONG><A NAME="item_MP3Genre">MP3Genre</A></STRONG><BR>
<DD>
Genre that will be sent to the client
<P></P>
<DT><STRONG><A NAME="item_MP3Random">MP3Random</A></STRONG><BR>
<DD>
Tells mod_mp3 to randomly dish out music
<P></P>
<DT><STRONG><A NAME="item_MP3Stream">MP3Stream</A></STRONG><BR>
<DD>
I am not useable yet.
<P></P>
<DT><STRONG><A NAME="item_MP3Loop">MP3Loop</A></STRONG><BR>
<DD>
Causes requests to loop thrugh the music requested indefinetly.
<P></P>
<DT><STRONG><A NAME="item_MP3LimitPlayConnections">MP3LimitPlayConnections</A></STRONG><BR>
<DD>
Limit the number of play requests possible.
<P></P>
<DT><STRONG><A NAME="item_MP3Log">MP3Log</A></STRONG><BR>
<DD>
<PRE>

Logs transaction ID of the player, md5sum of mp3 file, and song title, example: MP3Log /usr/local/apache/logs/mp3stream_log</PRE>
<DT><STRONG><A NAME="item_MP3ReloadRequest">MP3ReloadRequest</A></STRONG><BR>
<DD>
When enabled this causes mod_mp3 to reload all of playlists/files/directories for each request.
<P></P>
<DT><STRONG><A NAME="item_MP3Playlist">MP3Playlist</A></STRONG><BR>
<DD>
This takes a file filled with mp3 filenames and loads the filename into mod_cgi list (most MP3 player's playlists are in this format)
<P></P>
<DT><STRONG><A NAME="item_MP3Cache">MP3Cache</A></STRONG><BR>
<DD>
Tells mod_mp3 to cache all of the files to memory instead of getting them at request time from disk. This can take up a lot of memory but is quite a bit faster if you are expecting a large load. This directive must come first if used.
<P></P>
<DT><STRONG><A NAME="item_MP3DefaultOperation">MP3DefaultOperation</A></STRONG><BR>
<DD>
You can use this to send a different default output than just straight MP3. The different options are: rss, m3u, m3u2, pls, pls2, list, select. It will also take a second option with can be a regular expression to match browsers with.
<P></P>
<DT><STRONG><A NAME="item_MP3Allow">MP3Allow</A></STRONG><BR>
<DD>
When turned on, only files that are matched with a regular expression given with this directive will load. So ``MP3Allow *.mp3'' would only load file that ended with .mp3.
<P></P>
<DT><STRONG><A NAME="item_MP3Deny">MP3Deny</A></STRONG><BR>
<DD>
Same as MP3Allow but it denies files by filenames.
<P></P>
<DT><STRONG><A NAME="item_MP3DispatchAgent">MP3DispatchAgent</A></STRONG><BR>
<DD>
Tells ModMP3 to use a specific dispatch agent (internal, mysql, playlist, pgsql)
<P></P>
<DT><STRONG><A NAME="item_MP3MySQLConnectInfo">MP3MySQLConnectInfo</A></STRONG><BR>
<DD>
If you are using the mysql Dispatch agent.  specify the hostname,username,password #for the database to connect to.  (MP3MySQLConnectInfo ``localhost'' ``USERNAME'' ``PASSWORD'').
<P></P>
<DT><STRONG><A NAME="item_MP3MySQLInfo">MP3MySQLInfo</A></STRONG><BR>
<DD>
Database and Table info (MP3MySQLInfo ``DATABASENAME'' ``TABLENAME'')
<P></P>
<DT><STRONG><A NAME="item_MP3MySQLTokenTable">MP3MySQLTokenTable</A></STRONG><BR>
<DD>
Table to use to find tokens.
<P></P>
<DT><STRONG><A NAME="item_MP3PgConnectInfo">MP3PgConnectInfo</A></STRONG><BR>
<DD>
If you are using the mysql Dispatch agent.  specify the hostname,username,password #for the database to connect to.  (MP3PgConnectInfo ``localhost'' ``USERNAME'' ``PASSWORD'').
<P></P>
<DT><STRONG><A NAME="item_MP3PgInfo">MP3PgInfo</A></STRONG><BR>
<DD>
Database and Table info (MP3PgInfo ``DATABASENAME'' ``TABLENAME'')
<P></P>
<DT><STRONG><A NAME="item_MP3PgTokenTable">MP3PgTokenTable</A></STRONG><BR>
<DD>
Table to use to find tokens.
<P></P></DL>
<P>
<HR>
<H1><A NAME="xmms is just sitting here doing nothing.">XMMS is just sitting here doing nothing.</A></H1>
<P>Look at the example, you probably don't have your virtualhost defined correctly.</P>
<P>
<HR>
<H1><A NAME="what protocols are being supported">What protocols are being supported?</A></H1>
<P>Whatever I can get my hands on. Right now that means just
Icecast and Shoutcast. Shout is full supported and ice is
coming along nicely. We can also do the headers for Ogg files.</P>
<P>
<HR>
<H1><A NAME="can i write an interface for it">Can I write an interface for it?</A></H1>
<P>Yes. The idea is to let other people write the interface for mod_mp3. To enable this a couple of hooks have been added. You can find a list of the contents to a server by doing a <A HREF="http://example.com:8000/?op=rss.">http://example.com:8000/?op=rss.</A> If you want, you can this grab songs based on the ID of the song (which is the filename MD5'ed). An examle is: <A HREF="http://avenger.tangent.org:8080/?op=play&song=475c47c405940fde1737e8bc85f65760&song=7777e58678fcc5fcc96d449b4951ebd1">http://avenger.tangent.org:8080/?op=play&song=475c47c405940fde1737e8bc85f65760&song=7777e58678fcc5fcc96d449b4951ebd1</A></P>
<P>This was just a start, there is a mailing list for the interface, as I get an idea about what people want, more will be added</P>
<P>
<HR>
<H1><A NAME="what are the different flags i can give op ">What are the different flags I can give op ?</A></H1>
<DL>
<DT><STRONG><A NAME="item_%3Fop%3Dselect">?op=select</A></STRONG><BR>
<DD>
lets you search, but also lists ALL the songs, on the bottom of the list, you can selct individual songs, and play them.. (make your own playlist, search for songs, etc).
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Drdf">?op=rdf</A></STRONG><BR>
<DD>
listing in RDF format Version 1.0
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Drss">?op=rss</A></STRONG><BR>
<DD>
listing in RSS format Version 0.91
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dm3u">?op=m3u</A></STRONG><BR>
<DD>
Makes a playlist in m3u format, and sends it to you, if you have the proper settings with mime-types this would/could load up winamp for you with the entire collectionas a playlist.
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dm3u2">?op=m3u2</A></STRONG><BR>
<DD>
different format of the playlist.
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dpls">?op=pls</A></STRONG><BR>
<DD>
Winamp playlist
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dpls2">?op=pls2</A></STRONG><BR>
<DD>
Another playlist format
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dlist">?op=list</A></STRONG><BR>
<DD>
List in RSS version 0.91
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dplay">?op=play</A></STRONG><BR>
<DD>
Plays songs randomly.
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dreload">?op=reload</A></STRONG><BR>
<DD>
Tells the server to reload all of its playlists.
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dmbm">?op=mbm</A></STRONG><BR>
<DD>
Displays the songs in Musicbrainz DTD
<P></P>
<DT><STRONG><A NAME="item_%3Fop%3Dindex">?op=index</A></STRONG><BR>
<DD>
Shows the index page, if you have one set in your document root for this host. (NOTE, index can be replaced by anything that is not mentioned above, i.e it could be ?op=blowupafghasnistan).
<P></P></DL>
<P>
<HR>
<H1><A NAME="will this work with apple's osx">Will this work with Apple's OSX?</A></H1>
<P>Several people have written in and said that it will. If I get a binary I will put it up for people to download and use. Which has been happening.  Keep in mind though that until someone sends me a copy of OSX (I own a Mac) I won't be actively testing it.</P>
<P>
<HR>
<H1><A NAME="so what is up with apple's itunes">So what is up with Apple's Itunes?</A></H1>
<P>In theory it supports the shout protocol, but in reality it seems to ignore file names found in the stream.</P>
<P>
<HR>
<H1><A NAME="so what are streams">So what are streams?</A></H1>
<P>A cute idea. Look through the mail archives for the mailing lists for more info. This is not completly supported yet.</P>
<P>
<HR>
<H1><A NAME="will this work with ssl">Will this work with SSL?</A></H1>
<P>According to people on the mailing list, it will work just fine. Trick is you need a player that can do SSL. You can either do this by tunneling or I am told by using IE with some native player.</P>
<P>
<HR>
<H1><A NAME="my build is dieing with apxs=255">My build is dieing with apxs=255?</A></H1>
<P>You are not going to like the answer to this. Basically at some point you have either installed multiple copies of Apache or somehow munged your current copy. Do this: ``apxs -g -n example; cd example; make''. Did that work? If it didn't your copy of Apache is munged.</P>
<P>
<HR>
<H1><A NAME="so what about vorbis support">So what about Vorbis support?</A></H1>
<P>Go look at <A HREF="http://media.tangent.org/article.pl?sid=01/05/04/1547242">http://media.tangent.org/article.pl?sid=01/05/04/1547242</A></P>
<P>
<HR>
<H1><A NAME="i am getting a sync error from the client, what does that mean">I am getting a sync error from the client, what does that mean?</A></H1>
<P>Check that you are not accidently loading any files that may not be mp3's. That is the normal culprit. You can make sure you are only loading mp3 files by using the MP3Allow directive (MP3Allow *.mp3).</P>
<P>
<HR>
<H1><A NAME="apache is loading very slowly.">Apache is loading very slowly.</A></H1>
<P>You have some crazy sized music collection I take it? And you are just point Apache at the directory and waiting for it to start right? Well, it will, but it is going to take a while. I would suggest using a playlist instead. You can generate one with ``find /export/mp3 | grep -i ''\.mp3`` &gt; /tmp/playlist''</P>
<P>
<HR>
<H1><A NAME="what is this rss thing, and where can i find a perl/php class to handle it">What is this RSS thing, and where can I find a perl/php class to handle it?</A></H1>
<P>You can find out information on RSS at &lt;A HREF=``''&gt;. There is a perl class on CPAN called XML::RSS that will parse RSS. For PHP look at this <A HREF="http://nwow.org/rssparse-0.4.tar.gz">http://nwow.org/rssparse-0.4.tar.gz</A></P>
<P>
<HR>
<H1><A NAME="what does all the info in the logs mean ">What does all the info in the logs mean ?</A></H1>
<P>Example:</P>
<P>[16/Jul/2001:22:36:19 -0400] fc62362bf4cd1a8602bbf170409b8d04 7652fcbd1077f4ffa58ba36d10c8d9d4</P>
<P>Explanation:</P>
<DL>
<DT><STRONG><A NAME="item_%5B16%2FJul%2F2001%3A22%3A36%3A19_%2D0400%5D">[16/Jul/2001:22:36:19 -0400]</A></STRONG><BR>
<DD>
the stuff in the [] is pretty self explanatory.
<P></P>
<DT><STRONG><A NAME="item_fc62362bf4cd1a8602bbf170409b8d04">fc62362bf4cd1a8602bbf170409b8d04</A></STRONG><BR>
<DD>
The second string is the transaction id of the player
<P></P>
<LI><STRONG><A NAME="item_fcbd1077f4ffa58ba36d10c8d9d4">fcbd1077f4ffa58ba36d10c8d9d4</A></STRONG><BR>

The third string is the MD5 of the file being streamed for that player
<P></P>
<DT><STRONG><A NAME="item_Pharoahs">Pharoahs</A></STRONG><BR>
<DD>
The fourth string is the ID3 Name or filename if there is no id3 tag for that file.
<P></P></DL>
<P>
<HR>
<H1><A NAME="do i have to use a virtual host for this">Do I have to use a virtual host for this?</A></H1>
<P>No, not at all. You can put directives in the root of your httpd.conf or even put them in a directory (you could also technically put them in a .htaccess file, but that would be pretty horrible for performance).</P>
<P>
<HR>
<H1><A NAME="what is a dispatch">What is a dispatch?</A></H1>
<P>A dispatch is an internal handler. It is what gets the data to Apache to send. The default handler is a simple load the data into memory and use it sort of thing. There is also currently a MySQL dispatch, Postgres dispatch, and a playlist dispatch. If you are going to do large scale broadcasting the MySQL dispatch is probably what you want. Also, if you want to reload without restarting Apache, then any dispatch other then the internal dispatch is what you want. If you lack a database, the playlist dispatch is probably the way to grow. It lack token support like the MySQL and Postgres dispatch though.</P>
<P>
<HR>
<H1><A NAME="how do i use the mysql dispatch">How do I use the MySQL dispatch?</A></H1>
<P>First, you need to have MySQL installed. Second you need to tell configure to use mysql (./configure --with-mysql). Third you need to create a database to hold the table. There is a sample schema in the support directory. mod_mp3 will load the files for you if you want, it does this with the MP3 directive (also with playlists), or you can choose to load them by hand. As long as you use similair names for the columns you will be ok. You will need to call MP3DispatchAgent and MP3MySQLConnectInfo to feed the right information to Apache so that it can connect to you DB.</P>
<P>
<HR>
<H1><A NAME="how do i use the postgres dispatch">How do I use the Postgres dispatch?</A></H1>
<P>First, you need to have Postgres installed. Second you need to tell configure to use mysql (./configure --with-postgres). Third you need to create a database to hold the table. There is a sample schema in the support directory. mod_mp3 will load the files for you if you want, it does this with the MP3 directive (also with playlists), or you can choose to load them by hand. As long as you use similair names for the columns you will be ok. You will need to call MP3DispatchAgent and MP3PostgresConnectInfo to feed the right information to Apache so that it can connect to you DB. You should realize that this is quite alpha at this point and misses many of the features of the MySQL dispatch. Patches to fix this of course are encouraged.</P>
<P>
<HR>
<H1><A NAME="how do i use the playlist dispatch">How do I use the Playlist dispatch?</A></H1>
<P>This has to be one of the easiest methods to use mod_mp3. Use the playlist directive to specify a playlist to use and you are in business. Updating it will update the available files (and may cause clients to reconnect at the next song). No token support is currently provided by this dispatch.</P>
<P>
<HR>
<H1><A NAME="i am trying to use the mysql dispatch, but apache won't load">I am trying to use the MySQL dispatch, but Apache won't load</A></H1>
<P>This is a symptom of having PHP with MySQL support and ModMP3 with MySQL support built-in.  The fix for this is to recompile PHP. The PHP configure script warns you about this.  The exact message is:</P>
<PRE>
        +--------------------------------------------------------------------+
        |                        *** WARNING ***                             |
        |                                                                    |
        | You chose to compile PHP with the built-in MySQL support.  If you  |
        | are compiling a server module, and intend to use other server      |
        | modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0,         |
        | mod_perl) you must NOT rely on PHP's built-in MySQL support, and   |
        | instead build it with your local MySQL support files, by adding    |
        | --with-mysql=/path/to/mysql to your configure line.                |
</PRE>
<PRE>

If you installed PHP as an RPM, please let us know what you did to fix this problem.</PRE>
<P>
<HR>
<H1><A NAME="i just want to have apache stream files while mixing them with other files, can i do this">I just want to have Apache stream files while mixing them with other files, can I do this?</A></H1>
<P>Yep! Just do a AddHandler mp3-file *.mp3 or AddHandler ogg-handler *.ogg to your httpd.conf and you are good to go.</P>
<P>
<HR>
<H1><A NAME="what are tokens">What are tokens?</A></H1>
<P>Tokens are like cookies that are specified in the URL. For example:</P>
<P><A HREF="http://example.com:8000/?op=play&token=rock">http://example.com:8000/?op=play&token=rock</A></P>
<P>The above would play any file that is associated with the ``rock'' token. For more information on this you should send email to the developers list.</P>
<P>
<HR>
<H1><A NAME="i am using the mysql dispatch but no data is being loaded, what is up">I am using the MySQL dispatch but no data is being loaded, what is up?</A></H1>
<P>You probably have called MP3 or MP3Playlist before you specified the MySQL information. Don't do that, it will not work :) See the sample MySQL file in the support directory.</P>
<P>
<HR>
<H1><A NAME="so you say you are having bandwidth problems">So you say you are having bandwidth problems?</A></H1>
<P>Since you have bandwidth issues, it is time to turn on compression. Actually, it is time to use LAME to compress your mp3 files even more than they are now, before transit across your broadband network.</P>
<P>Look at it this way:
You have 100 kilo bits per second of upload capability. You have to consider the protocol overhead or minus 10% or 15%.  You have a 128 Kbit quality MP3 you want to stream. The calculation looks something like this:</P>
<P>((100,000 - 10%) / 128000) = 0.703125</P>
<P>This means you get 0.7 of your connection dedicated for music (aka 70% music, 30% pops &amp; static).</P>
<P>To fix this you have to lower the bitrate of your mp3 stream, and try the calculation above again until you get a whole number. This means you need to use the mod_mp3 MP3Encoder directive to lower your mp3 bitrate while they are on their way out the door:</P>
<P>MP3Encoder ``/usr/local/bin/lame -q 2 -b 48 --silent % -''</P>
<P>This solution imposes a penalty on your system resources as long as your streaming music with LAME. This is not something you want to use on a multi-user setup like Ampache, or Mummi. As long as your doing this for your own personal, and don't have to share the system, it shouldn't be a problem. =)</P>
<P>
<HR>
<H1><A NAME="will this work on any flavor of windows how portable is it">Will this work on any flavor of windows? How portable is it?</A></H1>
<P>There is no reason why this should not compile under windows. Currently no one has ever provided the instructions on how to do this though. In fact any system that can compile Apache and has SYSV shared memory should be able to compile this software.</P>
<P>
<HR>
<H1><A NAME="where can i find a directory server that is mod_mp3 aware">Where can I find a directory server that is mod_mp3 aware?</A></H1>
<P>Vidyut Luther has made a directory server which works with Icecast servers and mod_mp3. You can find out more information on it here : &lt;A HREF=``http://yp.modmp3.net/''&gt;yp.modmp3.net&lt;/A&gt;</P>
<P>
<HR>
<H1><A NAME="so what is the future">So what is the future?</A></H1>
<P>World domination? Complete online server that would make any radio station drool. Support for more than just mp3. You name it, I am open to ideas. The big thing for me is that I want to give people a voice. Just like apache opened up the web for anyone to publish thoughts and ideas that they have, I want this module to extend that same philosphy to the online airwaves. The FCC is never going to make community radio a reality, hopefully this will give people an alternative.  Ok, now that that soap box bit is over, the idea is to create a server which can be controlled by other applications. Let people write good interfaces and not worry about the actual protocols and methods of delivery.</P>
<P>
<HR>
<H1><A NAME="appendix a. mp3 httpd.conf examples">Appendix A. MP3 httpd.conf Examples</A></H1>
<P>
<H2><A NAME="simple">Simple</A></H2>
<P><TABLE CELLSPACING=0 CELLPADDING=0><TR><TD>Listen 8000
<TR><TD><TD>&lt;VirtualHost avenger.tangent.org:8000&gt;
<TR><TD><TD>ServerName avenger.tangent.org
<TR><TD><TD>MP3Engine On
<TR><TD><TD>MP3CastName ``Brian's Tunes''
<TR><TD><TD>MP3Genre ``Much, nutty''
<TR><TD><TD>MP3 /export/mp3
<TR><TD><TD>MP3DefaultOperation select
<TR><TD><TD>Timeout 1200
<TR><TD><TD>ErrorLog /usr/local/apache/logs/music_error_log
<TR><TD><TD>&lt;/VirtualHost&gt;</TABLE></P>
<P>
<H2><A NAME="ogg">Ogg</A></H2>
<PRE>
        Listen 8001
        &lt;VirtualHost avenger.tangent.org:8001&gt;
                ServerName avenger.tangent.org
                MP3Engine On
                MP3CastName &quot;Brian's Tunes&quot;
                MP3Genre &quot;Much, nutty&quot;
                MP3 /export/ogg
                MP3MimeType audio/x-ogg
                ErrorLog /usr/local/apache/logs/music_error_log
                Timeout 1200
        &lt;/VirtualHost&gt;</PRE>
<P>
<H2><A NAME="advanced">Advanced</A></H2>
<PRE>
        # The mod_mp3 virtual host.
        # Do not just make-up any name here for the ServerName directive.
        # Use real, valid, host names from the DNS.
        # Increase the timeout if you have large length mpeg files.
        # Timeout of zero means no timeout.
        &lt;VirtualHost 123.456.789.101&gt;
                ServerName music.example.com
                ServerAdmin webmaster@example.com
                ErrorLog /var/log/httpd-error.log
                SetEnvIfNoCase User-Agent mozilla is_a_browser</PRE>
<PRE>
                # Toggle the MP3 module On/Off.
                MP3Engine On</PRE>
<PRE>
                # Control the number of connections to mod_mp3.
                # Upload speed divided by bitrate is the rule of thumb.
                # example with DSL 768/768 line, and mp3 w/128 bitrate:
                # floor((768000 - 10%) / 128000) = 5
                # Remember that about 5% to 15% of your bandwidth is consumed by overhead.
                # and since 90% of a stream is not so good, we round-down, and get five.
                # Your mileage may vary.
                MP3LimitPlayConnections 2</PRE>
<PRE>
                # Name this radio station.
                MP3CastName &quot;mod_mp3 radio&quot;</PRE>
<PRE>
                # Give your Station a format type (aka Classical, Electronic, rock'n'roll, etc.).
                MP3Genre &quot;various&quot;</PRE>
<PRE>
                # Multiple MP3 directives are allowed.
                # Rule of thumb dictates you not use the MP3 direcctive when using a MP3Playlist.
                MP3 &quot;/data/mp3z&quot;</PRE>
<PRE>
                # This can increase the performance on large collections, but not dramatically.
                # It is a good idea to avoid using this with the MP3 directive,
                # unless you know what your doing.
                #MP3Playlist /data/playlist.m3u</PRE>
<PRE>
                # Toggle the stream mode On/Off
                # This doens't work at the moment.
                # When enabled, you  should comment-out any MP3, or MP3Playlist directives.
                #MP3Stream On</PRE>
<PRE>
                # Randomize (aka shuffle) the mod_mp3 internal playlist for playback.
                #MP3Random On</PRE>
<PRE>
        &lt;/VirtualHost&gt;</PRE>
<P>
<H2><A NAME="mysql support">MySQL Support</A></H2>
<PRE>
        &lt;VirtualHost 123.123.78.90&gt; 
                ServerName mp3s.yourdomain.com
                ServerAdmin webmaster@yourdomain.com
                CustomLog /www/modmp3/logs/access_log combined</PRE>
<PRE>
                #Turn the ModMp3 engine ON.
                MP3Engine On
                #The name of your broadcast.
                MP3CastName &quot;Linuxpowered Radio&quot;
                #What dispatch agent you want to use 
                MP3DispatchAgent mysql
                #If the Agent is Mysql, specify the hostname,username,password
                #for the database to connect to. 
                MP3MySQLConnectInfo &quot;localhost&quot; &quot;USERNAME&quot; &quot;PASSWORD&quot;
                #Now specify the database and tablename where the songs are stored.
                MP3MySQLInfo &quot;DATABASENAME&quot; &quot;TABLENAME&quot;
                # Specify the table for tokens
                MP3MySQLTokenTable &quot;tokens&quot;
                #Specify where the MP3's are.  This must come after the MySQL directives
                MP3 &quot;/www/modmp3/songs&quot; 
                MP3Genre &quot;various&quot;
                MP3Random On
                MP3Log /www/modmp3/logs/mp3_log
                MP3Allow *.mp3
        &lt;/VirtualHost&gt;</PRE>

</BODY>

</HTML>