[Web4lib] converting MP3 to streaming audio

John Millard millarj at lib.muohio.edu
Tue May 31 13:07:58 EDT 2005


We've been using the free mod_mp3 module for apache to dynamically  
create the m3u file from a single mp3 and stream it.  A little php  
script sets it all up.
The advantage is that all you need to do is create the MP3 and let  
mod_mp3 do the rest.

Here's the code we use (with comments):

---
$string = "$mp3_path_and_filename;
     #The absolute path to the mp3 file

$string = md5($string);
     #creates the md5 hash that mod_mp3 uses

header("Location: http://audio.lib.muohio.edu:8000/?op=m3u&song= 
$string");
     #redirects to the mod_mp3 streamer listening on port 8000

---

Hope that helps,

John
-----------------------------------------------------------------
John Millard
Digital Initiatives Librarian
Miami University Libraries
Oxford, OH 45056



On May 31, 2005, at 12:40 PM, Breakall, Scott wrote:

> John,
>
> The simplest way to accomplish this is to upload the MP3 file to  
> your server, then create an M3U (playlist) file that points to the  
> MP3 and upload it, and create a link on your web page to the M3U  
> file.  The user clicks on the link to the M3U file, which calls up  
> the MP3 file and actually starts the stream.  The MP3 file will be  
> loaded and played in the user's default MP3 player (could be WMP,  
> RealPlayer, iTunes, Winamp, etc.).
>
> Detailed instructions for creating the M3U file can be found near  
> the bottom of this page (#1 Google hit for "mp3 stream m3u"):
> http://www.transom.org/tools/webaudio/200403.mp3_streaming.html
>
> ~Scott~
>
>
>
>
> -----Original Message-----
> From: web4lib-bounces at webjunction.org [mailto:web4lib- 
> bounces at webjunction.org] On Behalf Of John Fitzgibbon
> Sent: Tuesday, May 31, 2005 4:57 AM
> To: web4lib at webjunction.org
> Subject: [Web4lib] converting MP3 to streaming audio
>
>
> Hi,
>
> I am making an MP3 file available for download from our website. We  
> would also like to make the file available as streaming audio to  
> allow users to listen to portions of the file without having to  
> download the entire file first.
>
> How can I convert this file to streaming audio?
>
> Also, I would like the file to be available as streaming audio to  
> users of Windows Media Player. I wish to avoid forcing people to  
> download additional software such as Real Player (Windows Media  
> Player comes pre-packaged with the Windows Operating System which  
> many computers run
> anyway) to access the file in this way. Is this possible?
>
> Finally, to deliver streaming audio, is special software required  
> on the server or is it simply a matter of uploading the file on the  
> web server and creating a link that will point to it?
>
> Any ideas would be most welcome.
>
> Regards
> John
>
> John Fitzgibbon
>
> Galway Public Library
> Island House
> Cathedral Square
> Galway
> Ireland
>
> p: 00 353 91 562471
> f: 00 353 91 565039
> w: http://www.galwaylibrary.ie
>
> *******************************************************************
> Tá eolas atá príobháideach agus rúnda sa ríomhphost seo
> agus aon iatán a ghabhann leis agus is leis an duine/na daoine sin  
> amháin a bhfuil siad seolta chucu a bhaineann siad.
> Mura seolaí thú, níl tú údaraithe an ríomhphost nó aon iatán
> a ghabhann leis a léamh, a chóipáil ná a úsáid.
> Má tá an ríomhphost seo faighte agat trí dhearmad,
> cuir an seoltóir ar an eolas thrí aischur ríomhphoist
> agus scrios ansin é le do thoil.
>
> This e-mail and any attachment contains information which is
> private and confidential and is intended for the addressee
> only. If you are not an addressee, you are not authorised
> to read, copy or use the e-mail or any attachment.
> If you have received this e-mail in error, please notify
> the sender by return e-mail and then destroy it.
> *********************************************************************
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
>



More information about the Web4lib mailing list