In response to many requests from friends and fellow musicians, I'll try to explain the process of setting up mp3 streaming from any site. A Virtual Jukebox (AVJ from here on in) was built on my home PC under Windows 98 employing a Brisbane (Australia) ISP. There are over 80 available audio file formats to choose from, most of which want you to pay big $$ (for a starving muso/student anyway!). I wanted to build a system that cost nothing - and I succeeded. This system can be made to work employing free downloadable programs. The only costs involved are your normal Internet Service Provider (ISP) service charges and I assume you've got those under control or you wouldn't be reading this!
Those running Macs or PCs under different platforms may have to dig a little deeper regarding the instructions and links etc. I have to assume that you already have a homepage and are familiar with how to upload (via FTP) files to your site held at your ISP.
Firstly, you'll need:
Links are provided for further research.
Preparing your .mp3 files:
Firstly, you need to create a wave (.wav) file of each track. Your mp3 files are created from these wave files. If your tracks are on CD you'll need a 'ripping' programme such as Audiograbber to create wave files from an audio CD.
CD track -->wave file -->mp3 file + ID3 tags
You need to generate a 'lo-fi' - 24 kilobytes per second (kbps) - mp3 file of each track you wish to stream. I used Steinberg's Wavelab 3.0 to create my .wav files and then encoded them as mp3 files. There many free downloads of mp3 crunchers available: try mp3.com / tucows.com / filefarm.com.
It is important to identify these mp3 files properly: most players allow you to attach information such as album title, artist, track name, copyright, date etc. via an ID3 tag editor. When playing mp3 files directly, as you do from this CD-ROM for example, the track name and artist information entered in these ID3 files 'scrolls' across the player's window as the track plays. When streaming the mp3 via the internet, this 'scrolling' viewer gets its information from your .m3u file (explained below).
Make sure that you add the extension .mp3 to each file, check your ID3 tag information,then upload your mp3 files to your server - this process is the most time consuming so be patient. I had a bit of trouble when I attempted to stream mp3s from a dedicated 'MP3' folder under my main index directory. I would suggest you upload them to the same directory/folder that yourindex.html (the opening page of your website)file resides in. Once uploaded, check that those files are actually appearing on the net as URLs: Using Winamp, open the playlist editor>add URL and type in the string to where your mp3 resides. Your computer should attempt to download these files - try it and see what you get. As an example, here's the path to Phil Manning's "Weary Traveller" mp3 file that is incorporated in AVJ : http://www.xenon.net/~swamprat/Weary_Traveller.mp3
NOTE:use underscores ( _ )notspaces.I found out the hard way that UNIX servers won't recognise spaces.
While 24kbps mp3 files sound pretty rough, I figured that they're OK for audition-only purposes and that they would stream on the slowest internet connections. If you're into cable or LAN etc. try all of this with hi-fi 128kbps files - the difference is extraordinary! The choice of lo-fi=24kbps and hi-fi=128kbps was modelled on mp3.com
Once you're comfortable that all is well and that your mp3s are sitting nicely on your ISP's server it's time to look at preparing the .m3u playlist files.
Back to top
Preparing your .m3u playlist files:
.m3u files are the key to audio streaming: by supplying a URL, they instruct your computer where to go to find the actual .mp3 file. Now we don't want to give away our music do we? My aim with AVJ was to build a site where the public could 'look but don't touch' or, more precisely, 'listen but don't download'.
After months of research via net-surfing (some links are included below) and discussions with experts (my thanks must go to Brad, from customer support at Xenon Internet) I took a closer look at the elusive .m3u file. One of my favourite streaming radio sites is at http://www.louisianaradio.com/ - try it if you're into swamp, blues and cajun music! When I clicked on the link to them, I was asked whether to 'open it' or 'save to disk' the .m3u file that took me to their site. I downloaded it and studied it: it's a little more difficult than meets the eye - if you double click (to open) this .m3u file, it wants to take you there and fire up Winamp etc. All I wanted to do was see inside it - what made it tick?
.m3u files are very small text files made in any simple text editor - in my case (PC) Wordpad or Notepad. Most PC/Windows users will have one of these text editors installed (try start>programs>accessories>notepad.exe). To open an .m3u file as text, select (single left click and highlight) the .m3u file and then, while holding, right-click on the file. Select 'open with' from the menu and your standard 'open with' window appears. Scroll down the available programs and double click on Notepad (or Wordpad). The .m3u file should now open - revealing the textual contents.
When I opened loiusianaradio,com's .m3u file, this is what I got:
#EXTM3U
#EXTINF:-1,louisianaradio.com: blues, jazz, cajun, zydeco, gospel, swamp pop and more...
http://207.152.1.16:7775
I'll repeat it now with certain elements in various colours for analysis purposes:
#EXTM3U
#EXTINF:-1,louisianaradio.com: blues, jazz, cajun, zydeco, gospel, swamp pop and more...
http://207.152.1.16:7775
I'm not sure what this blue section represents so I didn't fool with it !
The red text is the message that scrolls across across the little window at the top of Winamp as the file buffer builds up.Replace this with your message
The green line is the URL (in this instance as a numerical value) where the actual mp3 file is stored.Substitute your mp3's URL here.
Again using theWeary Travellerexample, this is what my .m3u file looks like:
#EXTM3U
#EXTINF:-1,downstream.cjb.net - fine original jazz and blues
http://www.xenon.net/~swamprat/Weary_Traveller.mp3
NOTE: again use underscoresnotspaces
Save the file with the extension<.m3u>instead of the normal<.txt>extension. Your computer may warn you that 'this file may become unstable' (or words to that effect). Ignore this and save it with the same title (except for the extension of course) as the actual mp3 file. Upload to your server in the same directory/folder as your mp3. You should now have two files sitting on your server -.mp3 and.m3u. I noticed that once I had stored my .m3u file with the extension (.m3u), Winamp 'grabbed' it - via file association - and applied its icon to it. It was now an official Winamp playlist file! Test this file by double clicking on it - it should boot up Winamp (or your chosen player), begin to build up it's buffer memory and then play once the buffer has reached 100%.
When you are linking to the track you want to stream, link to this .m3u file - not the .mp3 file. When you click on the link, your computer opens the .m3u file and is in turn told where to go to stream the .mp3 file.
Here's what your finished .m3u filemaylook like:
#EXTM3U
#EXTINF:-1,
http://www./~/.mp3
Back to top
Your Internet Service Provider
Take a look at the file sizes of Weary Traveller:
- Original .wav file = 44,181,712 bytes = 44.2 Megabyte
- .mp3 hi-fi (128kbps) file = 4,008,748 bytes = 4.0 Megabyte
- .mp3 lo-fi (24kbps) file = 753,257 bytes = 0.75 Megabyte
Notice that the hi-fi .mp3 is approx. one eleventh the size of the .wav file, and that the lo-fi .mp3 is approx. one fifty-eighth the size of the .wav file!
Despite the massive reduction in size via mp3 encoding, they are still relatively large files. You'll easily exceed the space allocated to you for your homepage by your ISP (typically 10 or 20 Meg) if you're not careful. As well as this, imagine the load on your ISP if one thousand people hit on your site and began streaming simultaneously - this would result in a massive reduction in the server's available processing power and a massive reduction in bandwidth. They hate this!
After many discussions regarding technical aspects etc.with my friends at Xenon Internet increased my homepage site allocation to 50 Meg at no charge and agreed to make the slight file association changes necessary at their end to allow mp3 streaming. They are also interested in establishing a music-based site similar to mp3.com and were interested in seeing the outcome of my experimentation.
Talk to your ISP - will they support mp3 streaming? Bandwidth restrictions? Will they 'play ball'? All I can say is "Good Luck" (particularly if you are with Telstra's BigPond)
Back to top
Be patient!
It took me months to evaluate over 80 audio file formats available to transfer music over the 'net.
I hope the above explanation is clear - I've tried to make it as simple as possible.
If you're stuck email me here and I'll attempt to help you.
Any corrections / information / updates / comments / advice would be welcome.
Happy mp3 streaming! The Swamprat
Back to top
Links
Here are some links that may help you or shed light on a tricky and sometimes bewildering subject:
Animated Screen Capture shows how to associate WIN98's Mediaplayer with MP3's and M3u's
http://kingtet.com/mplayer2.htm
Digital AudioSystems -technical
http://www.iocon.com/das/technical_str.shtml
Want to be webcaster and build your own internet-based radio station?
http://www.shoutcast.com/
Other systems:
The home of Real Producer Plus
http://www.realnetworks.com/products/producerplus/info.html?src=000831realhome,smkit_080400
An alternative streaming method - Crescendo
http://www.liveupdate.com/css.html
Back to top
Server Configuration
A good ISP server will probably have the server configured properly, but if you have any trouble, then you may have to contact your ISP provider or web-master. A typical problem with server configurations would be clicking on a link and a browser window popping up, filled with garbage text.
The server configuration revolve around one issue - application association. Before a server directs ANY file to your computer through the web, it first tells your computer what kind of file it is and if any specific program should be used to open the file. For example, your server tells your computer that all files with extension HTML or HTM should be opened using your web-browser. A few low-budget ISP's may not have configured their server to recognize files of extension MP3, M3U, VQF, etc.
If you have trouble with either one, be sure to contact your ISP provider or webmaster. They may ask you to post an additional file labeled ".htaccess". The period in front is important. (You could try posting this on your on.) This file tells the server how to handle files with specific extensions and whether or not to associate a browser plug-in or application with them. The file must be posted in the same directory, or higher, as the audio files. Any subdirectories
within the same directory as the .htaccess file, will "inherit" the same settings. My .htaccess file looks like this:
AddType application/octet-stream mp3
AddType audio/x-mpegurl m3u
AddType audio/x-twinvq vqf
AddType audio/x-twinvq vql
AddType audio/x-twinvq vqe
The first line tells the server that files with the extension MP3 are applications that must be downloaded in binary form - they are not ASCII text or HTML code. The second line associates files with the extension M3U with the default audio player. The last 3 lines tell the browser that the files of those extensions are associated with file type "audio" and to use the plugin "twinvq" to play them. These last 3 lines are very similar to the code provided on Yamaha's site.
Although, you may not have to do this, I have included it for the few who may need it. Again, first ask your webmaster and ISP if you have any problems. It won't hurt to add the above ".htaccess" file, even if the server doesn't recognize it.
This section was reproduced from the articlehere
Back to top