Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Apache Software

Apache As An MP3 Server 62

From the list of odd things you can do with your Apache web server, how about an Apache module to turn your Apache webserver into your basic RIAA hating, but every college student loving, MP3 streaming server? Supports Icecast/Shoutcast protocols. It's an early beta, but it does work.
This discussion has been archived. No new comments can be posted.

Apache As An MP3 Server

Comments Filter:
  • by Anonymous Coward
    I've been serving MP3s with Apache long before this with RIMPS [sourceforge.net]!
  • by Anonymous Coward
    I use webplay on my Lan and on the INternet so I can listen to my mp3s at work. Webplay is excellent. You can change the bit rate on the fly and make your own playlists via web interface. I've tried the rest and this is the best. Somewhat harder to configure but worth it. yngwie@home.com
  • You, too, are right. So if the Apache Group simply refrains from linking to or distributing mod_mp3, are they legally safe?

    I would certainly hope that Apache isn't liable simply because their module API allowed for mod_mp3 to exist. If that case were to happen, would it not set the stage for suing Microsoft for every Windows application which does something illegal? After all, MS didn't try to stop the application from being developed..
  • How hard would it be for a several multi-billion dollar record companies to sue apache out of existance?

    Well, first they'd have to prove the Apache Group had anything, whatsoever, to do with the development of mod_mp3.

    They didn't write it.

    If the RIAA is going to go after somebody, they'll go after the guy that did write it.

    To go after the Apache Group for mod_mp3 is very much the same idea as going after Microsoft because Napster uses the Win32 API.
  • by stripes ( 3681 ) on Sunday April 08, 2001 @07:50AM (#307356) Homepage Journal

    You can stream MP3s forever over a totally standard web server. All you need is client software like w3juke [sourceforge.net].

  • Hmm. Can you stream them over HTTP like you can with Real* / MP3 / etc? If the one-process-per-stream overhead of apache is too much, remember: thttpd is your friend.

    --
  • even though it is an early beta it seems to have good options (recursing subdirectories) etc. Also good if you already have a webpage and you are having to use some other sort of program to stream your MP3s.

    The FAQ seems easy enough to follow, and it looks really easy to install/use. Good luck :)
  • so you can't play anything encoded higher than 204.. Who cares? I really can't notice any difference over 128 anyway.

    I don't think I ever mentioned that it was for the masses, are many "beta" programs?
  • by szyzyg ( 7313 ) on Monday April 09, 2001 @06:53AM (#307360)
    At least I was doing this back in 1997.....

    Myplay.com , mp3.com and a load of other sites use apache clusters to serve streaming audio, it's not exactly difficult..

    Then again... /. never likes to give companies like myplay any credit for innovation.
  • by EMR ( 13768 ) on Sunday April 08, 2001 @09:58AM (#307361)
    So far it's pretty slick.. A lot nicer then using Icecast. And for adding more streams.. apache's .htaccess file make it REAL easy no need to create a port 8000 virtual host just allowoveride in a directory and put this in there.

    here is my .htaccess file
    -- .htaccess BEGIN --
    <Files all>
    SetHandler mp3
    MP3CastName "My Mp3s"
    MP3Genre "Various"
    MP3 /home/ftp/pub/mp3
    MP3Random On
    </files>
    -- .htaccess END --
    then just access it like

    http://myhost/streamdir/all
  • If you can listen to a MP3 stream, you can record it. XMMS [xmms.org] can save streaming audio or you can use downloading utilities like wget [sunsite.dk] to directly download the stream.

    The RIAA doesn't like MP3 at all because there's no real way to attach any copyright protection to it. They are currently turning a blind eye to MP3 broadcasters, but that position may later turn hostile. For now, all MP3 broadcasters should abstain from publishing playlists for future shows, and archiving high-quality copies of old shows to avoid future legal battles.

    Let's hope that the DMCA will be overturned and our copyright laws will get back to a sane state.
  • by No-op ( 19111 )
    I just nabbed it and tossed it onto a laptop w/ FreeBSD; it's busy serving up 256k streams right now to my wintel desktop with no problems whatsoever.

    maybe your files were VBR? it might choke on those, although I wouldn't really know. I don't know anyone who uses VBR anyway, so maybe it's some other weird bug.
  • I maintain a large media server for some internal usage, and I've been looking for a system somewhat like this. I've been tinkering with the apache::mp3 module for a while, and while it works nicely it's not really what I've been looking for. I'd love to see a system with MySQL support, rather than something that just creates hash tables on the fly, etc.

    What I'm really trying to find is something that will resample mp3 files on the fly, and/or save the resampled tunes in a temporary database that will do some sort of intelligent size maintenance. (kind of like squid; "here's your 18GB of space, manage yourself.")

    anyone have some ideas for that? I just grabbed this mod_mp3 and it works well- one nifty thing about it (which impresses me, anyway) is that I can define a ton of virtual servers and have it feed different streams simultaneously. the system usage seems very reasonable too. this product definitely has room for growth, and I'm looking forward to messing with it and adding horrible, codebloating features to it :)

  • Everybody knows that Apache HTTPD server is just a circumvention device :)
  • Frankly, I think IP law is good - and you can make and protect ideas and patent them. More money for someone who had the brains to think it up and not some person who is just copying someone else.

    If you arent fast, you're last!
  • What I would love to see is more support for other streaming formats in an Apache friendly enviroment. (Notably .ASX streaming).

    One project I'm working on requires streaming audio and video for a training course and the people providing me the content are using WMA and WMV files - they *insist* on using this MS format.

    So now I'm stuck because streaming support on W2K is ok if *all* you want to do is blindly stream.

    ARRRGH! Give me apache and a good streaming app than can handle ASX on a *nix server and I'll be in heaven!


    -----

  • I use Edna [sourceforge.net]. Written in python, needs no apache, no mysql. Installs on anything that runs python, as far as I can tell (runs on NT, redhat, *bsd, debian). Sexy, template-based interface.
    We serve up over 90 gig of MP3's to 110 users in the workplace with edna. Why don't you?

  • one word: MAES [sourceforge.net]. yes, it's a shameless self-plug, but it works. Multiple users, apache authentication integration, searching, browsing, multiple database support, id3v1/2 viewer/editor, playlist creation and storage, windows support as a server in the pipe (working on a couple of odbc issues)...I use it all the time, as do quite a few other people. It's worth trying, and I always answer any questions that arise.
  • BeOS + Soundplay (mp3,etc player) or BeOS + Robinhood (a threaded BeOS native WebServer) have both had this capability for ages, its nothing really new.
  • I'm pretty sure that the RIAA is much more concerned about non-streaming, regularly downloadable MP3s...
  • by wunderhorn1 ( 114559 ) on Sunday April 08, 2001 @06:45AM (#307372)
    The Apache Foundation will be forced by the RIAA to pay damages from alleged copyright violation unless the module is altered to disallow the streaming of copyrighted content...



    Well that *started out* as a joke post, but now I'm not so sure...

  • If I remember.. Apache versions up to the current 1.3.x are as you describe, but the RC versions of the Apache 2.0 server are multi-threaded as opposed to multi-process. Not that I'd expect a machine to have too much trouble running the processes to serve as many MP3s as it's bandwidth would permit, mind.
  • The Tangent site sets a cookie storing the reverse DNS info for your machine. Now why would they do that?
  • I've never seen you post here before and the search can't find any articles written by you. Welcome to slashdot!

    Peace,
    Amit
    ICQ 77863057
  • thanks for the link ^_^

    Peace,
    Amit
    ICQ 77863057
  • To my knowledge each apache process can only serve one client

    I think you're right (unless Apache uses nonblocking I/O), but is one process per client such a bad thing, especially when multiple Apache processes/threads can share resources and when some kernels [kernel.org]' schedulers are extremely fast?

    Any idea if this will be ported to WinApache?

  • Man is it just me or these people made thier site design for 320x 240 pixel 10 inch screens?

    Or perhaps for 320x240 pixel 4-inch screens of palmtop devices with MP3 support. (Actually, the page looks optimized for 640x480.)

    But you don't have to surf with your Mozilla/Galeon/K-Meleon/IE browser window maximized. For example, I normally have four 720x540-pixel browser windows open on my 1024x768-pixel 17" monitor; keeping multiple windows open lets me read one page while loading another, making browsing on dial-up more efficient.

  • Its an Apache -module-, not part of Apache. Modules can be created by a 3rd party for whatever reason. I'm sure the Apache Group is working on more important things than streaming mp3 support, but this is cool.
  • How does the math on this work? Is it as simple as needing 256Kb/Sec of available upstream bandwidth to support streaming two 128Kb/Sec mp3s concurrently?

    tune

  • There's also a very good Apache Perl module called Apache::MP3 that you can download from CPAN which provides something similar, though I don't think it necessarily supports shoutcast/icecast yet.
  • I am working on something similar using HTML::Mason [masonhq.com] and MySQL [mysql.com].

    I have the ability to search the database for a particular tune, save playlists, save favorites, recommend titles to others, etc. It's pretty stable, so if you're interested, pop me an email here: dcarnage at spookyworld.dnsalias.com [mailto].



    --
  • rosie...you are so strange. oprah-lover.
    --
  • by don_carnage ( 145494 ) on Sunday April 08, 2001 @07:48AM (#307384) Homepage
    There is a Perl module that does the same sort of thing written by Lincoln Stein on CPAN: Apache::MP3 [uwinnipeg.ca].

    --
  • Take a look at edna [freshmeat.net]!

    It's small, fast, light, flexible, and, in about a year of using it, 100% stable!

    Apache is wonderfully powerful, (and I love it) but do you ALWAYS need a 600 pound gorilla?

    [/plug]

  • Sorry to tell you but Krow isn't new. See this link. [slashdot.org] It looks as though he or she has had posts since December. :) Ah well.. Welcome anyway.
  • It is you who are communist. You have forced redistribution of wealth via intellectual property law. We beleive in free market copying. Who is communist again?
    Who forced you to buy CDs? And, by the way, a marketplace is a place for selling things, not giving them away.
  • by dalinian ( 177437 ) on Sunday April 08, 2001 @07:09AM (#307388)
    No Ogg Vorbis [xiph.org] support?
  • Why not make this thing talk to mojonation? That way you could stream everybody's mp3's from all over the net. RIAA beware! Hell, go a step further and make a mod_mojo. Provide an easy deployment for mojonation and get around all those pesky firewall issues...
  • But Yogi, the RIAA won't like that.

    Hey Booboo! Whatcha got in that pic-a-nic server?!

    I'm smarter than the average 1337 /.'er.
  • I believe they are being sued by the state of Louisanna and by the parents of Colubine. Hmmm, actually I believe another gun manufactor and not S&M is being sued but for the same reason you stated above in your comment. The gun manufactors are being sued for causing voilence. Thanks to the hordes and hordes of new layers coming out of law school, you can be sued for just about anything. In the movie the devils advocate I recall hearing that there are more law students in college then actual lawyers ( don't know if its true ).

    To win a court case all you need are some emotional arguements and alot of lying or pointing to facts that have nothing to do with your case but can be used to make it apear different otherwise.

    Ex. John Ashcroft: "All the students who killed played violent video games?". What can we picture hear? It makes you think that video games actually cause violence. Fact: "%96 of all kids paly violent video games anyway". Now we have the truth in. If you listened in court to the previous argument by Ashcroft day in and out without the facts, you will atcually believe him. Simple physcology.

    Keep in mind we are technical and know the difference between a mod and part of a whole program but does a jury know ? They go to sleep when you talk technical. After hearing the words "thieves and pirates" and charts of record comapnies losing pofits, its no suprise whom they will believe. Keep in mind the RIAA has tons of laywers and apchace couldn't afford more then 1 or 2. WIth clever arguements by superb lawyers the RIAA could win this hands down.

    Anyway, the state of Louisanna sued S&M because New Orleans is a high violence city and it was very expensive to clean up the corruption taht Smith and Wesson some how caused. The supreme court rules in favor of Smith and Wesson but I believe the case with Colubine parents suing a particular gun maker is currently being appealed. I am not into guns so I do not know the name of the gun maker. However I know for a fact they were sued and colubine won.

    Hollywood media companies are nuts and they will stop at nothing to destroy whatever gets in their way. They love power. Just look at Decss. Even though 2600 did not ever write the code, they got sued! All they did was point a link. The RIAA could figure a clone would appear and unless they go after the head, this will never stop.

    If the riaa is sueing ISP's then no doubt they will sue apache for assitance. All they need is proof that apache knew about it and aproved of the mod. Remember that you can write apache modules without apaches approval but if they link your mod or recognize it existed they are screwed for not stoping them. According to the napster case, all you need to do is not go thru extra recautions and you can be sued for assitance. This is how all these other file swaping companeis are complying or going belly up. The results of a case is like a word of god to a lawyer. This is why imesh is being sued and has stopped RIAA un-approved files on there system. They are not an American company but they just quoted the napster case and they relised they an not fight back because its written in stone unless a higher court overturns it.

    I will wait for 6 months, when slashdot runs a story about apache being in trouble I will link this comment and laugh and watch my karma rise. Do not say I didn't warn you.
  • You are right. All you need is some proff that teh apache knew about this mod and linked it in their website or acknowledged it as part of their distribution. The naspter case proves in stone in lawyer speak that all you need to do is know about something and if you did not stop it, your guilty. This is what RIAA is using to blackmail all the isp's and file swaping services. An ignorant jury will not understand why apache mentioned its existance and linked to and didn't stop it. Its no different then with napster when the CEP decided not to stop users from voilating coprights. The riaa proved that it was the ceo's fault.

    This is alittle different then with using an api since Microsoft deosn't link or distribute napster.

    However a Canadian company was according to RMS was sued out of existance for suing an API!! Sad but true.

    They comapny was small and didn't couldn't afford a enough lawyers. Same thing will happen with apache. Just look at whom the RIAA sues?

    They sue first and aks questions later. THis is how they get work doen. Apache is dirt poor compared to them.
  • I was under the impression that the RIAA has nothing to do with the DVD region locking insanity.

    I thought it was the MPAA, CCA, and co-conspirators.
  • You are so wrong, and so desperately trying to be right, it's almost comical.
    • the fruit-copies won't be identical
    • nobody "invented" or "wrote" fruit
    • just like with buying and growing fruit, you are free to buy music, make your own interpretation of it (i.e. learn to play an instrument and sing, then make your own version of the song) and sell that (as long as you pay royalties, which is not really all that different from having to pay for the land/food/water that you'll need to grow "copies" of your fruit).
  • Do you know anything about plants? The clones _will_ be identical,

    Genetically identical, but not physically identical. This in contrast to software (programs, music, video), where each copy is completely identical to the original in each and every way.

  • You are the moron. I suspect you are not fucking though.
    No, of course changing some bits isn't going to make it legit, since the other parts (that you didn't change) are still copyrighted. You would have to change everything in order for it to be legit. At that point, you have effectively rewritten the application.
    To come back to the fruit-analogy: you will have rewritten the application using the same basic building blocks (the CPU instruction set), just like the cloned fruit will be different, but consist of the same building blocks (the genes).
  • Copyrights are the lifetime of the author plus 120 years. This is infinite time for all practical purposes since the copyright will outlive us

    You've heard of classical music, right? Oh, you don't like classical music? Well that's just too bad. I guess you *will* have to wait a little then before you are allowed to copy the latest Britney Spears album...

  • Maybe it is me but as nifty as this is, it seems a bit over kill. To my knowledge each apache process can only serve one client and so each person that listens in will use up an apache process. I dunno just feels like using MS word to write a shell script. (but when is using the right tool for the job any fun?)

    Leknor

  • Why stream?

    I can construct a playlist for my own webserver, and simply "stream" the songs that way. I do this all the time at work b/c the radio reception in my lab sucks.

    http://my.server.wherever/mp3s/artist/album/song.m p3 works fine for me!
  • Apache will never die ! -- Babes for the geek: babes.foobla.com [foobla.com]
  • by Zeinfeld ( 263942 ) on Sunday April 08, 2001 @07:33AM (#307401) Homepage
    The net is not much of a threat to the RIAA compared to my Archos MP3 jukebox. With the net you get to swap a track at a time and the transaction is inherently observable.

    With the archos device I have a 6Gb hard drive that is slightly smaller than a walkman and connects to a PC via USB. To the PC it looks just like a hard drive (I often use it to swap large files between office and home, it is much faster than burning a CDROM and bigger capacity).

    Unlike the crappy SDMI influenced systems the archos device allows tracks to be copied to or from the drive.

    With napster or any net based system it would take weeks to snarf a thousand tracks. With the archos device the CD collection becomes the unit of exchange. I have 120CDs on mine, I could copy them onto someone else's machine in about 10 minutes and then replace them by 120 from their collection.

    Interestingly enough this probably passes for 'fair use' as currently understood

    I am not currently disposed to do this, I believe that artists have a right to an income. However the RIAA is making it harder and harder for folk like myself to be influential. Ultimately the only means by which laws are observed is if there is a general consensus that they should. The RIAA made it very difficult for me to sympathize with their position after their legislative grab for the 'returned rights' that previously belonged to their artists. Meanwhile the DVD 'zone control' system is designed to maintain differential pricing across markets - Europe will pay most, Asia least.

    The RIAA need to understand that buying congressmen and legislation will be counterproductive.

  • Hey good work. Make it a bender plug in, then you've got a winner...people can discuss songs, post their own mp3s to the diary, maybe even pay the artist some spare change

    james
  • Different heads of the Beast, but the same words come out of all of them. "Vital to the economy... small amounts of fair use hide massive abuse... only protecting our poor widdle content creators..."
  • Heck, we were running .au jukeboxen on the St Andrews University campus LAN back in 1991. College admins might say the right words about respecting copyright, but they're pragmatic beasts. Better to have it streaming privately inside the LAN than tying up the outside links and exposing your user's piracy.

    Makes sense for ISP's too, come to think of it. It might even be cheaper for them to license music and provide jukeboxen than for them to buy the external bandwidth to suck in multiple dodgy Napsterised copies of it (while their common carrier status is steadily eroded by doofus circuit judgements).

  • Well, first they'd have to prove the Apache Group had anything, whatsoever, to do with the development of mod_mp3

    Sure, but if the corps launch a frivolous suit and are lucky enough to get a circuit judge who's dumb enough to allow the case (plenty of precedent), it'll cost Apache a pile in legal fees to "prove their innocence", compared to chump change for the corps. Dumb fucked up legal system. The corps don't have to win cases, they just have to bleed their target dry defending it.

    To go after the Apache Group for mod_mp3 is very much the same idea as going after Microsoft because Napster uses the Win32 API.

    Or to go after an ISP because it's users have been serving/pulling down kiddie porn or warez. Ludicrous! It'd never get to court! No... wait a minute...

  • I'm working on a project where I'd like to use my palm as the interface and the box it's connected to (via serial) as a server. We can do PPP so anyone has suggestions? Web pages can be displayed but that's pretty much it. There is the PalmAMP plugin for xmms but I'd like to run my box in text mode as it has no monitor attached at the moment. What kind of clients are available out there other than web clients?
  • I will check this out. I'm noticing that maybe mod_mp3 makes it hard to run ./httpd stop on OpenBSD? Seems the httpd processes hang out not dying and mod_mp3 still streams mp3s. DIE! It's easiest to reboot. I notice when stopping apache the mp3s are reloaded. I'm also noticing that winamp does the best job of streaming. I see much less disk access when using it as opposed to Real Player which really seems to hog the disk? Probably Real doesn't like shoutcast. Looks like very good care was taken to use physical memory or something because performance and load stay pretty nice, though it would be interesting to do bandwidth negotiation to determine stream based on connection like Real does (ugh). Because 128kbps 44khz stereo doesn't work so well via NetZero! Not sure if this would involve mutiple mp3 encoding for each file? Does this deal mean you can broadcast on port 80 without affecting your web pages? I'm not so up on .htaccess - will have to check out. I definitely think it's better than having to set up a VirtualHost which seems to break the initial apache web server on port 80.
  • According to someone I know who absolutely refuses to post (silly lurkers), webplay [sourceforge.net] by sourceforge [sourceforge.net] is a much more streamlined streaming mp3 werver than the apache one. He says "an entire vhost per playlist is too much overhead".

    Don't ask me about it, though-- I'm no computer engineer. ;)
  • Most Classical music is still copyrighted and very expensively so.

    Because it's played from sheet music there are several copyright issues to deal with: the actual music or the original text the composer wrote, which although it may no longer be copyrighted, it nevertheless remains the physical property of some estate. This music is periodically edited, often to account for changes in instrumentation/music hall sizes.

    Most people, when they hear Beethoven's symphonies, are not hearing the original version: Mahler edited the text to exploit the larger music halls which came into fashion. He added instruments and "beefed up" the sound.

    Also, there is a copyright on the actual typesetting of the notes as they appear on the paper (yes this is very lame). All of these are copyrighted for the life of the author plus some ungodly length of time (I think it's 50 years, actually, instead of 120, but the law may have changed)

    So the bottom line is that if you wish to play a classical music piece you will have to pay up the wazzoo for the music.

    Case in point:

    My mother plays in a semi-professional local orchestra. There's a core group of musicians who get a couple hundred dollars per performance, surrounded by a larger group of volunteers. The licensing fees for the sheet music amounts to, on average, $5000 per perfomance. That's for each piece of music played. Since they have about five concerts a year, each performed twice, and each containing about 5 musical selections, that amounts to about $250,000 a year in copyright fees that this community orchestra must pay. This is by far the biggest artificial hurdle that local symphonies face in trying to stay afloat, since the difference between red and black is often much smaller. Why non-profit organizations must pay these fees is beyond me. Also, the debate over government funding of the arts is really silly in comparison to the huge sums sent to the estates of dead composers, who often control the above copyrights. I would much rather if the government just got out of the way and refused to enforce these monopolies instead of requiring community symphonies to pay outrageous amounts, and then throwing them a few bucks in NEA grants with loads of strings attached.


  • I've just got a symlink in my /var/www directory to my mp3 directory on my webserver. and when I want to stream music off of it, I just flip open konqueror, go to my webservers mp3 directory and drag & drop all the songs I want onto my xmms playlist. someone tell me what the hell is wrong with that? "Tell your boss what you think of him, and the truth shall set you free"
  • I know shoutcast [shoutcast.com] isn't open source, but they manage to stick it Time Warner/AOHell whenever possible, so I feel good about using it.

    Besides, I found it was far more stable than icecast [icecast.org], although I still keep an eye on their development.
    You just drop your mp3's into a directory and can provide on-demand content.

    Shameless somewhat on-topic plug below :P

  • Ja, MAES ist wunderbar It had a rough start, being a fix to the inferior MyMP3. Since then, it's gained some serious ground and now it's very impressive. Custom playlists, individual accounts, and full ID3 support/searching make this a worthy utility that all MP3 fans should use. With a little hacking, it should be easy to add support for other HTTP-streamable formats such as RealAudio/Video.
  • His password is "clemency-is-for-pussies"

Reality must take precedence over public relations, for Mother Nature cannot be fooled. -- R.P. Feynman

Working...