WEB SITE AUDIO FORMATS AND STREAMING

Any audio on your computer or web site is going to be in a digital or 'file' format. Digital audio is electronic files - 1's and 0's. CD's and mp3's are digital forms of audio.

Digital audio comes in several file formats and within each format there are many Codec's (from COmpression-DECompression).

Some formats require special streaming software on a server to play on a web site and others don't.

Streaming is where the file starts to download, then begins playing as the rest of the file downloads. This prevents the user from having to wait until the whole file downloads before being able to listen to it.
 

Audio Formats

Each format has an associated file extension, such as .wav, .mp3, .wma, etc. To be able to see the file extensions on your Windows XP computers go to the Control Panel, click on Folder Options, click on the View tab and uncheck "Hide extensions for known file types"

First, native file formats:

Waveform (.wav) is a format that is used on Windows computers.

Audio Interchange File Format (.aiff) is used on Apple computers.
 

Internet Media File Formats

Sound or video on the Internet is compressed using a Codec to shrink the file and let it download or stream faster.

When a sound file is broadcast from a web site, the computer on the other end has to have compatible software to play it, either a plug-in installed in the web browser or a separate player.

"The best format for instant audio online is Macromedia's Shockwave."

The file extension is .swa for Shockwave Audio and .swf for Shockwave Flash. The Flash plug-in is installed on about 98% of browsers and is the most widely used of the instant audio formats.

It does not require a special streaming server to stream from your site. Two programs we recommend use the .swf format without having to spend the $499 for Macromedia's Flash MX 2004.

NOTE: Video formats can carry video, video and audio, or just audio. Audio formats cannot carry video. Many times a video format will be used for audio streaming.

Microsoft's Windows Media uses the .wma format. It can play in a browser or in the separate Windows Media Player which is on every Windows computer.

RealNetworks RealMedia is trying to be the dominant format. It uses the .ra and .ram file formats and also can be used with a plug-in or separate player.

Apple uses QuickTime which is generally based on the MPEG (Motion Picture Experts Group) format. MPEG layer 3 (.mp3) is the audio portion on the MPEG video format. Quicktime also uses the newer AAC audio format found on it's iPods, but it's not really suitable for web site streaming.


Codec's And Other Parameters

If you want to prepare your own files for streaming, there are certain parameters that you must choose...

Stereo or Mono - mono for voice and music clips, stereo for longer music files.

Sample rate in KiloHertz (KHz) - How often the audio is sampled, usually 8. 11, 22 or 44 KHz. You should generally record voice in 22 KHz, music in 44 KHz. You can always compress it down when you convert it. Voice on the Internet is usually 8 or 11 KHz.

You may also have to select 8 bit or 16 bit - the amount of information in each sample. Voice should be 8 bit.

Streaming rate (bitrate) in kilobits per second (kbps) - for audio you want to stream at the lowest common denominator while still maintaining decent quality. Dial-up users on a 28.8K connection can download at about 24 kbps, so that's the rate you should use for audio.

Codec - Some formats, like Flash and mp3 have a single Codec by default. Others, like Windows Media, have many options that increase as newer and better compression algorithms are designed.

The problem is compatibility. For example, Windows Media Player 10 is now available, but many web surfers may still be using Media Player 7. Using newer Codec's will require the user to download the new Codec before being able to listen to the sound file. The same thing goes for versions of the Flash Player Plugin.


Streaming Audio

You have two options for streaming - from your own web server or from a dedicated streaming server. The advantages of using your own server are the control you have and the money you save, since you are paying for a web site anyway.

But, you will have to use a format that does not require special streaming server software and pay for the bandwidth used if you are getting a lot of hits.

A commercial streaming server has the advantage of being set up close to a major Internet backbone for faster streaming, the software required and the bandwidth needed for high demand.

Most streaming server software will monitor the reception rate and adjust if possible.

A commercial streaming server is almost a requirement for streaming video, but for audio you can generally get by using your own website server.

Streaming .mp3's using .m3u

While MP3's won't stream (they fully download, then play) there is a way to stream them using the .m3u file extension. Essentially it's a simple text file with a list of links to one or more mp3's. For example, open Notepad, type in the address of an mp3 on your server such as http://www.mydomain.com/audio/filename.mp3 and save it as playlist.m3u instead of playlist.txt. When a visitor clicks on the .m3u link the mp3 will stream.

For the link, let's say you have audio files in a folder called audio on your web site. You created a playlist.m3u with links to one or more of the audio files. To create a link on your web page, the html code would look something like this:

<a href="/Audio/playlist.m3u?Play+All=1;playlist=1">Stream me!</a>

It's not quite that simple, though. You have to be using a Linux server with Apache and make some configuration changes that are explained here.

<<Previous

Continue>>

 

Website Audio logo